Advertisement

Acta Informatica

, Volume 42, Issue 2–3, pp 191–225 | Cite as

Subtyping for session types in the pi calculus

  • Simon Gay
  • Malcolm Hole
Original Article

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.

Keywords

Information System Operating System Data Structure Communication Network Information Theory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bonelli, E., Compagnoni, A., Gunter, E.: Correspondence assertions for process synchronization in concurrent communication. Journal of Functional Programming 15(2), 219–247 (2005)CrossRefMathSciNetGoogle Scholar
  2. 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)Google Scholar
  3. 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)Google Scholar
  4. 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)Google Scholar
  5. 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)Google Scholar
  6. 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)Google Scholar
  7. 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) SpringerGoogle Scholar
  8. 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)Google Scholar
  9. 9.
    Girard, J.-Y.: Linear Logic. Theoretical Computer Science 50(1), 1–102 (1987)CrossRefMathSciNetzbMATHGoogle Scholar
  10. 10.
    Gordon, A.D., Jeffrey, A.: Typing correspondence assertions for communication protocols. Theoretical Computer Science 300(1–3), 379–409 (2003)MathSciNetGoogle Scholar
  11. 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)Google Scholar
  12. 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)Google Scholar
  13. 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)Google Scholar
  14. 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)Google Scholar
  15. 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)Google Scholar
  16. 16.
    Igarashi, A., Kobayashi, N.: A generic type system for the pi-calculus. Theoretical Computer Science, 311(1–3), 121–163 (2004)MathSciNetGoogle Scholar
  17. 17.
    Kobayashi, N.: A partially deadlock-free typed process calculus. ACM Transactions on Programming Languages and Systems 20, 436–482 (1998)CrossRefGoogle Scholar
  18. 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)CrossRefGoogle Scholar
  19. 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. 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)Google Scholar
  21. 21.
    Milner, R., Parrow, J., Walker, D.: A calculus of mobile processes, I and II. Information and Computation 100(1), 1–77 (September 1992)MathSciNetGoogle Scholar
  22. 22.
    Myers, J., Rose, M.: Post office protocol version 3. Internet Standards RFC1939. (May 1996)Google Scholar
  23. 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)Google Scholar
  24. 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)Google Scholar
  25. 25.
    Pierce, B.C.: Types and programming languages. MIT Press (2002)Google Scholar
  26. 26.
    Pierce, B.C., Sangiorgi, D.: Typing and subtyping for mobile processes. Mathematical Structures in Computer Science, 6(5) (1996)Google Scholar
  27. 27.
    Pierce, B.C., Sangiorgi, D.: Behavioral equivalence in the polymorphic pi-calculus. Journal of the ACM 47(3), (2000)Google Scholar
  28. 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)Google Scholar
  29. 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)zbMATHGoogle Scholar
  30. 30.
    Sangiorgi, D., Walker, D.: The π-calculus: a Theory of Mobile Processes. Cambridge University Press (2001)Google Scholar
  31. 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)Google Scholar
  32. 32.
    Turner, D.N.: The Polymorphic Pi-Calculus: theory and implementation. PhD thesis, University of Edinburgh (1996)Google Scholar
  33. 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)Google Scholar
  34. 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)Google Scholar
  35. 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)Google Scholar

Copyright information

© Springer-Verlag 2005

Authors and Affiliations

  1. 1.Department of Computing ScienceUniversity of GlasgowUK
  2. 2.Department of Computer Science, Royal HollowayUniversity of LondonUK

Personalised recommendations