Intrinsically Typed Sessions With Callbacks

03/02/2023
by   Peter Thiemann, et al.
0

All formalizations of session types rely on linear types for soundness as session-typed communication channels must change their type at every operation. Embedded language implementations of session types follow suit. They either rely on clever typing constructions to guarantee linearity statically, or on run-time checks that approximate linearity. We present a new language embedded implementation of session types, which is inspired by the inversion of control design principle. With our approach, all application programs are intrinsically session typed and unable to break linearity by construction. Linearity remains a proof obligation for a tiny encapsulated library that can be discharged once and for all when the library is built. We demonstrate that our proposed design extends to a wide range of features of session type systems: branching, recursion, multichannel and higher-order session, as well as context-free sessions. The multichannel extension provides an embedded implementation of session types which guarantees deadlock freedom by construction. The development reported in this paper is fully backed by type-checked Agda code.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/26/2021

Deadlock-Free Session Types in Linear Haskell

Priority Sesh is a library for session-typed communication in Linear Has...
research
08/27/2018

Context-Free Session Types for Applied Pi-Calculus

We present a binary session type system using context-free session types...
research
06/12/2021

Polymorphic Context-free Session Types

Context-free session types provide a typing discipline for recursive str...
research
03/18/2021

Zooid: a DSL for Certified Multiparty Computation

We design and implement Zooid, a domain specific language for certified ...
research
04/03/2020

Fluent Session Programming in C#

We propose SessionC#, a lightweight session typed library for safe concu...
research
04/02/2019

Value-Dependent Session Design in a Dependently Typed Language

Session Types offer a typing discipline that allows protocol specificati...
research
09/12/2019

Rusty Variation: Deadlock-free Sessions with Failure in Rust

Rusty Variation (RV) is a library for session-typed communication in Rus...

Please sign up or login with your details

Forgot password? Click here to reset