Lune

POPL2024Top-tier venue

Pipelines and Beyond: Graph Types for ADTs with Futures

Francis Rinaldi, june wunder, Arthur Azevedo de Amorim, Stefan K. Muller

Abstract

Parallel programs are frequently modeled as dependency or cost graphs, which can be used to detect various bugs, or simply to visualize the parallel structure of the code. However, such graphs reflect just one particular execution and are typically constructed in a post-hoc manner. Graph types , which were introduced recently to mitigate this problem, can be assigned statically to a program by a type system and compactly represent the family of all graphs that could result from the program. Unfortunately, prior work is restricted in its treatment of futures , an increasingly common and especially dynamic form of parallelism. In short, each instance of a future must be statically paired with a vertex name. Previously, this led to the restriction that futures could not be placed in collections or be used to construct data structures. Doing so is not a niche exercise: such structures form the basis of numerous algorithms that use forms of pipelining to achieve performance not attainable without futures. All but the most limited of these examples are out of reach of prior graph type systems. In this paper, we propose a graph type system that allows for almost arbitrary combinations of futures and recursive data types. We do so by indexing datatypes with a type-level vertex structure , a codata structure that supplies unique vertex names to the futures in a data structure. We prove the soundness of the system in a parallel core calculus annotated with vertex structures and associated operations. Although the calculus is annotated, this is merely for convenience in defining the type system. We prove that it is possible to annotate arbitrary recursive types with vertex structures, and show using a prototype inference engine that these annotations can be inferred from OCaml-like source code for several complex parallel algorithms.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on2

  1. A flexible type system for fearless concurrencyMae Milano, Joshua Turcotti, Andrew C. MyersPLDI 2022 · 14 citations
  2. Static prediction of parallel computation graphsStefan K. MullerPOPL 2022 · 4 citations

Related papers

  1. Language-Agnostic Static Deadlock Detection for FuturesStefan K. MullerPPoPP 2024 · 1 citation
  2. Formalising Graph Algorithms with CoinductionDonnacha Oisín Kidney, Nicolas WuPOPL 2025 · 2 citations
  3. Disentanglement with Futures, State, and InteractionJatin Arora, Stefan K. Muller, Umut A. AcarPOPL 2024
  4. Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect DependenciesOliver Bracevac, Guannan Wei, Songlin Jia, Supun Abeysinghe et al.OOPSLA 2023 · 14 citations
  5. Responsive parallelism with futures and stateStefan K. Muller, Kyle Singer, Noah Goldstein, Umut A. Acar et al.PLDI 2020 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines