, Volume 20, Issue 4, pp 371-401
Date: 24 Oct 2007

A static simulation of dynamic delimited control

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access

Abstract

We present a continuation-passing-style (CPS) transformation for some dynamic delimited-control operators, including Felleisen’s \(\verb|control|\) and \(\verb|prompt|\) , that extends a standard call-by-value CPS transformation. Based on this new transformation, we show how Danvy and Filinski’s static delimited-control operators \(\verb|shift|\) and \(\verb|reset|\) simulate dynamic operators, allaying in passing some skepticism in the literature about the existence of such a simulation. The new CPS transformation and simulation use recursive delimited continuations to avoid undelimited control and the overhead it incurs in implementation and reasoning.