TY - JOUR
T1 - Modular session types for objects
AU - Gay, Simon J.
AU - Gesbert, Nils
AU - Ravara, António
AU - Vasconcelos, Vasco T.
N1 - We thank Jonathan Aldrich and Luis Caires for helpful discussions. Gay was partially supported by the UK EPSRC (EP/E065708/1 "Engineering Foundations of Web Services", EP/F037368/1 "Behavioural Types for Object-Oriented Languages", EP/K034413/1 "From Data Types to Session Types: A Basis for Concurrency and Distribution" and EP/L00058X/1 "Exploiting Parallelism through Type Transformations for Hybrid Manycore Systems"). He thanks the University of Glasgow for the sabbatical leave during which part of this research was done. Gay and Ravara were partially supported by the Security and Quantum Information Group at Instituto de Telecomunicacoes, Portugal. Vasconcelos was partially supported by the Large-Scale Informatics Systems Laboratory, Portugal. Ravara was partially supported the Portuguese Fundacao para a Ciencia e a Tecnologia FCT (SFRH/BSAB/757/2007), and by the UK EPSRC (EP/F037368/1). Gesbert was supported by the UK EPSRC (EP/E065708/1) and by the French ANR (project ANR-08-EMER-004 "CODEX"). All of the authors have received support from COST Action IC1201 "Behavioural Types for Reliable Large-Scale Software Systems".
PY - 2015
Y1 - 2015
N2 - Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestate supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational semantics, a sound type system, and a sound and complete type checking algorithm for a small distributed class-based object-oriented language with structural subtyping. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state.
AB - Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestate supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational semantics, a sound type system, and a sound and complete type checking algorithm for a small distributed class-based object-oriented language with structural subtyping. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state.
KW - Non-uniform method availability
KW - Object-oriented calculus
KW - Session types
KW - Typestate
UR - http://www.scopus.com/inward/record.url?scp=84957899589&partnerID=8YFLogxK
U2 - 10.2168/LMCS-11(4:12)2015
DO - 10.2168/LMCS-11(4:12)2015
M3 - Article
AN - SCOPUS:84957899589
SN - 1860-5974
VL - 11
JO - Logical Methods In Computer Science
JF - Logical Methods In Computer Science
IS - 4
M1 - 12
ER -