skip to main content
research-article
Open Access

A bunch of sessions: a propositions-as-sessions interpretation of bunched implications in channel-based concurrency

Published:31 October 2022Publication History
Skip Abstract Section

Abstract

The emergence of propositions-as-sessions, a Curry-Howard correspondence between propositions of Linear Logic and session types for concurrent processes, has settled the logical foundations of message-passing concurrency. Central to this approach is the resource consumption paradigm heralded by Linear Logic. In this paper, we investigate a new point in the design space of session type systems for message-passing concurrent programs. We identify O’Hearn and Pym’s Logic of Bunched Implications (BI) as a fruitful basis for an interpretation of the logic as a concurrent programming language. This leads to a treatment of non-linear resources that is radically different from existing approaches based on Linear Logic. We introduce a new π-calculus with sessions, called πBI; its most salient feature is a construct called spawn, which expresses new forms of sharing that are induced by structural principles in BI. We illustrate the expressiveness of πBI and lay out its fundamental theory: type preservation, deadlock-freedom, and weak normalization results for well-typed processes; an operationally sound and complete typed encoding of an affine λ-calculus; and a non-interference result for access of resources.

References

  1. Gabrielle Anderson and David Pym. 2016. A calculus and logic of bunched resources and processes. Theor. Comput. Sci., 614 (2016), 63–96. https://doi.org/10.1016/j.tcs.2015.11.035 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ryuta Arisaka and Shengchao Qin. 2012. LBI Cut Elimination Proof with BI-MultiCut. In 2012 Sixth International Symposium on Theoretical Aspects of Software Engineering. 235–238. https://doi.org/10.1109/TASE.2012.30 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Robert Atkey. 2004. A λ -Calculus for Resource Separation. In Automata, Languages and Programming: 31st International Colloquium, ICALP 2004, Turku, Finland, July 12-16, 2004. Proceedings, Josep Díaz, Juhani Karhumäki, Arto Lepistö, and Donald Sannella (Eds.) (Lecture Notes in Computer Science, Vol. 3142). Springer, 158–170. https://doi.org/10.1007/978-3-540-27836-8_16 Google ScholarGoogle ScholarCross RefCross Ref
  4. Robert Atkey. 2006. Substructural Simple Type Theories for Separation and In-place Update. Ph. D. Dissertation. University of Edinburgh. Google ScholarGoogle Scholar
  5. Robert Atkey. 2017. Observed Communication Semantics for Classical Processes. In 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, Hongseok Yang (Ed.) (Lecture Notes in Computer Science, Vol. 10201). Springer, 56–82. https://doi.org/10.1007/978-3-662-54434-1_3 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Stephanie Balzer and Frank Pfenning. 2017. Manifest sharing with session types. Proc. ACM Program. Lang., 1, ICFP (2017), 37:1–37:29. https://doi.org/10.1145/3110281 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Josh Berdine and Peter O’Hearn. 2006. Strong Update, Disposal, and Encapsulation in Bunched Typing. In Proceedings of the 22nd Annual Conference on Mathematical Foundations of Programming Semantics, MFPS 2006, Genova, Italy, May 23-27, 2006, Stephen D. Brookes and Michael W. Mislove (Eds.) (Electronic Notes in Theoretical Computer Science, Vol. 158). Elsevier, 81–98. https://doi.org/10.1016/j.entcs.2006.04.006 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Stephen Brookes and Peter O’Hearn. 2016. Concurrent separation logic. ACM SIGLOG News, 3, 3 (2016), 47–65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. James Brotherston. 2012. Bunched Logics Displayed. Studia Logica, 100, 6 (2012), 1223–1254. https://doi.org/10.1007/s11225-012-9449-0 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. James Brotherston and Cristiano Calcagno. 2010. Classical BI: Its Semantics and Proof Theory. Logical Methods in Computer Science, 6, 3 (2010), 42 pages. https://doi.org/10.2168/LMCS-6(3:3)2010 Google ScholarGoogle ScholarCross RefCross Ref
  11. James Brotherston and Jules Villard. 2015. Sub-classical Boolean Bunched Logics and the Meaning of Par. In 24th EACSL Annual Conference on Computer Science Logic, CSL 2015, September 7-10, 2015, Berlin, Germany, Stephan Kreutzer (Ed.) (LIPIcs, Vol. 41). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 325–342. https://doi.org/10.4230/LIPIcs.CSL.2015.325 Google ScholarGoogle ScholarCross RefCross Ref
  12. Luís Caires and Jorge A. Pérez. 2016. Multiparty Session Types Within a Canonical Binary Theory, and Beyond. In 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, Elvira Albert and Ivan Lanese (Eds.) (Lecture Notes in Computer Science, Vol. 9688). Springer, 74–95. https://doi.org/10.1007/978-3-319-39570-8_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Luís Caires and Jorge A. Pérez. 2017. Linearity, Control Effects, and Behavioral Types. In Programming Languages and Systems, Hongseok Yang (Ed.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 229–259. isbn:978-3-662-54434-1 https://doi.org/10.1007/978-3-662-54434-1_9 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Luís Caires, Jorge A. Pérez, Frank Pfenning, and Bernardo Toninho. 2013. Behavioral Polymorphism and Parametricity in Session-Based Communication. In ESOP (Lecture Notes in Computer Science, Vol. 7792). Springer, 330–349. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Luís Caires and Frank Pfenning. 2010. Session Types as Intuitionistic Linear Propositions. In CONCUR 2010 - Concurrency Theory, 21th International Conference, CONCUR 2010, Paris, France, August 31-September 3, 2010. Proceedings, Paul Gastin and François Laroussinie (Eds.) (Lecture Notes in Computer Science, Vol. 6269). Springer, 222–236. https://doi.org/10.1007/978-3-642-15375-4_16 Google ScholarGoogle ScholarCross RefCross Ref
  16. Luís Caires, Frank Pfenning, and Bernardo Toninho. 2016. Linear Logic Propositions as Session Types. Mathematical Structures in Computer Science, 26, 3 (2016), March, 367–423. issn:0960-1295, 1469-8072 https://doi.org/10.1017/S0960129514000218 Google ScholarGoogle ScholarCross RefCross Ref
  17. Marco Carbone, Sam Lindley, Fabrizio Montesi, Carsten Schürmann, and Philip Wadler. 2016. Coherence Generalises Duality: A Logical Explanation of Multiparty Session Types. In 27th International Conference on Concurrency Theory, CONCUR 2016, August 23-26, 2016, Québec City, Canada, Josée Desharnais and Radha Jagadeesan (Eds.) (LIPIcs, Vol. 59). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 33:1–33:15. https://doi.org/10.4230/LIPIcs.CONCUR.2016.33 Google ScholarGoogle ScholarCross RefCross Ref
  18. Matthew Collinson, David Pym, and Edmund Robinson. 2008. Bunched polymorphism. Mathematical Structures in Computer Science, 18, 6 (2008), 1091–1132. https://doi.org/10.1017/S0960129508007159 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Farzaneh Derakhshan, Stephanie Balzer, and Limin Jia. 2021. Session Logical Relations for Noninterference. In LICS. IEEE, 1–14. https://doi.org/10.1109/LICS52264.2021.9470654 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Henry DeYoung, Luís Caires, Frank Pfenning, and Bernardo Toninho. 2012. Cut Reduction in Linear Logic as Asynchronous Session-Typed Communication. In Computer Science Logic (CSL’12) - 26th International Workshop/21st Annual Conference of the EACSL, CSL 2012, September 3-6, 2012, Fontainebleau, France, Patrick Cégielski and Arnaud Durand (Eds.) (LIPIcs, Vol. 16). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 228–242. https://doi.org/10.4230/LIPIcs.CSL.2012.228 Google ScholarGoogle ScholarCross RefCross Ref
  21. Simon Docherty. 2019. Bunched Logics: A Uniform Approach. Ph. D. Dissertation. University College London. Google ScholarGoogle Scholar
  22. Simon Fowler, Sam Lindley, J. Garrett Morris, and Sára Decova. 2019. Exceptional asynchronous session types: session types without tiers. Proc. ACM Program. Lang., 3, POPL (2019), 28:1–28:29. https://doi.org/10.1145/3290341 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Dan Frumin, Emanuele D’Osualdo, Bas van den Heuvel, and Jorge A. Pérez. 2022. A Bunch of Sessions: A Propositions-as-Sessions Interpretation of Bunched Implications in Channel-Based Concurrency. https://doi.org/10.48550/ARXIV.2209.05421 Google ScholarGoogle Scholar
  24. Daniele Gorla. 2010. Towards a unified approach to encodability and separation results for process calculi. Information and Computation, 208, 9 (2010), 1031–1053. https://doi.org/10.1016/j.ic.2010.05.002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Kohei Honda. 1993. Types for Dyadic Interaction. In CONCUR ’93, 4th International Conference on Concurrency Theory, Hildesheim, Germany, August 23-26, 1993, Proceedings, Eike Best (Ed.) (Lecture Notes in Computer Science, Vol. 715). Springer, 509–523. https://doi.org/10.1007/3-540-57208-2_35 Google ScholarGoogle ScholarCross RefCross Ref
  26. Kohei Honda, Vasco Vasconcelos, and Makoto Kubo. 1998. Language Primitives and Type Discipline for Structured Communication-Based Programming. In Programming Languages and Systems - ESOP’98, 7th European Symposium on Programming, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS’98, Lisbon, Portugal, March 28 - April 4, 1998, Proceedings, Chris Hankin (Ed.) (Lecture Notes in Computer Science, Vol. 1381). Springer, 122–138. https://doi.org/10.1007/BFb0053567 Google ScholarGoogle ScholarCross RefCross Ref
  27. Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty asynchronous session types. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008, San Francisco, California, USA, January 7-12, 2008, George C. Necula and Philip Wadler (Eds.). ACM, 273–284. https://doi.org/10.1145/1328438.1328472 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Ryan Kavanagh. 2022. Fairness and communication-based semantics for session-typed languages. Inf. Comput., 285, Part (2022), 104892. Google ScholarGoogle Scholar
  29. Wen Kokke, Fabrizio Montesi, and Marco Peressotti. 2019. Better late than never: a fully-abstract semantics for classical processes. Proc. ACM Program. Lang., 3, POPL (2019), 24:1–24:29. https://doi.org/10.1145/3290337 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Dimitrios Kouzapas, Nobuko Yoshida, and Kohei Honda. 2011. On Asynchronous Session Semantics. In Formal Techniques for Distributed Systems - Joint 13th IFIP WG 6.1 International Conference, FMOODS 2011, and 31st IFIP WG 6.1 International Conference, FORTE 2011, Reykjavik, Iceland, June 6-9, 2011. Proceedings, Roberto Bruni and Jürgen Dingel (Eds.) (Lecture Notes in Computer Science, Vol. 6722). Springer, 228–243. https://doi.org/10.1007/978-3-642-21461-5_15 Google ScholarGoogle ScholarCross RefCross Ref
  31. Robin Milner. 1992. Functions as Processes. Mathematical Structures in Computer Science, 2, 2 (1992), 119–141. https://doi.org/10.1017/S0960129500001407 Google ScholarGoogle ScholarCross RefCross Ref
  32. Peter O’Hearn. 2003. On bunched typing. Journal of Functional Programming, 13, 4 (2003), 747–796. https://doi.org/10.1017/S0956796802004495 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Peter O’Hearn. 2019. Separation logic. CACM, 62, 2 (2019), 86–95. https://doi.org/10.1145/3211968 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Peter O’Hearn and David Pym. 1999. The logic of bunched implications. Bulletin of Symbolic Logic, 5, 2 (1999), 215–244. https://doi.org/10.2307/421090 Google ScholarGoogle ScholarCross RefCross Ref
  35. Jorge A. Pérez, Luís Caires, Frank Pfenning, and Bernardo Toninho. 2014. Linear Logical Relations and Observational Equivalences for Session-Based Concurrency. Information and Computation, 239 (2014), Dec., 254–302. issn:0890-5401 https://doi.org/10.1016/j.ic.2014.08.001 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Kirstin Peters. 2019. Comparing Process Calculi Using Encodings. In Proceedings Combined 26th International Workshop on Expressiveness in Concurrency and 16th Workshop on Structural Operational Semantics, EXPRESS/SOS 2019, Amsterdam, The Netherlands, 26th August 2019, Jorge A. Pérez and Jurriaan Rot (Eds.) (EPTCS, Vol. 300). 19–38. https://doi.org/10.4204/EPTCS.300.2 Google ScholarGoogle ScholarCross RefCross Ref
  37. Klaas Pruiksma and Frank Pfenning. 2021. A message-passing interpretation of adjoint logic. Journal of Logical and Algebraic Methods in Programming, 120 (2021), 100637. https://doi.org/10.1016/j.jlamp.2020.100637 Google ScholarGoogle ScholarCross RefCross Ref
  38. David Pym. 2002. The semantics and proof theory of the logic of bunched implications (Applied logic series, Vol. 26). Kluwer. isbn:978-1-4020-0745-3 Google ScholarGoogle Scholar
  39. David Pym, Peter O’Hearn, and Hongseok Yang. 2004. Possible worlds and resources: the semantics of BI. Theoretical Computer Science, 315, 1 (2004), 257–305. https://doi.org/10.1016/j.tcs.2003.11.020 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Zesen Qian, G. A. Kavvos, and Lars Birkedal. 2021. Client-server sessions in linear logic. Proc. ACM Program. Lang., 5, ICFP (2021), 1–31. https://doi.org/10.1145/3473567 Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Davide Sangiorgi and David Walker. 2003. The pi-calculus: A Theory of Mobile Processes. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Alceste Scalas and Nobuko Yoshida. 2019. Less is more: multiparty session types revisited. Proc. ACM Program. Lang., 3, POPL (2019), 30:1–30:29. https://doi.org/10.1145/3290343 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Bernardo Toninho, Luis Caires, and Frank Pfenning. 2012. Functions as Session-Typed Processes. In Foundations of Software Science and Computational Structures, Lars Birkedal (Ed.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 346–360. isbn:978-3-642-28729-9 https://doi.org/10.1007/978-3-642-28729-9_23 Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Vasco Vasconcelos. 2012. Fundamentals of session types. Information and Computation, 217 (2012), 52–70. https://doi.org/10.1016/j.ic.2012.05.002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Philip Wadler. 2012. Propositions as sessions. In ACM SIGPLAN International Conference on Functional Programming, ICFP’12, Copenhagen, Denmark, September 9-15, 2012, Peter Thiemann and Robby Bruce Findler (Eds.). ACM, 273–286. https://doi.org/10.1145/2364527.2364568 Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Philip Wadler. 2014. Propositions as sessions. Journal of Functional Programming, 24, 2-3 (2014), 384–418. https://doi.org/10.1017/S095679681400001X Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. A bunch of sessions: a propositions-as-sessions interpretation of bunched implications in channel-based concurrency

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Article Metrics

        • Downloads (Last 12 months)155
        • Downloads (Last 6 weeks)18

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!