Skip to main content Accessibility help
×
Home

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)
Corresponding

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 2009

Access options

Get access to the full version of this content by using one of the access options below.

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.

Altmetric attention score

Full text views

Full text views reflects PDF downloads, PDFs sent to Google Drive, Dropbox and Kindle and HTML full text views.

Total number of HTML views: 0
Total number of PDF views: 134 *
View data table for this chart

* Views captured on Cambridge Core between September 2016 - 19th January 2021. This data will be updated every 24 hours.

Hostname: page-component-76cb886bbf-tvlwp Total loading time: 0.329 Render date: 2021-01-19T21:42:54.411Z Query parameters: { "hasAccess": "0", "openAccess": "0", "isLogged": "0", "lang": "en" } Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "metricsAbstractViews": false, "figures": false, "newCiteModal": false }

Send article to Kindle

To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Linear type theory for asynchronous session types
Available formats
×

Send article to Dropbox

To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

Linear type theory for asynchronous session types
Available formats
×

Send article to Google Drive

To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

Linear type theory for asynchronous session types
Available formats
×
×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *