Design-by-Contract for Flexible Multiparty Session Protocols -- Extended Version
Lorenzo Gheri, Ivan Lanese, Neil Sayers, Emilio Tuosto, Nobuko Yoshida

TL;DR
This paper extends choreography automata with partial participation and assertions, enabling flexible, correct-by-construction communication protocols for distributed systems, and provides a toolchain for TypeScript API generation.
Contribution
It introduces a novel extension to choreography automata allowing partial participation and assertions, facilitating flexible and correct communication protocols.
Findings
Participants can act in only some scenarios, increasing flexibility.
Communication assertions enable design-by-contract, ensuring message correctness.
Generated APIs guarantee deadlock-free communication patterns.
Abstract
Choreographic models support a correctness-by-construction principle in distributed programming. Also, they enable the automatic generation of correct message-based communication patterns from a global specification of the desired system behaviour. In this paper we extend the theory of choreography automata, a choreographic model based on finite-state automata, with two key features. First, we allow participants to act only in some of the scenarios described by the choreography automaton. While this seems natural, many choreographic approaches in the literature, and choreography automata in particular, forbid this behaviour. Second, we equip communications with assertions constraining the values that can be communicated, enabling a design-by-contract approach. We provide a toolchain allowing to exploit the theory above to generate APIs for TypeScript web programming. Programs…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Parallel Computing and Optimization Techniques · Distributed systems and fault tolerance
