Language-Agnostic Static Deadlock Detection for Futures
Stefan K. Muller
Abstract
Deadlocks, in which threads wait on each other in a cyclic fashion and can't make progress, have plagued parallel programs for decades. In recent years, as the parallel programming mechanism known as futures has gained popularity, interest in preventing deadlocks in programs with futures has increased as well. Various static and dynamic algorithms exist to detect and prevent deadlock in programs with futures, generally by constructing some approximation of the dependency graph of the program but, as far as we are aware, all are specialized to a particular programming language.
A recent paper introduced graph types, by which one can statically approximate the dependency graphs of a program in a language-independent fashion. By analyzing the graph type directly instead of the source code, a graph-based program analysis, such as one to detect deadlock, can be made language-independent. Indeed, the paper that proposed graph types also proposed a deadlock detection algorithm. Unfortunately, the algorithm was based on an unproven conjecture which we show to be false. In this paper, we present, and prove sound, a type system for finding possible deadlocks in programs that operates over graph types and can therefore be applied to many different languages. As a proof of concept, we have implemented the algorithm over a subset of the OCaml language extended with built-in futures.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ae024c45-48a9-41db-8f12-8309707efddcCited by top-tier papers1
Ask how each one uses itBuilds on3
- Parallel determinacy race detection for futuresYifan Xu, Kyle Singer, I-Ting Angelina LeePPoPP 2020 · 11 citations
- Static prediction of parallel computation graphsStefan K. MullerPOPL 2022 · 4 citations
- An ownership policy and deadlock detector for promisesCaleb Voss, Vivek SarkarPPoPP 2021 · 2 citations
Related papers
- Pipelines and Beyond: Graph Types for ADTs with FuturesFrancis Rinaldi, june wunder, Arthur Azevedo de Amorim, Stefan K. MullerPOPL 2024
- Disentanglement with Futures, State, and InteractionJatin Arora, Stefan K. Muller, Umut A. AcarPOPL 2024
- Investigating the semantics of futures in transactional memory systemsJingna Zeng, Shady Issa, Paolo Romano, Luís E. T. Rodrigues et al.PPoPP 2021 · 4 citations
- A flexible type system for fearless concurrencyMae Milano, Joshua Turcotti, Andrew C. MyersPLDI 2022 · 14 citations
- Pirouette: higher-order typed functional choreographiesAndrew K. Hirsch, Deepak GargPOPL 2022 · 31 citations
