Results 11  20
of
38
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 ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
(Show Context)
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 ...
Logic Frameworks for Logic Programs
, 1994
"... . We show how logical frameworks can provide a basis for logic program synthesis. With them, we may use firstorder logic as a foundation to formalize and derive rules that constitute program development calculi. Derived rules may be in turn applied to synthesize logic programs using higherorder re ..."
Abstract

Cited by 13 (7 self)
 Add to MetaCart
. We show how logical frameworks can provide a basis for logic program synthesis. With them, we may use firstorder logic as a foundation to formalize and derive rules that constitute program development calculi. Derived rules may be in turn applied to synthesize logic programs using higherorder resolution during proof that programs meet their specifications. We illustrate this using Paulson's Isabelle system to derive and use a simple synthesis calculus based on equivalence preserving transformations. 1 Introduction Background In 1969 Dana Scott developed his Logic for Computable Functions and with it a model of functional program computation. Motivated by this model, Robin Milner developed the theorem prover LCF whose logic PP used Scott's theory to reason about program correctness. The LCF project [13] established a paradigm of formalizing a programming logic on a machine and using it to formalize different theories of functional programs (e.g., strict and lazy evaluation) and the...
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. ...
Integer Constraints to Stop Deforestation
, 1996
"... . Deforestation is a transformation of functional programs to remove intermediate data structures. It is based on outermost unfolding of function calls where folding occurs when unfolding takes place within the same nested function call. Since unrestricted unfolding may encounter arbitrarily man ..."
Abstract

Cited by 11 (2 self)
 Add to MetaCart
. Deforestation is a transformation of functional programs to remove intermediate data structures. It is based on outermost unfolding of function calls where folding occurs when unfolding takes place within the same nested function call. Since unrestricted unfolding may encounter arbitrarily many terms, a termination analysis has to determine those subterms where unfolding is possibly dangerous. We show that such an analysis can be obtained from a control flow analysis by an extension with integer constraints  essentially at no loss in efficiency. 1 Introduction The key idea of flow analysis for functional languages is to define an abstract meaning in terms of program points , i.e., subexpressions of the program possibly evaluated during program execution [Pa95]. Such analysises have been invented for tasks like type recovery [Sh91], binding time analysis [Co93], or safety analysis [PS95]. Conceptually, these are closely related to A. Deutsch's storebased alias analysis [D...
Deriving Analysers By Folding/unfolding of Natural Semantics and a Case Study: Slicing
, 1998
"... : We consider specications of analysers expressed as compositions of two functions: a semantic function, which returns a natural semantics derivation tree, and a property dened by recurrence on derivation trees. A recursive denition of a dynamic analyser can be obtained by fold/unfold program transf ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
: We consider specications of analysers expressed as compositions of two functions: a semantic function, which returns a natural semantics derivation tree, and a property dened by recurrence on derivation trees. A recursive denition of a dynamic analyser can be obtained by fold/unfold program transformation combined with deforestation. We apply our framework to the derivation of a slicing analysis for a logic programming language. Keywords: systematic derivation, program transformation, natural semantics, proof tree, slicing analysis. (R#sum# : tsvp) Unite de recherche INRIA Rennes IRISA, Campus universitaire de Beaulieu, 35042 RENNES Cedex (France) Telephone : 02 99 84 71 00  International : +33 2 99 84 71 00 Telecopie : 02 99 84 71 71  International : +33 2 99 84 71 71 D#rivation d'analyseurs # partir d'une s#mantique naturelle par pliage/d#pliage, application # l'analyse d'#lagage R#sum# : Nous consid#rons la sp#cication d'un analyseur comme la composition de deux fonctio...
A Transformation System Combining Partial Evaluation with Term Rewriting
 In Higher Order Algebra, Logic and Term Rewriting (HOA '93), volume 816 of LNCS
, 1993
"... . This paper presents a new approach to optimizing functional programs based on combining partial evaluation and rewriting. Programs are composed of higherorder primitives. Partial evaluation is used to eliminate higherorder functions. Firstorder rewriting is used to process the transformation. L ..."
Abstract

Cited by 6 (5 self)
 Add to MetaCart
(Show Context)
. This paper presents a new approach to optimizing functional programs based on combining partial evaluation and rewriting. Programs are composed of higherorder primitives. Partial evaluation is used to eliminate higherorder functions. Firstorder rewriting is used to process the transformation. Laws about the higherorder primitives that are relevant for the optimizations are automatically extracted from a library and transformed into firstorder terms using partial evaluation. Such a combination of a partial evaluation system and an intrinsically firstorder rewriting tool allows a form of higherorder rewriting at a firstorder level. This way, it is possible to automate deforestation of higherorder programs. Introduction The socalled Squiggol [10] style for program construction is a highlevel programming technique that consists of building a program by composing primitives or other functions while taking into account wellknown laws on the primitives. Functions are usually de...
Calculating a New Data Mining Algorithm for Market Basket Analysis
, 2000
"... The general goal of data mining is to extract interesting correlated information from large ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
(Show Context)
The general goal of data mining is to extract interesting correlated information from large
A Grammarbased Dataflow Analysis to Stop Deforestation
 CAAP'94: Proceedings of the 19th International Colloquium on Trees in Algebra and Programming, volume 787 of Lecture Notes in Computer Science
, 1994
"... . Wadler's deforestation algorithm removes intermediate data structures from functional programs, but is only guaranteed to terminate for treeless programs. Chin has shown how one can apply deforestation to all firstorder programs: annotate nontreeless subterms and apply the extended defores ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
. Wadler's deforestation algorithm removes intermediate data structures from functional programs, but is only guaranteed to terminate for treeless programs. Chin has shown how one can apply deforestation to all firstorder programs: annotate nontreeless subterms and apply the extended deforestation algorithm which essentially leaves annotated subterms untransformed. We develop a new technique of putting annotations on programs. The basic idea is to compute a finite grammar which approximates the set of terms that the deforestation algorithm encounters. The technique extends Wadler's and Chin's in a certain sense. 1 Introduction Modern functional programming languages like 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 write programs, it also results in inefficient pro...
Redundant Call Elimination via Tupling
 FUNDAMENTA INFORMATICAE
, 2005
"... Redundant call elimination has been an important program optimisation process as it can produce superlinear speedup in optimised programs. In this paper, we investigate use of the tupling transformation in achieving this optimisation over a firstorder functional language. Standard tupling techniqu ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
Redundant call elimination has been an important program optimisation process as it can produce superlinear speedup in optimised programs. In this paper, we investigate use of the tupling transformation in achieving this optimisation over a firstorder functional language. Standard tupling technique, as described in [6], works excellently in a restricted variant of the language; namely, functions with single recursion argument. We provide a semantic understanding of call redundancy, upon which we construct an analysis for handling the tupling of functions with multiple recursion arguments. The analysis provides a means to ensure termination of the tupling transformation. As the analysis is of polynomial complexity, it makes the tupling suitable as a step in compiler optimisation.
Bridging the Algorithm Gap: A Lineartime Functional Program for Paragraph Formatting
 Science of Computer Programming
, 1997
"... In the constructive programming community it is commonplace to see formal developments of textbook algorithms. In the algorithm design community, on the other hand, it may be well known that the textbook solution to a problem is not the most efficient possible. However, in presenting the more eff ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
(Show Context)
In the constructive programming community it is commonplace to see formal developments of textbook algorithms. In the algorithm design community, on the other hand, it may be well known that the textbook solution to a problem is not the most efficient possible. However, in presenting the more efficient solution, the algorithm designer will usually omit some of the implementation details, thus creating an algorithm gap between the abstract algorithm and its concrete implementation. This is in contrast to the formal development, which usually presents the complete concrete implementation of the less efficient solution. We claim that the algorithm designer is forced to omit some of the details by the relative expressive poverty of the Pascallike languages typically used to present the solution; the greater expressiveness provided by a functional language allows the whole story to be told in a reasonable amount of space. We therefore hope to bridge the algorithm gap between ab...