Results 11  20
of
47
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.
Is ContinuationPassing Useful for Data Flow Analysis?
 Proceedings of the ACM SIGPLAN'94 Conference on Programming Languages Design and Implementation, SIGPLAN Notices
, 1994
"... The widespread use of the continuationpassing style (CPS) transformation in compilers, optimizers, abstract interpreters, and partial evaluators reflects a common belief that the transformation has a positive effect on the analysis of programs. Investigations by Nielson [13] and Burn/Filho [5, 6] s ..."
Abstract

Cited by 22 (5 self)
 Add to MetaCart
The widespread use of the continuationpassing style (CPS) transformation in compilers, optimizers, abstract interpreters, and partial evaluators reflects a common belief that the transformation has a positive effect on the analysis of programs. Investigations by Nielson [13] and Burn/Filho [5, 6] support, to some degree, this belief with theoretical results. However, they do not pinpoint the source of increased abstract information and do not explain the observation of many people that continuationpassing confuses some conventional data flow analyses. To study the impact of the CPS transformation on program analysis, we derive three canonical data flow analyzers for the core of an applicative higherorder programming language. The first analyzer is based on a direct semantics of the language, the second on a continuationsemantics of the language, and the last on the direct semantics of CPS terms. All analyzers compute the control flow graph of the source program and hence our result...
EtaExpansion does the Trick
 ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Partialevaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "bindingtime improvements": nonstandard use of continuationpassing style, etaexpansion, and a popul ..."
Abstract

Cited by 21 (6 self)
 Add to MetaCart
Partialevaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "bindingtime improvements": nonstandard use of continuationpassing style, etaexpansion, and a popular transformation called "The Trick". We provide a unified view of these bindingtime improvements, from a typing perspective. Just as a
Two for the Price of One: Composing Partial Evaluation and Compilation
, 1997
"... One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a sourcetosource transformation for highlevel languages, whereas realistic compilers produce object code. We close this gap by composing a partial eva ..."
Abstract

Cited by 21 (3 self)
 Add to MetaCart
One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a sourcetosource transformation for highlevel languages, whereas realistic compilers produce object code. We close this gap by composing a partial evaluator with a compiler by automatic means. Our work is a successful application of several metacomputation techniques to build the system, both in theory and in practice. The composition is an application of deforestation or fusion. The result is a runtime code generation system built from existing components. Its applications are numerous. For example, it allows the language designer to perform interpreterbased experiments with a sourcetosource version of the partial evaluator before building a realistic compiler which generates object code automatically.
Type Specialisation for the lambdacalculus, or A New Paradigm for Partial Evaluation based on Type Inference
"... this paper is to propagate static information via residual types. For example, when we specialise a static integer the residual expression is a dummy value, but the residual type tells us which static value it represents: 3 : int ,! ffl : 3 Here `3' is a type with only one element, namely ffl, and w ..."
Abstract

Cited by 16 (3 self)
 Add to MetaCart
this paper is to propagate static information via residual types. For example, when we specialise a static integer the residual expression is a dummy value, but the residual type tells us which static value it represents: 3 : int ,! ffl : 3 Here `3' is a type with only one element, namely ffl, and which therefore has just the same elements as 4, 5, 6 etc.  but which carries different static information. All expressions, even `dynamic' ones, carry static information in the form of a residual type. For purely dynamic expressions this is just an ordinary type, for example 3 : int ,! 3 : int
RML  A New Language and Implementation for Natural Semantics
 PROCEEDINGS OF THE 6TH INTERNATIONAL SYMPOSIUM ON PROGRAMMING LANGUAGE IMPLEMENTATION AND LOGIC PROGRAMMING, PLILP, VOLUME 884 OF LNCS
, 1994
"... RML is a programming language intended for the implementation of Natural Semantics specifications. The basic procedural elements are relations: manytomany mappings defined by a number of axioms or inference rules. It has control flow, logical variables and (explicit) unification as in Prolog; from ..."
Abstract

Cited by 15 (2 self)
 Add to MetaCart
RML is a programming language intended for the implementation of Natural Semantics specifications. The basic procedural elements are relations: manytomany mappings defined by a number of axioms or inference rules. It has control flow, logical variables and (explicit) unification as in Prolog; from ML it borrows a polymorphic type system, data structures, and pattern matching; a facility for separatelycompilable modules also exists. A simple prototype compiler, based on translating RML to ContinuationPassing Style and then to C, has been implemented. Benchmarks indicate that this compiler generates code that is several orders of magnitude faster than Typol, and two times faster than standard Prolog compilers.
The Formal Relationship Between Direct and ContinuationPassing Style Optimizing Compilers: A Synthesis of Two Paradigms
, 1994
"... Compilers for higherorder programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuationpassing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two co ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
Compilers for higherorder programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuationpassing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two compilation strategies. Starting from
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 ...
A Typedirected, Online, Partial Evaluator for a Polymorphic Language
 In Proceedings of the Symposium on Partial Evaluation and SemanticsBased Program Manipulation
, 1997
"... Recently, Olivier Danvy introduced a new, simple method for implementing powerful partial evaluators, namely typedirected partial evaluation[9]. He introduced a partial evaluator for the simplytyped lambda calculus (x2). This paper explores the possibility of using the same techniques over a lambda ..."
Abstract

Cited by 13 (3 self)
 Add to MetaCart
Recently, Olivier Danvy introduced a new, simple method for implementing powerful partial evaluators, namely typedirected partial evaluation[9]. He introduced a partial evaluator for the simplytyped lambda calculus (x2). This paper explores the possibility of using the same techniques over a lambda calculus with a richer type system. We generalize and extend Danvy's work in four ways: 1. Our system handles a much richer language than that presented by Danvy, including all of the features functional programmers have come to expect, such as polymorphism (x5), inductive datatypes (x10), and recursion (x9). 2. Our system includes a new systematic treatment of primitive operators (x7) and the propagation of residualized code (x7.1). This question has either been ignored or treated in an adhoc manner in previous work. 3. Our system handles nonclosed terms (x6). This makes typedirected partial evaluation much more practically useful, and can easily be extended to work in languages wit...
Separating Stages in the ContinuationPassing Style Transformation
 Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The continuationpassing style (CPS) transformation is powerful but complex. Our thesis is that this transformation is in fact compound, and we set out to stage it. We factor the CPS transformation into several steps, separating aspects in each step: 1. Intermediate values are named. 2. Continuation ..."
Abstract

Cited by 13 (6 self)
 Add to MetaCart
The continuationpassing style (CPS) transformation is powerful but complex. Our thesis is that this transformation is in fact compound, and we set out to stage it. We factor the CPS transformation into several steps, separating aspects in each step: 1. Intermediate values are named. 2. Continuations are introduced. 3. Sequencing order is decided and administrative reductions are performed. Step 1 determines the evaluation order (e.g., callbyname or callbyvalue). Step 2 isolates the introduction of continuations and is expressed with local, structurepreserving rewrite rules  a novel aspect standing in sharp contrast with the usual CPS transformations. Step 3 determines the ordering of continuations (e.g., lefttoright or righttoleft evaluation) and leads to the familiarlooking continuationpassing terms. Step 2 is completely reversible and Steps 1 and 3 form Galois connections. Together they leading to the direct style (DS) transformation of our earlier work (including first...