Skip to main content Accesibility Help
×
×
Home

Linear type theory for asynchronous session types

  • SIMON J. GAY (a1) and VASCO T. VASCONCELOS (a2)
Abstract

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.

Copyright
References
Hide All
Amtoft, T., Nielson, F. & Nielson, H. R. (1999) Type and Effect Systems: Behaviours for Concurrency. Imperial College Press, London.
Bonelli, E., Compagnoni, A. & Gunter, E. (2005) Correspondence assertions for process synchronization in concurrent communication, J. Funct. Program. 15 (2), 219247.
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.
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.
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.
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.
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.
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.
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.
Gay, S. J. (2006) Subtyping Between Standard and Linear Function Types, Technical Report 2006-305. Glasgow, Scotland: Department of Computing Science, University of Glasgow.
Gay, S. J. (2008) Bounded polymorphism in session types, Math. Struct. Comp. Sci. 18 (5), 895930.
Gay, S. J. & Hole, M. J. (2005) Subtyping for session types in the pi calculus, Acta Inform. 42 (2/3), 191225.
Gay, S. J. & Vasconcelos, V. T. (2007) Asynchronous Functional Session Types, Technical Report 2007-251. Glasgow, Scotland: Department of Computing Science, University of Glasgow.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Pierce, B. C. (2002) Types and Programming Languages. MIT Press, Cambridge, Massachusetts.
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.
Vallecillo, A., Vasconcelos, V. T. & Ravara, A. (2006) Typing the behavior of software components using session types, Fundam. Inform. 73 (4), 583598.
Vasconcelos, V. T., Gay, S. J. & Ravara, A. (2006) Typechecking a multithreaded functional language with session types, Theoretical Computer Science 368 (1–2), 6487.
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.
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.
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.
Wright, A. K. & Felleisen, M. (1994) A syntactic approach to type soundness. Inform. Comput. 115 (1), 3894.
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.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Linear type theory for asynchronous session types

  • SIMON J. GAY (a1) and VASCO T. VASCONCELOS (a2)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *