Abstract
Session types provide a principled programming discipline for structured interactions. They represent a wide spectrum of type-systems for concurrency. Their type safety is thus extremely important. EMTST is a tool to aid in representing and validating theorems about session types in the Coq proof assistant. On paper, these proofs are often tricky, and error prone. In proof assistants, they are typically long and difficult to prove. In this work, we propose a library that helps validate the theory of session types calculi in proof assistants. As a case study, we study two of the most used binary session types systems: we show the impossibility of representing the first system in \(\alpha \)-equivalent representations, and we prove type preservation for the revisited system. We develop our tool in the Coq proof assistant, using locally nameless for binders and small scale reflection to simplify the handling of linear typing environments.
Keywords
- Concurrency
- proof assistants
- meta-theory
- session-types
Chapter PDF
References
Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 3–15. POPL ’08, ACM, New York, NY, USA (2008)
de Bruijn, N.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indag. Math 34(5), 381–392 (1972)
Castro, D., Ferreira, F., Yoshida, N.: EMTST - Engineering Meta-theory of Session Types (Oct 2019), https://doi.org/10.5281/zenodo.3516299
Castro, D., Ferreira, F., Yoshida, N.: Engineering the meta-theory of session types. Tech. Rep. 2019/4, Imperial College London (2019), https://www.doc.ic.ac.uk/research/technicalreports/2019/#4
Charguéraud, A.: The locally nameless representation. Journal of Automated Reasoning 49(3), 363–408 (Oct 2012)
Gay, S., Hole, M.: Subtyping for session types in the pi calculus. Acta Informatica 42(2), 191–225 (Nov 2005)
Gonthier, G., Mahboubi, A.: An introduction to small scale reflection in coq. Journal of Formalized Reasoning 3(2), 95–152 (2010)
Gordon, A.D.: A mechanisation of name-carrying syntax up to alpha-conversion. In: Joyce, J.J., Seger, C.J.H. (eds.) Higher Order Logic Theorem Proving and Its Applications. pp. 413–425. Springer Berlin Heidelberg, Berlin, Heidelberg (1994)
Goto, M., Jagadeesan, R., Jeffrey, A., Pitchar, C., Riely, J.: An extensible approach to session polymorphism. Mathematical Structures in Computer Science 26(3), 465–509 (2016)
Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR’93. pp. 509–523. Springer Berlin Heidelberg, Berlin, Heidelberg (1993)
Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Hankin, C. (ed.) Programming Languages and Systems. pp. 122–138. Springer Berlin Heidelberg, Berlin, Heidelberg (1998)
Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: Proc. of 35th Symp. on Princ. of Prog. Lang. pp. 273–284. POPL ’08, ACM, New York, NY, USA (2008)
McBride, C., McKinna, J.: Functional pearl: I am not a number–i am a free variable. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Haskell. pp. 1–9. Haskell ’04, ACM, New York, NY, USA (2004)
McKinna, J., Pollack, R.: Some lambda calculus and type theory formalized. Journal of Automated Reasoning 23(3), 373–409 (Nov 1999)
Milner, R., Parrow, J., Walker, D.: A Calculus of Mobile Processes, Parts I and II. Info. & Comp. 100(1) (1992)
Orchard, D.A., Yoshida, N.: Using session types as an effect system. In: Proceedings Eighth International Workshop on Programming Language Approaches to Concurrency- and Communication-cEntric Software, PLACES 2015, London, UK, 18th April 2015. pp. 1–13 (2015)
Polonowski, E.: Generic environments in coq. CoRR abs/1112.1316 (2011), http://arxiv.org/abs/1112.1316
Schäfer, S., Tebbi, T., Smolka, G.: Autosubst: Reasoning with de bruijn terms and parallel substitutions. In: Zhang, X., Urban, C. (eds.) Interactive Theorem Proving - 6th International Conference, ITP 2015, Nanjing, China, August 24-27, 2015. LNAI, Springer-Verlag (Aug 2015)
Tassarotti, J., Jung, R., Harper, R.: A higher-order logic for concurrent termination-preserving refinement. In: Yang, H. (ed.) Programming Languages and Systems. pp. 909–936. Springer Berlin Heidelberg, Berlin, Heidelberg (2017)
The Coq Development Team: The Coq Proof Assistant Reference Manual v. 8.6.1. Institut National de Recherche en Informatique et en Automatique (2016)
Thiemann, P.: Intrinsically-typed mechanized semantics for session types. In: Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages 2019. pp. 19:1–19:15. PPDP ’19, ACM, New York, NY, USA (2019)
Weirich, S., collaborators: Metalib – the penn locally nameless metatheory library. https://github.com/plclub/metalib (2008)
Yoshida, N., Vasconcelos, V.T.: Language primitives and type discipline for structured communication-based programming revisited: Two systems for higher-order session communication. Electronic Notes in Theoretical Computer Science 171(4), 73 – 93 (2007), proceedings of the First International Workshop on Security and Rewriting Techniques (SecReT 2006)
Zalakian, U.: Type-checking session-typed \(\pi \)-calculus with Coq. Master’s thesis, University of Glasgow (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2020 The Author(s)
About this paper
Cite this paper
Castro, D., Ferreira, F., Yoshida, N. (2020). EMTST: Engineering the Meta-theory of Session Types. In: Biere, A., Parker, D. (eds) Tools and Algorithms for the Construction and Analysis of Systems. TACAS 2020. Lecture Notes in Computer Science(), vol 12079. Springer, Cham. https://doi.org/10.1007/978-3-030-45237-7_17
Download citation
DOI: https://doi.org/10.1007/978-3-030-45237-7_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-45236-0
Online ISBN: 978-3-030-45237-7
eBook Packages: Computer ScienceComputer Science (R0)
-
Published in cooperation with
http://www.etaps.org/