Skip to main content
QUICK REVIEW

[Paper Review] Kickstarting Choreographic Programming

Fabrizio Montesi|arXiv (Cornell University)|Feb 9, 2015
Logic, Reasoning, and KnowledgeComputer Science21 references6 citations
TL;DR

This paper introduces Choreographic Programming, a paradigm that compiles global choreographic specifications—describing communication flows among concurrent endpoints—into correct-by-construction, deadlock-free endpoint code via Endpoint Projection (EPP). The approach enables developers to write distributed systems from a global, high-level viewpoint, ensuring correctness through formal compilation, with the Chor language and its compiler serving as a concrete realization of the paradigm.

ABSTRACT

We present an overview of some recent efforts aimed at the development of Choreographic Programming, a programming paradigm for the production of concurrent software that is guaranteed to be correct by construction from global descriptions of communication behaviour.

Motivation & Objective

  • To establish choreographic programming as a fully-fledged programming paradigm, not just a specification method.
  • To address the challenge of writing correct concurrent communication code by shifting development to a global, high-level description of communication behavior.
  • To ensure correctness by construction through formal compilation of choreographies into endpoint programs.
  • To enable practical adoption by integrating with existing systems and supporting real-world features like asynchronous operations and type safety.
  • To lay the foundation for future extensions, including exceptions, interoperability, and formal verification of implementation mappings.

Proposed method

  • The Choreography Calculus (CC) is used as a formal language model, where processes represent endpoints and sessions represent communication channels.
  • Choreographies are expressed as sequences of communication actions, such as 'p.e -> q.x:k; C', specifying message sending and continuation.
  • A syntactic swapping congruence relation $\simeq_{\mathcal{C}}$ allows reordering of independent communications, modeling concurrent execution.
  • Endpoint Projection (EPP) compiles global choreographies into local endpoint programs, ensuring correctness and deadlock-freedom by construction.
  • The Chor language implements this paradigm with support for session typing, asynchronous operations, and conditional logic, compiled to executable code.
  • The implementation uses data-based message routing (not $\pi$-calculus channels), enabling integration with enterprise frameworks and existing languages.

Experimental results

Research questions

  • RQ1Can choreographic specifications be used as first-class programs rather than just specifications, enabling full-fledged programming?
  • RQ2How can a correct-by-construction compilation process (EPP) be designed and implemented to generate executable, deadlock-free endpoint code?
  • RQ3What language features—such as asynchrony, conditionals, and session typing—are necessary and sufficient to support practical distributed programming in this paradigm?
  • RQ4How can the formal model of choreographic programming be mapped to real-world implementations using data-based routing instead of $\pi$-calculus channels?
  • RQ5What extensions (e.g., exceptions, interoperability) are needed to make choreographic programming viable in industrial-scale systems?

Key findings

  • The Chor language and its compiler successfully realize the choreographic programming paradigm, enabling developers to write global choreographies that are compiled into correct-by-construction, executable endpoint programs.
  • The use of a syntactic swapping congruence $\simeq_{\mathcal{C}}$ allows for flexible reordering of independent communications, modeling concurrency while preserving correctness.
  • Endpoint Projection (EPP) ensures that generated endpoint code is deadlock-free because all I/O actions are derived from a globally consistent choreography.
  • The integration of session typing with choreographies enables type-safe, interoperable communication protocols, with type inference and deadlock-freedom analysis supported natively.
  • The implementation of Chor using data-based message routing instead of $\pi$-calculus channels provides a practical bridge to existing enterprise systems, though formal verification of this mapping remains an open challenge.
  • The approach has already been used to build systems like AIOCJ and supports protocol generation via Scribble, demonstrating real-world applicability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.