Skip to main content Accessibility help
×
×
Home

An extensible approach to session polymorphism

  • MATTHEW GOTO (a1), RADHA JAGADEESAN (a1), ALAN JEFFREY (a2), CORIN PITCHER (a1) and JAMES RIELY (a1)...
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.

Copyright
Footnotes
Hide All

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

Footnotes
References
Hide All
Affeldt, R. and Kobayashi, N. (2008) A Coq library for verification of concurrent programs. Electronic Notes in Theoretical Computer Science 199 1732.
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.
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.
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.
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.
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.
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.
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.
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.
Charguéraud, A. (2012) The locally nameless representation. Journal of Automated Reasoning 49 (3) 363408.
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.
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/.
Coquand, T. and Paulin-Mohring, C. (1990) Inductively defined types. Lecture Notes in Computer Science 417 5066.
Deniélou, P.-M. and Yoshida, N. (2011) Dynamic multirole session types. In: Symposium on Principles of programming languages 435–446.
Despeyroux, J. (2000) A higher-order specification of the π-calculus. In: IFIP Conference on Theoretical Computer Science. Lecture Notes in Computer Science 1872 425439.
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.
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.
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.
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.
Divito, B. L. (1981) A mechanical verification of the alternating bit protocol. ACM SIGSOFT Software Engineering Notes 6 (3), 813.
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.
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.
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.
Gay, S. J. (2008) Bounded polymorphism in session types. Mathematical Structures in Computer Science 18 (5) 895930.
Gay, S. J. and Hole, M. (2005) Subtyping for session types in the π calculus. Acta Informatica 42 (2–3) 191225.
Gay, S. J. and Vasconcelos, V. T. (2010) Linear type theory for asynchronous session types. Journal of Functional Programming 20 (1) 1950.
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.
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.
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.
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/.
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.
Honda, K., Yoshida, N. and Carbone, M. (2008) Multiparty asynchronous session types. In: Symposium on Principles of programming languages 273–284.
Honsell, F., Miculan, M. and Scagnetto, I. (2001) π-calculus in (co)inductive type theory. Theoretical Computer Science 253 239285.
Hu, R., Yoshida, N. and Honda, K. (2008) Session-based distributed programming in Java. In: ECOOP. Lecture Notes in Computer Science 5142 516541.
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.
Kiselyov, O., Peyton Jones, S. and Shan, C.-C. (2010) Fun with type functions (version 3). Presented at Tony Hoare's 75th birthday celebration.
Kobayashi, N. (1998) A partially deadlock-free typed process calculus. ACM Transactions on Programming Languages and Systems 20 (2) 436482.
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.
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.)
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.)
Milner, R., Parrow, J. and Walker, D. (1992) A calculus of mobile processes, I. Information and Computation 100 (1) 140.
Neubauer, M. and Thiemann, P. (2004a) An implementation of session types. In: PADL. Springer Lecture Notes in Computer Science 3057 5670.
Neubauer, M. and Thiemann, P. (2004b) Protocol specialization. In: Chin, W.-N. (ed.) APLAS. Springer Lecture Notes in Computer Science 3302 246261.
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.
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.
Roscoe, A. W. (1997) The Theory and Practice of Concurrency, Prentice Hall.
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.
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.
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.
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.
Vasconcelos, V. T. (2009) Fundamentals of Session Types. Springer Verlag Lecture Notes in Computer Science 5569 158186.
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.
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.
Wadler, P. (2012) Propositions as sessions. In: Thiemann, P. and Findler, R. B. (eds.) International Conference on Functional Programming, ACM 273286.
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.
Recommend this journal

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

Mathematical Structures in Computer Science
  • ISSN: 0960-1295
  • EISSN: 1469-8072
  • URL: /core/journals/mathematical-structures-in-computer-science
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

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