Asynchronous Functional Session Types

Session types support a type-theoretic formulation of structured patterns of communication, so that the communication behaviour of agents in a distributed system can be verified by static type checking. Applications include network protocols, business processes, and operating system services. In this paper we define a multithreaded functional language with session types, which unifies, simplifies and extends previous work. There are three main contributions. First: an operational semantics with buffered channels, instead of the synchronous communication of previous work. Second: session type manipulation by means of the standard structures of a linear type theory, rather than by means of new forms of typing judgement. Third: a notion of subtyping, including the standard subtyping relation for session types (imported into the functional setting) and a novel form of subtyping between standard and linear function types. Our new approach significantly simplifies session types in the functional setting, clarifies their essential features, and provides a secure foundation for language developments such as polymorphism and object-orientation, as well as further forms of static analysis including estimating the size of communication buffers.

[1]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[2]  Flemming Nielson,et al.  Type and effect systems - behaviours for concurrency , 1999 .

[3]  Sophia Drossopoulou,et al.  A Distributed Object-Oriented Language with Session Types , 2005, TGC.

[4]  James Cheney,et al.  Region-based memory management in cyclone , 2002, PLDI '02.

[5]  Simon J. Gay,et al.  Subtyping for session types in the pi calculus , 2005, Acta Informatica.

[6]  António Ravara,et al.  Session Types for Functional Multithreading , 2004, CONCUR.

[7]  James R. Larus,et al.  Language support for fast and reliable message-based communication in singularity OS , 2006, EuroSys.

[8]  Kohei Honda,et al.  An Interaction-based Language and its Typing System , 1994, PARLE.

[9]  Kohei Honda,et al.  Types for Dyadic Interaction , 1993, CONCUR.

[10]  Nobuko Yoshida,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 2007, Electron. Notes Theor. Comput. Sci..

[11]  Peter Thiemann,et al.  An Implementation of Session Types , 2004, PADL.

[12]  Peter Thiemann,et al.  Session Types for Asynchronous Communication , 2007 .

[13]  Dan Grossman,et al.  Type-safe multithreading in cyclone , 2003, TLDI '03.

[14]  Simon J. Gay Bounded polymorphism in session types , 2008, Math. Struct. Comput. Sci..

[15]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[16]  Antonio Vallecillo,et al.  Typing the Behavior of Software Components using Session Types , 2006, Fundam. Informaticae.

[17]  Sophia Drossopoulou,et al.  Session Types for Object-Oriented Languages , 2006, ECOOP.

[18]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

[19]  Robert DeLine,et al.  Adoption and focus: practical linear types for imperative programming , 2002, PLDI '02.

[20]  Eduardo Bonelli,et al.  Correspondence assertions for process synchronization in concurrent communications , 2004, J. Funct. Program..

[21]  António Ravara,et al.  Type checking a multithreaded functional language with session types , 2006, Theor. Comput. Sci..