Modular Session Types for Objects - TYREX Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2011

Modular Session Types for Objects

Résumé

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 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 OO 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 OO 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 of OO programming, such as encapsulation of local state. The main ideas presented herein have been implemented as a prototype.
Fichier principal
Vignette du fichier
article.pdf (894.8 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-00700635 , version 1 (23-05-2012)
hal-00700635 , version 2 (20-01-2015)
hal-00700635 , version 3 (30-01-2015)
hal-00700635 , version 4 (08-10-2015)

Identifiants

Citer

Simon J. Gay, Nils Gesbert, António Ravara, Vasco Thudichum Vasconcelos. Modular Session Types for Objects. 2011. ⟨hal-00700635v1⟩
623 Consultations
316 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More