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.
This work was funded in part by the Information Society Technologies programme of the European Commission, Future and Emerging Technologies under the IST-2005-015905 MOBIUS project, and FP6-2004-510996 Coordination Action TYPES, and by MIUR Cofin’04 project McTafi, and by EPSRC GR/T03208, GR/S55538, GR/T04724 and GR/S68071. This paper reflects only the authors’ views and the Community is not liable for any use that may be made of the information contained therein.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A full version of this paper, http://www.doc.ic.ac.uk/~dm04
Personal communication by e-mails between the authors of [6, 7, 13, 15, 18, 20, 26, 27, 29]
Conversation with Steve Ross-Talbot. ACM Queue 4(2) (2006)
Ahern, A., Yoshida, N.: Formalising Java RMI with Explicit Code Mobility. In: OOPSLA 2005, pp. 403–422. ACM Press, New York (2005)
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)
Bonelli, E., Compagnoni, A., Gunter, E.: Correspondence Assertions for Process Synchronization in Concurrent Communications. J. of Funct. Progr. 15(2), 219–248 (2005)
Bonelli, E., Compagnoni, A., Gunter, E.: Typechecking Safe Process Synchronization. In: FGUC 2004. ENTCS, vol. 138, pp. 3–22. Elsevier, Amsterdam (2005)
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 report
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)
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)
Drossopoulou, S.: Advanced issues in object oriented languages course notes, http://www.doc.ic.ac.uk/~scd/Teaching/AdvOO.html
Fahndrich, M., DeLine, R.: Adoption and focus: practical linear types for imperative programming. In: PLDI 2002, pp. 13–24. ACM Press, New York (2002)
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)
Gay, S., Hole, M.: Subtyping for Session Types in the Pi-Calculus. Acta Informatica 42(2/3), 191–225 (2005)
Gay, S., Vasconcelos, V.T., Ravara, A.: Session Types for Inter-Process Communication. TR 2003–133, Department of Computing, University of Glasgow (2003)
Gordon, A.D., Jeffrey, A.: Typing Correspondence Assertions for Communication Protocols. In: MFPS 2001. ENTCS, vol. 45, pp. 379–409. Elsevier, Amsterdam (2001)
Hole, M., Gay, S.J.: Bounded Polymorphism in Session Types. Technical Report TR-2003-132, Department of Computing Science, University of Glasgow (2003)
Honda, K.: Types for Dyadic Interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)
Honda, K.: Composing Processes. In: POPL 1996, pp. 344–357. ACM Press, New York (1996)
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)
Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a Minimal Core Calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001)
Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the Pi-Calculus. ACM TOPLAS 21(5), 914–947 (1999)
Milner, R., Parrow, J., Walker, D.: A Calculus of Mobile Processes, Parts I and II. Information and Computation 100(1) (1992)
Mostrous, D.: Moose: a Minimal Object Oriented Language with Session Types. Master’s thesis, Imperial College London (2005)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
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)
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)
Vasconcelos, V.T.: Typed Concurrent Objects. In: Tokoro, M., Pareschi, R. (eds.) ECOOP 1994. LNCS, vol. 821, pp. 100–117. Springer, Heidelberg (1994)
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)
Web Services Choreography Working Group. Web Services Choreography Description Language, http://www.w3.org/2002/ws/chor/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N., Drossopoulou, S. (2006). Session Types for Object-Oriented Languages. In: Thomas, D. (eds) ECOOP 2006 – Object-Oriented Programming. ECOOP 2006. Lecture Notes in Computer Science, vol 4067. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11785477_20
Download citation
DOI: https://doi.org/10.1007/11785477_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35726-1
Online ISBN: 978-3-540-35727-8
eBook Packages: Computer ScienceComputer Science (R0)