Results 1 -
3 of
3
Composition of functions with accumulating parameters
- Journal of Functional Programming
, 2004
"... Many functional programs with accumulating parameters are contained in the class of macro tree transducers. We present a program transformation technique that can be used to solve the efficiency problems due to creation and consumption of intermediate data structures in compositions of such function ..."
Abstract
-
Cited by 20 (9 self)
- Add to MetaCart
Many functional programs with accumulating parameters are contained in the class of macro tree transducers. We present a program transformation technique that can be used to solve the efficiency problems due to creation and consumption of intermediate data structures in compositions of such functions, where classical deforestation techniques fail. In order to do so, given two macro tree transducers under appropriate restrictions, we construct a single macro tree transducer that implements the composition of the two original ones. The imposed restrictions are more liberal than those in the literature on macro tree transducer composition, thus generalising previous results.
Composition of restricted Macro Tree Transducers
, 2001
"... A special class of functional programs can be modelled by Macro Tree Transducers. We present a technique that can be used to solve the efficiency problems due to creation and consumption of intermediate results in such functional programs, by constructing for two given Macro Tree Transducers, with a ..."
Abstract
-
Cited by 9 (6 self)
- Add to MetaCart
A special class of functional programs can be modelled by Macro Tree Transducers. We present a technique that can be used to solve the efficiency problems due to creation and consumption of intermediate results in such functional programs, by constructing for two given Macro Tree Transducers, with appropriate restrictions, a single Macro Tree Transducer that implements the composition of the two original ones. We show that this is possible, if the first Macro Tree Transducer is non-copying and the second one is weakly single-use. Thus, we obtain the characterization MAC_nc;MAC_wsu=MAC, which generalizes a previous result. We also develop two post-processing constructions that can be used for optimizing the Macro Tree Transducer obtained from the composition construction, by eliminating superfluous context parameters and superfluous traversals through the input tree. Further, we present two interesting applications of the above characterization to problems about non-copying Macro Tree Transducers.
Tree transducer based program transformations for Haskell+
, 2001
"... This document is intended as a first introduction to the programs of the Haskell+ group on implementing program transformations for functional programs (currently constituted by Armin Kühnemann, Rainer Vater, Janis Voigtländer and Andreas Maletti, previous work done by Christian Lescher and Matthias ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
This document is intended as a first introduction to the programs of the Haskell+ group on implementing program transformations for functional programs (currently constituted by Armin Kühnemann, Rainer Vater, Janis Voigtländer and Andreas Maletti, previous work done by Christian Lescher and Matthias Höff). It is not self-contained as the program transformations are not described formally here, but references to the literature are given where appropriate. The system is based on the Haskell+ language for extending Haskell by macro attribute grammars (which are an extension of attribute grammars). This functional programming language is used for specifying different kinds of tree transducers as known from the literature. Several constructions for results from tree transducer theory are implemented in Haskell as transformations on Haskell+ programs. There is as yet just a rudimentary user interface, so this document will focus on implementation issues by describing the involved Haskell modules in short and giving hints for further implementation work. For illustrating the implemented program transformations, we will give a simple example each, as well as a complex example at the end, which makes combined use of several transformations. In

