Composition and decomposition of multiparty sessions

Abstract Multiparty sessions are systems of concurrent processes, which allow several participants to communicate by sending and receiving messages. Their overall behaviour can be described by means of global types. Typable multiparty sessions enjoy lock-freedom. We look at multiparty sessions as open systems by allowing one to compose multiparty sessions by transforming two of their participants into a pair of coupled gateways, forwarding messages between the two sessions. Gateways need to be compatible. We show that the session resulting from the composition can be typed, and its type can be computed from the global types of the starting sessions. As a consequence, lock-freedom is preserved by composition. Compatibility between global types is necessary, since systems obtained by composing sessions with incompatible global types have locks (or they are not sessions). We also define direct composition, which allows one to connect two global types without using gateways. Finally, we propose a decomposition operator, to split a global type into two, which is the left inverse of direct composition. Direct composition and decomposition on global types prepare the ground for a novel framework allowing for the modular design and implementation of distributed systems.

[1]  Mariangiola Dezani-Ciancaglini,et al.  Precise subtyping for synchronous multiparty sessions , 2016, PLACES.

[2]  Luca Padovani,et al.  A Gentle Introduction to Multiparty Asynchronous Session Types , 2015, SFM.

[3]  Luca Padovani,et al.  A theory of contracts for Web services , 2007, TOPL.

[4]  Romain Demangeon,et al.  Full Abstraction in a Subtyped pi-Calculus with Linear Types , 2011, CONCUR.

[5]  Simon J. Gay Subtyping Supports Safe Session Substitution , 2016, A List of Successes That Can Change the World.

[6]  Naoki Kobayashi A type system for lock-free processes , 2002 .

[7]  Hugo Torres Vieira,et al.  A type language for message passing component-based systems , 2020, ICE.

[8]  Emilio Tuosto,et al.  Coordination Via Types in an Event-Based Framework , 2007, FORTE.

[9]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[10]  Bruno Courcelle,et al.  Fundamental Properties of Infinite Trees , 1983, Theor. Comput. Sci..

[11]  Mariangiola Dezani-Ciancaglini,et al.  Compliance for reversible client/server interactions , 2014, BEAT.

[12]  Rolf Hennicker,et al.  Global Types for Open Systems , 2018, ICE.

[13]  Ivan Lanese,et al.  Dynamic Choreographies: Theory And Implementation , 2017, Log. Methods Comput. Sci..

[14]  Mariangiola Dezani-Ciancaglini,et al.  Open Multiparty Sessions , 2019, ICE.

[15]  Philip Wadler,et al.  Coherence Generalises Duality: A Logical Explanation of Multiparty Session Types , 2016, CONCUR.

[16]  Mariangiola Dezani-Ciancaglini,et al.  Reversible client/server interactions , 2016, Formal Aspects of Computing.

[17]  Nobuko Yoshida,et al.  Global Principal Typing in Partially Commutative Asynchronous Sessions , 2009, ESOP.

[18]  Alexandra Silva,et al.  Practical coinduction , 2016, Mathematical Structures in Computer Science.

[19]  Ivan Lanese,et al.  Guess Who's Coming: Runtime Inclusion of Participants in Choreographies , 2019, The Art of Modelling Computational Systems.

[20]  Paula Severi,et al.  Observational Equivalence for Multiparty Sessions , 2019, Fundam. Informaticae.

[21]  Luca Padovani,et al.  Global progress for dynamically interleaved multiparty sessions , 2014, Mathematical Structures in Computer Science.

[22]  Luís Caires,et al.  Multiparty Session Types Within a Canonical Binary Theory, and Beyond , 2016, FORTE.

[23]  Simon J. Gay,et al.  Subtyping for session types in the pi calculus , 2005, Acta Informatica.

[24]  Resolving Non-determinism in Choreographies , 2014, ESOP.

[25]  Nobuko Yoshida,et al.  Explicit Connection Actions in Multiparty Session Types , 2017, FASE.

[26]  Gian Luigi Ferrari,et al.  JSCL: A Middleware for Service Coordination , 2006, FORTE.

[27]  Mario Bravetti,et al.  Undecidability of asynchronous session subtyping , 2016, Inf. Comput..

[28]  Ilaria Castellani,et al.  Reversible sessions with flexible choices , 2019, Acta Informatica.

[29]  Rolf Hennicker,et al.  Connecting open systems of communicating finite state machines , 2019, J. Log. Algebraic Methods Program..

[30]  Roberto Bruni,et al.  Data-Driven Choreographies à la Klaim , 2019, Models, Languages, and Tools for Concurrent and Distributed Programming.

[31]  Nobuko Yoshida,et al.  Multiparty asynchronous session types , 2008, POPL '08.

[32]  Luca Padovani,et al.  Deadlock and lock freedom in the linear π-calculus , 2014, CSL-LICS.

[33]  Daniel Brand,et al.  On Communicating Finite-State Machines , 1983, JACM.

[34]  Emilio Tuosto,et al.  Synthesising Choreographies from Local Session Types , 2012, CONCUR.

[35]  Vladimir Gapeyev,et al.  Recursive Types , 2007 .