How to Remove a Dynamic Prompt: Static and Dynamic Delimited Continuation Operators Are Equally Expressible

Loading...
Thumbnail Image
Can’t use the file because of accessibility barriers? Contact us

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

We show how to remove a dynamic prompt (aka reset) and thus to turn so-called static delimited continuation operators (shift/reset) into dynamic ones: control, control0, shift0. Our technique extends the continuation captured by shift by composing it with the previous fragments of the `stack'. Composition of context fragments can be done via regular functional composition. We thus demonstrate that all the above delimited continuation operators are macro-expressible in terms of each other --- without capturing undelimited continuations and without using mutable state. Furthermore, the operators shift, control, control0, shift0 are the members of a single parameterized family, and the standard CPS is sufficient to express their denotational semantics. We give the simplest Scheme implementation of the dynamic control operators. We give a formal simulation proof that control realized through shift indeed has its standard reduction semantics.

Table of Contents

Description

Keywords

Citation

Journal

DOI

Link(s) to data and video for this item

Relation

Rights

This work is protected by copyright unless stated otherwise.

Type