A Principled Approach to Concurrency, Nondeterminism, and Asynchrony in Choreographies
Xueying Qin, Marco Peressotti, Fabrizio Montesi
Abstract
Choreographic programming (CP) describes a distributed system as a global program and compiles it into communicating network programs via endpoint projection (EPP). Asynchrony captures the independent progress of communicating processes, while nondeterminism captures the range of behaviours that can arise from their interactions. However, the integration of both features into a theory of CP is absent. We present Nyarlathotep, the first asynchronous nondeterministic CP framework. We define its operational semantics of choreographies and networks using labelled transition systems. Besides asynchrony and choreographic nondeterminism, Nyarlathotep supports expressive features including general branching, out-of-order execution, and general recursion with parameterised procedures that processes can enter independently. We prove EPP sound and complete, establishing strong behavioural equivalence between the semantics of choreographies and their projected networks. We prove that projected networks are communication-safe and deadlock-free. We mechanised all our results in Lean 4.
Create a lesson
Related papers
You Have Mail: Set-Theoretic Types for Actors
Giuseppe Castagna, Luca Padovani, Daniele Varacca et al.
Sightline: Calibrated Data-Flow Summaries for LLM-Integrated Applications
Zihao Xu, Yuekang Li, Ruitao Feng et al.
Tenon: A Unified Programming Framework for Retargetable PIM Compilation
Niansong Zhang, Shiran Guo, Zhiru Zhang
Mode Inference for Substructural Adjoint Types
Sophia Roshal, Frank Pfenning
Validating Concurrent Correctness Witnesses with Ghosts by Thread-Modular Abstract Interpretation
Michael Schwarz, Zhendong Ang, Umang Mathur
When Is Program Structure Required? Certificate-Grounded Calibration of Program-Induction Difficulty
Wenzhang Du