Results 1 
4 of
4
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into "esse ..."
Abstract

Cited by 81 (7 self)
 Add to MetaCart
This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree 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 onepass 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. Further we show how CPSbased 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 t...
On the Transformation between Direct and Continuation Semantics
 Proceedings of the 9th Conference on Mathematical Foundations of Programming Semantics, number 802 in Lecture Notes in Computer Science
, 1993
"... . Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that directstyle terms can be transformed into continuation style automatically. However, transforming the representation of a directstyle semantics into continuation sty ..."
Abstract

Cited by 14 (11 self)
 Add to MetaCart
. Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that directstyle terms can be transformed into continuation style automatically. However, transforming the representation of a directstyle semantics into continuation style usually does not yield the expected representation of a continuationstyle semantics (i.e., one written by hand). The goal of our work is to automate the transformation between textual representations of direct semantics and of continuation semantics. Essentially, we identify properties of a directstyle representation (e.g., totality), and we generalize the transformation into continuation style accordingly. As a result, we can produce the expected representation of a continuation semantics, automatically. It is important to understand the transformation between representations of direct and of continuation semantics because it is these representations that get processed in any kind of ...
Three Steps for the CPS Transformation
, 1991
"... Transforming a #term into continuationpassing style (CPS) might seem mystical at first, but in fact it can be characterized by three separate aspects: . The values of all intermediate applications are given a name. . The evaluation of these applications is sequentialized based on a traversal o ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
Transforming a #term into continuationpassing style (CPS) might seem mystical at first, but in fact it can be characterized by three separate aspects: . The values of all intermediate applications are given a name. . The evaluation of these applications is sequentialized based on a traversal of their syntax tree. This traversal mimics the reduction strategy. . The resulting term is equipped with a continuation  a #abstraction whose application to intermediate values yields the final result of the whole evaluation. The first point is fulfilled using the uniform naming mechanism of #abstraction (Church encoding), which explains why continuations are represented as functions. The second point justifies why CPS terms are evaluationorder independent  their evaluation order is determined by the syntax tree traversal of the CPS transformation. The third point captures the essence of the CPS transformation. We have staged Fischer and Plotkin's original CPS transformer accordin...
Thunks (continued)
 Kansas State University
, 1992
"... : Callbyname can be simulated in a callbyvalue setting using "thunks" (i.e., parameterless procedures) or continuationpassingstyle (CPS). In this paper we uncover a relationship between the two simulations. We prove that the callbyvalue CPS transformation Cv , when applied to a term T (t) wh ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
: Callbyname can be simulated in a callbyvalue setting using "thunks" (i.e., parameterless procedures) or continuationpassingstyle (CPS). In this paper we uncover a relationship between the two simulations. We prove that the callbyvalue CPS transformation Cv , when applied to a term T (t) which simulates callbyname using thunks, yields a term identical to the callbyname CPS transformation Cn applied directly to t (modulo renaming): Cv ffi T j Cn This result sheds new light on the callbyname CPS transformation  it can be factored into two conceptually distinct steps: ffl the suspension of argument evaluation (captured in T ); ffl the sequentialization of function application to give the usual tailcalls of CPS terms (captured in Cv ). Keywords: calculus, callbyname, callbyvalue, continuationpassing style transformation. 1. Introduction Among many possible implementations of callbyname in Algol 60, one still stands the test of time: Ingerman's "thunks" [8]. A...