Representing control: A study of the cps transformation

208Citations
Citations of this article
75Readers
Mendeley users who have this article in their library.
Get full text

Abstract

This paper investigates the transformation of λv-terms into continuation-passing style (CPS). We show that by appropriate n-expansion of Fischer and Plotkin’s two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into “essential” and “administrative” constructs. Interpreting the former as syntax builders and the latter as directly executable code, we obtain a simple and efficient one-pass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results. We go on to show how CPS-based control operators similar to, but more general than, Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of the efficient CPS transformation algorithm. Finally, we relate the fundamental ideas underlying this derivation to similar concepts from other work on program manipulation; we derive a one-pass CPS transformation of Xn-terms; and we outline some promising areas for future research. © 1992, Cambridge University Press. All rights reserved.

Cite

CITATION STYLE

APA

Filinski, A. (1992). Representing control: A study of the cps transformation. Mathematical Structures in Computer Science, 2(4), 361–391. https://doi.org/10.1017/S0960129500001535

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free