Disentanglement with Futures, State, and Interaction
Jatin Arora, Stefan K. Muller, Umut A. Acar
Abstract
Recent work has proposed a memory property for parallel programs, called disentanglement, and showed that it is pervasive in a variety of programs, written in different languages, ranging from C/C++ to Parallel ML, and showed that it can be exploited to improve the performance of parallel functional programs. All existing work on disentanglement, however, considers the "fork/join" model for parallelism and does not apply to "futures", the more powerful approach to parallelism. This is not surprising: fork/join parallel programs exhibit a reasonably strict dependency structure (e.g., series-parallel DAGs), which disentanglement exploits. In contrast, with futures, parallel computations become first-class values of the language, and thus can be created, and passed between functions calls or stored in memory, just like other ordinary values, resulting in complex dependency structures, especially in the presence of mutable state. For example, parallel programs with futures can have deadlocks, which is impossible with fork-join parallelism.
In this paper, we are interested in the theoretical question of whether disentanglement may be extended beyond fork/join parallelism, and specifically to futures. We consider a functional language with futures, Input/Output (I/O), and mutable state (references) and show that a broad range of programs written in this language are disentangled. We start by formalizing disentanglement for futures and proving that purely functional programs written in this language are disentangled. We then generalize this result in three directions. First, we consider state (effects) and prove that stateful programs are disentangled if they are race free. Second, we show that race freedom is sufficient but not a necessary condition and non-deterministic programs, e.g. those that use atomic read-modify-operations and some non-deterministic combinators, may also be disentangled. Third, we prove that disentangled task-parallel programs written with futures are free of deadlocks, which arise due to interactions between state and the rich dependencies that can be expressed with futures. Taken together, these results show that disentanglement generalizes to parallel programs with futures and, thus, the benefits of disentanglement may go well beyond fork-join parallelism.
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 b488a9bc-4e56-4943-8a99-12971db33407Cited by top-tier papers1
Ask how each one uses itBuilds on6
- Disentanglement in nested-parallel programsSam Westrick, Rohan Yadav, Matthew Fluet, Umut A. AcarPOPL 2020 · 19 citations
- Responsive parallelism with futures and stateStefan K. Muller, Kyle Singer, Noah Goldstein, Umut A. Acar et al.PLDI 2020 · 12 citations
- Parallel determinacy race detection for futuresYifan Xu, Kyle Singer, I-Ting Angelina LeePPoPP 2020 · 11 citations
- Provably space-efficient parallel functional programmingJatin Arora, Sam Westrick, Umut A. AcarPOPL 2021 · 9 citations
- Efficient Parallel Functional Programming with EffectsJatin Arora, Sam Westrick, Umut A. AcarPLDI 2023 · 6 citations
Related papers
- DisLog: A Separation Logic for DisentanglementAlexandre Moine, Sam Westrick, Stephanie BalzerPOPL 2024
- Language-Agnostic Static Deadlock Detection for FuturesStefan K. MullerPPoPP 2024 · 1 citation
- 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
- Pipelines and Beyond: Graph Types for ADTs with FuturesFrancis Rinaldi, june wunder, Arthur Azevedo de Amorim, Stefan K. MullerPOPL 2024
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational TheoryYuyan Bao, Songlin Jia, Guannan Wei, Oliver Bracevac et al.OOPSLA 2025 · 3 citations
