## Comparison of Deforestation Techniques for Functional Programs and for Tree Transducers (1999)

### Cached

### Download Links

- [wwwtcs.inf.tu-dresden.de]
- [www.orchid.inf.tu-dresden.de]
- [www.orchid.inf.tu-dresden.de]
- DBLP

### Other Repositories/Bibliography

Venue: | In FLOPS'99 |

Citations: | 20 - 5 self |

### BibTeX

@INPROCEEDINGS{Kühnemann99comparisonof,

author = {Armin Kühnemann},

title = {Comparison of Deforestation Techniques for Functional Programs and for Tree Transducers},

booktitle = {In FLOPS'99},

year = {1999},

pages = {114--130},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

We compare transformations for the elimination of intermediate results in first-order functional programs. We choose the well known deforestation technique of Wadler and composition techniques from the theory of tree transducers, of which the implementation of functional programs yet does not take advantage. We identify syntactic classes of function definitions for which both techniques deliver equally efficient results and for which one technique is more powerful than the other.

### Citations

581 | A Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1977
(Show Context)
Citation Context ...ar(e 2 ); t v 2 TCp 1 ], nf () p1 ; e 1 oe) = nf () p2 ; e 2 oe): 2 4 Deforestation The (classical) deforestation technique [20, 5] can be seen as algorithmic instance of the fold/unfold-technique in =-=[1]-=-. The presentation of deforestation in Transformation 4.1 obeys the syntax of our language P and is similar to e.g. [18]. Deforestation mimics call-by-name reduction steps (unfold-steps) on expression... |

466 | Semantics of context-free languages
- Knuth
(Show Context)
Citation Context ...al deforestation and cheap deforestation is performed. On the other hand we would like to inspect composition methods for attributed tree transducers [6], which are abstractions of attribute grammars =-=[14]-=-. Such composition results were presented e.g. in [6, 8, 9]. They can also be used for the composition of a restricted class of mtts [15]. For the intended comparison, we consider macro attributed tre... |

414 | Deforestation: transforming programs to eliminate trees
- Wadler
- 1990
(Show Context)
Citation Context ...rmediate results are structured objects like lists or trees. There are several techniques for transforming programs which use intermediate results into programs which do not. We compare deforestation =-=[20, 5]-=-, which is a well known optimization technique for functional programs, with some composition techniques from the theory of tree transducers [7]. The comparison is restricted to the twofold compositio... |

293 | Why Functional Programming Matters
- Hughes
- 1989
(Show Context)
Citation Context ...unctions, where functions produce intermediate results, which are consumed by other functions. On the one hand this modular style of programming simplifies the design and the verification of programs =-=[13]-=-. On the other hand the production and consumption of intermediate results can cause inefficiencies, in particular, if the intermediate results are structured objects like lists or trees. There are se... |

199 | A short cut to deforestation
- Gill, Launchbury, et al.
- 1993
(Show Context)
Citation Context ... and composition. Other methods for the elimination of intermediate results should be integrated into the comparison. Therefore, on the one hand we want to analyze Short Cut (or: Cheap) Deforestation =-=[11]-=-. In [10] already an informal comparison between classical deforestation and cheap deforestation is performed. On the other hand we would like to inspect composition methods for attributed tree transd... |

121 |
Mappings and grammars on trees
- Rounds
- 1970
(Show Context)
Citation Context ...contain recursive function calls, where the first argument of a function call is a variable that refers to a subtree of t. If every function of m has rank 1, then m is called top-down tree transducer =-=[17, 19]-=- (for short tdtt). Throughout this paper we will use the following mtts m app , m rev , m mir , and m ex as examples, where m ex is a tdtt. m app : app (A x 1 ) y 1 = A (app x 1 y 1 ) m mir : mir (A x... |

110 |
Macro tree transducers
- Engelfriet, Vogler
- 1985
(Show Context)
Citation Context ...ecursion, in which additionally simultaneous definitions of functions and nesting of terms in parameter positions are allowed. This scheme is called macro tree transducer [3] (for short mtt; cf. also =-=[2, 4]-=-). An mtt m translates trees over a ranked alphabet of input symbols into trees over a ranked alphabet of output symbols. For this translation process, m uses a ranked alphabet of functions which have... |

69 |
Syntax-directed semantics: Formal models based on tree transducers
- Fülöp, Vogler
- 1998
(Show Context)
Citation Context ...nto programs which do not. We compare deforestation [20, 5], which is a well known optimization technique for functional programs, with some composition techniques from the theory of tree transducers =-=[7]-=-. The comparison is restricted to the twofold composition of first-order functions, which are defined by an extended scheme of primitive recursion, in which additionally simultaneous definitions of fu... |

65 | Cheap deforestation for non-strict functional languages
- Gill
- 1996
(Show Context)
Citation Context ...osition. Other methods for the elimination of intermediate results should be integrated into the comparison. Therefore, on the one hand we want to analyze Short Cut (or: Cheap) Deforestation [11]. In =-=[10]-=- already an informal comparison between classical deforestation and cheap deforestation is performed. On the other hand we would like to inspect composition methods for attributed tree transducers [6]... |

57 |
Attribute grammars and recursive program schemes I
- Courcelle, Franchi-Zannettacci
- 1982
(Show Context)
Citation Context ...ecursion, in which additionally simultaneous definitions of functions and nesting of terms in parameter positions are allowed. This scheme is called macro tree transducer [3] (for short mtt; cf. also =-=[2, 4]-=-). An mtt m translates trees over a ranked alphabet of input symbols into trees over a ranked alphabet of output symbols. For this translation process, m uses a ranked alphabet of functions which have... |

51 |
On attributed tree transducers
- Fülöp
- 1980
(Show Context)
Citation Context ...10] already an informal comparison between classical deforestation and cheap deforestation is performed. On the other hand we would like to inspect composition methods for attributed tree transducers =-=[6]-=-, which are abstractions of attribute grammars [14]. Such composition results were presented e.g. in [6, 8, 9]. They can also be used for the composition of a restricted class of mtts [15]. For the in... |

50 |
Composition and evaluation of attribute coupled grammars
- Giegerich
- 1988
(Show Context)
Citation Context ... On the other hand we would like to inspect composition methods for attributed tree transducers [6], which are abstractions of attribute grammars [14]. Such composition results were presented e.g. in =-=[6, 8, 9]-=-. They can also be used for the composition of a restricted class of mtts [15]. For the intended comparison, we consider macro attributed tree transducers [16] as suitable integration formalism. Ackno... |

47 |
Some open questions and recent results on tree transducers and tree languages
- Engelfriet
- 1980
(Show Context)
Citation Context ...rogram p 0 2 P + and a new initial expression e 0 for p 0 . We denote the transformation result (p 0 ; e 0 ) also by Def (p; e). (1) D[[v]] = v (2) D[[c t 1 : : : t k ]] = c D[[t 1 ]] : : : D[[t k ]] =-=(3)-=- D[[f (c t 1 : : : t k ) t 0 1 : : : t 0 n ]] = D[[rhs(f; c)[x i =t i ][y i =t 0 i ]]] (4) D[[f v t 0 1 : : : t 0 n ]] = e f v D[[t 0 1 ]] : : : D[[t 0 n ]] where e f (c 1 x 1 : : : x k1 ) y 1 : : : y... |

39 | Generalized sequential machine maps - Thatcher - 1970 |

32 | Benefits of tree transducers for optimizing functional programs
- Kuhnemann
- 1998
(Show Context)
Citation Context ... transducers [6], which are abstractions of attribute grammars [14]. Such composition results were presented e.g. in [6, 8, 9]. They can also be used for the composition of a restricted class of mtts =-=[15]-=-. For the intended comparison, we consider macro attributed tree transducers [16] as suitable integration formalism. Acknowledgment I would like to thank Morten Heine Srensen and Heiko Vogler for stim... |

27 |
Increasing modularity and language-independency in automatically generated compilers
- Ganzinger
- 1983
(Show Context)
Citation Context ... On the other hand we would like to inspect composition methods for attributed tree transducers [6], which are abstractions of attribute grammars [14]. Such composition results were presented e.g. in =-=[6, 8, 9]-=-. They can also be used for the composition of a restricted class of mtts [15]. For the intended comparison, we consider macro attributed tree transducers [16] as suitable integration formalism. Ackno... |

25 | Towards unifying partial evaluation, deforestation, supercompilation
- Sørensen, Glück, et al.
- 1994
(Show Context)
Citation Context ...ique [20, 5] can be seen as algorithmic instance of the fold/unfold-technique in [1]. The presentation of deforestation in Transformation 4.1 obeys the syntax of our language P and is similar to e.g. =-=[18]. Deforest-=-ation mimics call-by-name reduction steps (unfold-steps) on expressions with variables, i.e. with "values" which are unknown at transformation time. Therefore, deforestation defines new func... |

21 | When will deforestation stop
- Ferguson, Wadler
- 1988
(Show Context)
Citation Context ...: : :). The symbols v, c, f , and t (also with indices and apostrophes) range over the sets V , C p = fc 1 ; : : : ; c q g, F p , and T , respectively. The notation e f and g f 1 f 2 in rules (4) and =-=(5), respectively, refe-=-rs to a function f and f 1 f 2 , respectively, which either is constructed as specified behind "where" ("where" does not occur in the transformation result), or which was already c... |

20 |
Synthesized and inherited functions — a new computational model for syntax–directed semantics
- Kühnemann, Vogler
(Show Context)
Citation Context ...tion results were presented e.g. in [6, 8, 9]. They can also be used for the composition of a restricted class of mtts [15]. For the intended comparison, we consider macro attributed tree transducers =-=[16]-=- as suitable integration formalism. Acknowledgment I would like to thank Morten Heine Srensen and Heiko Vogler for stimulating discussions on deforestation and on tree transducers, respectively. Refer... |

20 | Towards unifying partial evaluation, deforestation, supercompilation, and GPC - S��rensen, Gluck, et al. - 1994 |

12 |
Extending deforestation for first order functional programs
- Hamilton, Jones
- 1992
(Show Context)
Citation Context ...esting of terms in parameter positions. To ensure termination of deforestation also on P , we assume that every context argument of a function application is implicitly abstracted by a let-expression =-=[20, 12]-=-, i.e. we handle (f x i t 1 : : : t n ) as if it were written like let v 1 = t 1 ; : : : ; vn = t n in (f x i v 1 : : : vn ). We do not choose explicit let-expressions, since this would expand the des... |

1 | Extending deforestation for order functional programs - Hamilton, Jones - 1992 |