A Dynamic Continuation-Passing Style for Dynamic Delimited Continuations
DOI:
https://doi.org/10.7146/brics.v13i15.21920Resumé
We put a pre-existing definitional abstract machine for dynamic delimited continuations in defunctionalized form, and we present the consequences of this adjustment.We first prove the correctness of the adjusted abstract machine. Because it is in defunctionalized form, we can refunctionalize it into a higher-order evaluation function. This evaluation function, which is compositional, is in continuation+state passing style and threads a trail of delimited continuations and a meta-continuation. Since this style accounts for dynamic delimited continuations, we refer to it as `dynamic continuation-passing style' and we present the corresponding dynamic CPS transformation. We show that the notion of computation induced by dynamic CPS takes the form of a continuation monad with a recursive answer type and we present a new simulation of dynamic delimited continuations in terms of static ones as well as new applications of dynamic delimited continuations.
The significance of the present work is that the computational artifacts surrounding dynamic CPS are not independent designs: they are mechanical consequences of having put the definitional abstract machine in defunctionalized form.
Downloads
Publiceret
2006-10-12
Citation/Eksport
Biernacki, D., Danvy, O., & Millikin, K. (2006). A Dynamic Continuation-Passing Style for Dynamic Delimited Continuations. BRICS Report Series, 13(15). https://doi.org/10.7146/brics.v13i15.21920
Nummer
Sektion
Artikler
Licens
Authors who publish with this journal agree to the following terms:- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).