kirancodes.me
To Proof Maintenance & Beyond!

Functional pearl: the great escape or, how to jump the border without getting caught

David Herman

Abstract

Filinski showed that callcc and a single mutable reference cell are sufficient to express the delimited control operators shift and reset. However, this implementation interacts poorly with dynamic bindings like exception handlers. We present a variation on Filinski's encoding of delimited continuations that behaves appropriately in the presence of exceptions and give an implementation in Standard ML of New Jersey. We prove the encoding correct with respect to the semantics of delimited dynamic binding.

DOI 10.1145/1291151.1291177

Related papers