z-logo
open-access-imgOpen Access
A Dynamic Continuation-Passing Style for Dynamic Delimited Continuations
Author(s) -
Dariusz Biernacki,
Olivier Danvy,
Kevin Millikin
Publication year - 2006
Publication title -
brics report series
Language(s) - English
Resource type - Journals
eISSN - 1601-5355
pISSN - 0909-0878
DOI - 10.7146/brics.v13i15.21920
Subject(s) - continuation , computer science , correctness , monad (category theory) , function (biology) , transformation (genetics) , programming language , computation , algorithm , mathematics , discrete mathematics , biochemistry , chemistry , evolutionary biology , biology , gene , functor
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.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here