Results 1  10
of
15
For a Better Support of Static Data Flow
 Functional Programming Languages and Computer Architecture
"... . This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial b ..."
Abstract

Cited by 64 (15 self)
 Add to MetaCart
(Show Context)
. This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial binding time improvements and thus dramatically better results not only in the case of partial evaluation but also for static analyses of programs  this last point actually is related to a theoretical result obtained by Nielson. Our work can also be interpreted as providing a solution to the problem of conditionally static data, the dual of partially static data. We point out which changes in the control flow of a source program may improve its static data flow. Unfortunately they require one to iterate earlier phases of partial evaluation. We show how these changes are subsumed by transforming the source program into continuationpassing style (CPS). The transformed programs get specializ...
Partial Deduction and Driving are Equivalent
, 1994
"... Partial deduction and driving are two methods used for program specialization in logic and functional languages, respectively. We argue that both techniques achieve essentially the same transformational effect by unificationbased information propagation. We show their equivalence by analyzing the ..."
Abstract

Cited by 45 (10 self)
 Add to MetaCart
Partial deduction and driving are two methods used for program specialization in logic and functional languages, respectively. We argue that both techniques achieve essentially the same transformational effect by unificationbased information propagation. We show their equivalence by analyzing the definition and construction principles underlying partial deduction and driving, and by giving a translation from a functional language to a definite logic language preserving certain properties. We discuss residual program generation, termination issues, and related other techniques developed for program specialization in logic and functional languages.
Generating a Compiler for a Lazy Language by Partial Evaluation
, 1992
"... Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This ..."
Abstract

Cited by 28 (2 self)
 Add to MetaCart
Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This paper describes a large application of partial evaluation where a realistic compiler was generated for a strongly typed lazy functional language. The language, that was called BAWL, was modeled after the language in Bird and Wadler [BW88] and is a combinator language with pattern matching, guarded alternatives, local definitions and list comprehensions. The paper describes the most important techniques used, especially the binding time improvements needed in order to get small and efficient target programs. Finally, the performance of the compiler is compared with two compilers for similar languages: Miranda and LML. Keywords Compiler generation, partial evaluation, binding time improvemen...
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 28 (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.
A Transformation Method for DynamicSized Tabulation
, 1995
"... Tupling is a transformation tactic to obtain new functions, without redundant calls and/or multiple traversals of common inputs. It achieves this feat by allowing each set (tuple) of function calls to be computed recursively from its previous set. In previous works by Chin and Khoo [8, 9], a safe (t ..."
Abstract

Cited by 10 (3 self)
 Add to MetaCart
Tupling is a transformation tactic to obtain new functions, without redundant calls and/or multiple traversals of common inputs. It achieves this feat by allowing each set (tuple) of function calls to be computed recursively from its previous set. In previous works by Chin and Khoo [8, 9], a safe (terminating) fold/unfold transformation algorithm was developed for some classes of functions which are guaranteed to be successfully tupled. However, these classes of functions currently use staticsized tables for eliminating the redundant calls. As shown by Richard Bird in [3], there are also other classes of programs whose redundant calls could only be eliminated by using dynamicsized tabulation. This paper proposes a new solution to dynamicsized tabulation by an extension to the tupling tactic. Our extension uses lambda abstractions which can be viewed as either dynamicsized tables or applications of the higherorder generalisation technique to facilitate tupling. Significant speedups could be obtained after the transformed programs were vectorised, as confirmed by experiment.
A Monadic Approach for Avoiding Code Duplication when Staging Memoized Functions
, 2006
"... Building program generators that do not duplicate generated code can be challenging. At the same time, code duplication can easily increase both generation time and runtime of generated programs by an exponential factor. We identify an instance of this problem that can arise when memoized functions ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Building program generators that do not duplicate generated code can be challenging. At the same time, code duplication can easily increase both generation time and runtime of generated programs by an exponential factor. We identify an instance of this problem that can arise when memoized functions are staged. Without addressing this problem, it would be impossible to effectively stage dynamic programming algorithms. Intuitively, direct staging undoes the effect of memoization. To solve this problem once and for all, and for any function that uses memoization, we propose a staged monadic combinator library. Experimental results confirm that the library works as expected. Preliminary results also indicate that the library is useful even when memoization is not used.
Evaluation under λAbstraction
, 1996
"... In light of the usual definition of values [15] as terms in weak head normal form (WHNF), a abstraction is regarded as a value, and therefore no expressions under abstraction can get evaluated and the sharing of computation under has to be achieved through program transformations such as lifting ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
In light of the usual definition of values [15] as terms in weak head normal form (WHNF), a abstraction is regarded as a value, and therefore no expressions under abstraction can get evaluated and the sharing of computation under has to be achieved through program transformations such as lifting and supercombinators. In this paper we generalise the notion of head normal form (HNF) and introduce the definition of generalised head normal form (GHNF). We then define values as terms in GHNF with flexible heads, and study a callbyvalue calculus v hd corresponding to this new notion of values. After establishing a version of normalisation theorem in v hd , we construct an evaluation function eval v hd for v hd which evaluates under  abstraction. We prove that a program can be evaluated in v hd to a term in GHNF if and only if it can be evaluated in the usual calculus to a term in HNF. We also present an operational semantics for v hd via a SECD machine. We argue that l...
A Computational Formalization for Partial Evaluation (Extended Version)
, 1996
"... We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of " ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlbased bindingtime improvements" for let expressions. Specifically,
Axiomatic sharingvialabelling
 of LIPIcs
, 2012
"... A judicious use of labelled terms makes it possible to bring together the simplicity of term rewriting and the sharing power of graph rewriting: this has been known for twenty years in the particular case of orthogonal firstorder systems. The present paper introduces a concise and easily usable axi ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
A judicious use of labelled terms makes it possible to bring together the simplicity of term rewriting and the sharing power of graph rewriting: this has been known for twenty years in the particular case of orthogonal firstorder systems. The present paper introduces a concise and easily usable axiomatic presentation of sharingvialabelling techniques that applies to higherorder term rewriting as well as to nonorthogonal term rewriting. This provides a general framework for the sharing of subterms and keeps the formalism as simple as term rewriting.