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.
- Dariusz Biernacki, Olivier Danvy, and Chung-chieh Shan. On the static and dynamic extents of delimited continuations. Science of Computer Programming, 60(3):274--297, 2006. ISSN 0167-6423. Google Scholar
Digital Library
- Olivier Danvy and Andrzej Filinski. A functional abstraction of typed contexts. Technical Report 89/12, DIKU, University of Copenhagen, 1989.Google Scholar
- Matthias Felleisen. The calculi of λv-CS conversion: A syntactic theory of control and state in imperative higher-order languages. PhD thesis, 1987. Google Scholar
Digital Library
- Matthias Felleisen. The theory and practice of first-class prompts. In Symposium on Principles of Programming Languages, 1988. Google Scholar
Digital Library
- Andrzej Filinski. Controlling Effects. PhD thesis, School of Computer Science, Carnegie Mellon University, May 1996. Available as Technical Report CMU-CS-96-119.Google Scholar
- Chris Hanson. MIT scheme reference manual. Technical Report AITR-1281, 1991. Google Scholar
Digital Library
- Christopher T. Haynes and Daniel P. Friedman. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 9(4):582--598, 1987. ISSN 0164-0925. Google Scholar
Digital Library
- Richard Kelsey, William Clinger, and Jonathan Rees (Editors). Revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices, 1998. Google Scholar
Digital Library
- Oleg Kiselyov. How to remove a dynamic prompt: static and dynamic delimited continuation operators are equally expressible. Technical Report 611, Indiana University, March 2005.Google Scholar
- Oleg Kiselyov, Chung-chieh Shan, and Amr Sabry. Delimited dynamic binding. In International Conference on Functional Programming, 2006. Google Scholar
Digital Library
- Jeffrey R. Lewis, Mark Shields, John Launchbury, and Erik Meijer. Implicit parameters: Dynamic scoping with static types. In Symposium on Principles of Programming Languages, 2000. Google Scholar
Digital Library
- Robin Milner, Mads Tofte, and Robert Harper. The definition of Standard ML. MIT Press, Cambridge, MA, 1990. ISBN 0-262-63132-6. Google Scholar
Digital Library
- Luc Moreau. A Syntactic Theory of Dynamic Binding. In International Joint Conference on Theory and Practice of Software Development (TAPSOFT/FASE'97), volume 1214, pages 727--741, Lille, France, April 1997. Springer-Verlag. Google Scholar
Digital Library
- John C. Reynolds. Definitional interpreters for higher-order programming languages. In ACM Annual Conference, pages 717--740, August 1972. Google Scholar
Digital Library
- Chung-Chieh Shan. Shift to control. In Scheme Workshop, September 2004.Google Scholar
- Dorai Sitaram. Models of Control and Their Implications for Programming Language Design. PhD thesis, 1994. Google Scholar
Digital Library
- Dorai Sitaram and Matthias Felleisen. Control delimiters and their hierarchies. Lisp and Symbolic Computing, 3(1), 1990. Google Scholar
Digital Library
- Hayo Thielecke. Comparing control constructs by double-barrelled CPS. Higher-Order and Symbolic Computation, 14(2):141--160, 2002. Google Scholar
Digital Library
- Mitchell Wand and Daniel P. Friedman. The mystery of the tower revealed: a non-reflective description of the reflective tower. In LISP and functional programming, 1986. Google Scholar
Digital Library
Index Terms
Functional pearl: the great escape or, how to jump the border without getting caught
Recommendations
On the expressive power of user-defined effects: effect handlers, monadic reflection, delimited control
We compare the expressive power of three programming abstractions for user-defined computational effects: Plotkin and Pretnar's effect handlers, Filinski's monadic reflection, and delimited control without answer-type-modification. This comparison ...
Functional pearl: the great escape or, how to jump the border without getting caught
ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programmingFilinski 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 ...
An approach to call-by-name delimited continuations
POPL '08We show that a variant of Parigot's λμ-calculus, originally due to de Groote and proved to satisfy Boehm's theorem by Saurin, is canonically interpretable as a call-by-name calculus of delimited control. This observation is expressed using Ariola et al'...







Comments