Abstract 1 Introduction 2 Preliminaries 3 Mechanization 4 Related Work 5 Conclusion References

Certified Implementability of Global Multiparty Protocols

Elaine Li ORCID New York University, NY, USA Thomas Wies ORCID New York University, NY, USA
Abstract

Implementability is the decision problem at the heart of top-down approaches to protocol verification. In this paper, we present a mechanization of a recently proposed precise implementability characterization by Li et al. for a large class of protocols that subsumes many existing formalisms in the literature. Our protocols and implementations model asynchronous commmunication, and can exhibit infinite behavior. We improve upon their pen-and-paper results by unifying distinct formalisms, simplifying existing proof arguments, elaborating on the construction of canonical implementations, and even uncovering a subtle bug in the semantics for infinite words. As a corollary of our mechanization, we show that the original characterization of implementability applies even to protocols with infinitely many participants. We also contribute a reusable library for reasoning about generic communicating state machines. Our mechanization consists of about 15k lines of Rocq code. We believe that our mechanization can provide the foundation for deductively proving the implementability of protocols beyond the reach of prior work, extracting certified implementations for finite protocols, and investigating implementability under alternative asynchronous communication models.

Keywords and phrases:
Asynchronous protocols, communicating state machines, labeled transition systems, infinite semantics, realizability, multiparty session types, choreographies, deadlock freedom
Copyright and License:
[Uncaptioned image] © Elaine Li and Thomas Wies; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic and verification
; Theory of computation Distributed computing models ; Theory of computation Automata over infinite objects
Supplementary Material:
Software: https://zenodo.org/records/15760397 [30]
Funding:
This work is supported by the National Science Foundation under the grant agreement 2304758.
Editors:
Yannick Forster and Chantal Keller

1 Introduction

Distributed, message-passing protocols are notoriously difficult to implement correctly due to exhibiting potentially infinitely many behaviors, only a handful of which may contain bugs. One salient verification methodology centers on the construct of a global protocol, which specifies the behaviors of all participants from the perspective of an omniscient observer. Global protocols enjoy certain desirable correctness properties by design, such as the absence of unspecified message receptions, and deadlock freedom. Top-down verification methodologies use global protocols as a starting point to synthesize correct-by-construction, distributed implementations in an automatic or semi-automatic fashion, that inherit all desirable properties of the global specification. The approach is attractive due to its simplicity and use of automation. It is thus adopted by numerous existing frameworks including multiparty session types [26, 4, 3, 49, 50, 32], choreography automata and choreographic programming [18, 25, 44], and high-level message sequence charts [38, 16, 15, 14, 42, 1, 35, 2, 40, 39, 17].

The decision problem at the heart of all such top-down approaches is implementability, which asks whether a given global specification admits a distributed implementation. A distributed implementation is considered admissible if it is deadlock-free and exhibits exactly the same communication behaviors as described by the specification. Implementability can be understood as a meta-correctness property of global specifications.

To see that implementability is a subtle problem, consider the faulty two-bidder protocol adapted from [33] and shown in Figure 1. The protocol specifies a negotiation between two bidders 𝙱𝟷 and 𝙱𝟸 to split the price c for the purchase of a book y from seller 𝚂. A transition 𝚙𝚚:x{ϕ} in the protocol specifies that 𝚙 sends value x to 𝚚 under transition constraint ϕ. A transition constraint expresses conditions on the sent value x in relation to register variables (prefixed with r) as well as updates to these register variables (expressed in terms of primed register variables). In the loop formed by the control states q3, q4, and q7, the two bidders exchange bids b1 and b2 until either 𝙱𝟸 aborts the protocol, or the sum of the bids exceeds the books price (stored in 𝑟𝑐). Registers 𝑟𝑧1 and 𝑟𝑧2 are used to track the latest bids of each bidder.

Note that the only way in which protocol participants can learn information about the global protocol state is via the sent message values. Consequently, the protocol is not implementable. The reason is that the transition from q4 to q7 requires 𝙱𝟸 to choose a bid b2 that is strictly smaller than 𝑟𝑐. However, 𝙱𝟸 cannot know the value of 𝑟𝑐 because the book’s price is never disclosed to 𝙱𝟸. If the constraint b2<𝑟𝑐 is dropped from the transition, then the protocol becomes implementable.

Figure 1: Non-implementable two-bidder protocol. If one omits the constraint b2<𝑟𝑐 in the transition from q4 to q7, the protocol is implementable.

The problem of implementability is of both theoretical interest and practical importance. In the high-level message sequence chart literature, implementability is referred to as realizability, and its decidability and complexity have been thoroughly studied for finite state protocols [38, 16, 15, 14, 42]. Frameworks such as multiparty session types [26, 4, 3, 49, 50, 32] and choreographic programming [9, 20, 25, 44] combine implementability checking and synthesis in a single step known as endpoint projection. Unsound implementability checks in these frameworks may result in implementations that exhibit communication errors or deadlocks, whereas incomplete implementability checks undermine their utility.

Despite the fact that the vast majority of existing implementability checks are conservative and do not aim for completeless, multiple unsound implementability checks have been proposed [6, 8, 11, 10, 49], in addition to false claims about the decidability of implementability for various protocol classes [18] that were later refuted.

Mechanization has proven to be an effective way to fortify the correctness of pen-and-paper results. In the domain of process calculi, a mechanization of [29] called HOCore [37] revealed and subsequently fixed several major flaws in the existing proofs. Proof assistants especially excel at preventing inexhaustive case analysis, which was shown by [13] to be the cause of erroneous prior works claiming the decidability of the realizability and synchronizability problems for systems of asynchronously communicating state machines.

However, all existing works in the intersection of mechanization and protocol implementability consider restricted implementation models that support only synchronous communication [48, 25] or asynchronous communication with directed choice [7]. Moreover, specifications are restricted to protocols with finitely many participants and completeness is stated relative to projection operators that are themselves incomplete for implementability.

Contributions.

In this paper, we present a mechanization of a recently proposed precise implementability characterization for a large class of protocols that subsumes many existing formalisms in the literature [33, 34]. Throughout this paper, we refer to the extended version [34] of [33] containing complete proofs. Our protocols and implementations model asynchronous commmunication, and can exhibit infinite behavior. Our semantic model of protocols unifies two distinct formalisms from [34] under one general definition, which is capable of expressing syntactic formalisms such as multiparty session types and choreographic programs. We improve upon the results in [34] by simplifying existing proof arguments, elaborating on the construction of canonical implementations, and even uncovering a subtle bug in the semantics for infinite words. As a corollary of our mechanization, we show that the characterization in [34] applies even to protocols with infinitely many participants. We also contribute a reusable library for reasoning about generic communicating state machines, which can serve as a basis for formalizing other theoretical results in concurrency theory.

2 Preliminaries

We introduce basic concepts and notation, and tour the main result from [34], introducing relevant definitions along the way.

Words.

Let Σ be an alphabet. Σ denotes the set of finite words over Σ, Σω the set of infinite words, and Σ their union ΣΣω. A word uΣ is a prefix of word vΣ, denoted uv, if there exists wΣ with uw=v; we denote all prefixes of u with pref(u). Given a word w=w0wn, we use w[i] to denote the i-th symbol wiΣ, and w[0..i] to denote the subword between and including w0 and wi, i.e. w0wi.

Message Alphabets.

Let 𝒫 be a (possibly infinite) set of participants and 𝒱 be a (possibly infinite) data domain. We define the set of synchronous events Γ𝑠𝑦𝑛𝑐{𝚙𝚚:m𝚙,𝚚𝒫 and m𝒱} where 𝚙𝚚:m denotes a message exchange of m from sender 𝚙 to receiver 𝚚. For a participant 𝚙𝒫, we define the alphabet Γ𝚙={𝚙𝚚:m𝚚𝒫,m𝒱}{𝚚𝚙:m𝚚𝒫,m𝒱}, and a homomorphism Γ𝚙, where xΓ𝚙=x if xΓ𝚙 and ε otherwise. For a participant 𝚙𝒫, we define the alphabet Σ𝚙,!={𝚙𝚚!m𝚚𝒫,m𝒱} of send events and the alphabet Σ𝚙,?={𝚙𝚚?m𝚚𝒫,m𝒱} of receive events. The event 𝚙𝚚!m denotes participant 𝚙 sending a message m to 𝚚, and 𝚙𝚚?m denotes participant 𝚙 receiving a message m from 𝚚. We write Σ𝚙=Σ𝚙,!Σ𝚙,?, Σ!=𝚙𝒫Σ𝚙,!, and Σ?=𝚙𝒫Σ𝚙,?. Finally, the set of asynchronous events is Σ𝑎𝑠𝑦𝑛𝑐=Σ!Σ?. We define a homomorphism to map words from the synchronous alphabet to their asynchronous counterpart, split(𝚙𝚚:m)𝚙𝚚!m.𝚚𝚙?m. We say that 𝚙 is active in xΣ𝑎𝑠𝑦𝑛𝑐 if xΣ𝚙. For each participant 𝚙𝒫, we define a homomorphism Σ𝚙, where xΣ𝚙=x if xΣ𝚙 and ε otherwise. We write 𝒱(w) to project the send and receive events in w onto their messages.

The basic building block for specifying global protocols in [34] is a labeled transition system over the synchronous alphabet Γ𝑠𝑦𝑛𝑐.

Labeled Transition Systems.

A labeled transition system (LTS) is a tuple 𝒮=(S,Γ,T,s0,F) where S is a set of states, Γ is a set of labels, T is a set of transitions from S×Γ×S, FS is a set of final states, and s0S is the initial state. We use p𝛼q to denote the transition (p,α,q)T. Runs and traces of an LTS are defined in the expected way. A run is maximal if it is either finite and ends in a final state, or is infinite. The language of an LTS 𝒮, denoted (𝒮), is defined as the set of maximal traces. An LTS is deadlock-free if every run is extensible to a maximal run. Given an LTS 𝒮=(S,Γ,T,s0,F) and a state sS, we use 𝒮s to denote the LTS obtained by replacing s0 with s as the initial state: (S,Γ,T,s,F).

In [34], LTS over Γ𝑠𝑦𝑛𝑐 are constrained with three additional conditions, to yield a fragment called global communicating labeled transition systems, hereafter GCLTS. The three GCLTS assumptions are sink finality, sender-driven choice, and deadlock freedom. Sink finality is a purely syntactic condition enforcing that final states have no outgoing transitions. Sender-driven choice states that from any state, all outgoing transitions are labeled with events that share a unique sender, and moreover no two transitions are labeled with the same event. Deadlock freedom requires that every run is extensible to a maximal one.

In the remainder of the paper, let 𝒮=(S,Γ𝑠𝑦𝑛𝑐,T,s0,F) be a protocol satisfying GCLTS assumptions. The standard LTS semantics of 𝒮 yields a set of finite and infinite synchronous traces. Yet, global protocols describe asynchronous behaviors. The asynchronous protocol semantics of 𝒮 are defined on top of its LTS semantics, and rely on a notion of channel compliance. Channel compliance describes sequences of asynchronous send and receive events that respect peer-to-peer FIFO ordering, meaning that messages are sent before they are received, and between every pair of participants, the order of messages received strictly follows the order of messages sent, with no drops or reordering.

Channel Compliance.

Let wΣ𝑎𝑠𝑦𝑛𝑐. We say that w is channel-compliant if for all prefixes ww, for all 𝚙𝚚𝒫, 𝒱(w𝚚𝚙?_)𝒱(w𝚙𝚚!_).

Asynchronous Protocol Semantics.

Let 𝒮 be an LTS over Γ𝑠𝑦𝑛𝑐. The asynchronous semantics of 𝒮, denoted 𝒞(𝒮), is defined by first mapping synchronous words of 𝒮 onto their asynchronous counterpart using split, and then closing the resulting language under an indistinguishability relation that captures all possible reorderings in an asynchronous, FIFO network. The semantics for infinite words in 𝒮 used in this work differs from that in [34]. We revisit this point in detail in §3.2, and provide the formal definition of 𝒮’s asynchronous protocol semantics below.

𝒞(𝒮)= {wΣ𝑎𝑠𝑦𝑛𝑐wΣ𝑎𝑠𝑦𝑛𝑐.wsplit((𝒮))w is channel-compliant
𝚙𝒫.wΣ𝚙=wΣ𝚙}
{wΣ𝑎𝑠𝑦𝑛𝑐ωvw.wΣ𝑎𝑠𝑦𝑛𝑐.u,uΣ𝑎𝑠𝑦𝑛𝑐.wsplit((𝒮))
uwvu is channel-compliant𝚙𝒫.(vu)Σ𝚙=uΣ𝚙}.

For disambiguation, we refer to (𝒮)Γ𝑠𝑦𝑛𝑐ω as the LTS semantics of 𝒮, and refer to 𝒞(𝒮)Σ𝑎𝑠𝑦𝑛𝑐ω as the protocol semantics of 𝒮.

The implementation model in [34] is communicating labeled transition systems, hereafter CLTS. CLTSs are a generalization of communicating state machines [5] to potentially infinite-state labeled transition systems for each participant.

Communicating LTS.

𝒯={{T𝚙}}𝚙𝒫 is a communicating labeled transition system (CLTS) over 𝒫 and 𝒱 if T𝚙 is a deterministic LTS over Σ𝚙 for every 𝚙𝒫, denoted by (Q𝚙,Σ𝚙,δ𝚙,q0,𝚙,F𝚙). Let 𝚙𝒫Q𝚙 denote the set of global states and 𝖢𝗁𝖺𝗇={(𝚙,𝚚)𝚙,𝚚𝒫,𝚙𝚚} denote the set of channels. A configuration of 𝒜 is a pair (s,ξ), where s is a global state and ξ:𝖢𝗁𝖺𝗇𝒱 is a mapping from each channel to a sequence of messages. We use s𝚙 to denote the state of 𝚙 in s. The CLTS transition relation, denoted , is defined as follows.

  • (s,ξ)𝚙𝚚!m(s,ξ) if (s𝚙,𝚙𝚚!m,s𝚙)δ𝚙, s𝚛=s𝚛 for every participant 𝚛𝚙, ξ(𝚙,𝚚)=ξ(𝚙,𝚚)m and ξ(c)=ξ(c) for every other channel c𝖢𝗁𝖺𝗇.

  • (s,ξ)𝚚𝚙?m(s,ξ) if (s𝚚,𝚚𝚙?m,s𝚚)δ𝚚, s𝚛=s𝚛 for every participant 𝚛𝚚, ξ(𝚙,𝚚)=mξ(𝚙,𝚚) and ξ(c)=ξ(c) for every other channel c𝖢𝗁𝖺𝗇.

In the initial configuration (s0,ξ0), each participant’s state in s0 is the initial state q0,𝚙 of A𝚙, and ξ0 maps each channel to ε. A configuration (s,ξ) is final iff s𝚙 is final for every 𝚙 and ξ maps each channel to ε. Runs and traces are defined in the expected way. A run is maximal if either it is finite and ends in a final configuration, or it is infinite. The language (𝒯) of the CLTS 𝒯 is defined as the set of maximal traces. A configuration (s,ξ) is a deadlock if it is not final and has no outgoing transitions. A CLTS is deadlock-free if no reachable configuration is a deadlock.

Having defined the model of global protocols and their implementations, we can now define the implementability problem.

Definition 1 (Protocol Implementability).

A protocol 𝒮 is implementable if there exists a CLTS {{T𝚙}}𝚙𝒫 such that the following two properties hold: (i) protocol fidelity: ({{T𝚙}}𝚙𝒫)=𝒞(𝒮), and (ii) deadlock freedom: {{T𝚙}}𝚙𝒫 is deadlock-free. We say that {{T𝚙}}𝚙𝒫 implements 𝒮.

The key result in [34] is a sound and complete characterization of implementability for GCLTS with a finite set of participants, formulated as three Coherence Conditions (CC). In a nutshell, these are 2-hyperproperties stating that from two locally indistinguishable global protocol states, a participant can either perform a send action that is enabled in both states (Send Coherence), or perform a receive action that uniquely distinguishes the two states (Receive Coherence), but cannot choose between performing a send or receive action (No Mixed Choice). Locally indistinguishable states are captured by the definition of simultaneous reachability for a participant 𝚙, denoted s0𝚙𝑢s1,s2, which says there exist w1,w2Γ𝑠𝑦𝑛𝑐 such that s0w1s1T,s0w2s2T and w1Γ𝚙=w2Γ𝚙=u. We use s0𝚙𝑢s to denote participant-based reachability of a single state, i.e. when there exists wΓ𝑠𝑦𝑛𝑐 such that s0𝑤sT and wΓ𝚙=u.

Definition 2 (Coherence Conditions).

A protocol 𝒮=(S,Γ𝑠𝑦𝑛𝑐,T,s0,F) satisfies Coherence Conditions (CC) when it satisfies:

  • Send Coherence: s1𝚙𝚚:ms2T,s1S:(uΓ𝚙.s0𝚙𝑢s1,s1)(s2S.s1𝚙𝚙𝚚:ms2).

  • Receive Coherence: s1𝚙𝚚:ms2,s1𝚛𝚚:ms2T:(𝚛𝚙uΓ𝚚.s0𝚚𝑢s1,s1)¬wpref((𝒮s2)).wΣ𝚚=ε𝒱(w𝚙𝚚!_)=𝒱(w𝚚𝚙?_)m.

  • No Mixed Choice: s1𝚙𝚚:ms2,s1𝚛𝚙:ms2T:(uΓ𝚙.s0𝚙𝑢s1,s1)

Theorem 3 (Preciseness of Coherence Conditions).

Let 𝒮 be a protocol. Then, 𝒮 is implementable if and only if it satisfies CC.

 Note.

In [34] and this work, soundness and completeness are terms defined relative to the semantic notion of implementability, and thus describe the metacorrectness of the verification methodology. Soundness of a characterization means that if a protocol satisfies the characterization, then it is implementable; completeness means that every implementable protocol satisfies the characterization. The terms are used varyingly elsewhere in the literature: in [48], soundness and completeness is defined relative to an existing coinductive relation between global and local session types, which it itself incomplete with respect to implementability, meaning that it does not relate every implementable global type with a candidate local type implementation. In turn, the completeness of [48] does not imply completeness with respect to implementability. In many existing works [7, 25], soundness and completeness describes the correspondence between global and local behaviors captured by protocol fidelity: soundness means that every global behavior is exhibited by the local implementations, and completeness means that every local implementation behavior is included in the global specification. On the other hand, the flawed type safety proofs of existing multiparty session type frameworks discussed in [43] constitute unsoundness per our definition: projectable global types lead to local types that can deadlock or exhibit communication errors.

To show soundness of CC, the authors [34] first define canonical implementations, which serve as the witness to implementability. Canonicity is defined with respect to 𝒮’s protocol semantics, and includes 𝒞(𝒮) by construction. To show that the canonical implementation’s language is included in 𝒞(𝒮), and moreover that the canonical implementation is deadlock-free, the authors identify a key inductive invariant, which they call intersection set non-emptiness. Intuitively, intersection set non-emptiness says that for every prefix in the canonical CLTS, there exists a finite or infinite maximal run in the protocol that all participants agree on as a possible run from their local perspective, observing only partial information.

To show completeness of CC, the authors proceed via modus tollens, and construct from the negation of each Coherence Condition a trace for which no protocol run is possible. They show that any implementation of the protocol must admit this trace. Thus, either the trace leads to a deadlock, or it leads to a maximal word in the language that does not have a counterpart in 𝒞(𝒮). Either way, this poses a contradiction to implementability.

3 Mechanization

We focus our exposition in this section on aspects of the Rocq mechanization that improve upon the pen-and-paper proofs from [34]. In §3.1, we present our purely semantic definition of protocols, which collapses the distinction between GCLTS and symbolic protocols in [34], and can easily encode existing protocol models. In §3.2, we discuss a subtle flaw identified in the infinite word semantics used in [34], its implications on the pen-and-paper proofs, and propose a revised infinite word semantics. As a byproduct, we obtain the generalization from finite to infinite participant sets for free. In §3.3, we present our novel existence proof of canonical implementations. In §3.4, we present a simplification to a key soundness lemma that features nested induction.

3.1 Protocols as Labeled Transition Systems

In [34], the authors introduce an additional model for finitely representing potentially infinite GCLTS, called symbolic protocols. Symbolic protocol states store a set of registers, and transitions are labeled with dependent predicates that can refer to communication variables and register variables, and can thus describe register updates (see e.g. Figure 1). The semantics and implementability of a symbolic protocol is defined in terms of the concrete GCLTS it represents.

For illustration purposes, the GCLTS and symbolic protocol representations of a simple addition protocol between three participants 𝚙, 𝚚 and 𝚛 are depicted in Figure 3 and Figure 3. In the protocol, participants 𝚙 and 𝚚 send two natural number values x and y to participant 𝚛, who replies to participant 𝚙 with the sum z=x+y, after which the protocol terminates.

Figure 2: Addition GCLTS.
Figure 3: Addition symbolic protocol.

[34] thus extends the Coherence Conditions to a set of Symbolic Coherence Conditions for algorithmically checking implementability of symbolic protocols, as well as investigating complexity of various decidable symbolic protocol fragments.

Thanks to Rocq’s type universe, we unify the two disparate definitions under a single formal definition in our mechanization, which represents protocols simply as an LTS parametric in a state and alphabet type, containing a transition relation, an initial state, and a final state relation.

Record LTS {A: Type} :=
mkLTS { transition: State -> A -> State -> Prop;
s0: State;
final: State -> Prop; }.

We define LTS semantics using an inductive relation to represent reachability, lists to represent finite traces, and streams to represent infinite traces. Despite the apparent inconvenience imposed by the type-level distinction between finite and infinite words, we will see in §3.4 that we can greatly delay the acknowledgement of this distinction in key proofs, and moreover, that doing so simplifies the existing pen-and-paper proofs.

3.2 Infinite Protocol Semantics

In this section, we examine asynchronous protocol semantics for infinite words. As mentioned in §2, the protocol semantics of 𝒮 is defined in steps: we begin with the LTS semantics of 𝒮, then apply a homomorphism split to obtain a set of asynchronous words that remain “synchronously ordered”, i.e. matching send and receive events are adjacent to each other. In an asynchronous network with peer-to-peer, FIFO channels, certain events can be reordered, and are thus considered independent. For example, the synchronous trace 𝚙𝚚:m𝚛𝚜:m yields the asynchronous trace u1=𝚙𝚚!m𝚛𝚜!m𝚜𝚛?m𝚚𝚙?m, as well as u2=𝚛𝚜!m𝚙𝚚!m𝚜𝚛?m𝚚𝚙?m, in which the independent sends by 𝚙 and 𝚛 are reordered.

We call two words w,wΣ𝑎𝑠𝑦𝑛𝑐ω indistinguishable when any asynchronous implementation recognizing one word necessarily recognizes the other. Note that indistinguishability is specific to the assumed communication architecture: two words that are indistinguishable in a peer-to-peer FIFO setting may not be in a mailbox setting.

Allowing the semantics of global protocols to selectively exclude indistinguishable behaviors, e.g. by including u1 but excluding u2, would render protocols spuriously non-implementable. Thus, we desire for our protocol semantics to be closed under this notion of indistinguishability. For finite words, the indistinguishability relation is intuitive to formalize. Prior works that give language-theoretic semantics to session types, such as [36], define indistinguishability in terms of a binary relation on asynchronous events capturing when they can be reordered 111We identify a minor erratum in the original formulation of the indistinguishability relation [36] used in later works [45, 32, 31]: cases (3) and (4) are not symmetric, and thus the relation is not an equivalence relation as claimed., and a notion of channel compliance that captures valid traces with respect to peer-to-peer, FIFO semantics. In the message sequence chart literature, linearizations are required to satisfy the union of per-participant total orders and the send-before-receive partial order on events, coinciding with the definition from [36]. A key observation is that in pairs of indistinguishable finite words, the sequence of events for each participant is identical. Thus, given an asynchronous implementation that recognizes wΣ𝑎𝑠𝑦𝑛𝑐ω, to show that the same asynchronous implementation recognizes w indistinguishable from w, we do not need to know more about each participant’s local implementation beyond the fact that it accepts wΣ𝚙, which is given from the fact that the implementation as a whole recognizes w.

For infinite words, however, indistinguishability can no longer be defined purely alphabetically. Consider the pair of infinite words v1=𝚙𝚚!mω and v2=𝚛𝚜!m𝚙𝚚!mω. Are v1 and v2 indistinguishable? On our previous notion of indistinguishability, the answer is unfortunately, no. The fact that v1 is a trace of an arbitrary asynchronous implementation gives us no information about the local implementation of participant 𝚛, yet to show that v2 is also a trace of said implementation, we need to additionally know that 𝚛’s local implementation admits the trace 𝚛𝚜!m. This discrepancy arises from the fact that infinite traces in an asynchronous implementation can infinitely reorder independent events, in this case every occurrence of 𝚙𝚚!m with 𝚛𝚜!m, achieving the effect of indefinitely postponing 𝚛𝚜!m.

Equipped with an understanding of the importance of indistinguishability-closed global semantics, we revisit the definition of infinite protocol semantics in [34]:

𝒞(𝒮)ω= {wΣ𝑎𝑠𝑦𝑛𝑐ωwΣ𝑎𝑠𝑦𝑛𝑐ω.wsplit((𝒮))vw.u,uΣ𝑎𝑠𝑦𝑛𝑐.
vu is channel-compliantuw𝚙𝒫.(vu)Σ𝚙=uΣ𝚙}.

We show via counterexample that 𝒞(𝒮)ω is not indistinguishability-closed. Consider the simple protocol depicted in Figure 5, involving four participants 𝚙, 𝚚, 𝚛, 𝚜 and two message values m,m. As per [34], 𝒞(𝒮𝑖𝑛𝑓) does not include the infinite word 𝚛𝚜!m𝚙𝚚!mω. In contrast, 𝒞(𝒮𝑖𝑛𝑓), whose protocol is obtained by a simple state renaming of Figure 5 and is depicted in Figure 5, does include 𝚛𝚜!m𝚙𝚚!mω.

Figure 4: Example infinite protocol 𝒮𝑖𝑛𝑓.
Figure 5: Example infinite protocol 𝒮𝑖𝑛𝑓.

Before proposing a revised infinite word semantics that resolves this discrepancy, we discuss the implications of this counterexample on the results from [34]. It is easy to verify that 𝒮𝑖𝑛𝑓 is a GCLTS and satisfies CC. However, 𝒮𝑖𝑛𝑓 is not implementable: there exists no CLTS that recognizes the finite word 𝚙𝚚!mn𝚙𝚚!m𝚛𝚜!m for all values of n yet does not recognize the infinite word 𝚛𝚜!m𝚙𝚚!mω. This contradicts the soundness of the Coherence Conditions as stated in [34]. The error lies in the case for infinite words in the proof of [34, Lemma 4.9], which concludes from the fact that every prefix of an infinite word w in the canonical implementation has a non-empty intersection run set I(w), that w𝒞(𝒮)ω. To show that w𝒞(𝒮)ω, one needs to find a witness infinite run ρ in 𝒮, such that for every prefix vw, there exists an extension u and a prefix of rho ρv such that for all participants, the events prescribed by ρv and vu are identical. To show the existence of such a run, the authors appeal to König’s Lemma, and argue that in a finitely-branching infinite tree containing possible run prefixes for every prefix of w, there exists a ray representing an infinite run. This argument appears inherited from earlier works that deal with finite, multiparty session types [36, 32]. We discover that not only is König’s Lemma not applicable in the infinite setting of [34] where GCLTS states can have infinitely many transitions, the existence of a ray is insufficient to prove membership of w in 𝒞(𝒮)ω. The latter implies that the proof using König’s Lemma in both prior works [36, 32] is flawed: indeed, 𝒮𝑖𝑛𝑓 is expressible in the multiparty session type fragments defined in these works that assume finitely many participants, states and transitions. The gap in the reasoning lies in showing that the infinite run obtained from König’s Lemma is indeed a suitable existential witness required by the infinite protocol semantics. In the infinite tree constructed for 𝒮𝑖𝑛𝑓 and word 𝚛𝚜!m𝚙𝚚!mω, the prefix 𝚛𝚜!m contributes a vertex labeled with the run prefix 𝚙𝚚:m𝚙𝚚:m𝚛𝚜:m. Subsequent prefixes of the form 𝚛𝚜!m𝚙𝚚!mn contribute vertices labeled with run prefixes 𝚙𝚚:mn𝚙𝚚:m𝚛𝚜:m. A ray exists in this finite-degree, infinite tree representing the run 𝚙𝚚:mω. This is clearly an infinite run in 𝒮𝑖𝑛𝑓, but unfortunately does not satisfy the conditions required to show membership of w in 𝒞(𝒮𝑖𝑛𝑓): for prefix 𝚛𝚜!m of w, there exists no prefix of 𝚙𝚚:mω that matches 𝚛’s events.

Fortunately, the flawed infinite word semantics from [34] can easily be amended to accurately reflect the desired, indistinguishability-closed semantics. Our revised infinite word semantics is as follows:

𝒞𝑎𝑙𝑡(𝒮)ω= {wΣ𝑎𝑠𝑦𝑛𝑐ωvw.ρΓ𝑠𝑦𝑛𝑐,uΣ𝑎𝑠𝑦𝑛𝑐.ρpref((𝒮))
vu is channel-compliant𝚙𝒫.(vu)Σ𝚙=split(ρ)Σ𝚙}.

𝒞𝑎𝑙𝑡(𝒮)ω swaps the first two quantifiers in the original definition, and weakens the requirement that w come from an infinite run to the requirement that w come from a finite run prefix (that could be part of a finite or infinite maximal run in 𝒮). We hypothesize that this revised condition faithfully represents what prior works intended to capture with their infinite protocol semantics. It also more closely matches simulation-based notions of trace equivalence, for example in [50]. This is further evidenced by the fact that the requisite changes to the overall proof were minimal: the flawed König’s Lemma argument could simply be omitted in favor of appealing directly to the intersection set non-emptiness inductive invariant, and the completeness proof remained largely unchanged. The latter is due to the fact that for any infinite word w, w𝒞(𝒮)ωw𝒞𝑎𝑙𝑡(𝒮)ω.

3.3 Constructing Canonical Implementations

Showing that a global protocol is implementable amounts to finding a witness CLTS that implements it. The soundness proof of CC in [34] chooses a particular CLTS as witness, referred to as the canonical implementation. The canonicity of an implementation is defined as follows:222Note that in [34], the notation (𝒮) is overloaded to denote 𝒞(𝒮).

Definition 4 (Canonical implementations [34]).

A CLTS {{T𝚙}}𝚙𝒫 is a canonical implementation for a protocol 𝒮=(S,Γ𝑠𝑦𝑛𝑐,T,s0,F) if for every 𝚙𝒫, T𝚙 satisfies:
(i) wΣ𝚙.w𝒞(T𝚙)w(𝒮)Σ𝚙, and (ii) pref((T𝚙))=pref(𝒞(𝒮)Σ𝚙).

In [34], the existence of a canonical implementation for any protocol is assumed. Formally proving the existence of canonical implementations in our mechanization requires constructing an explicit, albeit non-constructive, witness CLTS. The construction is conceptually straightforward; nonetheless, we illustrate key steps here as it is novel to our mechanization.

We begin by observing that because canonicity is defined on a per-participant basis, and with respect to an LTS that is deadlock-free, the definition can be weakened to use the LTS semantics of 𝒮 rather than its protocol semantics. The weaker definition avoids reasoning about asynchronous reorderings and channel compliance, and is formalized in Rocq as follows.

In the Rocq definitions below, S is a protocol of type LTS SyncAlphabet State, and p is a participant. We choose State -> Prop for the state type of local implementations, so S_p is an LTS of type LTS AsyncAlphabet (State -> Prop).

Definition canonical_implementation_local_naive S p S_p :=
(forall w:FinAsyncWord, is_finite_word S_p w ->
exists w’:FinSyncWord, is_finite_word S w /\ wproj (split w’) p = w)
/\
(forall w:FinSyncWord, is_finite_word S w ->
is_finite_word S_p (wproj (split w) p))
/\
(forall w:FinAsyncWord, is_trace S_p w ->
exists w’:FinSyncWord, is_trace S w /\ wproj (split w’) p = w)
/\
(forall w:FinSyncWord, is_trace S w ->
is_trace S_p (wproj (split w) p)).

The four conjuncts correspond to four inclusions that altogether define the two equalities in Section 3.3, and need to be stated separately due to the type mismatch between finite and infinite words.

Our construction for each participant’s local implementation can be expressed simply as a composition of two purely automata-theoretic operations: applying the homomorphism Σ𝚙 for each participant, followed by determinization. This coincides with the subset construction automaton as defined in [32], whose name we borrow in our definitions. Formally, for each participant 𝚙𝒫, the result of the second step is an LTS over Σ𝚙{ϵ}. To avoid introducing this compounded alphabet and reasoning about identity elements, we define both operations declaratively in one shot, to obtain a local LTS over the alphabet AsyncAlphabet, whose states are of type State -> Prop, representing subsets of Q.

The initial state is defined relationally as the set of all states reachable on ϵ from s0 in 𝒮. States in the subset construction are the set of non-empty subsets of states in 𝒮. Final states are defined relationally as sets of states containing at least one final state from 𝒮.

Definition initial_subset_construction_state S p :=
fun s => exists (w : list SyncAlphabet), lts.Reachable S (s0 S) w s
/\ wproj (split w) p = [].
Definition subset_construction_state S p :=
fun lstate => exists (s : State), lstate s.
Definition final_subset_construction_state S p :=
fun lstate => subset_construction_state S p lstate /\
exists (s : State), lstate s /\ final S s.

The transition relation describes triples (ls, a, ls’) where ls is a pre-state in the subset construction, a is an asynchronous alphabet symbol in p’s restricted alphabet, and ls’ is a post-state. The relation states that ls’ contains all states from 𝒮 that are either an immediate post-state of some state s in ls, or is ϵ-reachable from an immediate post-state.

Definition subset_construction_transition_relation S p :=
fun lstate1 a lstate2 => is_active p a
/\ subset_construction_state S p lstate1
/\ subset_construction_state S p lstate2
/\ forall (s’:State), lstate2 s <->
(exists (s:State), lstate1 s /\ transition S s (async_to_sync a) s’)
\/
(exists (s s_inter:State), lstate1 s /\
transition S s (async_to_sync a) s_inter /\
exists (v_epsilon:list SyncAlphabet),
lts.Reachable S s_inter v_epsilon s /\
wproj (split v_epsilon) p = []).

The former two conjuncts are implied by the latter two conjuncts together with the definition of final states in the subset construction. The latter two conjuncts state that every asynchronous trace in a participant’s canonical local implementation corresponds to a synchronous trace in 𝒮, and every synchronous trace in 𝒮 corresponds to an asynchronous trace in the participant’s canonical local implementation.

Unfortunately, these two properties are not themselves inductive: in both cases, the induction hypothesis is not strong enough to show that the respective traces can be extended. We state and prove two inductive invariants that explicitly quantify over states of 𝒮 in a participant’s canonical local implementation S_p, and weaken them to obtain the third and fourth conjuncts. The strengthened inductive properties respectively state that for every reachable state ls on some asynchronous word w in S_p, for every global state s in ls, one can find a corresponding synchronous word w’ such that w’ and w agree on participant p’s events, and 𝒮 reaches s on w’; conversely, for every reachable global state s on some synchronous word w in 𝒮, one can find a corresponding local state ls’ and asynchronous word w’ such that w’ and w agree on participant p’s events, and S_p reaches ls’ on w’.

Finally, we define the canonical CLTS by mapping each participant to their subset construction. To show that the map thus defined is indeed a CLTS, we additionally need to prove that each local implementation is deterministic, and moreover operates on its own restricted alphabet. Both proofs are straightforward by definition of the subset construction; our proof of determinism uses the axioms of functional and propositional extensionality from Rocq’s Logic library to establish the equality of local states of type State -> Prop. We conclude with the existence lemma:

Lemma canonical_implementation_exists :
forall (S : @LTS SyncAlphabet State),
deadlock_free S ->
exists (T : CLTS),
@canonical_implementation (State -> Prop) S T.

3.4 Simplification of Soundness

The core argument for soundness in [34] relies on proving the following inductive invariant:

Let 𝒮 be a protocol satisfying CC, and let {{T𝚙}}𝚙𝒫 be a canonical CLTS for 𝒮. Let w be a trace of {{T𝚙}}𝚙𝒫. Then, I(w).

The set I(w) contains finite or infinite maximal runs in 𝒮 that are possible with respect to the trace w. Formally, ρI(w) means that for every participant 𝚙𝒫, wΣ𝚙split(ρ)Σ𝚙, i.e. each participant’s local events in w agree with what ρ prescribes. The proof proceeds by induction on the length of w, with case analysis in the inductive step on whether the next event is a send or receive event.

The non-emptiness of I(w) amounts to an existential quantification over a disjunction. In our mechanization, however, due to the type-level distinction between finite and infinite runs, this property takes the form of a disjunction over existentials:

Definition I_set_non_empty (S: LTS) (w: FinAsyncWord) :=
(exists (run: FinSyncWord), finite_possible_run S run w)
\/
(exists (run: InfSyncWord), infinite_possible_run S run w).

Although the soundness arguments from [34] are mechanizable using this definition of intersection set non-emptiness, doing so would involve repetitive reasoning to deal with finite and infinite runs separately that does not shed additional insight on the problem. We instead prove that every canonical CLTS trace has a possible run prefix. Our new inductive invariant factors out the distinction between finite and infinite runs, and is additionally more expressive than its pen-and-paper counterpart: it makes explicit the construction of a possible run prefix for wx from one for w. When x is a receive event, our lemma states that the exact same run prefix can be reused. When x is a send event, a run prefix can be constructed incrementally by processing w in increasing length order, and appealing to CC to incrementally extend a prefix of the possible run prefix for wx.

We focus the exposition below on our simplified proof for the inductive step when x is a send event. Lemma 4.16 in [34] is stated as follows:

Lemma 5 (Send events preserve run prefixes).

Let 𝒮 be a protocol satisfying CC and {{T𝚙}}𝚙𝒫 be a canonical implementation for 𝒮. Let wx be a trace of {{T𝚙}}𝚙𝒫 such that xΣ𝚙,! for some 𝚙𝒫. Let ρ be a run in I(w), and αspre𝑙spostβ be the unique splitting of ρ for 𝚙 with respect to w. Then, there exists a run ρ in I(wx) such that αspreρ.

The unique splitting of a run for a participant with respect to a trace is the largest prefix of the run that matches the participant’s actions in the trace, formalized as follows:

Definition is_alpha (run alpha:FinSyncWord) (w:FinAsyncWord) p :=
prefix alpha run /\ wproj w p = wproj (split alpha) p /\
(forall (u: FinSyncWord), wproj w p = wproj (split u) p ->
prefix u run -> prefix u alpha).

For example, the unique splitting of run ρ=𝚙𝚚:m𝚛𝚜:m𝚛𝚚:m𝚚𝚙:m for participant 𝚙 with respect to trace u=𝚙𝚚!m𝚛𝚜!m𝚛𝚚!m is 𝚙𝚚:m𝚛𝚜:m𝚛𝚚:m, because 𝚙 has only completed the first event prescribed by ρ in u, namely sending m to 𝚛, but has not completed the second event, namely receiving m from 𝚚. Because the two synchronous events in between these two events in ρ do not concern 𝚙, they are included in the largest prefix. If a run disagrees with a trace on some participant’s actions, the unique splitting is ϵ, for example ρ’s unique splitting for participant 𝚛 with respect to trace 𝚛𝚜!m.

Our adapted formalization of Lemma 5 is thus stated as follows:

Lemma send_preserves_run_prefixes_finite :
forall S T w x rho_fin alpha,
GCLTS S -> NMC S -> SCC S -> RCC S ->
canonical_implementation S T ->
is_clts_trace T w -> is_clts_trace T (w ++ [x]) -> is_snd x ->
possible_run_prefix S rho_fin w ->
is_alpha rho alpha w (sender_async x) ->
exists (rho’: FinSyncWord),
prefix alpha rho /\ possible_run_prefix S rho (w ++ [x]).

The proof of Lemma 4.16 in [34] relies on a nested induction argument. We illustrate the key steps in order to elucidate the structure of the nested induction and explain our simplified proof. From the induction hypothesis, we are granted a canonical CLTS trace w and a possible run prefix for w. Let the send extention to w be x = Snd p q m. We can then define the largest prefix of rho matching w for participant p, and because the premise grants that alpha <> rho, there must exist a next action prescribed by rho for p, which we denote l. As a reminder, since rho is a run of the global protocol, which is an LTS over the synchronous alphabet, l is a synchronous alphabet symbol. By the induction hypothesis, rho is compliant with all participants:

forall (p: participant), prefix (wproj w p) (wproj (split rho) p)

The induction step asks to construct an existential witness for a new possible run prefix, rho’, that is compliant with wx. In the case that l = Event p q m, we can directly reuse rho as our witness, and the three conjuncts required of rho’ are trivially satisfied when rho’ = rho. When this is not the case, we must construct a different witness. We first appeal to Send Coherence Condition to show that we can find a different continuation from alpha that agrees with x, in other words, l’ = [Event p q m] and alpha ++ l’ is a run in the global protocol.

Refer to caption
Figure 6: Induction hypothesis.
Refer to caption
Figure 7: Inner induction hypothesis.

With this extension and removal of the original suffix from rho, however, we are left only with a guarantee about p’s compliance:

prefix (wproj (w ++ [x]) p) (wproj (split (alpha ++ [Event p q m])) p)

In the case that all of the actions in w were already contained in alpha, we can use alpha ++ [l’] directly as our witness for rho’. However, in the case that some of w’s actions were contained in the now removed suffix, it is no longer true that all participants are compliant with alpha ++ [l’]. Therefore, the next step of the proof involves restoring a suffix that is “long enough” to contain all of the actions that were originally in w.

The argument for suffix restoration in [34] is algorithmic in nature, and is captured by the pseudocode in Algorithm 1. The algorithm initializes the candidate run ρc as αl’ appended to an arbitrary run suffix β to form a maximal run. The outer while loop then “fixes” disagreements between w and the current candidate run ρc one symbol at a time, updating ρc after each fix. Termination is guaranteed by the fact that w has finite length and that each event in w is fixed at most once. The outer while loop invariant relates ρc with ρc, and guarantees that the largest common prefix shared by ρc and ρc between each loop iteration is strictly increasing. Because the initial candidate run is picked such that it includes αl’ as a prefix, and the common prefix between runs can only get longer, it holds by transitivity that when the while loop terminates, the final candidate run must have αl’ as a prefix, and furthermore is compliant with all events in w.

Algorithm 1 Algorithmic representation of Lemma 4.16 [34].

Formalizing the above algorithm in addition to its loop invariants would require a custom inductive predicate that relates the candidate run with disagreeing events in w. The fact that the loop invariant depends on both the current and previous candidate run introduces significant additional complexity.

We find a weaker inductive invariant that eliminates this dependency: it suffices to show that αl’ρc remains a prefix of the candidate run. This holds trivially upon entry to the while loop, and is preserved by each iteration from the fact that α comes from the original ρ that is compliant with w, and thus no events in w can disagree with events in α.

In our new inductive invariant, αl’ can now be treated as a constant. We convert the algorithmic reasoning in [34] to the following inner induction hypothesis:

H_inner: forall (w’: FinAsyncWord), prefix w w ->
(exists (beta’: FinSyncWord),
possible_run_prefix S (alpha ++ [Event p q m] ++ beta’) w’)).

We prove H_inner directly by induction on prefixes of w using rev_ind from the standard List library. Figure 7 visualizes the simplified inductive argument: the red symbols in w depict disagreeing events in w as a result of removing the suffix from rho.

To prove send_preserves_run_prefixes_finite, we needed to consider cases glossed over in the pen-and-paper proof from [34], and in some case develop arguments from scratch. For example, in the special case when alpha is a possible run prefix for participant p for trace w, but prescribes exactly as many events as are in w, we needed to show that either w is a maximal CLTS trace, or a different alpha can be found which prescribes more events, by appealing to the sink-finality of 𝒮.

4 Related Work

We refer the reader to [34] for a detailed discussion of related work on multiparty session types and similar formalisms. In the following, we instead focus our attention on comparing with prior efforts to mechanize such formalisms.

Most closely related to our effort are [7] and [48]. Zooid [7] is a mechanized domain-specific language for specifying and implementing asynchronous multiparty session types. [48] mechanizes the soundness and completeness proofs for the projection operator for synchronous multiparty session types proposed in [19]. A key conceptual difference is that our proofs follow a semantic argument grounded in formal language theory whereas both [7] and [48] follow more standard syntactic arguments. More fundamentally, the class of protocol specifications considered in this paper generalizes that of [7, 48] along several dimensions: [48] considers synchronous rather than asynchronous communication and in both works, internal choice syntactically disallows a sender from choosing among multiple receivers (like in state q4 of Figure 1). Moreover, both papers restrict specifications to finitely many participants and states, and abstract message values in terms of simple types without data refinements. Finally, the notion of completeness considered in [48] is defined relative to the coinductive definition of endpoint projection introduced in [19]. The latter is itself incomplete for our semantically defined notion of implementability. The end-point projection of [7] is likewise incomplete (for our notion of completeness; see the note in Section 2).

Pirouette [25] introduces a language of functional choreographies that are converted to a distributed implementation via endpoint projection. The language supports session delegation and higher-order functions, neither of which we include in our model of GCLTS. However, functional choreographies are much more restricted in their distributed behavior than the protocols in our model: communication is synchronous and all participants must remain in lock step. The latter is enforced by requiring that the programmer inserts potentially redundant synchronization messages into the choreography. A proof that the implementations obtained by projection are deadlock-free has been mechanized in Rocq. Similar to [48], the completeness theorem is stated relative to completeness of syntactic projection rather than semantic implementability.

There is a large number of other recent mechanization efforts for session type languages [21, 22, 28, 23, 47, 41, 24, 27, 46, 12]. However, these focus on the formalization of language semantics, compiler correctness, or on proving soundness of session type systems that check implementations against local types. The latter describe the behavior of individual participants or communication channels and may be obtained by prior endpoint projection from a global type or specified directly by the programmer. We therefore consider these efforts orthogonal to our work.

5 Conclusion

We summarize the mechanization effort in numbers below, briefly discuss our Rocq user experience, and conclude with a discussion of future directions. Our mechanization is available at https://zenodo.org/records/15760397 [30].

Contents LOC
Standard library 0.7K
Message alphabet 2.2K
LTS, CLTS 2.6K
Global protocol 3.3K
Coherence conditions 0.2K
Soundness 5.1K
Completeness 1.3K
Total 15K

Our formal language-theoretic treatment of message-passing concurrency meant that definitions were straightforward to state, and much of the reasoning is equational in nature. Our definition of finite words as lists enabled us to lean heavily on the Rocq Standard Library in addition to the stdpp.list. We found significantly less library support for reasoning about streams however, and thus the standard library supplement required for our mechanization primarily consists of lemmas about streams. In addition to the standard induction principles for natural numbers and lists, many proofs relied on alternative induction principles such as strong induction on natural numbers (lt_wf_ind) and reverse induction on lists (rev_ind).

On the basis of our observation that [33, 34]’s result does not rely on a finite number of participants, it would be interesting to model and prove implementability of protocols with expressive features such as channel creation and delegation that are elided in much of the literature due to their complexity. It would also be interesting to explore using our semantic definition of protocols to model and prove implementability of existing Rocq protocol formalisms, such as [25, 7]. We further hope to use our mechanization to synthesize certified implementations for finite protocols, and investigate implementability under other asynchronous communication architectures. As shown in [32], synthesis for finite protocols amounts to a direct subset construction. As discussed in [33], symbolic, infinite-state automata fragments which admit generalized subset construction procedures also admit synthesis of implementations. We also believe that the reusable LTS and CLTS libraries contributed by this work can serve as a starting point to mechanize other theoretical results related to CLTSs. Finally, we plan to incorporate other problems that are relevant to top-down verification and synthesis frameworks, such as subtyping and refinement.

References

  • [1] Rajeev Alur, Kousha Etessami, and Mihalis Yannakakis. Inference of message sequence charts. IEEE Trans. Software Eng., 29(7):623–633, 2003. doi:10.1109/TSE.2003.1214326.
  • [2] Rajeev Alur and Mihalis Yannakakis. Model checking of message sequence charts. In Jos C. M. Baeten and Sjouke Mauw, editors, CONCUR ’99: Concurrency Theory, 10th International Conference, Eindhoven, The Netherlands, August 24-27, 1999, Proceedings, volume 1664 of Lecture Notes in Computer Science, pages 114–129. Springer, 1999. doi:10.1007/3-540-48320-9_10.
  • [3] Laura Bocchi, Romain Demangeon, and Nobuko Yoshida. A multiparty multi-session logic. In Catuscia Palamidessi and Mark Dermot Ryan, editors, Trustworthy Global Computing - 7th International Symposium, TGC 2012, Newcastle upon Tyne, UK, September 7-8, 2012, Revised Selected Papers, volume 8191 of Lecture Notes in Computer Science, pages 97–111. Springer, 2012. doi:10.1007/978-3-642-41157-1_7.
  • [4] Laura Bocchi, Kohei Honda, Emilio Tuosto, and Nobuko Yoshida. A theory of design-by-contract for distributed multiparty interactions. In Paul Gastin and François Laroussinie, editors, CONCUR 2010 - Concurrency Theory, 21th International Conference, CONCUR 2010, Paris, France, August 31-September 3, 2010. Proceedings, volume 6269 of Lecture Notes in Computer Science, pages 162–176. Springer, 2010. doi:10.1007/978-3-642-15375-4_12.
  • [5] Daniel Brand and Pitro Zafiropulo. On communicating finite-state machines. J. ACM, 30(2):323–342, 1983. doi:10.1145/322374.322380.
  • [6] Luís Caires and Jorge A. Pérez. Multiparty session types within a canonical binary theory, and beyond. In Elvira Albert and Ivan Lanese, editors, Formal Techniques for Distributed Objects, Components, and Systems - 36th IFIP WG 6.1 International Conference, FORTE 2016, Held as Part of the 11th International Federated Conference on Distributed Computing Techniques, DisCoTec 2016, Heraklion, Crete, Greece, June 6-9, 2016, Proceedings, volume 9688 of Lecture Notes in Computer Science, pages 74–95. Springer, 2016. doi:10.1007/978-3-319-39570-8_6.
  • [7] David Castro-Perez, Francisco Ferreira, Lorenzo Gheri, and Nobuko Yoshida. Zooid: a DSL for certified multiparty computation: from mechanised metatheory to certified multiparty processes. In Stephen N. Freund and Eran Yahav, editors, PLDI ’21: 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, Virtual Event, Canada, June 20-25, 2021, pages 237–251. ACM, 2021. doi:10.1145/3453483.3454041.
  • [8] Tzu-Chun Chen. Lightening global types. J. Log. Algebraic Methods Program., 84(5):708–729, 2015. doi:10.1016/J.JLAMP.2015.06.003.
  • [9] Luís Cruz-Filipe and Fabrizio Montesi. A core model for choreographic programming. Theor. Comput. Sci., 802:38–66, 2020. doi:10.1016/j.tcs.2019.07.005.
  • [10] Pierre-Malo Deniélou and Nobuko Yoshida. Multiparty session types meet communicating automata. In Helmut Seidl, editor, Programming Languages and Systems - 21st European Symposium on Programming, ESOP 2012, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24 - April 1, 2012. Proceedings, volume 7211 of Lecture Notes in Computer Science, pages 194–213. Springer, 2012. doi:10.1007/978-3-642-28869-2_10.
  • [11] Pierre-Malo Deniélou, Nobuko Yoshida, Andi Bejleri, and Raymond Hu. Parameterised multiparty session types. Log. Methods Comput. Sci., 8(4), 2012. doi:10.2168/LMCS-8(4:6)2012.
  • [12] Burak Ekici and Nobuko Yoshida. Completeness of asynchronous session tree subtyping in Coq. In 15th International Conference on Interactive Theorem Proving, ITP 2024, September 9-14, 2024, Tbilisi, Georgia, volume 309 of LIPIcs, pages 13:1–13:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ITP.2024.13.
  • [13] Alain Finkel and Étienne Lozes. Synchronizability of communicating finite state machines is not decidable. In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, volume 80 of LIPIcs, pages 122:1–122:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.122.
  • [14] Thomas Gazagnaire, Blaise Genest, Loïc Hélouët, P. S. Thiagarajan, and Shaofa Yang. Causal message sequence charts. In Luís Caires and Vasco Thudichum Vasconcelos, editors, CONCUR 2007 - Concurrency Theory, 18th International Conference, CONCUR 2007, Lisbon, Portugal, September 3-8, 2007, Proceedings, volume 4703 of Lecture Notes in Computer Science, pages 166–180. Springer, 2007. doi:10.1007/978-3-540-74407-8_12.
  • [15] Blaise Genest and Anca Muscholl. Message sequence charts: A survey. In Fifth International Conference on Application of Concurrency to System Design (ACSD 2005), 6-9 June 2005, St. Malo, France, pages 2–4. IEEE Computer Society, 2005. doi:10.1109/ACSD.2005.25.
  • [16] Blaise Genest, Anca Muscholl, and Doron A. Peled. Message sequence charts. In Jörg Desel, Wolfgang Reisig, and Grzegorz Rozenberg, editors, Lectures on Concurrency and Petri Nets, Advances in Petri Nets [This tutorial volume originates from the 4th Advanced Course on Petri Nets, ACPN 2003, held in Eichstätt, Germany in September 2003. In addition to lectures given at ACPN 2003, additional chapters have been commissioned], volume 3098 of Lecture Notes in Computer Science, pages 537–558. Springer, 2003. doi:10.1007/978-3-540-27755-2_15.
  • [17] Blaise Genest, Anca Muscholl, Helmut Seidl, and Marc Zeitoun. Infinite-state high-level mscs: Model-checking and realizability. J. Comput. Syst. Sci., 72(4):617–647, 2006. doi:10.1016/j.jcss.2005.09.007.
  • [18] Lorenzo Gheri, Ivan Lanese, Neil Sayers, Emilio Tuosto, and Nobuko Yoshida. Design-by-contract for flexible multiparty session protocols. In Karim Ali and Jan Vitek, editors, 36th European Conference on Object-Oriented Programming, ECOOP 2022, June 6-10, 2022, Berlin, Germany, volume 222 of LIPIcs, pages 8:1–8:28. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ECOOP.2022.8.
  • [19] Silvia Ghilezan, Svetlana Jaksic, Jovanka Pantovic, Alceste Scalas, and Nobuko Yoshida. Precise subtyping for synchronous multiparty sessions. J. Log. Algebraic Methods Program., 104:127–173, 2019. doi:10.1016/J.JLAMP.2018.12.002.
  • [20] Saverio Giallorenzo, Fabrizio Montesi, Marco Peressotti, David Richter, Guido Salvaneschi, and Pascal Weisenburger. Multiparty languages: The choreographic and multitier cases (pearl). In Anders Møller and Manu Sridharan, editors, 35th European Conference on Object-Oriented Programming, ECOOP 2021, July 11-17, 2021, Aarhus, Denmark (Virtual Conference), volume 194 of LIPIcs, pages 22:1–22:27. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ECOOP.2021.22.
  • [21] Jonas Kastberg Hinrichsen, Jesper Bengtson, and Robbert Krebbers. Actris: session-type based reasoning in separation logic. Proc. ACM Program. Lang., 4(POPL):6:1–6:30, 2020. doi:10.1145/3371074.
  • [22] Jonas Kastberg Hinrichsen, Jesper Bengtson, and Robbert Krebbers. Actris 2.0: Asynchronous session-type based reasoning in separation logic. Log. Methods Comput. Sci., 18(2), 2022. doi:10.46298/LMCS-18(2:16)2022.
  • [23] Jonas Kastberg Hinrichsen, Jules Jacobs, and Robbert Krebbers. Multris: Functional verification of multiparty message passing in separation logic. 2024. URL: https://jihgfee.github.io/papers/multris_manuscript.pdf.
  • [24] Jonas Kastberg Hinrichsen, Daniël Louwrink, Robbert Krebbers, and Jesper Bengtson. Machine-checked semantic session typing. In Catalin Hritcu and Andrei Popescu, editors, CPP ’21: 10th ACM SIGPLAN International Conference on Certified Programs and Proofs, Virtual Event, Denmark, January 17-19, 2021, pages 178–198. ACM, 2021. doi:10.1145/3437992.3439914.
  • [25] Andrew K. Hirsch and Deepak Garg. Pirouette: higher-order typed functional choreographies. Proc. ACM Program. Lang., 6(POPL):1–27, 2022. doi:10.1145/3498684.
  • [26] Kohei Honda, Nobuko Yoshida, and Marco Carbone. Multiparty asynchronous session types. In George C. Necula and Philip Wadler, editors, Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008, San Francisco, California, USA, January 7-12, 2008, pages 273–284. ACM, 2008. doi:10.1145/1328438.1328472.
  • [27] Jules Jacobs, Stephanie Balzer, and Robbert Krebbers. Connectivity graphs: a method for proving deadlock freedom based on separation logic. Proc. ACM Program. Lang., 6(POPL):1–33, 2022. doi:10.1145/3498662.
  • [28] Jules Jacobs, Jonas Kastberg Hinrichsen, and Robbert Krebbers. Dependent session protocols in separation logic from first principles (functional pearl). Proc. ACM Program. Lang., 7(ICFP):768–795, 2023. doi:10.1145/3607856.
  • [29] Ivan Lanese, Jorge A. Pérez, Davide Sangiorgi, and Alan Schmitt. On the expressiveness and decidability of higher-order process calculi. In Proceedings of the Twenty-Third Annual IEEE Symposium on Logic in Computer Science, LICS 2008, 24-27 June 2008, Pittsburgh, PA, USA, pages 145–155. IEEE Computer Society, 2008. doi:10.1109/LICS.2008.8.
  • [30] Elaine Li. Itp’25 artifact: Certified implementability of global multiparty protocols), June 2025. doi:10.5281/zenodo.15760396.
  • [31] Elaine Li, Felix Stutz, and Thomas Wies. Deciding subtyping for asynchronous multiparty sessions. In Stephanie Weirich, editor, Programming Languages and Systems - 33rd European Symposium on Programming, ESOP 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, April 6-11, 2024, Proceedings, Part I, volume 14576 of Lecture Notes in Computer Science, pages 176–205. Springer, 2024. doi:10.1007/978-3-031-57262-3_8.
  • [32] Elaine Li, Felix Stutz, Thomas Wies, and Damien Zufferey. Complete multiparty session type projection with automata. In Constantin Enea and Akash Lal, editors, Computer Aided Verification - 35th International Conference, CAV 2023, Paris, France, July 17-22, 2023, Proceedings, Part III, volume 13966 of Lecture Notes in Computer Science, pages 350–373. Springer, 2023. doi:10.1007/978-3-031-37709-9_17.
  • [33] Elaine Li, Felix Stutz, Thomas Wies, and Damien Zufferey. Characterizing implementability of global protocols with infinite states and data. PACMPL, 9(Object-oriented Programming, Systems, Languages, and Applications (OOPSLA)), 2025. doi:10.1145/3720493.
  • [34] Elaine Li, Felix Stutz, Thomas Wies, and Damien Zufferey. Characterizing implementability of global protocols with infinite states and data, 2025. arXiv:2411.05722v2.
  • [35] Markus Lohrey. Realizability of high-level message sequence charts: closing the gaps. Theor. Comput. Sci., 309(1-3):529–554, 2003. doi:10.1016/j.tcs.2003.08.002.
  • [36] Rupak Majumdar, Madhavan Mukund, Felix Stutz, and Damien Zufferey. Generalising projection in asynchronous multiparty session types. In Serge Haddad and Daniele Varacca, editors, 32nd International Conference on Concurrency Theory, CONCUR 2021, August 24-27, 2021, Virtual Conference, volume 203 of LIPIcs, pages 35:1–35:24. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.CONCUR.2021.35.
  • [37] Petar Maksimovic and Alan Schmitt. Hocore in coq. In Christian Urban and Xingyuan Zhang, editors, Interactive Theorem Proving - 6th International Conference, ITP 2015, Nanjing, China, August 24-27, 2015, Proceedings, volume 9236 of Lecture Notes in Computer Science, pages 278–293. Springer, 2015. doi:10.1007/978-3-319-22102-1_19.
  • [38] Sjouke Mauw and Michel A. Reniers. High-level message sequence charts. In Ana R. Cavalli and Amardeo Sarma, editors, SDL ’97 Time for Testing, SDL, MSC and Trends - 8th International SDL Forum, Evry, France, 23-29 September 1997, Proceedings, pages 291–306. Elsevier, 1997.
  • [39] Rémi Morin. Recognizable sets of message sequence charts. In Helmut Alt and Afonso Ferreira, editors, STACS 2002, 19th Annual Symposium on Theoretical Aspects of Computer Science, Antibes - Juan les Pins, France, March 14-16, 2002, Proceedings, volume 2285 of Lecture Notes in Computer Science, pages 523–534. Springer, 2002. doi:10.1007/3-540-45841-7_43.
  • [40] Anca Muscholl and Doron A. Peled. Message sequence graphs and decision problems on mazurkiewicz traces. In Miroslaw Kutylowski, Leszek Pacholski, and Tomasz Wierzbicki, editors, Mathematical Foundations of Computer Science 1999, 24th International Symposium, MFCS’99, Szklarska Poreba, Poland, September 6-10, 1999, Proceedings, volume 1672 of Lecture Notes in Computer Science, pages 81–91. Springer, 1999. doi:10.1007/3-540-48340-3_8.
  • [41] Arjen Rouvoet, Casper Bach Poulsen, Robbert Krebbers, and Eelco Visser. Intrinsically-typed definitional interpreters for linear, session-typed languages. In Jasmin Blanchette and Catalin Hritcu, editors, Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2020, New Orleans, LA, USA, January 20-21, 2020, pages 284–298. ACM, 2020. doi:10.1145/3372885.3373818.
  • [42] Abhik Roychoudhury, Ankit Goel, and Bikram Sengupta. Symbolic message sequence charts. ACM Trans. Softw. Eng. Methodol., 21(2):12:1–12:44, 2012. doi:10.1145/2089116.2089122.
  • [43] Alceste Scalas and Nobuko Yoshida. Less is more: multiparty session types revisited. Proc. ACM Program. Lang., 3(POPL):30:1–30:29, 2019. doi:10.1145/3290343.
  • [44] Gan Shen, Shun Kashiwa, and Lindsey Kuper. Haschor: Functional choreographic programming for all (functional pearl). CoRR, abs/2303.00924, 2023. doi:10.48550/arXiv.2303.00924.
  • [45] Felix Stutz. Asynchronous multiparty session type implementability is decidable - lessons learned from message sequence charts. In Karim Ali and Guido Salvaneschi, editors, 37th European Conference on Object-Oriented Programming, ECOOP 2023, July 17-21, 2023, Seattle, Washington, United States, volume 263 of LIPIcs, pages 32:1–32:31. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.ECOOP.2023.32.
  • [46] Joseph Tassarotti, Ralf Jung, and Robert Harper. A higher-order logic for concurrent termination-preserving refinement. In Hongseok Yang, editor, Programming Languages and Systems - 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, volume 10201 of Lecture Notes in Computer Science, pages 909–936. Springer, 2017. doi:10.1007/978-3-662-54434-1_34.
  • [47] Peter Thiemann. Intrinsically-typed mechanized semantics for session types. In Ekaterina Komendantskaya, editor, Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages, PPDP 2019, Porto, Portugal, October 7-9, 2019, pages 19:1–19:15. ACM, 2019. doi:10.1145/3354166.3354184.
  • [48] Dawit Legesse Tirore, Jesper Bengtson, and Marco Carbone. A sound and complete projection for global types. In Adam Naumowicz andL René Thiemann, editor, 14th International Conference on Interactive Theorem Proving, ITP 2023, July 31 to August 4, 2023, Białystok, Poland, volume 268 of LIPIcs, pages 28:1–28:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.ITP.2023.28.
  • [49] Bernardo Toninho and Nobuko Yoshida. Certifying data in multiparty session types. J. Log. Algebraic Methods Program., 90:61–83, 2017. doi:10.1016/j.jlamp.2016.11.005.
  • [50] Fangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova, and Nobuko Yoshida. Statically verified refinements for multiparty protocols. Proc. ACM Program. Lang., 4(OOPSLA):148:1–148:30, 2020. doi:10.1145/3428216.