On Evaluation Contexts, Continuations, and the Rest of the Computation

Olivier Danvy · 2004

Continuations are variously understood as representations of the current evaluation context and as representations of the rest of the computation, but these understandings contradict each other: plugging an expression in a context yields a new expression whereas sending an intermediate result to a continuation yields the final answer. We show that continuations-as-evaluation-contexts are the defunctionalized representation of the continuation of a singlestep reduction function and that continuations-as-the-rest-of-thecomputation are the continuation of an evaluation function. Furthermore, we show that defunctionalizing the continuation of an evaluator gives rise to the same evaluation contexts as in the singlestep reducer. The only difference is how these evaluation contexts are interpreted: a `plug' interpretation yields one-step reduction, whereas a `refocus' interpretation yields evaluation.

Read the paper · More papers on PaperTik