Abstract
Session types describe the structure of bi-directional point-to-point communication channels by specifying the sequence and format of messages on each channel. A session type defines a communication protocol. Type systems that include session types are able to statically verify that communication-based code generates, and responds to, messages according to a specified protocol. It is natural to consider subtyping for session types, but the literature contains conflicting definitions. It is now folklore that one definition is based on safe substitutability of channels, while the other is based on safe substitutability of processes. We explain this point in more detail, and show how to unify the two views.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
S.J. Gay—Supported by EPSRC (EP/K034413/1 “From Data Types to Session Types: A Basis for Concurrency and Distribution” and EP/L00058X/1 “Exploiting Parallelism through Type Transformations for Hybrid Manycore Systems”) and COST Action IC1201 “Behavioural Types for Reliable Large-Scale Software Systems”.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
See also Dardha’s (2014) PhD thesis.
References
Carbone, M., Honda, K., Yoshida, N.: Structured communication-centred programming for web services. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 2–17. Springer, Heidelberg (2007). http://dx.doi.org/10.1007/978-3-540-71316-6/_2
Castagna, G., Dezani-Ciancaglini, M., Giachino, E., Padovani, L.: Foundations of session types. In: Proceedings of the 11th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP), pp. 219–230. ACM (2009). http://doi.acm.org/10.1145/1599410.1599437
Chen, T., Dezani-Ciancaglini, M., Yoshida, N.: On the preciseness of subtyping in session types. In: Proceedings of the 16th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP), pp. 135–146. ACM (2014). http://doi.acm.org/10.1145/2643135.2643138
Dardha, O.: Type Systems for Distributed Programs: Components and Sessions. Ph.D. thesis, University of Bologna (2014). https://tel.archives-ouvertes.fr/tel-01020998
Dardha, O., Giachino, E., Sangiorgi, D.: Session types revisited. In: Proceedings of the 14th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP), pp. 139–150. ACM (2012)
Demangeon, R., Honda, K.: Full abstraction in a subtyped pi-calculus with linear types. In: Katoen, J.-P., König, B. (eds.) CONCUR 2011. LNCS, vol. 6901, pp. 280–296. Springer, Heidelberg (2011). http://dx.doi.org/10.1007/978-3-642-23217-6_19
Frisch, A., Castagna, G., Benzaken, V.: Semantic subtyping. In: Proceedings of the 17th IEEE Symposium on Logic in Computer Science (LICS), pp. 137–146. IEEE (2002). http://dx.doi.org/10.1109/LICS.2002.1029823
Gay, S.J.: Bounded polymorphism in session types. Math. Struct. Comput. Sci. 18(5), 895–930 (2008). http://dx.doi.org/10.1017/S0960129508006944
Gay, S.J., Hole, M.: Types and subtypes for client-server interactions. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 74–90. Springer, Heidelberg (1999)
Gay, S.J., Hole, M.J.: Subtyping for session types in the pi calculus. Acta Informatica 42(2/3), 191–225 (2005)
Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 273–284. ACM (2008)
Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)
Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 122–138. Springer, Heidelberg (1998)
Kobayashi, N.: Type systems for concurrent programs. In: Aichernig, B.K. (ed.) Formal Methods at the Crossroads. From Panacea to Foundational Support. LNCS, vol. 2757, pp. 439–453. Springer, Heidelberg (2003). http://www.kb.ecei.tohoku.ac.jp/~koba/papers/tutorial-type-extended.pdf
Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the pi-calculus. ACM Trans. Program. Lang. Syst. 21(5), 914–947 (1999)
Liskov, B., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)
Mostrous, D., Yoshida, N.: Two session typing systems for higher-order mobile processes. In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 321–335. Springer, Heidelberg (2007). http://dx.doi.org/10.1007/978-3-540-73228-0_23
Mostrous, D., Yoshida, N.: Session typing and asynchronous subtyping for the higher-order \(\pi \)-calculus. Inf. Comput. 241, 227–263 (2015). http://dx.doi.org/10.1016/j.ic.2015.02.002
Pierce, B.C., Sangiorgi, D.: Typing and subtyping for mobile processes. Math. Struct. Comput. Sci. 6(5), 409–454 (1996)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Sangiorgi, D., Walker, D.: The \(\pi \)-Calculus: A Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)
Takeuchi, K., Honda, K., Kubo, M.: An interaction-based language and its typing system. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, pp. 398–413. Springer, Heidelberg (1994)
Acknowledgements
I am grateful to Nobuko Yoshida for discussion of the origin of the Honda et al. definition of subtyping, and to the anonymous referees for their comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Gay, S.J. (2016). Subtyping Supports Safe Session Substitution. In: Lindley, S., McBride, C., Trinder, P., Sannella, D. (eds) A List of Successes That Can Change the World. Lecture Notes in Computer Science(), vol 9600. Springer, Cham. https://doi.org/10.1007/978-3-319-30936-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-30936-1_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-30935-4
Online ISBN: 978-3-319-30936-1
eBook Packages: Computer ScienceComputer Science (R0)