Results 1  10
of
17
On perfect supercompilation
 Journal of Functional Programming
, 1996
"... We extend positive supercompilation to handle negative as well as positive information. This is done by instrumenting the underlying unfold rules with a small rewrite system that handles constraints on terms, thereby ensuring perfect information propagation. We illustrate this by transforming a na ..."
Abstract

Cited by 78 (3 self)
 Add to MetaCart
We extend positive supercompilation to handle negative as well as positive information. This is done by instrumenting the underlying unfold rules with a small rewrite system that handles constraints on terms, thereby ensuring perfect information propagation. We illustrate this by transforming a naively specialised string matcher into an optimal one. The presented algorithm is guaranteed to terminate by means of generalisation steps.
A Roadmap to Metacomputation by Supercompilation
, 1996
"... This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Th ..."
Abstract

Cited by 33 (4 self)
 Add to MetaCart
This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Then a taxonomy of related transformers is given and compared to the supercompiler. Finally, we put supercompilation into the larger perspective of metacomputation and consider three metacomputation tasks: specialization, composition, and inversion.
Proving the Correctness of RecursionBased Automatic Program Transformations
 Theoretical Computer Science
, 1996
"... This paper shows how the Improvement Theorema semantic condition ..."
Abstract

Cited by 31 (4 self)
 Add to MetaCart
This paper shows how the Improvement Theorema semantic condition
Deforestation for HigherOrder Functional Programs
, 1995
"... Functional programming languages are an ideal medium for program optimisations based on sourcetosource transformation techniques. Referential transparency affords opportunities for a wide range of correctnesspreserving transformations leading to potent optimisation strategies. This thesis builds ..."
Abstract

Cited by 17 (0 self)
 Add to MetaCart
Functional programming languages are an ideal medium for program optimisations based on sourcetosource transformation techniques. Referential transparency affords opportunities for a wide range of correctnesspreserving transformations leading to potent optimisation strategies. This thesis builds on deforestation, a program transformation technique due to Wadler that removes intermediate data structures from firstorder functional programs. Our contribution is to reformulate deforestation for higherorder functional programming languages, and to show that the resulting algorithm terminates given certain syntactic and typing constraints on the input. These constraints are entirely reasonable, indeed it is possible to translate any typed program into the required syntactic form. We show how this translation can be performed automatically and optimally. The higherorder deforestation algorithm is transparent. That is, it is possible to determine by examination of the source program w...
Higher Order Deforestation
, 1995
"... Intermediate data structures are widely used in functional programs. Programs which use these intermediate structures are usually a lot easier to understand, but they result in loss of efficiency at runtime. In order to reduce these runtime costs, a transformation algorithm called deforestation w ..."
Abstract

Cited by 17 (2 self)
 Add to MetaCart
Intermediate data structures are widely used in functional programs. Programs which use these intermediate structures are usually a lot easier to understand, but they result in loss of efficiency at runtime. In order to reduce these runtime costs, a transformation algorithm called deforestation was proposed by Wadler which could eliminate intermediate structures. However, this transformation algorithm was formulated only for first order functional programs. In this paper, it is shown how the original deforestation algorithm can be extended to deal with higher order functional programs. This extended algorithm is guaranteed to terminate only for expressions in which all functions are in a treeless form. It is shown how all function definitions can be generalised to this form so that the algorithm can be made to terminate for all programs. It is therefore argued that this algorithm is suitable for inclusion in an optimising compiler. i Contents 1 Introduction 1 2 Language 1 3 High...
Program Derivation With Verified Transformations  A Case Study
, 1995
"... A program development methodology based on verified program transformations is described and illustrated through derivations of a high level bisimulation algorithm and an improved minimumstate DFA algorithm. Certain doubts that were raised about the correctness of an initial paperandpencil deriva ..."
Abstract

Cited by 13 (3 self)
 Add to MetaCart
A program development methodology based on verified program transformations is described and illustrated through derivations of a high level bisimulation algorithm and an improved minimumstate DFA algorithm. Certain doubts that were raised about the correctness of an initial paperandpencil derivation of the DFA minimizationalgorithm were laid to rest by machinechecked formal proofs of the most difficult derivational steps. Although the protracted labor involved in designing and checking these proofs was almost overwhelming, the expense was somewhat offset by a successful reuse of major portions of these proofs. In particular, the DFA minimization algorithm is obtained by specializing and then extending the last step in the derivation of the high level bisimulation algorithm. Our experience suggests that a major focus of future research should be aimed towards improving the technology of machine checkable proofs  their construction, presentation, and reuse. This paper demonstrat...
A Constraintbased Partial Evaluator for Functional Logic Programs and its Application
, 1998
"... The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional ..."
Abstract

Cited by 12 (0 self)
 Add to MetaCart
The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional programming languages by incorporating logical features, including logical variables and builtin search, into its framework. This work is the first to address the automatic specialisation of these functional logic programs. In particular, a theoretical framework for the partial evaluation of rewritingbased functional logic programs is defined and its correctness is established. Then, an algorithm is formalised which incorporates the theoretical framework for the procedure in a fully automatic technique. Constraint solving is used to represent additional information about the terms encountered during the transformation in order to improve the efficiency and size of the residual programs. ...
Mechanically Verifying the Correctness of an Offline Partial Evaluator
, 1995
"... We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. For a mixstyle partial evaluator, we specify bindingtime constraints using a naturaldeduction logic, and the associated program specializer using natural (aka "deducti ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. For a mixstyle partial evaluator, we specify bindingtime constraints using a naturaldeduction logic, and the associated program specializer using natural (aka "deductive") semantics. These deductive systems can be directly encoded in the Elf programming language  a logic programming language based on the LF logical framework. The specifications are then executable as logic programs. This provides a prototype implementation of the partial evaluator. Moreover, since deductive system proofs are accessible as objects in Elf, many aspects of the partial evaluation correctness proofs (e.g., the correctness of bindingtime analysis) can be coded in Elf and mechanically verified. This work illustrates the utility of declarative programming and of using deductive systems for defining program specialization systems: by exploiting the logical character of definit...
Constraints to Stop HigherOrder Deforestation
 In 24th ACM Symposium on Principles of Programming Languages
, 1997
"... Wadler's deforestation algorithm eliminates intermediate data structures from functional programs. To be suitable for inclusion in a compiler, it must terminate on all programs. Several techniques to ensure termination of deforestation on all firstorder programs are known, but a technique for highe ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Wadler's deforestation algorithm eliminates intermediate data structures from functional programs. To be suitable for inclusion in a compiler, it must terminate on all programs. Several techniques to ensure termination of deforestation on all firstorder programs are known, but a technique for higherorder programs was only recently introduced by Hamilton, and elaborated and implemented in the Glasgow Haskell compiler by Marlow. We introduce a new technique for ensuring termination of deforestation on all higherorder programs that allows useful transformation steps prohibited in Hamilton's and Marlowe's techniques. 1 Introduction Lazy, higherorder, functional programming languages lend themselves to a certain style of programming which uses intermediate data structures [28]. Example 1 Consider the following program. letrec a = x; y:case x of [] ! y (h : t) ! h : a t y in u; v; w: a (a u v) w The term u; v; w:a (a u v) w appends the three lists u, v, and w. Appending u and v ...
Improvement Theory and its Applications
 HIGHER ORDER OPERATIONAL TECHNIQUES IN SEMANTICS, PUBLICATIONS OF THE NEWTON INSTITUTE
, 1997
"... An improvement theory is a variant of the standard theories of observational approximation (or equivalence) in which the basic observations made of a functional program's execution include some intensionalinformation about, for example, the program's computational cost. One program is an improvement ..."
Abstract

Cited by 10 (4 self)
 Add to MetaCart
An improvement theory is a variant of the standard theories of observational approximation (or equivalence) in which the basic observations made of a functional program's execution include some intensionalinformation about, for example, the program's computational cost. One program is an improvement of another if its execution is more efficient in any program context. In this article we give an overview of our work on the theory and applications of improvement. Applications include reasoning about time properties of functional programs, and proving the correctness of program transformation methods. We also introduce a new application, in the form of some bisimulationlike proof techniques for equivalence, with something of the flavour of Sangiorgi's "bisimulation upto expansion and context".