Skip to main content Accessibility help
×
Home
Hostname: page-component-559fc8cf4f-6f8dk Total loading time: 0.192 Render date: 2021-03-05T07:36:29.792Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "metricsAbstractViews": false, "figures": false, "newCiteModal": false, "newCitedByModal": true }

Delimited continuations for prolog

Published online by Cambridge University Press:  25 September 2013

TOM SCHRIJVERS
Affiliation:
Ghent University, Belgium (e-mail: tom.schrijvers@ugent.be)
BART DEMOEN
Affiliation:
KU Leuven, Belgium (e-mail: bart.demoen@cs.kuleuven.be)
BENOIT DESOUTER
Affiliation:
Ghent University, Belgium (e-mail: benoit.desouter@ugent.be)
JAN WIELEMAKER
Affiliation:
University of Amsterdam, The Netherlands (e-mail: jan@swi-prolog.org)

Abstract

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.

Type
Regular Papers
Copyright
Copyright © 2013 [TOM SCHRIJVERS, BART DEMOEN, BENOIT DESOUTER and JAN WIELEMAKER] 

Access options

Get access to the full version of this content by using one of the access options below.

References

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

Full text views

Full text views reflects PDF downloads, PDFs sent to Google Drive, Dropbox and Kindle and HTML full text views.

Total number of HTML views: 0
Total number of PDF views: 28 *
View data table for this chart

* Views captured on Cambridge Core between September 2016 - 5th March 2021. This data will be updated every 24 hours.

Send article to Kindle

To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Delimited continuations for prolog
Available formats
×

Send article to Dropbox

To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

Delimited continuations for prolog
Available formats
×

Send article to Google Drive

To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

Delimited continuations for prolog
Available formats
×
×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *