Hostname: page-component-8448b6f56d-qsmjn Total loading time: 0 Render date: 2024-04-25T05:12:30.877Z Has data issue: false hasContentIssue false

Linearity, session types and the Pi calculus

Published online by Cambridge University Press:  10 November 2014

MARCO GIUNTI
Affiliation:
CITI, Faculty of Sciences and Technology, New University of Lisbon, Portugal Email: mgiunti@di.ubi.pt
VASCO THUDICHUM VASCONCELOS
Affiliation:
LaSIGE, Faculty of Sciences, University of Lisbon, Portugal Email: vv@di.fc.ul.pt

Abstract

We present a type system based on session types that works on a conventional pi calculus. Types are equipped with a constructor that describes the two ends of a single communication channel, this being the only type available for describing the behaviour of channels. Session types, in turn, describe the behaviour of each individual channel end, as usual. A novel notion of typing context split allows for typing processes not typable with extant type systems. We show that our system guarantees that typed processes do not engage in races for linear resources. We assess the expressiveness of the type system by providing three distinct encodings – from the pi calculus with polarized variables, from the pi calculus with accept and request primitives, and from the linear pi calculus – into our system. For each language we present operational and typing correspondences, showing that our system effectively subsumes foregoing works on linear and session types. In the case of the linear pi calculus we also provide a completeness result.

Type
Paper
Copyright
Copyright © Cambridge University Press 2014 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Baltazar, P., Caires, L., Vasconcelos, V. T. and Vieira, H. T. (2013) A type system for flexible role assignment in multiparty communicating systems. In: TGC'12. Springer LNCS. 8191 8296.Google Scholar
Bruni, R. and Mezzina, L. G. (2008) Types and deadlock freedom in a calculus of services, sessions and pipelines. In: AMAST, Springer 100115.Google Scholar
Caires, L. and Vieira, H. (2010) Conversation types. Theoretical Computer Science 411 (51–52) 43994440.CrossRefGoogle Scholar
Capecchi, S., Coppo, M., Dezani-Ciancaglini, M., Drossopoulou, S. and Giachino, E. (2009) Amalgamating sessions and methods in object-oriented languages with generics. Theoretical Computer Science 410 (2–3) 142167.Google Scholar
Coppo, M., Dezani-Ciancaglini, M. and Yoshida, N. (2007) Asynchronous session types and progress for object-oriented languages. In: FMOODS. Springer Lecture Notes in Computer Science 4468 131.Google Scholar
Cruz-Filipe, L., Lanese, I., Martins, F., Ravara, A. and Vasconcelos, V. T. (2008) Behavioural theory at work: Program transformations in a service-centred calculus. In FMOODS. Springer Lecture Notes in Computer Science 5051 5977.Google Scholar
Dezani-Ciancaglini, M. and de'Liguoro, U. (2010). Sessions and session types: An overview. In: WS-FM'09. Springer Lecture Notes in Computer Science 6194 128.Google Scholar
Dezani-Ciancaglini, M., Drossopoulou, S., Giachino, E. and Yoshida, N. (2007) Bounded session types for object-oriented languages. In: FMCO. Springer Lecture Notes in Computer Science 4709 207245.Google Scholar
Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N. and Drossopolou, S. (2006) Session types for object-oriented languages. In: ECOOP. Springer Lecture Notes in Computer Science 4067 328352.Google Scholar
Dezani-Ciancaglini, M., Yoshida, N., Ahern, A. and Drossopolou, S. (2005) A distributed object-oriented language with session types. In: TGC. Springer Lecture Notes in Computer Science 3705 299318.Google Scholar
Fähndrich, M., Aiken, M., Hawblitzel, C., Hodson, O., Hunt, G., Larus, J. R. and Levi, S. (2006). Language support for fast and reliable message-based communication in Singularity OS. SIGOPS Operating Systems Review 40 (4) 177190.Google Scholar
Gay, S. and Vasconcelos, V. T. (2010) Linear type theory for asynchronous session types. Journal of Functional Programming 20 (1) 1950.CrossRefGoogle Scholar
Gay, S., Vasconcelos, V. T., Ravara, A., Gesbert, N. and Caldeira, A. Z. (2010) Modular session types for distributed object-oriented programming. In: POPL, ACM Press 299312.Google Scholar
Gay, S. J. and Hole, M. J. (2005) Subtyping for session types in the pi calculus. Acta Informatica 42 (2/3) 191225.Google Scholar
Giunti, M. (2011) A type checking algorithm for qualified session types. In: WWV. EPTCS 61 96114.Google Scholar
Giunti, M., Honda, K., Vasconcelos, V. T. and Yoshida, N. (2009) Session-based type discipline for pi calculus with matching. In: PLACES.Google Scholar
Giunti, M. and Vasconcelos, V. T. (2010) A linear account of session types in the pi calculus. In: CONCUR. Springer Lecture Notes in Computer Science 6269 432446.Google Scholar
Honda, K. (1993) Types for dyadic interaction. In: CONCUR. Springer Lecture Notes in Computer Science 715 509523.Google Scholar
Honda, K., Vasconcelos, V.T. and Kubo, M. (1998) Language primitives and type disciplines for structured communication-based programming. In: ESOP. Springer Lecture Notes in Computer Science 1381 22138.Google Scholar
Honda, K., Yoshida, N. and Carbone, M. (2008) Multiparty asynchronous session types. In: POPL, ACM Press 273284.Google Scholar
Hu, R., Yoshida, N. and Honda, K. (2008) Session-based distributed programming in Java. In: ECOOP. Springer Lecture Notes in Computer Science 5142 516541.Google Scholar
Kobayashi, N., Pierce, B. C. and Turner, D. N. (1999) Linearity and the pi-calculus. ACM Transactions on Programming Languages and Systems 21 (5) 914947.Google Scholar
Milner, R. (1992) Functions as processes. Mathematical Structures in Computer Science 2 (2) 119141.Google Scholar
Milner, R. (1993) The polyadic π-calculus: A tutorial. In: Logic and Algebra of Specification. Springer Series F. NATO ASI 94. (Available as Technical Report ECS-LFCS-91-180, University of Edinburgh, October 1991.)Google Scholar
Milner, R., Parrow, J. and Walker, D. (1992) A calculus of mobile processes, parts I and II. Information and Computation 100 (1) 177.Google Scholar
Padovani, L. (2012) On projecting processes into session types. Mathematical Structures in Computer Science 22 (2) 237289.CrossRefGoogle Scholar
Pierce, B. C. (2002) Types and Programming Languages, MIT Press.Google Scholar
Pierce, B. C. and Sangiorgi, D. (1996) Typing and subtyping for mobile processes. Mathematical Structures in Computer Science 6 (5) 409453.Google Scholar
Takeuchi, K., Honda, K. and Kubo, M. (1994) An interaction-based language and its typing system. In: PARLE. Springer Lecture Notes in Computer Science 817 398413.Google Scholar
Vasconcelos, V. T. (2011) Sessions, from types to programming languages. Bulletin of the EATCS 103 5373.Google Scholar
Vasconcelos, V. T. (2012) Fundamentals of session types. Information and Computation, 217 5270.Google Scholar
Vasconcelos, V. T., Gay, S.J. and Ravara, A. (2006) Typechecking a multithreaded functional language with session types. Theoretical Computer Science 368 (1–2) 6487.Google Scholar
Yoshida, N. and Vasconcelos, V.T. (2007) Language primitives and type discipline for structured communication-based programming revisited: Two systems for higher-order session communication. In: SecReT. ENTCS 171 (4) 7393.Google Scholar