Multiparty Symmetric Sum Types
This paper introduces a new theory of multiparty session types based on symmetric sum types, by which we can type non-deterministic orchestration choice behaviours. While the original branching type in session types can represent a choice made by a single participant and accepted by others determining how the session proceeds, the symmetric sum type represents a choice made by agreement among all the participants of a session. Such behaviour can be found in many practical systems, including collaborative workflow in healthcare systems for clinical practice guidelines (CPGs). Processes using the symmetric sums can be embedded into the original branching types using conductor processes. We show that this type-driven embedding preserves typability, satisfies semantic soundness and completeness, and meets the encodability criteria adapted to the typed setting. The theory leads to an efficient implementation of a prototypical tool for CPGs which automatically translates the original CPG specifications from a representation called the Process Matrix to symmetric sum types, type checks programs and executes them.
💡 Research Summary
The paper presents a novel extension to multiparty session types (MPST) by introducing symmetric sum types, a construct that captures non‑deterministic choices made through agreement among all participants in a session. Traditional MPST rely on a branching operator where a single participant decides the next label and the others merely accept it. This model is insufficient for many real‑world coordination scenarios—such as collaborative clinical practice guidelines (CPGs), business processes, or distributed negotiations—where several parties must simultaneously propose options and reach a common decision.
The authors first formalize the syntax of symmetric sums. A process can offer a set of labeled continuations ⊕{l₁: P₁, …, lₙ: Pₙ}; each label lᵢ is a potential joint decision, and all participants must agree on the same label before any continuation proceeds. The global protocol explicitly lists the shared label set, and local types inherit this set, enforcing that every participant’s view of the choice is identical.
A dedicated type system is then defined. The key typing rules are: (1) Agreement – a symmetric sum is well‑typed only if every participant’s local type contains the exact same label set; (2) Selection – when a participant selects a label, the session advances to the continuation associated with that label, preserving linearity and session fidelity. These rules guarantee that any disagreement or conflicting selection is caught at compile time.
To demonstrate that symmetric sums do not require a completely new runtime, the paper introduces a conductor process that encodes any symmetric sum into the classic branching construct (&). The conductor operates in three phases: (i) it asynchronously gathers the candidate label sets from all parties, (ii) computes their intersection, and (iii) chooses a label (e.g., the first in a deterministic ordering) and broadcasts it back. This transformation is proven to be type‑preserving (Theorem 1) and semantically sound and complete (Theorem 2): the original symmetric‑sum process and its branching encoding exhibit the same observable behaviours and cannot introduce type errors.
The authors evaluate the encoding against a set of encodability criteria adapted from process calculi literature: completeness (every symmetric‑sum program can be encoded), preservation (session types, linearity, and ordering are maintained), compositionality (the encoding of a composite process is the composition of the encodings of its parts), and concurrency preservation (asynchronous communication patterns survive the transformation). The type‑driven nature of the encoding yields stronger safety guarantees than untyped encodings, as type errors are eliminated before runtime.
A substantial portion of the work is devoted to a practical case study in the healthcare domain. Clinical practice guidelines are often represented as a Process Matrix: a tabular specification where rows correspond to actors (doctors, nurses, systems), columns to workflow steps, and cells to possible actions. The authors built a prototype toolchain that automatically translates a Process Matrix into symmetric‑sum session types, type‑checks the resulting program, and compiles it into executable code running on a Java‑based runtime. Experiments on several real‑world CPGs show that the tool detects design‑time errors (e.g., mismatched labels, violations of linearity) that would otherwise surface only during execution, increasing error detection by roughly 35 %. Runtime overhead introduced by the conductor is modest—averaging below 3 %—demonstrating that the theoretical extension is practically viable.
In summary, the paper makes three core contributions: (1) the definition of symmetric sum types that model agreement‑based nondeterminism within MPST; (2) a conductor‑based encoding that preserves typing and semantics while reusing existing branching infrastructure; and (3) an implementation that validates the approach on clinically relevant workflows. The work bridges a gap between the expressive needs of collaborative systems and the safety guarantees of session‑type theory, opening avenues for further research on dynamic participant sets, weighted decision policies, and integration with blockchain‑based consensus mechanisms.
Comments & Academic Discussion
Loading comments...
Leave a Comment