๐ค AI Summary
This work addresses safety and liveness risks arising from the interplay between global protocols and locally optimized specifications in asynchronous multiparty session types. We propose the first precise and practical theoretical framework for asynchronous multirole session types. Our approach introduces a rigorously defined asynchronous multirole subtyping relation and formally establishes, for the first time, an asynchronous correspondence between global protocols and their local projections. We mechanically verify in Coq and Isabelle the soundness and completeness of this correspondence. Crucially, this correspondence serves as a system-level invariant: it guarantees type safety, deadlock freedom, and livenessโeven when distributed components are developed independently and their actions are asynchronously reordered. The framework thus provides a foundational basis for compositional verification of asynchronous distributed systems.
๐ Abstract
Asynchronous multiparty session types are a type-based framework that ensures the compatibility of components in a distributed system by specifying a global protocol. Each component can be independently developed and refined locally, before being integrated into a larger system, leading to higher quality distributed software. This paper studies the interplay between global protocols and an asynchronous refinement relation, precise asynchronous multiparty subtyping. This subtyping relation locally optimises asynchronous messaging, enabling a permutation of two actions in a component while still preserving the safety and liveness of the overall composed system. In this paper, we first define the asynchronous association between a global protocol and a set of local (optimised) specifications. We then prove the soundness and completeness of the operational correspondence of this asynchronous association. We demonstrate that the association acts as an invariant to provide type soundness, deadlock-freedom and liveness of a collection of components optimised from the end-point projections of a given global protocol.