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. 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.
CITATION STYLE
Voigtländer, J., & Kühnemann, A. (2004). Composition of functions with accumulating parameters. Journal of Functional Programming, 14(3), 317–363. https://doi.org/10.1017/S0956796803004933
Mendeley helps you to discover research relevant for your work.