Advertisement

Session Types for Object-Oriented Languages

  • Mariangiola Dezani-Ciancaglini
  • Dimitris Mostrous
  • Nobuko Yoshida
  • Sophia Drossopoulou
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4067)

Abstract

A session takes place between two parties; after establishing a connection, each party interleaves local computations with communications (sending or receiving) with the other. Session types characterise such sessions in terms of the types of values communicated and the shape of protocols, and have been developed for the π-calculus, CORBA interfaces, and functional languages. We study the incorporation of session types into object-oriented languages through Moose, a multi-threaded language with session types, thread spawning, iterative and higher-order sessions. Our design aims to consistently integrate the object-oriented programming style and sessions, and to be able to treat various case studies from the literature. We describe the design of Moose, its syntax, operational semantics and type system, and develop a type inference system. After proving subject reduction, we establish the progress property: once a communication has been established, well-typed programs will never starve at communication points.

Keywords

Operational Semantic Session Type Shared Channel Type Safety Remote Method Invocation 
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.
    A full version of this paper, http://www.doc.ic.ac.uk/~dm04
  2. 2.
    Personal communication by e-mails between the authors of [6, 7, 13, 15, 18, 20, 26, 27, 29]Google Scholar
  3. 3.
    Conversation with Steve Ross-Talbot. ACM Queue 4(2) (2006)Google Scholar
  4. 4.
    Ahern, A., Yoshida, N.: Formalising Java RMI with Explicit Code Mobility. In: OOPSLA 2005, pp. 403–422. ACM Press, New York (2005)CrossRefGoogle Scholar
  5. 5.
    Bierman, G., Parkinson, M., Pitts, A.: MJ: An Imperative Core Calculus for Java and Java with Effects. Technical Report 563, Univ. of Cambridge Computer Laboratory (2003)Google Scholar
  6. 6.
    Bonelli, E., Compagnoni, A., Gunter, E.: Correspondence Assertions for Process Synchronization in Concurrent Communications. J. of Funct. Progr. 15(2), 219–248 (2005)MATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Bonelli, E., Compagnoni, A., Gunter, E.: Typechecking Safe Process Synchronization. In: FGUC 2004. ENTCS, vol. 138, pp. 3–22. Elsevier, Amsterdam (2005)Google Scholar
  8. 8.
    Carbone, M., Honda, K., Yoshida, N.: A Theoretical Basis of Communication-centered Concurrent Programming. Web Services Choreography Working Group mailing list, to appear as a WS-CDL working reportGoogle Scholar
  9. 9.
    DeLine, R., Fahndrich, M.: Enforcing High-Level Protocols in Low-Level Software. In: PLDI 2001. SIGPLAN Notices, vol. 36(5), pp. 59–69. ACM Press, New York (2001)CrossRefGoogle Scholar
  10. 10.
    Dezani-Ciancaglini, M., Yoshida, N., Ahern, A., Drossopoulou, S.: A Distributed Object-Oriented Language with Session Types. In: De Nicola, R., Sangiorgi, D. (eds.) TGC 2005. LNCS, vol. 3705, pp. 299–318. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  11. 11.
    Drossopoulou, S.: Advanced issues in object oriented languages course notes, http://www.doc.ic.ac.uk/~scd/Teaching/AdvOO.html
  12. 12.
    Fahndrich, M., DeLine, R.: Adoption and focus: practical linear types for imperative programming. In: PLDI 2002, pp. 13–24. ACM Press, New York (2002)CrossRefGoogle Scholar
  13. 13.
    Gay, S., Hole, M.: Types and Subtypes for Client-Server Interactions. In: Swierstra, S.D. (ed.) ESOP 1999 and ETAPS 1999. LNCS, vol. 1576, pp. 74–90. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  14. 14.
    Gay, S., Hole, M.: Subtyping for Session Types in the Pi-Calculus. Acta Informatica 42(2/3), 191–225 (2005)MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Gay, S., Vasconcelos, V.T., Ravara, A.: Session Types for Inter-Process Communication. TR 2003–133, Department of Computing, University of Glasgow (2003)Google Scholar
  16. 16.
    Gordon, A.D., Jeffrey, A.: Typing Correspondence Assertions for Communication Protocols. In: MFPS 2001. ENTCS, vol. 45, pp. 379–409. Elsevier, Amsterdam (2001)Google Scholar
  17. 17.
    Hole, M., Gay, S.J.: Bounded Polymorphism in Session Types. Technical Report TR-2003-132, Department of Computing Science, University of Glasgow (2003)Google Scholar
  18. 18.
    Honda, K.: Types for Dyadic Interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)Google Scholar
  19. 19.
    Honda, K.: Composing Processes. In: POPL 1996, pp. 344–357. ACM Press, New York (1996)CrossRefGoogle Scholar
  20. 20.
    Honda, K., Vasconcelos, V.T., Kubo, M.: Language Primitives and Type Discipline for Structured Communication-Based Programming. In: Hankin, C. (ed.) ESOP 1998 and ETAPS 1998. LNCS, vol. 1381, pp. 22–138. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  21. 21.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a Minimal Core Calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001)CrossRefGoogle Scholar
  22. 22.
    Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the Pi-Calculus. ACM TOPLAS 21(5), 914–947 (1999)CrossRefGoogle Scholar
  23. 23.
    Milner, R., Parrow, J., Walker, D.: A Calculus of Mobile Processes, Parts I and II. Information and Computation 100(1) (1992)Google Scholar
  24. 24.
    Mostrous, D.: Moose: a Minimal Object Oriented Language with Session Types. Master’s thesis, Imperial College London (2005)Google Scholar
  25. 25.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)Google Scholar
  26. 26.
    Takeuchi, K., Honda, K., Kubo, M.: An Interaction-based Language and its Typing System. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, pp. 398–413. Springer, Heidelberg (1994)Google Scholar
  27. 27.
    Vallecillo, A., Vasconcelos, V.T., Ravara, A.: Typing the Behavior of Objects and Components using Session Types. In: FOCLASA 2002. ENTCS, vol. 68(3), Elsevier, Amsterdam (2002)Google Scholar
  28. 28.
    Vasconcelos, V.T.: Typed Concurrent Objects. In: Tokoro, M., Pareschi, R. (eds.) ECOOP 1994. LNCS, vol. 821, pp. 100–117. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  29. 29.
    Vasconcelos, V.T., Ravara, A., Gay, S.: Session Types for Functional Multithreading. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 497–511. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  30. 30.
    Web Services Choreography Working Group. Web Services Choreography Description Language, http://www.w3.org/2002/ws/chor/

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Mariangiola Dezani-Ciancaglini
    • 1
  • Dimitris Mostrous
    • 2
  • Nobuko Yoshida
    • 2
  • Sophia Drossopoulou
    • 2
  1. 1.Dipartimento di InformaticaUniversità di Torino 
  2. 2.Department of ComputingImperial College London 

Personalised recommendations