Abstract
Session types have recently been integrated with functional languages, bringing message-passing concurrency to functional programming. Channel endpoints then become first-class and can be stored in data structures, captured in closures, and sent along channels. Representatives of the GV (Wadler's "Good Variation") session type family are of particular appeal because they not only assert session fidelity but also deadlock freedom, inspired by a Curry-Howard correspondence to linear logic. A restriction of current versions of GV, however, is the focus on binary sessions, limiting concurrent interactions within a session to two participants. This paper introduces Multiparty GV (MPGV), a functional language with multiparty session types, allowing concurrent interactions among several participants. MPGV upholds the strong guarantees of its ancestor GV, including deadlock freedom, despite session interleaving and delegation. MPGV has a novel redirecting construct for modular programming with first-class endpoints, thanks to which we give a type-preserving translation from binary session types to MPGV to show that MPGV is strictly more general than binary GV. All results in this paper have been mechanized using the Coq proof assistant.
- Arnon Avron. 1991. Hypersequents, Logical Consequence and Intermediate Logics for Concurrency. Annals of Mathematics and Artificial Intelligence, 4 (1991), 225–248. https://doi.org/10.1007/BF01531058
Google Scholar
Cross Ref
- Stephanie Balzer and Frank Pfenning. 2017. Manifest Sharing with Session Types. PACMPL, 1, ICFP (2017), 37:1–37:29. https://doi.org/10.1145/3110281
Google Scholar
Digital Library
- Stephanie Balzer, Frank Pfenning, and Bernardo Toninho. 2018. A Universal Session Type for Untyped Asynchronous Communication. In CONCUR (LIPIcs, Vol. 118). 30:1–30:18. https://doi.org/10.4230/LIPIcs.CONCUR.2018.30
Google Scholar
Cross Ref
- Stephanie Balzer, Bernardo Toninho, and Frank Pfenning. 2019. Manifest Deadlock-Freedom for Shared Session Types. In ESOP (LNCS, Vol. 11423). 611–639. https://doi.org/10.1007/978-3-030-17184-1_22
Google Scholar
Cross Ref
- Lorenzo Bettini, Mario Coppo, Loris D’Antoni, Marco De Luca, Mariangiola Dezani-Ciancaglini, and Nobuko Yoshida. 2008. Global Progress in Dynamically Interleaved Multiparty Sessions. In CONCUR (LNCS, Vol. 5201). 418–433. https://doi.org/10.1007/978-3-540-85361-9_33
Google Scholar
Digital Library
- Luís Caires and Jorge A. Pérez. 2016. Multiparty Session Types Within a Canonical Binary Theory, and Beyond. In FORTE (LNCS, Vol. 9688). 74–95. https://doi.org/10.1007/978-3-319-39570-8_6
Google Scholar
Digital Library
- Luís Caires and Frank Pfenning. 2010. Session Types as Intuitionistic Linear Propositions. In CONCUR (LNCS, Vol. 6269). 222–236. https://doi.org/10.1007/978-3-642-15375-4_16
Google Scholar
Cross Ref
- Marco Carbone, Sam Lindley, Fabrizio Montesi, Carsten Schürmann, and Philip Wadler. 2016. Coherence Generalises Duality: A Logical Explanation of Multiparty Session Types. In CONCUR (LIPIcs, Vol. 59). 33:1–33:15. https://doi.org/10.4230/LIPIcs.CONCUR.2016.33
Google Scholar
Cross Ref
- Marco Carbone, Fabrizio Montesi, Carsten Schürmann, and Nobuko Yoshida. 2015. Multiparty Session Types as Coherence Proofs. In CONCUR (LIPIcs, Vol. 42). 412–426. https://doi.org/10.4230/LIPIcs.CONCUR.2015.412
Google Scholar
Cross Ref
- Marco Carbone, Fabrizio Montesi, Carsten Schürmann, and Nobuko Yoshida. 2017. Multiparty session types as coherence proofs. Acta Informatica, 54, 3 (2017), 243–269. https://doi.org/10.1007/s00236-016-0285-y
Google Scholar
Digital Library
- David Castro-Perez, Francisco Ferreira, Lorenzo Gheri, and Nobuko Yoshida. 2021. Zooid: A DSL for Certified Multiparty Computation: From Mechanised Metatheory to Certified Multiparty Processes. In PLDI. 237–251. https://doi.org/10.1145/3453483.3454041
Google Scholar
Digital Library
- David Castro-Perez, Francisco Ferreira, and Nobuko Yoshida. 2020. EMTST: Engineering the Meta-theory of Session Types. In TACAS (2) (LNCS, Vol. 12079). 278–285. https://doi.org/10.1007/978-3-030-45237-7_17
Google Scholar
Digital Library
- Ruofei Chen, Stephanie Balzer, and Bernardo Toninho. 2022. Ferrite: A Judgmental Embedding of Session Types in Rust. In ECOOP (LIPIcs, Vol. 222). 22:1–22:28. https://doi.org/10.4230/LIPIcs.ECOOP.2022.22
Google Scholar
Cross Ref
- Luca Ciccone and Luca Padovani. 2020. A Dependently Typed Linear π -Calculus in Agda. In PPDP. 8:1–8:14. https://doi.org/10.1145/3414080.3414109
Google Scholar
Digital Library
- Mario Coppo, Mariangiola Dezani-Ciancaglini, Luca Padovani, and Nobuko Yoshida. 2013. Inference of Global Progress Properties for Dynamically Interleaved Multiparty Sessions. In COORDINATION. https://doi.org/10.1007/978-3-642-38493-6_4
Google Scholar
Cross Ref
- Mario Coppo, Mariangiola Dezani-Ciancaglini, Nobuko Yoshida, and Luca Padovani. 2016. Global Progress for Dynamically Interleaved Multiparty Sessions. MSCS, 26, 2 (2016), 238–302. https://doi.org/10.1017/S0960129514000188
Google Scholar
Cross Ref
- Karl Crary, Robert Harper, and Sidd Puri. 1999. What is a Recursive Module? In PLDI. 50–63. https://doi.org/10.1145/301618.301641
Google Scholar
Digital Library
- Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Certifying Choreography Compilation. In ICTAC (LNCS, Vol. 12819). 115–133. https://doi.org/10.1007/978-3-030-85315-0_8
Google Scholar
Digital Library
- Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Formalising a Turing-Complete Choreographic Language in Coq. In ITP (LIPIcs, Vol. 193). 15:1–15:18. https://doi.org/10.4230/LIPIcs.ITP.2021.15
Google Scholar
Cross Ref
- Ornela Dardha and Simon J. Gay. 2018. A New Linear Logic for Deadlock-Free Session-Typed Processes. In FOSSACS (LNCS, Vol. 10803). 91–109. https://doi.org/10.1007/978-3-319-89366-2_5
Google Scholar
Cross Ref
- Romain Demangeon and Kohei Honda. 2012. Nested Protocols in Session Types. In CONCUR (LNCS, Vol. 7454). 272–286. https://doi.org/10.1007/978-3-642-32940-1_20
Google Scholar
Digital Library
- Pierre-Malo Deniélou and Nobuko Yoshida. 2011. Dynamic multirole session types. In POPL. 435–446. https://doi.org/10.1145/1926385.1926435
Google Scholar
Digital Library
- Mariangiola Dezani-Ciancaglini, Dimitris Mostrous, Nobuko Yoshida, and Sophia Drossopoulou. 2006. Session Types for Object-Oriented Languages. In ESOP (LNCS, Vol. 4067). 328–352. https://doi.org/10.1007/11785477_20
Google Scholar
Digital Library
- Simon Fowler, Wen Kokke, Ornela Dardha, Sam Lindley, and J. Garrett Morris. 2021. Separating Sessions Smoothly. In CONCUR (LIPIcs, Vol. 203). 36:1–36:18. https://doi.org/10.4230/LIPIcs.CONCUR.2021.36
Google Scholar
Cross Ref
- Simon Fowler, Sam Lindley, J. Garrett Morris, and Sára Decova. 2019. Exceptional Asynchronous Session Types: Session Types Without Tiers. PACMPL, 3, POPL (2019), 28:1–28:29. https://doi.org/10.1145/3290341
Google Scholar
Digital Library
- Simon J. Gay, Peter Thiemann, and Vasco T. Vasconcelos. 2020. Duality of Session Types: The Final Cut. In PLACES (EPTCS, Vol. 314). 23–33. https://doi.org/10.4204/EPTCS.314.3
Google Scholar
Cross Ref
- Simon J. Gay and Vasco Thudichum Vasconcelos. 2010. Linear Type Theory for Asynchronous Session Types. JFP, 20, 1 (2010), 19–50. https://doi.org/10.1017/S0956796809990268
Google Scholar
Digital Library
- Silvia Ghilezan, Jovanka Pantovic, Ivan Prokic, Alceste Scalas, and Nobuko Yoshida. 2021. Precise subtyping for asynchronous multiparty sessions. PACMPL, 5, POPL (2021), 1–28. https://doi.org/10.1145/3434297
Google Scholar
Digital Library
- Elena Giachino, Naoki Kobayashi, and Cosimo Laneve. 2014. Deadlock Analysis of Unbounded Process Networks. In CONCUR (LNCS, Vol. 8704). 63–77. https://doi.org/10.1007/978-3-662-44584-6_6
Google Scholar
Cross Ref
- Matthew A. Goto, Radha Jagadeesan, Alan Jeffrey, Corin Pitcher, and James Riely. 2016. An Extensible Approach to Session Polymorphism. MSCS, 26, 3 (2016), 465–509. https://doi.org/10.1017/S0960129514000231
Google Scholar
Cross Ref
- Jonas Kastberg Hinrichsen, Daniël Louwrink, Robbert Krebbers, and Jesper Bengtson. 2021. Machine-checked semantic session typing. In CPP. 178–198. https://doi.org/10.1145/3437992.3439914
Google Scholar
Digital Library
- Kohei Honda. 1993. Types for Dyadic Interaction. In CONCUR (LNCS, Vol. 715). 509–523. https://doi.org/10.1007/3-540-57208-2_35
Google Scholar
Cross Ref
- Kohei Honda, Vasco Thudichum Vasconcelos, and Makoto Kubo. 1998. Language Primitives and Type Discipline for Structured Communication-Based Programming. In ESOP (LNCS, Vol. 1381). 122–138. https://doi.org/10.1007/BFb0053567
Google Scholar
Cross Ref
- Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty Asynchronous Session Types. In POPL. 273–284. https://doi.org/10.1145/1328438.1328472
Google Scholar
Digital Library
- Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2016. Multiparty Asynchronous Session Types. J. ACM, 63, 1 (2016), 9:1–9:67. https://doi.org/10.1145/2827695
Google Scholar
Digital Library
- Raymond Hu and Nobuko Yoshida. 2017. Explicit Connection Actions in Multiparty Session Types. In FASE (LNCS, Vol. 10202). 116–133. https://doi.org/10.1007/978-3-662-54494-5_7
Google Scholar
Digital Library
- Keigo Imai, Nobuko Yoshida, and Shoji Yuen. 2019. Session-Ocaml: A Session-Based Library with Polarities and Lenses. Science of Computer Programming, 172 (2019), 135–159. https://doi.org/10.1016/j.scico.2018.08.005
Google Scholar
Cross Ref
- Keigo Imai, Shoji Yuen, and Kiyoshi Agusa. 2010. Session Type Inference in Haskell. In PLACES (EPTCS, Vol. 69). 74–91. https://doi.org/10.4204/EPTCS.69.6
Google Scholar
Cross Ref
- Jules Jacobs, Stephanie Balzer, and Robbert Krebbers. 2022. Connectivity graphs: a method for proving deadlock freedom based on separation logic. PACMPL, 6, POPL, 1–33. https://doi.org/10.1145/3498662
Google Scholar
Digital Library
- Jules Jacobs, Stephanie Balzer, and Robbert Krebbers. 2022. Coq development. https://doi.org/10.5281/zenodo.6884760
Google Scholar
Digital Library
- Thomas Bracht Laumann Jespersen, Philip Munksgaard, and Ken Friis Larsen. 2015. Session Types for Rust. In WGP. 13–22. https://doi.org/10.1145/2808098.2808100
Google Scholar
Digital Library
- Alex C. Keizer, Henning Basold, and Jorge A. Pérez. 2021. Session Coalgebras: A Coalgebraic View on Session Types and Communication Protocols. In ESOP (LNCS, Vol. 12648). 375–403. https://doi.org/10.1007/978-3-030-72019-3_14
Google Scholar
Digital Library
- Naoki Kobayashi. 1997. A Partially Deadlock-Free Typed Process Calculus. In LICS. 128–139. https://doi.org/10.1109/LICS.1997.614941
Google Scholar
Cross Ref
- Naoki Kobayashi. 2002. A Type System for Lock-Free Processes. I&C, 177, 2 (2002), 122–159. https://doi.org/10.1006/inco.2002.3171
Google Scholar
Cross Ref
- Naoki Kobayashi. 2006. A New Type System for Deadlock-Free Processes. In CONCUR (LNCS, Vol. 4137). 233–247. https://doi.org/10.1007/11817949_16
Google Scholar
Digital Library
- Naoki Kobayashi and Cosimo Laneve. 2017. Deadlock Analysis of Unbounded Process Networks. Inf. Comput., 252 (2017), 48–70. https://doi.org/10.1016/j.ic.2016.03.004
Google Scholar
Digital Library
- Wen Kokke. 2019. Rusty Variation: Deadlock-free Sessions with Failure in Rust. In ICE (EPTCS, Vol. 304). 48–60. https://doi.org/10.4204/EPTCS.304.4
Google Scholar
Cross Ref
- Wen Kokke and Ornela Dardha. 2021. Deadlock-Free Session Types in Linear Haskell. In Haskell Symposium. 1–13. https://doi.org/10.1145/3471874.3472979
Google Scholar
Digital Library
- Wen Kokke and Ornela Dardha. 2021. Prioritise the Best Variation. In FORTE (LNCS, Vol. 12719). 100–119. https://doi.org/10.1007/978-3-030-78089-0_6
Google Scholar
Digital Library
- Wen Kokke, Fabrizio Montesi, and Marco Peressotti. 2019. Better Late Than Never: a Fully-Abstract Semantics for Classical Processes. PACMPL, 3, POPL (2019), 24:1–24:29. https://doi.org/10.1145/3290337
Google Scholar
Digital Library
- Robbert Krebbers, Jacques-Henri Jourdan, Ralf Jung, Joseph Tassarotti, Jan-Oliver Kaiser, Amin Timany, Arthur Charguéraud, and Derek Dreyer. 2018. MoSeL: A General, Extensible Modal Framework for Interactive Proofs in Separation Logic. PACMPL, 2, ICFP (2018), 77:1–77:30. https://doi.org/10.1145/3236772
Google Scholar
Digital Library
- Robbert Krebbers, Amin Timany, and Lars Birkedal. 2017. Interactive Proofs in Higher-Order Concurrent Separation Logic. In POPL. 205–217. https://doi.org/10.1145/3009837.3009855
Google Scholar
Digital Library
- Sam Lindley and J. Garrett Morris. 2015. A Semantics for Propositions as Sessions. In ESOP (LNCS, Vol. 9032). 560–584. https://doi.org/10.1007/978-3-662-46669-8_23
Google Scholar
Cross Ref
- Sam Lindley and J. Garrett Morris. 2016. Embedding Session Types in Haskell. In Haskell Symposium. 133–145. https://doi.org/10.1145/2976002.2976018
Google Scholar
Digital Library
- Sam Lindley and J. Garrett Morris. 2016. Talking Bananas: Structural Recursion For Session Types. In ICFP. 434–447. https://doi.org/10.1145/2951913.2951921
Google Scholar
Digital Library
- Sam Lindley and J. Garrett Morris. 2017. Lightweight Functional Session Types. In Behavioural Types: from Theory to Tools. https://homepages.inf.ed.ac.uk/slindley/papers/fst.pdf
Google Scholar
- Fabrizio Montesi. 2020. Introduction to Choreographies. https://www.fabriziomontesi.com/teaching/ct-2020/files/chor-notes.pdf Draft
Google Scholar
- Fabrizio Montesi and Marco Peressotti. 2018. Classical Transitions. CoRR, abs/1803.01049 (2018), arxiv:1803.01049. arxiv:1803.01049
Google Scholar
- Dimitris Mostrous, Nobuko Yoshida, and Kohei Honda. 2009. Global Principal Typing in Partially Commutative Asynchronous Sessions. In ESOP (LNCS, Vol. 5502). 316–332. https://doi.org/10.1007/978-3-642-00590-9_23
Google Scholar
Digital Library
- Peter W. O’Hearn and David J. Pym. 1999. The Logic Of Bunched Implications. Bulletin of Symbolic Logic, 5, 2 (1999), 215–244. https://doi.org/10.2307/421090
Google Scholar
Cross Ref
- Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local Reasoning about Programs that Alter Data Structures. In CSL (LNCS, Vol. 2142). 1–19. https://doi.org/10.1007/3-540-44802-0_1
Google Scholar
Cross Ref
- Luca Padovani. 2014. Deadlock and lock freedom in the linear π -calculus. In LICS. 72:1–72:10. https://doi.org/10.1145/2603088.2603116
Google Scholar
Digital Library
- Luca Padovani. 2017. A Simple Library Implementation of Binary Sessions. JFP, 27 (2017), e4. https://doi.org/10.1017/S0956796816000289
Google Scholar
Cross Ref
- Frank Pfenning and Dennis Griffith. 2015. Polarized Substructural Session Types. In FoSSaCS (LNCS, Vol. 9034). 3–22. https://doi.org/10.1007/978-3-662-46678-0_1
Google Scholar
Cross Ref
- Riccardo Pucella and Jesse A. Tov. 2008. Haskell Session Types with (Almost) No Class. In Haskell Symposium. 25–36. https://doi.org/10.1145/1411286.1411290
Google Scholar
Digital Library
- Arjen Rouvoet, Casper Bach Poulsen, Robbert Krebbers, and Eelco Visser. 2020. Intrinsically-Typed Definitional Interpreters for Linear, Session-Typed Languages. In CPP. 284–298. https://doi.org/10.1145/3372885.3373818
Google Scholar
Digital Library
- Alceste Scalas and Nobuko Yoshida. 2016. Lightweight Session Programming in Scala. In ECOOP (LIPIcs, 56). 21:1–21:28. https://doi.org/10.4230/LIPIcs.ECOOP.2016.21
Google Scholar
Cross Ref
- Alceste Scalas and Nobuko Yoshida. 2019. Less is more: multiparty session types revisited. PACMPL, 3, POPL (2019), 30:1–30:29. https://doi.org/10.1145/3290343
Google Scholar
Digital Library
- Alceste Scalas and Nobuko Yoshida. 2019. Less is more: multiparty session types revisited (technical report). https://www.doc.ic.ac.uk/research/technicalreports/2018/DTRS18-6.pdf
Google Scholar
- Joseph Tassarotti, Ralf Jung, and Robert Harper. 2017. A Higher-Order Logic for Concurrent Termination-Preserving Refinement. In ESOP (LNCS, Vol. 10201). 909–936. https://doi.org/10.1007/978-3-662-54434-1_34
Google Scholar
Digital Library
- Peter Thiemann. 2019. Intrinsically-Typed Mechanized Semantics for Session Types. In PPDP. 19:1–19:15. https://doi.org/10.1145/3354166.3354184
Google Scholar
Digital Library
- Bernardo Toninho. 2015. A Logical Foundation for Session-Based Concurrent Computation. Ph. D. Dissertation. Carnegie Mellon University and New University of Lisbon.
Google Scholar
- Bernardo Toninho, Luís Caires, and Frank Pfenning. 2013. Higher-Order Processes, Functions, and Sessions: A Monadic Integration. In ESOP (LNCS, Vol. 7792). 350–369. https://doi.org/10.1007/978-3-642-37036-6_20
Google Scholar
Digital Library
- Bernardo Toninho and Nobuko Yoshida. 2018. Interconnectability of Session-Based Logical Processes. TOPLAS, 40, 4 (2018), 17:1–17:42. https://doi.org/10.1145/3242173
Google Scholar
Digital Library
- Philip Wadler. 2012. Propositions as Sessions. In ICFP. 273–286. https://doi.org/10.1145/2364527.2364568
Google Scholar
Digital Library
- Uma Zalakain and Ornela Dardha. 2021. π with Leftovers: A Mechanisation in Agda. In FORTE (LNCS, Vol. 12719). 157–174. https://doi.org/10.1007/978-3-030-78089-0_9
Google Scholar
Digital Library
Index Terms
- Multiparty GV: functional multiparty session types with certified deadlock freedom
Recommendations
Less is more: multiparty session types revisited
Multiparty Session Types (MPST) are a typing discipline ensuring that a message-passing process implements a multiparty session protocol, without errors. In this paper, we propose a new, generalised MPST theory.
Our contribution is fourfold. (1) We ...
Multiparty Asynchronous Session Types
Communication is a central elements in software development. As a potential typed foundation for structured communication-centered programming, session types have been studied over the past decade for a wide range of process calculi and programming ...
Multiparty asynchronous session types
POPL '08Communication is becoming one of the central elements in software development. As a potential typed foundation for structured communication-centred programming, session types have been studied over the last decade for a wide range of process calculi and ...





Comments