Hostname: page-component-78c5997874-xbtfd Total loading time: 0 Render date: 2024-11-06T04:11:04.717Z Has data issue: false hasContentIssue false

An extensible approach to session polymorphism

Published online by Cambridge University Press:  23 February 2015

MATTHEW GOTO
Affiliation:
School of Computing, DePaul University, 243 S. Wabash Ave. Chicago, IL 60604, U.S.A. Emails: [email protected], [email protected], [email protected], [email protected]
RADHA JAGADEESAN
Affiliation:
School of Computing, DePaul University, 243 S. Wabash Ave. Chicago, IL 60604, U.S.A. Emails: [email protected], [email protected], [email protected], [email protected]
ALAN JEFFREY
Affiliation:
Alcatel-Lucent Bell Labs, 1960 Lucent Lane, Naperville, IL 60563, U.S.A. Email: [email protected]
CORIN PITCHER
Affiliation:
School of Computing, DePaul University, 243 S. Wabash Ave. Chicago, IL 60604, U.S.A. Emails: [email protected], [email protected], [email protected], [email protected]
JAMES RIELY
Affiliation:
School of Computing, DePaul University, 243 S. Wabash Ave. Chicago, IL 60604, U.S.A. Emails: [email protected], [email protected], [email protected], [email protected]

Abstract

Session types describe and constrain the input/output behaviour of systems. Existing session typing systems have limited support for polymorphism. For example, existing systems cannot provide the most general type for a generic proxy process that forwards messages between two channels. We provide a polymorphic session typing system for the π calculus, and demonstrate the utility of session-type-level functions in combination with polymorphic session typing. The type system guarantees subject reduction and safety properties, but not deadlock freedom. We describe a formalization of the type system in Coq. The proofs of subject reduction and safety properties, as well as typing of example processes, have been mechanically verified.

Type
Paper
Copyright
Copyright © Cambridge University Press 2015 

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

Footnotes

This material is based upon the work supported by the National Science Foundation under Grant No. 0916741.

References

Affeldt, R. and Kobayashi, N. (2008) A Coq library for verification of concurrent programs. Electronic Notes in Theoretical Computer Science 199 1732.CrossRefGoogle Scholar
Aydemir, B., Charguéraud, A., Pierce, B. C., Pollack, R. and Weirich, S. (2008) Engineering formal metatheory. In: Symposium on Principles of programming languages 3–15.CrossRefGoogle Scholar
Bartlett, K. A., Scantlebury, R. A. and Wilkinson, P. T. (1969) A note on reliable full-duplex transmission over half-duplex links. Communications of the ACM 12 (5) 260261.CrossRefGoogle Scholar
Bertot, Y. and Castéran, P. (2004) Interactive Theorem Proving and Program Development. Coq'Art: The Calculus of Inductive Constructions, Texts in Theoretical Computer Science, Springer Verlag.CrossRefGoogle Scholar
Bonelli, E., Compagnoni, A. B. and Gunter, E. L. (2005) Correspondence assertions for process synchronization in concurrent communications. Journal of Functional Programming 15 (2) 219247.CrossRefGoogle Scholar
Bono, V. and Padovani, L. (2011) Polymorphic endpoint types for copyless message passing. In: Proceedings of the 4th Workshop on Interaction and Concurrency Experience (ICE'11). Electronic Proceedings in Theoretical Computer Science 59 5367.Google Scholar
Caires, L., Pérez, J., Pfenning, F. and Toninho, B. (2013) Behavioral polymorphism and parametricity in session-based communication. In: Felleisen, M. and Gardner, P. (eds.) ESOP. Lecture Notes in Computer Science 7792 330349.Google Scholar
Caires, L. and Pfenning, F. (2010) Session types as intuitionistic linear propositions. In: Gastin, P. and Laroussinie, F. (eds.) CONCUR. Springer Lecture Notes in Computer Science 6269 222236.CrossRefGoogle Scholar
Castagna, G., Dezani-Ciancaglini, M., Giachino, E. and Padovani, L. (2009) Foundations of session types. In: Symposium on Principles and Practice of Declarative Programming ACM, 219230.Google Scholar
Charguéraud, A. (2012) The locally nameless representation. Journal of Automated Reasoning 49 (3) 363408.CrossRefGoogle Scholar
Coppo, M., Dezani-Ciancaglini, M. and Yoshida, N. (2007) Asynchronous session types and progress for object oriented languages. In: FMOODS. Lecture Notes in Computer Science 4468 131.CrossRefGoogle Scholar
Coquand, T. (1992) Pattern matching with dependent types. In: Nordström, B., Petersson, K. and Plotkin, G. (eds.) Electronic Proceedings of the 3rd Annual BRA Workshop on Logical Frameworks 66–79. Available from http://www.lfcs.inf.ed.ac.uk/research/types-bra/proc/.Google Scholar
Coquand, T. and Paulin-Mohring, C. (1990) Inductively defined types. Lecture Notes in Computer Science 417 5066.CrossRefGoogle Scholar
Deniélou, P.-M. and Yoshida, N. (2011) Dynamic multirole session types. In: Symposium on Principles of programming languages 435–446.Google Scholar
Despeyroux, J. (2000) A higher-order specification of the π-calculus. In: IFIP Conference on Theoretical Computer Science. Lecture Notes in Computer Science 1872 425439.CrossRefGoogle Scholar
Dezani-Ciancaglini, M. and de'Liguoro, U. (2010) Sessions and session types: An overview. In: Laneve, C. and Su, J. (eds.) WS-FM'09. Lecture Notes in Computer Science 6194 128.CrossRefGoogle Scholar
Dezani-Ciancaglini, M., de Liguoro, U. and Yoshida, N. (2007a) On progress for structured communications. In: TGC. Springer Lecture Notes in Computer Science 257–275.CrossRefGoogle Scholar
Dezani-Ciancaglini, M., Drossopoulou, S., Giachino, E. and Yoshida, N. (2007b) Bounded session types for object-oriented languages. In: FMCO'06. Lecture Notes in Computer Science 4709.CrossRefGoogle Scholar
Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N. and Drossopolou, S. (2006) Session types for object-oriented languages. In: ECOOP'06. Springer Lecture Notes in Computer Science 4067 328352.Google Scholar
Divito, B. L. (1981) A mechanical verification of the alternating bit protocol. ACM SIGSOFT Software Engineering Notes 6 (3), 813.Google Scholar
Dybjer, P. (1991) Inductive sets and families in Martin-Löf's type theory and their set-theoretic semantics. In: Huet, G. and Plotkin, G. (eds.) Logical Frameworks, New York, NY, USA. Cambridge University Press 280306.CrossRefGoogle Scholar
Freeman, T. and Pfenning, F. (1991) Refinement types for ML. In: Proceedings of the SIGPLAN '91 Symposium on Language Design and Implementation, ACM Press 268277.Google Scholar
Gay, S. J. (2001) A framework for the formalisation of π calculus type systems in Isabelle/HOL. In: Proceedings of 14th Theorem Proving in Higher Order Logics 217–232.CrossRefGoogle Scholar
Gay, S. J. (2008) Bounded polymorphism in session types. Mathematical Structures in Computer Science 18 (5) 895930.Google Scholar
Gay, S. J. and Hole, M. (2005) Subtyping for session types in the π calculus. Acta Informatica 42 (2–3) 191225.CrossRefGoogle Scholar
Gay, S. J. and Vasconcelos, V. T. (2010) Linear type theory for asynchronous session types. Journal of Functional Programming 20 (1) 1950.CrossRefGoogle Scholar
Gay, S. J., Vasconcelos, V. T., Ravara, A., Gesbert, N. and Caldeira, A. Z. (2010) Modular session types for distributed object-oriented programming. In: Symposium on Principles of programming languages 299–312.Google Scholar
Giunti, M., Honda, K., Vasconcelos, V. T. and Yoshida, N. (2009) Session-based type discipline for pi calculus with matching. Available at http://homepages.di.fc.ul.pt/~vv/papers/giunti.honda.etal_session-based-pi-matching.pdf.Google Scholar
Gordon, A. D. and Fournet, C. (2010) Principles and applications of refinement types. In: Esparza, J., Spanfelner, B. and Grumberg, O. (eds.) Logics and Languages for Reliability and Security, NATO Science for Peace and Security Series - D: Information and Communication Security volume 25, IOS Press 73104.Google Scholar
Goto, M., Jagadeesan, R., Jeffrey, A., Pitcher, C. and Riely, J. (2011) Coq formalization of extensible polymorphic session types. Available at http://fpl.cs.depaul.edu/projects/xpol/.Google Scholar
Honda, K., Vasconcelos, V. T. and Kubo, M. (1998) Language primitives and type discipline for structured communication-based programming. In: ESOP. Lecture Notes in Computer Science 1381 122138.CrossRefGoogle Scholar
Honda, K., Yoshida, N. and Carbone, M. (2008) Multiparty asynchronous session types. In: Symposium on Principles of programming languages 273–284.CrossRefGoogle Scholar
Honsell, F., Miculan, M. and Scagnetto, I. (2001) π-calculus in (co)inductive type theory. Theoretical Computer Science 253 239285.CrossRefGoogle Scholar
Hu, R., Yoshida, N. and Honda, K. (2008) Session-based distributed programming in Java. In: ECOOP. Lecture Notes in Computer Science 5142 516541.Google Scholar
Jeffrey, A. S. A. and Rathke, J. (2011) The lax braided structure of streaming I/O. In: Proceedings Conference of Computer Science Logic 292–306.Google Scholar
Kiselyov, O., Peyton Jones, S. and Shan, C.-C. (2010) Fun with type functions (version 3). Presented at Tony Hoare's 75th birthday celebration.Google Scholar
Kobayashi, N. (1998) A partially deadlock-free typed process calculus. ACM Transactions on Programming Languages and Systems 20 (2) 436482.Google Scholar
Kobayashi, N. (2006) A new type system for deadlock-free processes. In: Baier, C. and Hermanns, H. (eds.) CONCUR. Springer Lecture Notes in Computer Science 4137 233247.CrossRefGoogle Scholar
Malecha, G., Morrisett, G. and Wisnesky, R. (2011) Trace-based verification of imperative programs with I/O. Journal of Symbolic Computation 46 (2) 95118. (Automated specification and verification of web systems.)CrossRefGoogle Scholar
Milner, R. (1991) The polyadic π-calculus: A tutorial. Technical Report ECS-LFCS-91-180, Laboratory for Foundations of Computer Science, Department of Computer Science, University of Edinburgh, UK. (Also in Logic and Algebra of Specification, Bauer, F. L., Brauer, W. and Schwichtenberg, H. (eds.) Springer-Verlag, 1993.)Google Scholar
Milner, R., Parrow, J. and Walker, D. (1992) A calculus of mobile processes, I. Information and Computation 100 (1) 140.CrossRefGoogle Scholar
Neubauer, M. and Thiemann, P. (2004a) An implementation of session types. In: PADL. Springer Lecture Notes in Computer Science 3057 5670.CrossRefGoogle Scholar
Neubauer, M. and Thiemann, P. (2004b) Protocol specialization. In: Chin, W.-N. (ed.) APLAS. Springer Lecture Notes in Computer Science 3302 246261.CrossRefGoogle Scholar
Pucella, R. and Tov, J. A. (2008) Haskell session types with (almost) no class. In: Proceedings of the 1st ACM SIGPLAN Symposium on Haskell, 25–36.CrossRefGoogle Scholar
Röckl, C. and Hirschkoff, D. (2003) A fully adequate shallow embedding of the π-calculus in Isabelle/HOL with mechanized syntax analysis. Journal of Functional Programming 13 415451.CrossRefGoogle Scholar
Roscoe, A. W. (1997) The Theory and Practice of Concurrency, Prentice Hall.Google Scholar
Sackman, M. and Eisenbach, S. (2008) Session types in Haskell: Updating message passing for the 21st century. Available at http://hdl.handle.net/10044/1/5918.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.CrossRefGoogle Scholar
Tobin-Hochstadt, S. and Felleisen, M. (2010) Logical types for untyped languages. In: Hudak, P. and Weirich, S. (eds.) International Conference on Functional Programming, ACM 117128.Google Scholar
Toninho, B., Caires, L. and Pfenning, F. (2011) Dependent session types via intuitionistic linear type theory. In: Schneider-Kamp, P. and Hanus, M. (eds.) Symposium on Principles and Practices of Declarative Programming, ACM 161172.Google Scholar
Vasconcelos, V. T. (2009) Fundamentals of Session Types. Springer Verlag Lecture Notes in Computer Science 5569 158186.Google Scholar
Vasconcelos, V. T., Gay, S. J. and Ravara, A. (2006) Type checking a multithreaded functional language with session types. Theoretical Computer Science 368 (1–2) 6487.CrossRefGoogle Scholar
Vasconcelos, V. T., Giunti, M., Yoshida, N. and Honda, K. (2010) Type safety without subject reduction for session types. Available at http://www.di.fc.ul.pt/~vv/papers/vasconcelos.giunti.etal_type-safety-session-types.pdf.Google Scholar
Wadler, P. (2012) Propositions as sessions. In: Thiemann, P. and Findler, R. B. (eds.) International Conference on Functional Programming, ACM 273286.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: 1st International Workshop on Security and Rewriting Techniques. Elsevier Electronic Notes in Theoretical Computer Science 171 (4) 7393.CrossRefGoogle Scholar