Results 1 
6 of
6
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.
Macro Tree Translations of Linear Size Increase are MSO Definable
 SIAM J. Comput
, 2001
"... Abstract. The first main result is that if a macro tree translation is of linear size increase, i.e., if the size of every output tree is linearly bounded by the size of the corresponding input tree, then the translation is MSO definable (i.e., definable in monadic secondorder logic). This gives a ..."
Abstract

Cited by 16 (6 self)
 Add to MetaCart
Abstract. The first main result is that if a macro tree translation is of linear size increase, i.e., if the size of every output tree is linearly bounded by the size of the corresponding input tree, then the translation is MSO definable (i.e., definable in monadic secondorder logic). This gives a new characterization of the MSO definable tree translations in terms of macro tree transducers: they are exactly the macro tree translations of linear size increase. The second main result is that given a macro tree transducer, it can be decided whether or not its translation is MSO definable, and if it is then an equivalent MSO transducer can be constructed. Similar results hold for attribute grammars, which define a subclass of the macro tree translations.
Conditions for Efficiency Improvement by Tree Transducer Composition
 13th International Conference on Rewriting Techniques and Applications
, 2002
"... We study the question of efficiency improvement or deterioration for a semanticpreserving program transformation technique based on macro tree transducer composition. By annotating functional programs to reflect the internal property “computation time ” explicitly in the computed output, and by man ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
We study the question of efficiency improvement or deterioration for a semanticpreserving program transformation technique based on macro tree transducer composition. By annotating functional programs to reflect the internal property “computation time ” explicitly in the computed output, and by manipulating such annotations, we formally prove syntactic conditions under which the composed program is guaranteed to be more efficient than the original program, with respect to callbyneed reduction to normal form. The developed criteria can be checked automatically, and thus are suitable for integration into an optimizing functional compiler.
Syntactic Composition of TopDown Tree Transducers is Short Cut Fusion
, 2001
"... We compare two deforestation techniques: short cut fusion formalized in category theory and the syntactic composition of tree transducers. The former strongly depends on types and uses the parametricity property or free theorem whereas the latter makes no use of types at all and allows more general ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
We compare two deforestation techniques: short cut fusion formalized in category theory and the syntactic composition of tree transducers. The former strongly depends on types and uses the parametricity property or free theorem whereas the latter makes no use of types at all and allows more general compositions. We introduce the notion of a categorical transducer which is a generalization of a catamorphism and show a respective fusion result which is a generalization of the `acid rain theorem'. We prove the following main theorems: (i) The class of all categorical transducers builds a category where composition is fusion. (ii) The semantics of categorical transducers is a functor. (iii) The subclass of topdown categorical transducers is a subcategory. (iv) Syntactic composition of topdown tree transducers is equivalent to the fusion of topdown categorical transducers.
Programming macro tree transducers
 In WGP ’13
, 2013
"... A tree transducer is a set of mutually recursive functions transforming an input tree into an output tree. Macro tree transducers extend this recursion scheme by allowing each function to be defined in terms of an arbitrary number of accumulation parameters. In this paper, we show how macro tree tra ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
A tree transducer is a set of mutually recursive functions transforming an input tree into an output tree. Macro tree transducers extend this recursion scheme by allowing each function to be defined in terms of an arbitrary number of accumulation parameters. In this paper, we show how macro tree transducers can be concisely represented in Haskell, and demonstrate the benefits of utilising such an approach with a number of examples. In particular, tree transducers afford a modular programming style as they can be easily composed and manipulated. Our Haskell representation generalises the original definition of (macro) tree transducers, abolishing a restriction on finite state spaces. However, as we demonstrate, this generalisation does not affect compositionality.