← All papers
First page of Step in Tine: Forking Processes in Functional Choreographies

Step in Tine: Forking Processes in Functional Choreographies

Ashley Samuelson, Zonghao Zou, Andrew K. Hirsch, Ethan Cecchetti

cs.PL May 21, 2026 · v2
All metatheory of the choreographic fork calculus, including deadlock freedom and a verified type inference/elaboration pass, is formalized in Lean 4 with Mathlib.
Choreographic programming allows a concurrent programmer to write one centralized program and compile it to individual programs for each system participant. This approach simplifies critical properties like deadlock freedom, but it complicates forking new processes, a core concurrent primitive. This work addresses that gap with the choreographic fork calculus $λ{\pitchfork}$, the first functional choreographic language with process spawning. $λ{\pitchfork}$ provides a deadlock-freedom guarantee while allowing programs to dynamically determine when to spawn new processes, what they will do, and who will communicate with them. All results are formalized in Lean.

Choreographic programming guarantees deadlock freedom by compiling one global program into per-process code. Existing functional choreographic languages cannot dynamically fork new processes, a core concurrency primitive.

The authors define λ⋔, a functional choreographic calculus extending λqc. It supports process spawning alongside higher-order functions, process polymorphism, multiply-located values and first-class process names. They define a network language and endpoint projection, and introduce divergence-weakened soundness to handle multiply-located computations. All theorems and a bidirectional type inference/elaboration pass are formalized in Lean 4 with Mathlib. AI tools (Aristotle, Claude) generated the artifact from human-written paper proofs, and the authors corrected flaws before completing the formalization.

λ⋔ is proven deadlock-free, and the projection of a typed choreography never deadlocks. The Lean artifact, available on Zenodo, depends only on Lean's three standard axioms. It types, projects and runs examples such as a dynamically sized ring scheduler.