A static simulation of dynamic delimited control
- First Online:
- 63 Downloads
We present a continuation-passing-style (CPS) transformation for some dynamic delimited-control operators, including Felleisen’s \(\verb|control|\) and \(\verb|prompt|\) , that extends a standard call-by-value CPS transformation. Based on this new transformation, we show how Danvy and Filinski’s static delimited-control operators \(\verb|shift|\) and \(\verb|reset|\) simulate dynamic operators, allaying in passing some skepticism in the literature about the existence of such a simulation. The new CPS transformation and simulation use recursive delimited continuations to avoid undelimited control and the overhead it incurs in implementation and reasoning.
KeywordsDelimited control operators Macro expressibility Continuation-passing style (CPS) Shift and reset Control and prompt
Unable to display preview. Download preview PDF.