On the Soundness of Coroutines with Snapshots

06/04/2018
by   Aleksandar Prokopec, et al.
0

Coroutines are a general control flow construct that can eliminate control flow fragmentation inherent in event-driven programs, and are still missing in many popular languages. Coroutines with snapshots are a first-class, type-safe, stackful coroutine model, which unifies many variants of suspendable computing, and is sufficiently general to express iterators, single-assignment variables, async-await, actors, event streams, backtracking, symmetric coroutines and continuations. In this paper, we develop a formal model called λ_ (lambda-squiggly) that captures the essence of type-safe, stackful, delimited coroutines with snapshots. We prove the standard progress and preservation safety properties. Finally, we show a formal transformation from the λ_ calculus to the simply-typed lambda calculus with references.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/12/2019

Type Assignment for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
research
01/18/2014

Reformulating the Situation Calculus and the Event Calculus in the General Theory of Stable Models and in Answer Set Programming

Circumscription and logic programs under the stable model semantics are ...
research
07/12/2019

Intersection Types for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
research
07/16/2019

Recovering Purity with Comonads and Capabilities

In this paper, we take a pervasively effectful (in the style of ML) type...
research
09/27/2019

Backpropagation in the Simply Typed Lambda-calculus with Linear Negation

Backpropagation is a classic automatic differentiation algorithm computi...
research
02/09/2021

An Interactive Proof of Termination for a Concurrent λ-calculus with References and Explicit Substitutions

In this paper we introduce a typed, concurrent λ-calculus with reference...
research
10/17/2017

Privacy by typing in the π-calculus

In this paper we propose a formal framework for studying privacy in info...

Please sign up or login with your details

Forgot password? Click here to reset