A Selective CPS Transformation
By Lasse R. Nielsen. 2001
37 citations recorded by the source corpus.
Abstract The CPS transformation makes all functions continuation-passing, uniformly. Not all functions, however, need continuations: they only do if their evaluation includes computational effects. In this paper we focus on control operations, in particular “call with current continuation” and “throw”. We characterize this involvement as a control effect and we present a selective CPS transformation that makes functions and expressions continuation-passing if they have a control effect, and that leaves the rest of the program in direct style. We formalize this selective CPS transformation with an operational semantics and a simulation theorem a la Plotkin.
Subfields: Artificial Intelligence, Computational Theory and Mathematics, Program Analysis & Verification