Abstract
We study the question of efficiency improvement or deterioration for a semantic-preserving 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 call-by-need reduction to normal form. The developed criteria can be checked automatically, and thus are suitable for integration into an optimizing functional compiler.
Research supported by the DFG under grant KU 1290/2-1.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. J. ACM, 24:44–67, 1977.
W.N. Chin. Safe fusion of functional expressions II: Further improvements. J. Funct. Prog., 4:515–555, 1994.
N. Dershowitz and J.P. Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B, chapter 6, pages 243–320. Elsevier Science Publishers B.V., 1990.
J. Engelfriet and H. Vogler. Macro tree transducers. J. Comput. Syst. Sci., 31:71–145, 1985.
Z. Fülöp and H. Vogler. Syntax-Directed Semantics—Formal Models Based on Tree Transducers. Monographs in Theoretical Computer Science. Springer-Verlag, 1998.
M. Höff. Vergleich von Verfahren zur Elimination von Zwischenergebnissen bei funktionalen Programmen. Master thesis, Dresden University of Technology, 1999.
A. Kühnemann. Benefits of tree transducers for optimizing functional programs. In Foundations of Software Technology & Theoretical Computer Science, Chennai, India, Proceedings, volume 1530 of LNCS, pages 146–157. Springer-Verlag, 1998.
A. Kühnemann. Comparison of deforestation techniques for functional programs and for tree transducers. In Functional and Logic Programming, Tsukuba, Japan, Proceedings, volume 1722 of LNCS, pages 114–130. Springer-Verlag, 1999.
A. Kühnemann and J. Voigtländer. Tree transducer composition as deforestation method for functional programs. Technical Report TUD-FI01-07, Dresden University of Technology, 2001.
M. Rosendahl. Automatic complexity analysis. In Functional Programming Languages and Computer Architecture, London, England, Proceedings, pages 144–156. ACM Press, 1989.
D. Sands. Total correctness by local improvement in the transformation of functional programs. ACM Trans. on Prog. Lang. and Systems, 18:175–234, 1996.
J. Voigtländer and A. Kühnemann. Composition of functions with accumulating parameters. Technical Report TUD-FI01-08, Dresden University of Technology, 2001. http://wwwtcs.inf.tu-dresden.de/~voigt/TUD-FI01-08.ps.gz.
P. Wadler. Deforestation: Transforming programs to eliminate trees. Theoret. Comput. Sci., 73:231–248, 1990.
C.P. Wadsworth. Semantics and Pragmatics of the Lambda Calculus. PhD thesis, Oxford University, 1971.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Voigtländer, J. (2002). Conditions for Efficiency Improvement by Tree Transducer Composition. In: Tison, S. (eds) Rewriting Techniques and Applications. RTA 2002. Lecture Notes in Computer Science, vol 2378. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45610-4_16
Download citation
DOI: https://doi.org/10.1007/3-540-45610-4_16
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43916-5
Online ISBN: 978-3-540-45610-0
eBook Packages: Springer Book Archive