skip to main content
research-article
Open Access

Two sides of the same coin: session types and game semantics: a synchronous side and an asynchronous side

Published:02 January 2019Publication History
Skip Abstract Section

Abstract

Game semantics and session types are two formalisations of the same concept: message-passing open programs following certain protocols. Game semantics represents protocols as games, and programs as strategies; while session types specify protocols, and well-typed π-calculus processes model programs. Giving faithful models of the π-calculus and giving a precise description of strategies as a programming language are two difficult problems. In this paper, we show how these two problems can be tackled at the same time by building an accurate game semantics model of the session π-calculus.

Our main contribution is to fill a semantic gap between the synchrony of the (session) π-calculus and the asynchrony of game semantics, by developing an event-structure based game semantics for synchronous concurrent computation. This model supports the first truly concurrent fully abstract (for barbed congruence) interpretation of the synchronous (session) π-calculus. We further strengthen this correspondence, establishing finite definability of asynchronous strategies by the internal session π-calculus. As an application of these results, we propose a faithful encoding of synchronous strategies into asynchronous strategies by call-return protocols, which induces automatically an encoding at the level of processes. Our results bring session types and game semantics into the same picture, proposing the session calculus as a programming language for strategies, and strategies as a very accurate model of the session calculus. We implement a prototype which computes the interpretation of session processes as synchronous strategies.

Skip Supplemental Material Section

Supplemental Material

a27-castellan.webm

References

  1. Martín Abadi, Bruno Blanchet, and Cédric Fournet. 2017. The Applied Pi Calculus: Mobile Values, New Names, and Secure Communication. J. ACM 65, 1, Article 1 (Oct. 2017), 41 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Samson Abramsky, Kohei Honda, and Guy McCusker. 1998. A Fully Abstract Game Semantics for General References (LICS’98). IEEE Computer Society, Washington, DC, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Samson Abramsky, Radha Jagadeesan, and Pasquale Malacaria. 2000. Full Abstraction for PCF. 163 (2000), 409–470. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Samson Abramsky, Pasquale Malacaria, and Radha Jagadeesan. 1994. Full Abstraction for PCF. In TACS (Lecture Notes in Computer Science), Vol. 789. Springer, 1–15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Samson Abramsky and Guy McCusker. 1999. Full Abstraction for Idealized Algol with Passive Expressions. Vol. 227. 3–42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Samson Abramsky and Paul-André Melliès. 1999. Concurrent Games and Full Completeness. In 14th Annual IEEE Symposium on Logic in Computer Science, Trento, Italy, July 2-5, 1999. 431–442. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Robert Atkey. 2017. Observed Communication Semantics for Classical Processes. In ESOP. 56–82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. David Baelde, Stéphanie Delaune, and Lucca Hirschi. 2015. Partial Order Reduction for Security Protocols. In Proceedings of the 26th International Conference on Concurrency Theory (CONCUR’15) (Leibniz International Proceedings in Informatics), Luca Aceto and David de Frutos-Escrig (Eds.), Vol. 42. Leibniz-Zentrum für Informatik, Madrid, Spain, 497–510.Google ScholarGoogle Scholar
  9. Martin Berger, Kohei Honda, and Nobuko Yoshida. 2001. Sequentiality and the π -Calculus. In Typed Lambda Calculi and Applications (Lecture Notes in Computer Science), Samson Abramsky (Ed.), Vol. 2044. Springer Berlin Heidelberg, 29–45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Simon Castellan, Pierre Clairambault, Jonathan Hayman, and Glynn Winskel. 2018. Non-angelic Concurrent Game Semantics. In Foundations of Software Science and Computation Structures - 21st International Conference, FOSSACS 2018, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018, Thessaloniki, Greece, April 14-20, 2018, Proceedings. 3–19.Google ScholarGoogle Scholar
  11. Simon Castellan, Pierre Clairambault, Silvain Rideau, and Glynn Winskel. 2017. Games and Strategies as Event Structures. Logical Methods in Computer Science Volume 13, Issue 3 (Sept. 2017).Google ScholarGoogle Scholar
  12. Simon Castellan and Nobuko Yoshida. 2018. Two sides of the same coin: Session Types and Game Semantics. (2018). https://www.doc.ic.ac.uk/research/technicalreports/2018/DTRS18- 5.pdf Technical report.Google ScholarGoogle Scholar
  13. Gian Luca Cattani and Glynn Winskel. 1997. Presheaf models for concurrency. In Computer Science Logic, Dirk van Dalen and Marc Bezem (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 58–75.Google ScholarGoogle Scholar
  14. Tzu-Chun Chen, Mariangiola Dezani-Ciancaglini, Alceste Scalas, and Nobuko Yoshida. 2017. On the Preciseness of Subtyping in Session Types. LMCS 13 (2017), 1–62. Issue 2.Google ScholarGoogle Scholar
  15. Silvia Crafa, Daniele Varacca, and Nobuko Yoshida. 2007. Compositional Event Structure Semantics for the Internal π -calculus. In Proceedings of the 18th International Conference on Concurrency Theory (CONCUR’07). Springer-Verlag, Berlin, Heidelberg, 317–317. http://dl.acm.org/citation.cfm?id=2392200.2392224 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ioana Domnina Cristescu, Jean Krivine, and Daniele Varacca. 2015. Rigid Families for CCS and the π -calculus. In Theoretical Aspects of Computing - ICTAC 2015 - 12th International Colloquium Cali, Colombia, October 29-31, 2015, Proceedings. 223–240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Vincent Danos and Russell Harmer. 2002. Probabilistic Game Semantics. ACM Trans. Comput. Logic 3, 3 (July 2002), 359–382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Tim Disney and Cormac Flanagan. 2015. Game Semantics for Type Soundness. In LICS (LICS’15). IEEE, 104–114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Clovis Eberhart, Tom Hirschowitz, and Thomas Seiller. 2013. Fully-abstract concurrent games for pi. CoRR abs/1310.4306 (2013). http://arxiv.org/abs/1310.4306Google ScholarGoogle Scholar
  20. Simon Gay and Malcolm Hole. 2005. Subtyping for Session Types in the Pi Calculus. Acta Informatica 42, 2/3 (2005), 191–225.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Simon Gay and Vasco T. Vasconcelos. 2010. Linear Type Theory for Asynchronous Session Types. Journal of Functional Programming 20, 1 (2010), 19–50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Dan R. Ghica and Mohamed N. Menaa. 2011. Synchronous Game Semantics via Round Abstraction. In Foundations of Software Science and Computational Structures, Martin Hofmann (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 350–364. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Russell Harmer and Guy McCusker. 1999. A Fully Abstract Game Semantics for Finite Nondeterminism. In 14th Annual IEEE Symposium on Logic in Computer Science, Trento, Italy, July 2-5, 1999. 422–430. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Matthew Hennessy. 2007. A Distributed Pi-Calculus. CUP. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Kohei Honda and Mario Tokoro. 1991. An Object Calculus for Asynchronous Communication. In ECOOP’91 (LNCS), Vol. 512. 133–147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Kohei Honda, Vasco T. Vasconcelos, and Makoto Kubo. 1998. Language Primitives and Type Disciplines for Structured Communication-based Programming. In ESOP (LNCS), Vol. 1381. Springer, 122–138. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Kohei Honda and Nobuko Yoshida. 1995. On Reduction-Based Process Semantics. Theorical Computer Science 151, 2 (1995), 437–486. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Kohei Honda and Nobuko Yoshida. 1999. Game-Theoretic Analysis of Call-by-Value Computation. TCS 221 (1999), 393–456. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty Asynchronous Session Types. In POPL. ACM, 273–284. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Martin E. Hyland and C. H. Luke Ong. 1994. On Full Abstraction for PCF. Technical Report. Imperial College, Department of Computing. 130pp pages.Google ScholarGoogle Scholar
  31. J. Martin E. Hyland and C. H. Luke Ong. 2000. On Full Abstraction for PCF. Inf. & Comp. 163 (2000), 285–408. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. M. E. Hyland and C.-H. Luke Ong. 1995. Pi-Calculus, Dialogue Games and PCF. In FPCA. ACM, 96–107. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Dimitrios Kouzapas and Nobuko Yoshida. 2015. Globally Governed Session Semantics. LMCS 10 (2015). Issue 4.Google ScholarGoogle Scholar
  34. James Laird. 1997. Full Abstraction for Functional Languages with Control. In Proceedings, 12th Annual IEEE Symposium on Logic in Computer Science, Warsaw, Poland, June 29 - July 2, 1997. 58–67. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. James Laird. 2001. A Game Semantics of Idealized CSP. Electr. Notes Theor. Comput. Sci. 45 (2001), 232–257.Google ScholarGoogle ScholarCross RefCross Ref
  36. Jim Laird. 2005. A Game Semantics of the Asynchronous pi-Calculus. In CONCUR 2005 - Concurrency Theory, 16th International Conference, CONCUR 2005, San Francisco, CA, USA, August 23-26, 2005, Proceedings. 51–65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Paul-André Melliès. 2005. Asynchronous Games 4: A Fully Complete Model of Propositional Linear Logic. In 20th IEEE Symposium on Logic in Computer Science (LICS 2005), 26-29 June 2005, Chicago, IL, USA, Proceedings. 386–395. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Paul-André Melliès. 2006. Asynchronous games 2: The true concurrency of innocence. Theor. Comput. Sci. 358, 2-3 (2006), 200–228. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Paul-André Melliès. 2019. Categorical combinatorics of scheduling and synchronization for games and strategies. In Accepted for publication at POPL’19.Google ScholarGoogle Scholar
  40. Paul-André Melliès and Samuel Mimram. 2007. Asynchronous Games: Innocence Without Alternation. In CONCUR 2007 -Concurrency Theory, 18th International Conference. 395–411. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Paul-André Melliès and Léo Stefanesco. 2018. An Asynchronous Soundness Theorem for Concurrent Separation Logic. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018. 699–708. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Robin Milner. 1992. Functions as Processes. MSCS 2, 2 (1992), 119–141.Google ScholarGoogle Scholar
  43. Robin Milner and Davide Sangiorgi. 1992. Barbed Bisimulation. In ICALP (LNCS), Vol. 623. Springer, 685–695. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Dimitris Mostrous and Nobuko Yoshida. 2015. Session Typing and Asynchronous Subtyping for the Higher-Order π -Calculus. Inform. Comput. 241 (2015), 227–263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Vaughan R. Pratt. 1984. The Pomset Model of Parallel Processes: Unifying the Temporal and the Spatial. In Seminar on Concurrency, Carnegie-Mellon University, Pittsburg, PA, USA, July 9-11, 1984. 180–196. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Silvain Rideau and Glynn Winskel. 2011. Concurrent Strategies. In Proceedings of the 26th Annual IEEE Symposium on Logic in Computer Science, LICS 2011, June 21-24, 2011, Toronto, Ontario, Canada. 409–418. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Ken Sakayori and Takeshi Tsukada. 2017. A Truly Concurrent Game Model of the Asynchronous Pi-Calculus. In FoSSaCs. 389–406. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Davide Sangiorgi. 1995. Internal Mobility and Agent Passing Calculi. In Proc. ICALP‘95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. D. Sangiorgi. 1996. π -calculus, internal mobility and agent-passing calculi. TCS 167, 2 (1996), 235–274. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Peter Selinger. 1997. First-Order Axioms for Asynchrony. In Proc. CONCUR ’97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Kaku Takeuchi, Kohei Honda, and Makoto Kubo. 1994. An Interaction-based Language and its Typing System. In PARLE’94 (LNCS), Vol. 817. 398–413. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. P. S. Thiagarajan. 2002. Regular Event Structures and Finite Petri Nets: A Conjecture. In Formal and Natural Computing -Essays Dedicated to Grzegorz Rozenberg {on occasion of his 60th birthday, March 14, 2002}. 244–256. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Rob van Glabbeek and Frits Vaandrager. 2003. Bundle Event Structures and CCSP. In CONCUR 2003 - Concurrency Theory, Roberto Amadio and Denis Lugiez (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 57–71.Google ScholarGoogle Scholar
  54. Glynn Winskel. 1982. Event structure semantics for CCS and related languages. 561–576. See also DAIMI Report PB-159, Computer Science Department, Aarhus University, 1983.Google ScholarGoogle Scholar
  55. Glynn Winskel. 1986. Event Structures. In Petri Nets: Central Models and Their Properties, Advances in Petri Nets 1986, Part II, Proceedings of an Advanced Course, Bad Honnef, 8.-19. September 1986. 325–392. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Nobuko Yoshida. 1996. Graph Types for Monadic Mobile Processes.. In FSTTCS (LNCS), Vol. 1180. Springer, 371–386. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Nobuko Yoshida and Vasco Thudichum Vasconcelos. 2007. Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication. Electr. Notes Theor. Comput. Sci. 171, 4 (2007), 73–93. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Two sides of the same coin: session types and game semantics: a synchronous side and an asynchronous side

      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

      • Published in

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 3, Issue POPL
        January 2019
        2275 pages
        EISSN:2475-1421
        DOI:10.1145/3302515
        Issue’s Table of Contents

        Copyright © 2019 Owner/Author

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 2 January 2019
        Published in pacmpl Volume 3, Issue POPL

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

      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!