Hostname: page-component-76fb5796d-r6qrq Total loading time: 0 Render date: 2024-04-25T22:16:38.583Z Has data issue: false hasContentIssue false

Linear type theory for asynchronous session types

Published online by Cambridge University Press:  08 December 2009

SIMON J. GAY
Affiliation:
Department of Computing Science, University of Glasgow, Glasgow G12 8QQ, UK (e-mail: simon@dcs.gla.ac.uk)
VASCO T. VASCONCELOS
Affiliation:
Departamento de Informática, Faculdade de Ciências, Universidade de Lisboa, 1749-016 Lisboa, Portugal (e-mail: vv@di.fc.ul.pt)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Session types support a type-theoretic formulation of structured patterns of communication, so that the communication behaviour of agents in a distributed system can be verified by static typechecking. Applications include network protocols, business processes and operating system services. In this paper we define a multithreaded functional language with session types, which unifies, simplifies and extends previous work. There are four main contributions. First is an operational semantics with buffered channels, instead of the synchronous communication of previous work. Second, we prove that the session type of a channel gives an upper bound on the necessary size of the buffer. Third, session types are manipulated by means of the standard structures of a linear type theory, rather than by means of new forms of typing judgement. Fourth, a notion of subtyping, including the standard subtyping relation for session types (imported into the functional setting), and a novel form of subtyping between standard and linear function types, which allows the typechecker to handle linear types conveniently. Our new approach significantly simplifies session types in the functional setting, clarifies their essential features and provides a secure foundation for language developments such as polymorphism and object-orientation.

Type
Articles
Copyright
Copyright © Cambridge University Press 2009

References

Amtoft, T., Nielson, F. & Nielson, H. R. (1999) Type and Effect Systems: Behaviours for Concurrency. Imperial College Press, London.CrossRefGoogle Scholar
Bonelli, E., Compagnoni, A. & Gunter, E. (2005) Correspondence assertions for process synchronization in concurrent communication, J. Funct. Program. 15 (2), 219247.CrossRefGoogle Scholar
Capecchi, S., Coppo, M., Dezani-Ciancaglini, M., Drossopoulou, S. & Giachino, E. (2009) Amalgamating sessions and methods in object-oriented languages with generics, Theoret. Comp. Sci. 410, 142167.CrossRefGoogle Scholar
Coppo, M., Dezani-Ciancaglini, M. & Yoshida, N. (2007) Asynchronous session types and progress for object-oriented languages. In Proceedings of the 9th IFIP International Conference on Formal Methods for Open Object-Based Distributed Systems (FMOODS), Bonsangue, M. M. and Johnsen, E. B. (eds.), Lecture Notes in Computer Science, vol. 4468. Springer, Berlin, pp. 131.Google Scholar
DeLine, R. & Fähndrich, M. (2001) Enforcing high-level protocols in low-level software. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), SIGPLAN Notices, vol. 36, no. 5. ACM Press, pp. 5969.Google Scholar
Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N. & Drossopoulou, S. (2006) Session types for object-oriented languages. In Proceedings of the European Conference on Object-Oriented Languages (ECOOP), Thomas, D. (ed.), Lecture Notes in Computer Science, vol. 4067. Springer, Berlin, pp. 328352.Google Scholar
Dezani-Ciancaglini, M., Yoshida, N., Ahern, A. & Drossopolou, S. (2005) A distributed object-oriented language with session types. In Proceedings of the International Symposium on Trustworthy Global Computing (TGC), DeNicola, R. and Sangiorgi, D. (eds.), Lecture Notes in Computer Science, vol. 3705. Springer, Berlin, pp. 299318.CrossRefGoogle Scholar
Fähndrich, M., Aiken, M., Hawblitzel, C., Hodson, O., Hunt, G., Larus, J. R. & Levi, S. (2006) Language support for fast and reliable message-based communication in Singularity OS. In Proceedings of the EuroSys Conference, SIGOPS Operating Systems Review, vol. 40, no. 4. ACM Press, pp. 177190.Google Scholar
Fähndrich, M. & DeLine, R. (2002) Adoption and focus: practical linear types for imperative programming. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), SIGPLAN Notices, vol. 37, no. 5. ACM Press, pp. 1324.Google Scholar
Gay, S. J. (2006) Subtyping Between Standard and Linear Function Types, Technical Report 2006-305. Glasgow, Scotland: Department of Computing Science, University of Glasgow.Google Scholar
Gay, S. J. (2008) Bounded polymorphism in session types, Math. Struct. Comp. Sci. 18 (5), 895930.CrossRefGoogle Scholar
Gay, S. J. & Hole, M. J. (2005) Subtyping for session types in the pi calculus, Acta Inform. 42 (2/3), 191225.CrossRefGoogle Scholar
Gay, S. J. & Vasconcelos, V. T. (2007) Asynchronous Functional Session Types, Technical Report 2007-251. Glasgow, Scotland: Department of Computing Science, University of Glasgow.Google Scholar
Gay, S. J., Vasconcelos, V. T. & Ravara, A. (2003) Session Types for Inter-Process Communication, Technical Report 2003-133. Glasgow, Scotland: Department of Computing Science, University of Glasgow.Google Scholar
Gay, S. J., Vasconcelos, V. T., Ravara, A., Gesbert, N. & Caldeira, A. Z. (2010) Modular session types for distributed object-oriented programming. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press.Google Scholar
Grossman, D. (2003) Type-safe multithreading in Cyclone. In Proceedings of the ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI), SIGPLAN Notices, vol. 38, no. 3. ACM Press, pp. 1325.Google Scholar
Grossman, D., Morrisett, G., Jim, T., Hicks, M., Wang, Y. & Cheney, J. (2002) Region-based memory management in Cyclone. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), SIGPLAN Notices, vol. 37, no. 5. ACM Press, pp. 282293.Google Scholar
Honda, K. (1993) Types for dyadic interaction. In Proceedings of the International Conference on Concurrency Theory (CONCUR), Best, E. (ed.), Lecture Notes in Computer Science, vol. 715. Springer, Berlin, pp. 509523.Google Scholar
Honda, K., Vasconcelos, V. T. & Kubo, M. (1998) Language primitives and type discipline for structured communication-based programming. In Proceedings of the European Symposium on Programming Languages and Systems (ESOP), Honkin, C. (ed.), Lecture Notes in Computer Science, vol. 1381. Springer, Berlin, pp. 122138.CrossRefGoogle Scholar
Honda, K., Yoshida, N. & Carbone, M. (2008) Multiparty asynchronous session types. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), SIGPLAN Notices, vol. 43, no. 1. ACM Press, pp. 273284.Google Scholar
Lanese, I., Vasconcelos, V. T., Martins, F. & Ravara, A. (2007) Disciplining orchestration and conversation in service-oriented computing. In Proceedings of the IEEE International Conference on Software Engineering and Formal Methods. IEEE, pp. 305314.Google Scholar
Neubauer, M. & Thiemann, P. (2004a) An implementation of session types. In Proceedings of the International Symposium on Practical Aspects of Declarative Languages (PADL), Jayaraman, B. (ed.), Lecture Notes in Computer Science, vol. 3057. Springer, Berlin, pp. 5670.CrossRefGoogle Scholar
Neubauer, M. & Thiemann, P. (2004b) Protocol specialization. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS), Chin, W.-N. (ed.), Lecture Notes in Computer Science, vol. 3302. Springer, Berlin, pp. 246261.CrossRefGoogle Scholar
Neubauer, M. & Thiemann, P. (2004c) Session Types for Asynchronous Communication. [online] Available at: http://www.informatik.uni-freiburg.de/~thiemann/papers/stac.ps.gz Accessed 17 November 2009.Google Scholar
Neubauer, M. & Thiemann, P. (2005) From sequential programs to multi-tier applications by program transformation. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), SIGPLAN Notices, vol. 40, no. 1. ACM Press, pp. 221232.Google Scholar
Peyton Jones, S. & Wadler, P. (1993). Imperative functional programming. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, pp. 7184.CrossRefGoogle Scholar
Pierce, B. C. (2002) Types and Programming Languages. MIT Press, Cambridge, Massachusetts.Google Scholar
Takeuchi, K., Honda, K. & Kubo, M. (1994) An interaction-based language and its typing system. In Proceedings of Parallel Architectures and Languages Europe (PARLE), Halatsis, C., Maritsas, D., Philokyprou, G. and Theodoridis, S. (eds.), Lecture Notes in Computer Science, vol. 817. Springer, Berlin, pp. 398413.CrossRefGoogle Scholar
Vallecillo, A., Vasconcelos, V. T. & Ravara, A. (2006) Typing the behavior of software components using session types, Fundam. Inform. 73 (4), 583598.Google Scholar
Vasconcelos, V. T., Gay, S. J. & Ravara, A. (2006) Typechecking a multithreaded functional language with session types, Theoretical Computer Science 368 (1–2), 6487.CrossRefGoogle Scholar
Vasconcelos, V. T., Ravara, A. & Gay, S. J. (2004) Session types for functional multithreading. In Proceedings of the International Conference on Concurrency Theory (CONCUR), Gardner, P. and Yoshida, N. (eds.), Lecture Notes in Computer Science, vol. 3170. Springer, Berlin, pp. 497511.Google Scholar
W3C. (2005) Services choreography description language version 1.0 [online]. Available at: http://www.w3.org/TR/2005/CR-ws-cdl-10/ Accessed 17 November 2009.Google Scholar
Walker, D. (2005) Substructural type systems. In Advanced Topics in Types and Programming Languages, Pierce, B. C. (ed.). MIT Press, Cambridge, Massachusetts, Chapter 1, pp. 343.Google Scholar
Wright, A. K. & Felleisen, M. (1994) A syntactic approach to type soundness. Inform. Comput. 115 (1), 3894.CrossRefGoogle Scholar
Yoshida, N. & Vasconcelos, V. T. (2007) Language primitives and type discipline for structured communication-based programming revisited: Two systems for higher-order session communication, ENTCS 171 (4), 7393.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.