Skip to main content Accessibility help

Delimited continuations for prolog



Delimited continuations are a famous control primitive that originates in the functional programming world. It allows the programmer to suspend and capture the remaining part of a computation in order to resume it later. We put a new Prolog-compatible face on this primitive and specify its semantics by means of a meta-interpreter. Moreover, we establish the power of delimited continuations in Prolog with several example definitions of high-level language features. Finally, we show how to easily and effectively add delimited continuations support to the WAM.



Hide All
Aït-Kaci, H. 1991. Warren's Abstract Machine: A Tutorial Reconstruction. MIT Press.
Bowen, D., Byrd, L. and Clocksin, W. 1983. A portable Prolog compiler. In Proceedings of the Logic Programming Workshop, 74–83.
Branquart, P. and Lewi, J. 1970. A scheme of storage allocation and garbage collection for algol 68. In ALGOL 68 Implementation, North-Holland, 199238.
Costa, V. S., Rocha, R. and Damas, L. 2012. The YAP Prolog system. TPLP 12, 534.
Danvy, O. and Filinski, A. 1990. Abstracting control. In LFP '90, 151–160.
De Meuter, W. and Roman, G.-C., Eds. 2011. Coordination Models and Languages. LNCS, vol. 6721.
Demoen, B. 2002. Dynamic attributes, their hProlog implementation, and a first evaluation. Report CW 350, Department of Computer Science, KU Leuven, Belgium.
Demoen, B. and Nguyen, P.-L. 2000. So Many WAM Variations, so Little Time. LNAI, vol. 1861, 1240–1254.
Demoen, B. and Nguyen, P.-L. 2008. Two WAM Implementations of Action Rules. LNCS, vol. 5366, 621–635.
Demoen, B., Schrijvers, T. and Desouter, B. 2013. Delimited continuations in Prolog: Semantics, use and implementation in the WAM. Report CW 631, Department of Computer Science, KU Leuven, Belgium.
Felleisen, M. 1988. The theory and practice of first-class prompts. In POPL '88, 180–190.
Holzbaur, C. 1992. Meta-Structures vs. Attributed Variables in the Context of Extensible Unification. LNCS, vol. 631, 260–268.
Ivanovic, D., Morales Caballero, J. F., Carro, M. and Hermenegildo, M. 2009. Towards structured state threading in Prolog. In CICLOPS 2009.
Kiselyov, O. 2012. Iteratees. LNCS, vol. 7294, 166–181.
Kiselyov, O., Peyton-Jones, S. and Sabry, A. 2012. Lazy vs. yield: Incremental, lazy pretty-printing. In APLAS.
Le Houitouze, S. 1990. A New Data Structure for Implementing Extensions to Prolog. LNCS, vol. 456. 136–150.
Masuko, M. and Asai, K. 2009. Direct implementation of shift and reset in the MinCaml compiler. In ML'09, 49–60.
Moggi, E. 1991. Notions of computation and monads. Information and Computation 93, 1.
Neumerkel, U. 1990. Extensible unification by metastructures. In META'90, 352–364.
Plotkin, G. and Pretnar, M. 2009. Handlers of algebraic effects. In ESOP '09.
Roy, P. V. 1989. A useful extension to prolog's definite clause grammar notation. 24, 11, 132134.
Schimpf, J. 2002. Logical loops. LNCS, vol. 2401. 224–238.
Swift, T. and Warren, D. S. 2012. XSB: Extending Prolog with tabled logic programming. TPLP 12, 1–2, 157187.
Tarau, P. 2012. The BinProlog experience: Architecture and implementation choices for continuation passing Prolog and first-class logic engines. TPLP 12, 1–2, 97126.
Tarau, P. and Dahl, V. 1994. Logic programming and logic grammars with first-order continuations. In LOPSTR '94. Vol. 883.
Warren, D. H. D. 1983. An Abstract Prolog Instruction Set. Tech. Rep. 309, SRI.
Wielemaker, J. and Neumerkel, U. 2008. Precise garbage collection in Prolog. In CICLOPS '08, 1–15.
Wielemaker, J., Schrijvers, T., Triska, M. and Lager, T. 2012. SWI-Prolog. TPLP 12, 1–2, 6796.


Delimited continuations for prolog



Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed