We present a technique to prevent the construction of intermediate data structures in functional programs, which is based on results from the theory of tree transducers. We first decompose function definitions, which correspond to macro tree transducers, into smaller pieces. Under certain restrictions these pieces can be composed to an attributed tree transducer using a composition result for attribute grammars. The same construction can be used to compose the attributed tree transducers, which represent the initial function definitions.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Correnson, L., Duris, E., Parigot, D., Roussel, G.: Symbolic composition. Technical Report 3348, INRIA, France (1998)Google Scholar
  2. 2.
    Courcelle, B., Franchi-Zannettacci, P.: Attribute grammars and recursive program schemes. Theoret. Comput. Sci. 17, 163–191, 235–257 (1982)CrossRefMathSciNetGoogle Scholar
  3. 3.
    Duris, E., Parigot, D., Roussel, G., Jourdan, M.: Attribute grammars and folds: generic control operators. Technical Report 2957, INRIA, France (1996)Google Scholar
  4. 4.
    Engelfriet, J.: Some open questions and recent results on tree transducers and tree languages. In: Book, R.V. (ed.) Formal language theory; perspectives and open problems, pp. 241–286. Academic Press, New York (1980)Google Scholar
  5. 5.
    Engelfriet, J.: Tree transducers and syntax directed semantics. Technical Report Memorandum 363, Technische Hogeschool Twente (1981) Google Scholar
  6. 6.
    Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comp. Syst. Sci. 31, 71–145 (1985)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Fülöp, Z.: On attributed tree transducers. Acta Cybernetica 5, 261–279 (1981)zbMATHGoogle Scholar
  8. 8.
    Ganzinger, H.: Increasing modularity and language-independency in automatically generated compilers. Science of Computer Programming 3, 223–278 (1983)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Ganzinger, H., Giegerich, R.: Attribute coupled grammars. Symposium on Compiler Construction. In: SIGPLAN Notices, vol. 19(6), pp. 157–170 (1984)Google Scholar
  10. 10.
    Giegerich, R.: Composition and evaluation of attribute coupled grammars. Acta Informatica 25, 355–423 (1988)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Johnsson, T.: Attribute grammars as a functional programming paradigm. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 154–173. Springer, Heidelberg (1987)Google Scholar
  12. 12.
    Knuth, D.E.: Semantics of context–free languages. Math. Syst. Th. 2, 127–145 (1968) Corrections in Math. Syst. Th.  5, 95–96 (1971)Google Scholar
  13. 13.
    Kühnemann, A.: Berechnungsstärken von Teilklassen primitiv-rekursiver Programmschemata. PhD thesis, Technical Univ. of Dresden, Shaker Verlag (1997) Google Scholar
  14. 14.
    Kühnemann, A., Vogler, H.: Synthesized and inherited functions - a new computational model for syntax-directed semantics. Acta Informatica 31, 431–477 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Rounds, W.C.: Mappings and grammars on trees. Math. Syst.Th. 4, 257–287 (1970)zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Seidl, H., Sørensen, M.H.: Constraints to stop higher-order deforestation. In: POPL 1997, Paris, pp. 400–413. ACM Press, New York (1997)CrossRefGoogle Scholar
  17. 17.
    Thatcher, J.W.: Generalized2 sequential machine maps. J. Comp. Syst. Sci. 4, 339–367 (1970)zbMATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Wadler, P.: Deforestation: Transforming programs to eliminate trees. Theor. Comp. Sci. 73, 231–248 (1990)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Armin Kühnemann
    • 1
  1. 1.Grundlagen der Programmierung, Institut für Softwaretechnik I Fakultät InformatikTechnische Universität, DresdenDresdenGermany

Personalised recommendations