Skip to main content
Log in

Subtyping for session types in the pi calculus

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

Extending the pi calculus with the session types proposed by Honda et al. allows high-level specifications of structured patterns of communication, such as client-server protocols, to be expressed as types and verified by static typechecking. We define a notion of subtyping for session types, which allows protocol specifications to be extended in order to describe richer behaviour; for example, an implemented server can be refined without invalidating type-correctness of an overall system. We formalize the syntax, operational semantics and typing rules of an extended pi calculus, prove that typability guarantees absence of run-time communication errors, and show that the typing rules can be transformed into a practical typechecking algorithm.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bonelli, E., Compagnoni, A., Gunter, E.: Correspondence assertions for process synchronization in concurrent communication. Journal of Functional Programming 15(2), 219–247 (2005)

    Article  MathSciNet  Google Scholar 

  2. Bonelli, E., Compagnoni, A., Gunter, E.: Typechecking safe process synchronization. In Proceedings of the Third EATCS Workshop on the Foundations of Global Ubiquitous Computing, Electronic Notes on Theoretical Computer Science. Elsevier, 2005. To appear. (2005)

  3. Chaki, S., Rajamani, S.K., Rehof, J.: Types as models: model checking message-passing programs. In Proceedings, 29th ACM Symposium on Principles of Programming Languages, pages 45–57. ACM Press (2002)

  4. DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (SIGPLAN Notices 36(5)), pages 59–69. ACM Press (2001)

  5. Dezani-Ciancaglini, M., Yoshida, N., Ahern, A., Drossopolou, S.: A distributed object-oriented language with session types. In Proceedings of the Symposium on Trustworthy Global Computing. Springer, To appear. (2005)

  6. Gay, S.J.: A sort inference algorithm for the polyadic π-calculus. In Proceedings, 20th ACM Symposium on Principles of Programming Languages. ACM Press, (1993)

  7. Gay, S.J., Hole, M.J.: Types and subtypes for client-server interactions. In ESOP'99: Proceedings of the European Symposium on Programming Languages and Systems, volume 1576 of Lecture Notes in Computer Science, pp. 74–90. (1999) Springer

  8. Gay, S.J., Hole, M.J.: Types and subtypes for correct communication in client-server systems. Technical Report TR-2003-131, Department of Computing Science, University of Glasgow (February 2003)

  9. Girard, J.-Y.: Linear Logic. Theoretical Computer Science 50(1), 1–102 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  10. Gordon, A.D., Jeffrey, A.: Typing correspondence assertions for communication protocols. Theoretical Computer Science 300(1–3), 379–409 (2003)

    MathSciNet  Google Scholar 

  11. Grossman, D.: Type-safe multithreading in cyclone. In Proceedings of the ACM Workshop on Types in Language Design and Implementation (SIGPLAN Notices 38(3)), pp. 13–25. ACM Press (2003)

  12. Grossman, D., Morrisett, G., Jim, T., Hicks, M., Wang, Y., Cheney, J.: Region-based memory management in cyclone. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (SIGPLAN Notices 37(5)), pp. 282–293. ACM Press (2002)

  13. Hole, M.J., Gay, S.J.: Bounded polymorphism in session types. Technical Report TR-2003-132, Department of Computing Science, University of Glasgow (March 2003)

  14. Honda, K.: Types for dyadic interaction. In CONCUR'93: Proceedings of the International Conference on Concurrency Theory, volume 715 of Lecture Notes in Computer Science, pp. 509–523 (Springer, 1993)

  15. Honda, K., Vasconcelos, V., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In ESOP'98: Proceedings of the European Symposium on Programming, volume 1381 of Lecture Notes in Computer Science, pp. 122–138. Springer-Verlag (1998)

  16. Igarashi, A., Kobayashi, N.: A generic type system for the pi-calculus. Theoretical Computer Science, 311(1–3), 121–163 (2004)

    MathSciNet  Google Scholar 

  17. Kobayashi, N.: A partially deadlock-free typed process calculus. ACM Transactions on Programming Languages and Systems 20, 436–482 (1998)

    Article  Google Scholar 

  18. Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the Pi-Calculus. ACM Transactions on Programming Languages and Systems 21(5), 914–947 (September 1999)

    Article  Google Scholar 

  19. Mackie, I.: Lilac : A functional programming language based on linear logic. Journal of Functional Programming 4(4), 1–39 (October 1994)

    Google Scholar 

  20. Milner, R.: The polyadic π-calculus: A tutorial. Technical Report 91-180, Laboratory for Foundations of Computer Science, Department of Computer Science, University of Edinburgh (1991)

  21. Milner, R., Parrow, J., Walker, D.: A calculus of mobile processes, I and II. Information and Computation 100(1), 1–77 (September 1992)

    MathSciNet  Google Scholar 

  22. Myers, J., Rose, M.: Post office protocol version 3. Internet Standards RFC1939. (May 1996)

  23. Neubauer, M., Thiemann, P.: An implementation of session types. In Practical Aspects of Declarative Languages (PADL'04), volume 3057 of Lecture Notes in Computer Science, pp. 56–70 (Springer, 2004)

  24. Neubauer, M., Thiemann, P.: Protocol specialization. In Proceedings of the Second Asian Symposium on Programming Languages and Systems (APLAS 2004), volume 3302 of Lecture Notes in Computer Science, pp. 246–261 (Springer, 2004)

  25. Pierce, B.C.: Types and programming languages. MIT Press (2002)

  26. Pierce, B.C., Sangiorgi, D.: Typing and subtyping for mobile processes. Mathematical Structures in Computer Science, 6(5) (1996)

  27. Pierce, B.C., Sangiorgi, D.: Behavioral equivalence in the polymorphic pi-calculus. Journal of the ACM 47(3), (2000)

  28. Pierce, B.C., Turner, D.N.: Pict: A programming language based on the pi-calculus. In G. Plotkin, C. Stirling, and M. Tofte, editors, Proof, Language and Interaction: Essays in Honour of Robin Milner. MIT Press (2000)

  29. Rajamani, S.K., Rehof, J.: A behavioral module system for the pi-calculus. In Static Analysis: 8th International Symposium, SAS 2001, volume 2126 of Lecture Notes in Computer Science, pp. 375–394. Springer (2001)

    MATH  Google Scholar 

  30. Sangiorgi, D., Walker, D.: The π-calculus: a Theory of Mobile Processes. Cambridge University Press (2001)

  31. Takeuchi, K., Honda, K., Kubo, M.: An interaction-based language and its typing system. In PARLE '94: Parallel Architectures and Languages Europe, volume 817 of Lecture Notes in Computer Science, Springer (1994)

  32. Turner, D.N.: The Polymorphic Pi-Calculus: theory and implementation. PhD thesis, University of Edinburgh (1996)

  33. Vallecillo, A., Vasconcelos, V.T., Ravara, A.: Typing the behavior of objects and components using session types. In International Workshop on Foundations of Coordination Languages and Software Architectures, volume 68(3) of Electronic Notes in Theoretical Computer Science. Elsevier (2003)

  34. Vasconcelos, V.T., Honda, K.: Principal typing schemes in a polyadic π-calculus. In CONCUR'93: Proceedings of the International Conference on Concurrency Theory, volume 715 of Lecture Notes in Computer Science. Springer, (1993)

  35. Vasconcelos, V.T., Ravara, A., Gay, S.J.: Session types for functional multithreading. In CONCUR'04: Proceedings of the International Conference on Concurrency Theory, volume 3170 of Lecture Notes in Computer Science, pages 497–511. Springer. Full version to appear in Theoretical Computer Science. (2004)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Simon Gay.

Additional information

Malcolm Hole died on 28th February 2004, a few weeks after the original submission of this paper.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Gay, S., Hole, M. Subtyping for session types in the pi calculus. Acta Informatica 42, 191–225 (2005). https://doi.org/10.1007/s00236-005-0177-z

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-005-0177-z

Keywords

Navigation