Results 1 -
5 of
5
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 69 (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.
Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC
, 1994
"... We study four transformation methodologies which are automatic instances of Burstall and Darlington's fold/unfold framework: partial evaluation, deforestation, supercompilation, and generalized partial computation (GPC). One can classify these and other fold/unfold based transformers by how much inf ..."
Abstract
-
Cited by 22 (0 self)
- Add to MetaCart
We study four transformation methodologies which are automatic instances of Burstall and Darlington's fold/unfold framework: partial evaluation, deforestation, supercompilation, and generalized partial computation (GPC). One can classify these and other fold/unfold based transformers by how much information they maintain during transformation. We introduce the positive supercompiler, a version of deforestation including more information propagation, to study such a classification in detail. Via the study of positive supercompilation we are able to show that partial evaluation and deforestation have simple information propagation, positive supercompilation has more information propagation, and supercompilation and GPC have even more information propagation. The amount of information propagation is significant: positive supercompilation, GPC, and supercompilation can specialize a general pattern matcher to a fixed pattern so as to obtain efficient output similar to that of the Knuth-Morris-Pratt algorithm. In the case of partial evaluation and deforestation, the general matcher must be rewritten to achieve this.
A Constraint-based 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 rewriting-based functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewriting-based 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 rewriting-based functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewriting-based computational model extends traditional functional programming languages by incorporating logical features, including logical variables and built-in 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 rewriting-based 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. ...
A New Means of Ensuring Termination of Deforestation
, 1993
"... The deforestation algorithm transforms functional programs which use intermediate data structures into semantically equivalent programs which do not use intermediate data structures. However, the deforestation algorithm is only guaranteed to terminate for treeless programs. The generalizing deforest ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
The deforestation algorithm transforms functional programs which use intermediate data structures into semantically equivalent programs which do not use intermediate data structures. However, the deforestation algorithm is only guaranteed to terminate for treeless programs. The generalizing deforestation algorithm does the same job as the standard deforestation algorithm except that it leaves subterms which are annotated with \Psi untransformed. The problem remains to give the program safe annotations, i.e. annotations ensuring that application of the generalizing deforestation algorithm to the annotated program terminates. We develop a method of finding safe annotations automatically. Given a program, the idea is to calculate a grammar such that (at least) every term that the deforestation algorithm encounters when transforming the program is derivable from the grammar. Whenever the deforestation algorithm loops infinitely, it encounters infinitely many different terms, and whenever ...
A New Means of Ensuring Termination of Deforestation With an Application to Logic Programming
- In Workshop of the Global Compilation Workshop in conjunction with the International Logic Programming Symposium
, 1993
"... Wadler's deforestation algorithm eliminates intermediate data structures from functional programs, but is only guaranteed to terminate for a certain class of programs. Chin has shown how one can apply deforestation to all first-order programs. We develop a new technique of ensuring termination of de ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Wadler's deforestation algorithm eliminates intermediate data structures from functional programs, but is only guaranteed to terminate for a certain class of programs. Chin has shown how one can apply deforestation to all first-order programs. We develop a new technique of ensuring termination of deforestation for all first-order programs which strictly extends Chin's technique in a sense we make precise. We also show how suitable modifications may render our technique applicable to ensure termination of transformers of logic programs such as partial evaluation as studied by Gallagher and others and the elimination procedure studied by Proietti and Pettorossi. 1 Introduction Modern functional programming languages such as Miranda 1 [Tur90] lend themselves to a certain elegant style of programming which exploits higherorder functions, lazy evaluation and intermediate data structures; Hughes [Hug90] gives illuminating examples. While this programming style makes it easy to read and w...

