Simon J. Gay ; Nils Gesbert ; António Ravara ; Vasco T. Vasconcelos - Modular session types for objects

lmcs:1613 - Logical Methods in Computer Science, December 16, 2015, Volume 11, Issue 4 - https://doi.org/10.2168/LMCS-11(4:12)2015
Modular session types for objectsArticle

Authors: Simon J. Gay ; Nils Gesbert ; António Ravara ORCID; Vasco T. Vasconcelos ORCID

    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 se-mantics, 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.


    Volume: Volume 11, Issue 4
    Published on: December 16, 2015
    Submitted on: January 16, 2015
    Keywords: Computer Science - Programming Languages
    Funding:
      Source : OpenAIRE Graph
    • From Data Types to Session Types---A Basis for Concurrency and Distribution; Funder: UK Research and Innovation; Code: EP/K034413/1
    • Engineering Foundations of Web Services: Theories and Tool Support; Funder: UK Research and Innovation; Code: EP/E065708/1
    • BEHAVIOURAL TYPES FOR OBJECT-ORIENTED LANGUAGES; Funder: UK Research and Innovation; Code: SFRH/BSAB/757/2007
    • Behavioural Types for Object-Oriented Languages; Funder: UK Research and Innovation; Code: EP/F037368/1

    9 Documents citing this article

    Consultation statistics

    This page has been seen 1811 times.
    This article's PDF has been downloaded 479 times.