Results 1  10
of
26
Shortcut Deforestation in Calculational Form
 In Proc. Conference on Functional Programming Languages and Computer Architecture
, 1995
"... In functional programming, intermediate data structures are often used to "glue" together small programs. Deforestation is a program transformation to remove these intermediate data structures automatically. We present a simple algorithm for deforestation based on two fusion rules for hylo ..."
Abstract

Cited by 101 (3 self)
 Add to MetaCart
(Show Context)
In functional programming, intermediate data structures are often used to "glue" together small programs. Deforestation is a program transformation to remove these intermediate data structures automatically. We present a simple algorithm for deforestation based on two fusion rules for hylomorphism, an expressive recursion pattern. A generic notation for hylomorphisms is introduced, where natural transformations are explicitly factored out, and it is used to represent programs. Our method successfully eliminates intermediate data structures of any algebraic type from a much larger class of compositional functional programs than previous techniques. 1 Introduction In functional programming, programs are often constructed by "gluing" together small components, using intermediate data structures to convey information between them. Such data are constructed in one component and later consumed in another component, but never appear in the result of the whole program. The compositional styl...
Narrowingdriven Partial Evaluation of Functional Logic Programs
 ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unificationbased goalsolving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Formal methods of transfo ..."
Abstract

Cited by 83 (36 self)
 Add to MetaCart
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unificationbased goalsolving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Formal methods of transformation of functional logic programs can be based on this wellestablished operational semantics. In this paper, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. We study the semantic properties of the transformation and the conditions under which the technique terminates, is sound and complete, and is also generally applicable to a wide class of programs. We illustrate our method with several examples and discuss the relation with Supercompilation and Partial Evaluation. To the best of our knowledge this is the first formal approach to partial evaluation of functional logic programs.
The essence of program transformation by partial evaluation and driving
 Logic, Language and Computation. LNCS 792
, 1994
"... Abstract. An abstract framework is developed to describe program transformation by specializing a given program to a restricted set of inputs. Particular cases include partial evaluation [19] and Turchin’s more powerful “driving ” transformation [33]. Such automatic program speedups have been see ..."
Abstract

Cited by 37 (1 self)
 Add to MetaCart
(Show Context)
Abstract. An abstract framework is developed to describe program transformation by specializing a given program to a restricted set of inputs. Particular cases include partial evaluation [19] and Turchin’s more powerful “driving ” transformation [33]. Such automatic program speedups have been seen to give quite signifcant speedups in practical applications. This paper’s aims are similar to those of [18]: better to understand the fundamental mathematical phenomena that make such speedups possible. The current paper is more complete than [18], since it precisely formulates correctness of code generation; and more powerful, since it includes program optimizations not achievable by simple partial evaluation. Moreover, for the first time it puts Turchin’s driving methodology on a solid semantic foundation which is not tied to any particular programming language or data structure. This paper is dedicated to Satoru Takasu with thanks for good advice early in my career on how to do research, and for insight into how to see the essential part of a new problem.
Regular Approximation of Computation Paths in Logic and Functional Languages
, 1996
"... . The aim of this work is to compute descriptions of successful computation paths in logic or functional program executions. Computation paths are represented as terms, built from special constructor symbols, each constructor symbol corresponding to a specific clause or equation in a program. Such t ..."
Abstract

Cited by 23 (6 self)
 Add to MetaCart
. The aim of this work is to compute descriptions of successful computation paths in logic or functional program executions. Computation paths are represented as terms, built from special constructor symbols, each constructor symbol corresponding to a specific clause or equation in a program. Such terms, called traceterms, are abstractions of computation trees, which capture information about the control flow of the program. A method of approximating traceterms is described, based on wellestablished methods for computing regular approximations of terms. The special function symbols are first introduced into programs as extra arguments in predicates or functions. Then a regular approximation of the program is computed, describing the terms occurring in some set of program executions. The approximation of the extra arguments (the traceterms) can then be examined to see what computation paths were followed during the computation. This information can then be used to control both offl...
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 21 (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...
Advanced Logic Program Specialisation
 In this volume
"... Declarative programming languages, are highlevel programming languages in which one only has to state what is to be computed and not necessarily how it is to be computed. Logic programming and functional programming are two prominent members of this class of programming languages. While functional ..."
Abstract

Cited by 20 (11 self)
 Add to MetaCart
(Show Context)
Declarative programming languages, are highlevel programming languages in which one only has to state what is to be computed and not necessarily how it is to be computed. Logic programming and functional programming are two prominent members of this class of programming languages. While functional programming is based on the calculus, logic
Comparison of Deforestation Techniques for Functional Programs and for Tree Transducers
 In FLOPS'99
, 1999
"... We compare transformations for the elimination of intermediate results in firstorder functional programs. We choose the well known deforestation technique of Wadler and composition techniques from the theory of tree transducers, of which the implementation of functional programs yet does not ta ..."
Abstract

Cited by 20 (5 self)
 Add to MetaCart
(Show Context)
We compare transformations for the elimination of intermediate results in firstorder functional programs. We choose the well known deforestation technique of Wadler and composition techniques from the theory of tree transducers, of which the implementation of functional programs yet does not take advantage. We identify syntactic classes of function definitions for which both techniques deliver equally efficient results and for which one technique is more powerful than the other.
Supercompilation by evaluation
, 2010
"... Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Insp ..."
Abstract

Cited by 17 (4 self)
 Add to MetaCart
Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Inspired by Mitchell’s promising results [4], we show how the callbyneed supercompilation algorithm can be recast to be based explicitly on an evaluator, and in the process extend it to deal with recursive let expressions.
Mechanically verifying the correctness of an offline partial evaluator (extended version
, 1995
"... Abstract. We show that using deductive systems to specify an offline partial evaluator allows one to specify, prototype, and mechanically verify correctness via metaprogramming — all within a single framework. For a λmixstyle partial evaluator, we specify bindingtime constraints using a natural ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
(Show Context)
Abstract. We show that using deductive systems to specify an offline partial evaluator allows one to specify, prototype, and mechanically verify correctness via metaprogramming — all within a single framework. 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 evaluator correctness proofs (e.g., the correctness of bindingtime analysis) can be coded in Elf and mechanically checked. 1
Towards higherlevel supercompilation
 SECOND INTERNATIONAL WORKSHOP ON METACOMPUTATION IN RUSSIA
, 2010
"... We show that the power of supercompilation can be increased by constructing a hierarchy of supercompilers, in which a lowerlevel supercompiler is used by a higherlevel one for proving improvement lemmas. The lemmas thus obtained are used to transform expressions labeling nodes in process trees, in ..."
Abstract

Cited by 12 (9 self)
 Add to MetaCart
(Show Context)
We show that the power of supercompilation can be increased by constructing a hierarchy of supercompilers, in which a lowerlevel supercompiler is used by a higherlevel one for proving improvement lemmas. The lemmas thus obtained are used to transform expressions labeling nodes in process trees, in order to avoid premature generalizations. Such kind of supercompilation, based on a combination of several metalevels, is called higherlevel supercompilation (to differentiate it from higherorder supercompilation related to transforming higherorder functions). Higherlevel supercompilation may be considered as an application of a more general principle of metasystem transition.