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
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

07/12/2019

Type Assignment for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
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 ...
07/16/2019

Recovering Purity with Comonads and Capabilities

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

Backpropagation in the Simply Typed Lambda-calculus with Linear Negation

Backpropagation is a classic automatic differentiation algorithm computi...
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...
05/25/2021

Tracking Captured Variables in Types

Type systems usually characterize the shape of values but not their free...
08/27/2018

On the Distributability of Mobile Ambients

Modern society is dependent on distributed software systems and to verif...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.