CoMPSeT : A Framework for Comparing Multiparty Session Types

Telmo Ribeiro, José Proença, Mário Florido · 2025

Read CoMPSeT : A Framework for Comparing Multiparty Session Types by Telmo Ribeiro, José Proença, Mário Florido (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-24205.txt.

Introduction

Telmo Ribeiro and two co-authors present CoMPSeT, a tool for comparing multiparty session types, a way to describe global interaction protocols for concurrent systems. Such choreographic descriptions capture valid patterns of exchange between participants, but many variants exist, each with its own features and quirks. Comparing them by reading papers alone is hard.

CoMPSeT gathers a representative set of examples and lets users combine features, animate protocols, and compare the meaning of concrete cases across variants. The tool is open source, compiled to JavaScript, and runs directly in any web browser. The authors aim to help researchers map the landscape of session types and to support teaching and further design work.

Catalog record

CREATORTelmo Ribeiro, José Proença, Mário Florido
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE52 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2510-24205

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

CoMPSeT : A Framework for Comparing Multiparty Session Types Telmo Ribeiro, José Proença, Mário Florido Abstract Concurrent systems are often complex and difficult to design. Choreographic languages, such as Multiparty Session Types (MPST), allow the description of global protocols of interactions by capturing valid patterns of interactions between participants. Many variations of MPST exist, each one with its rather specific features and idiosyncrasies. Here we propose a tool – CoMPSeT – that provides clearer insights over different features in existing MPST. We select a representative set of MPST examples and provide mechanisms to combine different features and to animate and compare the semantics of concrete examples. CoMPSeT is open-source, compiled into JavaScript, and can be directly executed from any browser, becoming useful both for researchers who want to better understand the landscape of MPST and for teachers who want to explain global choreographies. 1 Introduction Communicating systems can be described by a variety of formalisations, often differing in subtle but significant ways – such as their treatment of concurrency, message ordering, or assumptions about synchrony – which makes their analysis non-trivial. These challenges build upon the inherent difficulties in the architecture of such systems, where numerous execution flows and behaviours must be understood to ensure the absence of communication errors [ 20 ] . This paper focuses on Multiparty Session Types (MPST) , a typing discipline that guarantees communication safety and liveness in concurrent systems [ 11 ] , originally formulated by Honda et al. [ 15 ] . Session Types denote a formalism capable of verifying correctness in concurrent programs, where the well-behaviour of a protocol can be asserted through the well-typedness of its participants. The Multi party aspect generalizes the earlier concept of Binary Session Types [ 14 ] , which considered communications between only two parties. \mathcal{G}lobal \mathcal{L}ocals \mathcal{P}rocesses projected into type check Figure 1: The classical Multiparty Session Types’ framework The classical MPST framework, illustrated in Fig. 1 , begins with the specification of a global type . The global type describes the expected communication behaviour of a system from a global perspective, detailing how participants interact and how the session evolves over time, as exemplified in Example 1.1 . 1 1 1 We employ \to to denote the communication of a data type between two participants, while ~\mathbin{;}~ and \mathbin{\|} represent the sequential and parallel composition, respectively. Additionally, ! and ? highlight the direction of a communication, marking sending and receiving actions. Example 1.1 . A possible global type describing a session where a \mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}} assigns a task ( \mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}} ) to two workers, \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}} and \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}} , in this particular order. The workers are then expected to reply with a completion message ( \mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}} ) in any order. \displaystyle\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}\to\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}}:\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}}~\mathbin{;}~\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}\to\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}}:\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}}~\mathbin{;}~ \displaystyle(\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}}\to\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}:\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}}\mathbin{\|}\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}}\to\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}:\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}}) From the global specification, local types – also known as session types – may be derived via a projection operation. Each local type reflects the perspective of a single participant and contains only the actions in which that participant is involved – either as sender or as receiver – similar to the depiction in Example 1.2 . Local types can then be used to statically type-check processes implementing corresponding participants. Example 1.2 . The local types derived from the projection of Example 1.1 , where \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{AB}}}}} is used to reference both \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}} and \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}} , as they share an identical structure. \displaystyle L_{\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}} \displaystyle=\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}}!\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}}~\mathbin{;}~\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}}!\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}}~\mathbin{;}~(\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}}?\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}}\mathbin{\|}\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}}?\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}}) \displaystyle L_{\mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{AB}}}}}} \displaystyle=\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}?\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Work}}}}~\mathbin{;}~\mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}}!\mathit{{{\color[rgb]{0,0.5,0}\mathsf{Done}}}} Formally, let G be a well-formed global type involving participants \mathit{{{\color[rgb]{0,0,1}\mathsf{p_{1}}}}},\ldots,\mathit{{{\color[rgb]{0,0,1}\mathsf{p_{n}}}}} . If, for each 1\leq i\leq n , there exists a process {P_{i}} such that \vdash P_{i}:(G\mathit{{\downharpoonright_{\mathit{{{\color[rgb]{0,0,1}\mathsf{p_{i}}}}}}}}) – where \mathit{{\downharpoonright_{\mathit{{{\color[rgb]{0,0,1}\mathsf{}}}}}}} denotes the projection of G onto participant \mathit{{{\color[rgb]{0,0,1}\mathsf{p_{i}}}}} – then the composed concurrent system (P_{1}\mid...\mid P_{n}) is guaranteed to be both safe and live [ 8 ] . Here, the projection operation must be a partial function undefined for global types that do not meet the conditions required to ensure these guarantees. Figure 2: CoMPSeT representations for Example 1.1 and Example 1.2 , where \mathit{{{\color[rgb]{0,0,1}\mathsf{controller}}}} , \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{A}}}}} , and \mathit{{{\color[rgb]{0,0,1}\mathsf{worker_{B}}}}} are abbreviated as \mathit{{{\color[rgb]{0,0,1}\mathsf{c}}}} , \mathit{{{\color[rgb]{0,0,1}\mathsf{wA}}}} , and \mathit{{{\color[rgb]{0,0,1}\mathsf{wB}}}} , respectively We developed CoMPSeT , a tool for comparing MPST sessions and semantics through hands-on experimentation and visualisation. The core contribution of CoMPSeT lies in its ability to support not only the comparison of distinct sessions under the same semantic but also of semantics employing different formalisms, such as synchronous versus asynchronous communication models. Furthermore, it enables users to configure the underlying semantics according to a selected set of features (see Fig. 2 ) and to immediately observe the practical effects of varying formalisation choices. Our tool pivots CAOS [ 21 , 22 ] , a framework that enables programmers to test, define, and animate both sessions and structural operational semantics (SOSs) by defining widget (builders) – visual and/or interactive blocks of extendable functionality – called upon as functions. CoMPSeT instantiates these builders with appropriate parameters to generate the visual and interactive elements configured according to the user’s choice. Importantly, while CAOS is a general-purpose framework for SOSs and does not specifically target MPST, CoMPSeT is designed with a modular architecture defining all MPST-specific components, including projections, operational semantics, and well-formedness conditions. These components are then parametrised against the configurations selected by the user and animated through the CAOS framework. Remarks on the scope We avoid establishing new lemmas and theorems, as our focus is neither on the development of new formulations nor on a comprehensive survey of existing ones, but rather on the introduction of a system capable of effectively comparing MPST variation points. Although we often provide formalisms to support our notations, they are largely grounded in existing contributions. Contributions Our primary contribution is a prototype open-source tool called CoMPSeT , available to be executed online at https://telmoribeiro.github.io/CoMPSeT . This tool uses a dedicated input language for specifying global types (see Section 2.1 ) and supports configurations over how the language is interpreted, such as choosing between synchronous and asynchronous communication or selecting what constructs are permissible (see Section 3 ). Users can configure and compare two different semantics within the same session, with additional analysis available through branching bisimulation checkers. Sessions are visually represented using message sequence charts (MSCs) and projections of the global type, while identifying and reporting errors when projections are undefined. Finally, it provides semantic animations, either through step-by-step execution or by rendering the entire state space. As a complementary contribution, we extended the CAOS framework to overcome two identified limitations: (1) lack of runtime widget variability and (2) absence of user-driven parametrisation. These extensions were crucial for supporting the configurability and interactivity of CoMPSeT and are made available as an independent fork at https://github.com/TelmoRibeiro/CAOS . Organisation of the paper Section 1 introduces the motivation, problem statement, and contributions of this work. Section 2 provides an overview of the MPST framework, including definitions of global and local types, projection mechanisms, and semantics for different communication models. Section 3 surveys existing formalisms while describing our notions of feature and base semantics . Section 4 details the extensions made to the CAOS framework to support dynamic widget behaviour and user-configurability, enabling the innovative aspects leveraged in CoMPSeT . Section 5 defines CoMPSeT , describing its interface, features, and use cases through illustrative

Read the complete text