Results 1 - 10
of
11
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 hylomorphism, ..."
Abstract
-
Cited by 84 (3 self)
- Add to MetaCart
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...
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.
Systematic Derivation of Incremental Programs
, 1995
"... A systematic approach is given for deriving incremental programs from non-incremental programs written in a standard functional programming language. We exploit a number of program analysis and transformation techniques and domain-specific knowledge, centered around effective utilization of caching, ..."
Abstract
-
Cited by 38 (21 self)
- Add to MetaCart
A systematic approach is given for deriving incremental programs from non-incremental programs written in a standard functional programming language. We exploit a number of program analysis and transformation techniques and domain-specific knowledge, centered around effective utilization of caching, in order to provide a degree of incrementality not otherwise achievable by a generic incremental evaluator. 1 Introduction Incremental programs take advantage of repeated computations on inputs that differ only slightly from one another, avoiding unnecessary duplication of common computations. Given a program f and a certain input change \Phi, a program f 0 that computes the value of f(x \Phi y) efficiently by making use of the value of f(x) is called an incremental version of f under \Phi. The parameter y can be regarded as a change ffix to the input x. Methods of incremental computation have widespread applications, e.g., loop optimizations in optimizing compilers [1, 24, 9, 10] and ...
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. ...
Turchin's Supercompiler Revisited - An operational theory of positive information propagation
, 1996
"... Turchin`s supercompiler is a program transformer that includes both partial evaluation and deforestation. Although known in the West since 1979, the essence of its techniques, its more precise relations to other transformers, and the properties of the programs that it produces are only now becoming ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
Turchin`s supercompiler is a program transformer that includes both partial evaluation and deforestation. Although known in the West since 1979, the essence of its techniques, its more precise relations to other transformers, and the properties of the programs that it produces are only now becoming apparent in the Western functional programming community. This thesis gives a new formulation of the supercompiler in familiar terms; we study the essence of it, how it achieves its effects, and its relations to related transformers; and we develop results dealing with the problems of preserving semantics, assessing the efficiency of transformed programs, and ensuring termination.
Program transformations for information personalization
, 2004
"... Personalization constitutes the mechanisms necessary to automatically customize information content, structure, and presentation to the end-user to reduce information overload. Unlike traditional approaches to personalization, the central theme of our approach is to model a website as a program and ..."
Abstract
-
Cited by 7 (6 self)
- Add to MetaCart
Personalization constitutes the mechanisms necessary to automatically customize information content, structure, and presentation to the end-user to reduce information overload. Unlike traditional approaches to personalization, the central theme of our approach is to model a website as a program and conduct website transformation for personalization by program transformation (e.g., partial evaluation, program slicing). The goal of this paper is study personalization through a program transformation lens, and develop a formal model, based on program transformations, for personalized interaction with hierarchical hypermedia. The specific research issues addressed involve identifying and developing program representations and transformations suitable for classes of hierarchical hypermedia, and providing supplemental interactions for improving the personalized experience. The primary form of personalization discussed is out-of-turn interaction – a technique which empowers a user navigating a hierarchical website to postpone clicking on any of the hyperlinks presented on the current page and, instead, communicate the
An Intermediate Meta-Language for Program Transformation
, 1998
"... As part of an effort to bridge the gap between the theory and practice of program transformation, we have designed a meta-language for transforming functional programs. The metalanguage is sound in preserving both value and termination properties of programs (and is thus superior to the unfold/fo ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
As part of an effort to bridge the gap between the theory and practice of program transformation, we have designed a meta-language for transforming functional programs. The metalanguage is sound in preserving both value and termination properties of programs (and is thus superior to the unfold/fold methodology). Our key contribution is an equational specification of Scherlis's expression procedures, in which we express the essence of expression procedures as a single transformation rule. Our approach has the following advantages over both unfold/fold and expression procedures: (1) all program derivations are reversible; (2) many transformations can be done which unfold/fold and expression procedures cannot do; and (3) the proof of correctness is far simpler. 1 Introduction Program transformation has been an elusive goal of the programming language research community. We talk about it, write about it, preach about it, but in practice don't use it very much. In the functional p...
Program Specialization via Algorithmic Unfold/Fold Transformations
- ACM Computing Surveys: Special Issue on Partial Evaluation
, 1998
"... this paper we will essentially refer to these techniques as they have been developed in the fields of functional and logic programming. ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
this paper we will essentially refer to these techniques as they have been developed in the fields of functional and logic programming.
Program Adaptation via Output-Constraint Specialization
- Journal of Higher-Order and Symbolic Computing (HOSC
, 2004
"... In component-based software development, gluing of two software components are usually achieved by defining an interface specification, and creating wrappers on components to support the interface. We believe that interface specification provides useful information for specializing components. Howev ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
In component-based software development, gluing of two software components are usually achieved by defining an interface specification, and creating wrappers on components to support the interface. We believe that interface specification provides useful information for specializing components. However, an interface may define constraints on a component's inputs, as well as on its outputs. In this paper, we propose a novel concept of program specialization with respect to output constraints. We provide the form in which an efficient specialized program should be in after such specialization, and consider a variant of partial evaluation to achieve it. In the process, we translate an output constraint into a characterization function for a component's input, and define a specializer that uses this characterization to guide the specialization process. We believe this work will broaden the scope of program specialization, and provide a framework for building more generic and versatile program adaptation techniques.

