Abstract

Session types are a formalism used to model structured communication-based programming. A binary session type describes communication by specifying the type and direction of data exchanged between two parties. When session types and session processes are added to the syntax of standard π-calculus they give rise to additional separate syntactic categories. As a consequence, when new type features are added, there is duplication of effort in the theory: the proofs of properties must be checked both on standard types and on session types. We show that session types are encodable into standard π-types, relying on linear and variant types. Besides being an expressivity result, the encoding (i) removes the above redundancies in the syntax, and (ii) the properties of session types are derived as straightforward corollaries, exploiting the corresponding properties of standard π-types. The robustness of the encoding is tested on a few extensions of session types, including subtyping, polymorphism and higher-order communications.

Highlights

  • In complex distributed systems, participants willing to communicate should previously agree on a protocol to follow

  • Typing judgements for the higher-order π-calculus with and without sessions are of the form Φ; Γ; S ⊢ v ∶ T and Φ; Γ; S ⊢ v ∶ τ, respectively where Φ associates variables to value types, except session types; Γ associates variables to session types; and S denotes the set of linear functional variables

  • The main differences with respect to our work are: (i) the target language is closer to the session π-calculus having branch and select constructs, and a refined subtyping theory is provided, while we focus on encoding the session π-calculus in the standard πcalculus in order to exploit the rich and well-established theory of the latter; (ii) we study the encoding in a systematic way as a means to formally derive session types and their properties, in order to provide a methodology for the treatment of session types and their extensions without the burden of establishing the underlying theory (Demangeon and Honda [9] focus on subtyping issues)

Read more

Summary

Introduction

Participants willing to communicate should previously agree on a protocol to follow. This type is assigned to a session channel endpoint and it describes a structured sequence of inputs and outputs by specifying the type of messages that it can transmit. This way of proceeding reminds us of the linearised channels [20], which are channels used multiple times for communication but only in a sequential manner. Duality describes the split of behaviour of session channel endpoints This reminds us of the split of input and output capabilities of π-types: once a new channel is created via the ν construct, it can be used by the two communicating processes owning the opposite capabilities. X!⟨v⟩.P x?(y).P x ◁ lj.P x ▷ {li ∶ Pi}i∈I (output) (input) (selection) (branching)

Background
Encoding
Properties Derived from the Encoding
Subtyping
Polymorphism
Parametric Polymorphism
Bounded Polymorphism
Higher-Order π-calculus
Further considerations
Related Work
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call