Dependent Session Types

Session types offer a type-based discipline for enforcing communication protocols in distributed programming. We have previously formalized simple session types in the setting of multi-threaded $\lambda$-calculus with linear types. In this work, we build upon our earlier work by presenting a form of dependent session types (of DML-style). The type system we formulate provides linearity and duality guarantees with no need for any runtime checks or special encodings. Our formulation of dependent session types is the first of its kind, and it is particularly suitable for practical implementation. As an example, we describe one implementation written in ATS that compiles to an Erlang/Elixir back-end.

[1]  Bernardo Toninho,et al.  Higher-Order Processes, Functions, and Sessions: A Monadic Integration , 2013, ESOP.

[2]  Vasco Thudichum Vasconcelos,et al.  Linear type theory for asynchronous session types , 2009, Journal of Functional Programming.

[3]  Riccardo Pucella,et al.  Haskell session types with (almost) no class , 2008, Haskell '08.

[4]  Nobuko Yoshida,et al.  Multiparty asynchronous session types , 2008, POPL '08.

[5]  Nobuko Yoshida,et al.  Multiparty session types as coherence proofs , 2016, Acta Informatica.

[6]  Bernardo Toninho,et al.  Behavioral Polymorphism and Parametricity in Session-Based Communication , 2013, ESOP.

[7]  Hongwei Xi,et al.  Multirole Logic (Extended Abstract) , 2017, ArXiv.

[8]  Bernardo Toninho,et al.  Proof-Carrying Code in a Session-Typed Process Calculus , 2011, CPP.

[9]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[10]  Nobuko Yoshida,et al.  Type-Safe Eventful Sessions in Java , 2010, ECOOP.

[11]  Gang Chen,et al.  Guarded recursive datatype constructors , 2003, POPL '03.

[12]  Sam Lindley,et al.  A Semantics for Propositions as Sessions , 2015, ESOP.

[13]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

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

[15]  Bernardo Toninho,et al.  Dependent session types via intuitionistic linear type theory , 2011, PPDP.

[16]  Hongwei Xi,et al.  Dependent ML An approach to practical programming with dependent types , 2007, Journal of Functional Programming.

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

[18]  Nobuko Yoshida,et al.  Safe Parallel Programming with Session Java , 2011, COORDINATION.

[19]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[20]  Philip Wadler Propositions as sessions , 2014, J. Funct. Program..

[21]  Ken Friis Larsen,et al.  Session types for Rust , 2015, WGP@ICFP.

[22]  Nobuko Yoshida,et al.  Session-Based Distributed Programming in Java , 2008, ECOOP.

[23]  Sam Lindley,et al.  Embedding session types in Haskell , 2016, Haskell.

[24]  Hongwei Xi,et al.  Applied Type System: Extended Abstract , 2003, TYPES.

[25]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[26]  Nobuko Yoshida,et al.  Multiparty Session C: Safe Parallel Programming with Message Optimisation , 2012, TOOLS.

[27]  Rui Shi,et al.  Types for safe resource sharing in sequential and concurrent programming , 2008 .

[28]  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.

[29]  Hongwei Xi,et al.  Session Types in a Linearly Typed Multi-Threaded Lambda-Calculus , 2016, ArXiv.

[30]  Vasco Thudichum Vasconcelos,et al.  Session Typing for a Featherweight Erlang , 2011, COORDINATION.

[31]  H. Xi,et al.  Applied Type System with Stateful Views ∗ , 1998 .

[32]  Rui Shi,et al.  A linear type system for multicore programming in ATS , 2013, Sci. Comput. Program..

[33]  Philip Wadler,et al.  Coherence Generalises Duality: A Logical Explanation of Multiparty Session Types , 2016, CONCUR.