Inspired by the continuation-passing encoding of binary sessions, we describe a simple approach to embed a hybrid form of session type checking into any programming language that supports parametric polymorphism. The approach combines static protocol analysis with dynamic linearity checks. To demonstrate the effectiveness of the technique, we implement a well-integrated OCaml module for session communications. For free, OCaml provides us with equi-recursive session types, parametric behavioural polymorphism, complete session type inference, and session subtyping.
Padovani, L. (2017). A Simple Library Implementation of Binary Sessions. JOURNAL OF FUNCTIONAL PROGRAMMING, 27(e4), 1-42 [10.1017/S0956796816000289].
A Simple Library Implementation of Binary Sessions
PADOVANI, Luca
2017
Abstract
Inspired by the continuation-passing encoding of binary sessions, we describe a simple approach to embed a hybrid form of session type checking into any programming language that supports parametric polymorphism. The approach combines static protocol analysis with dynamic linearity checks. To demonstrate the effectiveness of the technique, we implement a well-integrated OCaml module for session communications. For free, OCaml provides us with equi-recursive session types, parametric behavioural polymorphism, complete session type inference, and session subtyping.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.