Polymorphic Typestate for Session Types

10/31/2022
by   Hannes Saffrich, et al.
0

Session types provide a principled approach to typed communication protocols that guarantee type safety and protocol fidelity. Formalizations of session-typed communication are typically based on process calculi, concurrent lambda calculi, or linear logic. An alternative model based on context-sensitive typing and typestate has not received much attention due to its apparent restrictions. However, this model is attractive because it does not force programmers into particular patterns like continuation-passing style or channel-passing style, but rather enables them to treat communication channels like mutable variables. Polymorphic typestate is the key that enables a full treatment of session-typed communication. Previous work in this direction was hampered by its setting in a simply-typed lambda calculus. We show that higher-order polymorphism and existential types enable us to lift the restrictions imposed by the previous work, thus bringing the expressivity of the typestate-based approach on par with the competition. On this basis, we define PolyVGR, the system of polymorphic typestate for session types, establish its basic metatheory, type preservation and progress, and present a prototype implementation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/08/2019

Intrinsically-Typed Mechanized Semantics for Session Types

Session types have emerged as a powerful paradigm for structuring commun...
research
06/10/2019

Minimal Session Types (Extended Version)

Session types are a type-based approach to the verification of message-p...
research
08/10/2022

Comparing Channel Restrictions of Communicating State Machines, High-level Message Sequence Charts, and Multiparty Session Types

Communicating state machines provide a formal foundation for distributed...
research
03/24/2022

Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types

Session types provide guarantees about concurrent behaviour and can be u...
research
11/11/2020

Session Coalgebras: A Coalgebraic View on Session Types and Communication Protocols

Compositional methods are central to the development and verification of...
research
07/31/2018

Multiparty Dependent Session Types (Extended Abstract)

Programs are more distributed and concurrent today than ever before, and...
research
12/14/2021

Forwarders as Process Compatibility, Logically

Session types define protocols that processes must follow when communica...

Please sign up or login with your details

Forgot password? Click here to reset