Results 1 - 10
of
18
Back to Direct Style
, 1994
"... This paper describes the transformation of lambda-terms from continuation-passing style (CPS) to direct style. This transformation is the left inverse of Plotkin's left-to-right call-by-value CPS encoding for the pure lambda-calculus. Not all -terms are CPS terms, and not all CPS terms encode a left ..."
Abstract
-
Cited by 44 (20 self)
- Add to MetaCart
This paper describes the transformation of lambda-terms from continuation-passing style (CPS) to direct style. This transformation is the left inverse of Plotkin's left-to-right call-by-value CPS encoding for the pure lambda-calculus. Not all -terms are CPS terms, and not all CPS terms encode a left-to-right call-by-value evaluation. These CPS terms are characterized here; they can be mapped back to direct style. In addition, the two transformations -- to continuation-passing style and to direct style -- are factored using a language where all intermediate values are named and their computation is sequentialized. The issue of proper tail-recursion is also addressed.
The Semantics of Future and Its Use in Program Optimization
- Rice University
, 1995
"... The future annotations of MultiLisp provide a simple method for taming the implicit parallelism of functional programs. Past research concerning futures has focused on implementation issues. In this paper, we present a series of operational semantics for an idealized functional language with futures ..."
Abstract
-
Cited by 44 (4 self)
- Add to MetaCart
The future annotations of MultiLisp provide a simple method for taming the implicit parallelism of functional programs. Past research concerning futures has focused on implementation issues. In this paper, we present a series of operational semantics for an idealized functional language with futures with varying degrees of intensionality. We develop a set-based analysis algorithm from the most intensional semantics, and use that algorithm to perform touch optimization on programs. Experiments with the Gambit compiler indicates that this optimization substantially reduces program execution times. 1 Implicit Parallelism via Annotations Programs in functional languages offer numerous opportunities for executing program components in parallel. In a call-by-value language, for example, the evaluation of every function application could spawn a parallel thread for each sub-expression. However, if such a strategy were applied indiscriminately, the execution of a program would generate far t...
A Correspondence between Continuation Passing Style and Static Single Assignment Form
- ACM SIGPLAN Notices
, 1995
"... We define syntactic transformations that convert continuation passing style (CPS) programs into static single assignment form (SSA) and vice versa. Some CPS programs cannot be converted to SSA, but these are not produced by the usual CPS transformation. The CPS!SSA transformation is especially helpf ..."
Abstract
-
Cited by 34 (0 self)
- Add to MetaCart
We define syntactic transformations that convert continuation passing style (CPS) programs into static single assignment form (SSA) and vice versa. Some CPS programs cannot be converted to SSA, but these are not produced by the usual CPS transformation. The CPS!SSA transformation is especially helpful for compiling functional programs. Many optimizations that normally require flow analysis can be performed directly on functional CPS programs by viewing them as SSA programs. We also present a simple program transformation that merges CPS procedures together and by doing so greatly increases the scope of the SSA flow information. This transformation is useful for analyzing loops expressed as recursive procedures. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by per...
Secure Information Flow and CPS
- In Proc. of the 10th European Symposium on Programming, volume 2028 of Lecture Notes in Computer Science
, 2001
"... Security-typed languages enforce secrecy or integrity policies by type checking. This paper investigates continuation-passing style as a means of proving that such languages enforce non-interference and as a first step towards understanding their compilation. We present a lowlevel, secure calcul ..."
Abstract
-
Cited by 30 (10 self)
- Add to MetaCart
Security-typed languages enforce secrecy or integrity policies by type checking. This paper investigates continuation-passing style as a means of proving that such languages enforce non-interference and as a first step towards understanding their compilation. We present a lowlevel, secure calculus with higher-order, imperative features. Our type system makes novel use of ordered linear continuations.
Secure Information Flow via Linear Continuations
- Higher Order and Symbolic Computation
, 2002
"... Security-typed languages enforce secrecy or integrity policies by type-checking. This paper investigates continuation-passing style (CPS) as a means of proving that such languages enforce noninterference and as a rst step towards understanding their compilation. We present a low-level, secure calcu ..."
Abstract
-
Cited by 30 (6 self)
- Add to MetaCart
Security-typed languages enforce secrecy or integrity policies by type-checking. This paper investigates continuation-passing style (CPS) as a means of proving that such languages enforce noninterference and as a rst step towards understanding their compilation. We present a low-level, secure calculus with higher-order, imperative features and linear continuations.
Syntactic Accidents in Program Analysis: On the Impact of the CPS Transformation
- Journal of Functional Programming
, 2000
"... Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuati ..."
Abstract
-
Cited by 25 (9 self)
- Add to MetaCart
Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.
Set-Based Analysis for Full Scheme and Its Use in Soft-Typing
, 1995
"... Set-Based Analysis is an efficient and accurate program analysis for higher-order languages. It exploits an intuitive notion of approximation that treats program variables as sets of values. We present a new derivation of set-based analysis, based on a reduction semantics, that substantially simplif ..."
Abstract
-
Cited by 20 (5 self)
- Add to MetaCart
Set-Based Analysis is an efficient and accurate program analysis for higher-order languages. It exploits an intuitive notion of approximation that treats program variables as sets of values. We present a new derivation of set-based analysis, based on a reduction semantics, that substantially simplifies previous formulations. Most importantly, the derivation easily extends from a functional core language to include imperative features such as assignments and first-class continuations, and supports the first correctness proof of set-based analysis for these imperative features. The paper includes an implementation of the derived analysis for a Scheme-like language, and describes a soft-typing algorithm that eliminates type-checks based on the information produced by the analysis.
The Formal Relationship Between Direct and Continuation-Passing Style Optimizing Compilers: A Synthesis of Two Paradigms
, 1994
"... Compilers for higher-order programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuation-passing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two co ..."
Abstract
-
Cited by 13 (0 self)
- Add to MetaCart
Compilers for higher-order programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuation-passing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two compilation strategies. Starting from
The semantics of Future
- Its Use in Program Optimizations. ACM Principles of Programming Languages
, 1994
"... The future annotation introduced by MultiLisp provides a simple method for taming the implicit parallelism of functional programs. Prior research on futures has concentrated on implementation and design issues, and has largely ignored the development ofasemantic characterization of futures. This pap ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
The future annotation introduced by MultiLisp provides a simple method for taming the implicit parallelism of functional programs. Prior research on futures has concentrated on implementation and design issues, and has largely ignored the development ofasemantic characterization of futures. This paper presents four operational semantics for an idealized functional language with futures with varying degrees of intensionality. The rst semantics de nes future to be a semantically-transparent annotation. The second semantics interprets a future expression as a potentially parallel task. The third semantics explicates the coordination of parallel tasks and the need for touch operations on placeholder-strict arguments to certain primitive operations by introducing placeholder objects. The fourth and last semantics is a low-level re nement of the third semantics, which explicates just enough information to permit the smooth derivation of program analyses. The paper includes proofs showing the equivalence of

