Acta Informatica

, Volume 31, Issue 8, pp 741–760 | Cite as

Tree automata for code selection

  • Christian Ferdinand
  • Helmut Seidl
  • Reinhard Wilhelm


We deal with the generation of code selectors in compiler backends. The fundamental concepts are systematically derived from the theory of regular tree grammars and finite tree automata. We use this general approach to construct algorithms that generalize and improve existing methods.


Information System Operating System Data Structure Communication Network Information Theory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Aho, A.V., Ganapathi, M.: Efficient tree pattern matching: an aid to code generation. In: Proc. of the 12th ACM Symp. on Principles of Programming Languages, 1985, pp. 334–340Google Scholar
  2. [2]
    Börstler, J., Möncke, U., Wilhelm R.: Table compression for free automata. In: ACM Trans. Programm. Lang. Syst.13(3), 295–314 (1991)Google Scholar
  3. [3]
    Chase, D.R.: An improvement to bottom-up tree pattern matching. In: Proc. of 14th ACM Symposium on Principles of Programming Languages, 1987, pp. 168–177Google Scholar
  4. [4]
    Dauchet, M., Deruyver, A.: Compilation of ground term rewriting systems and applications. In: Dershowitz (ed.) Proceedings of the Conference: Rewriting Techniques and Applications. (Lect. Notes Comput. Sci., vol. 355, pp. 556–558) Berlin, Heidelberg, New York: Springer 1989Google Scholar
  5. [5]
    Downey, P.J., Sethi, R., Tarjan, E.R.: Variations on the common subexpression problem. In: J. ACM27, 758–771 (1980)Google Scholar
  6. [6]
    Emmelmann, H.: Code selection by regularly controlled term rewriting. In: Giegerich, R., Graham, S.L. (eds.) Code generation-concepts, tools, techniques. (Workshops in Computing Series), pp. 3–29) Berlin, Heidelberg, New York: Springer 1991Google Scholar
  7. [7]
    Ferdinand, C.: Pattern matching in a functional transformation language using treeparsing. In: Deransart, P., Maluszyński J. (eds.) Proceedings of the Workshop: Programming Language Implementation and Logic Programming (Lect. Notes Comput Sci., vol. 465, pp. 358–371) Berlin, Heidelberg, New York: Springer 1990Google Scholar
  8. [8]
    Gecseg, F., Steinby, M.: Tree automata. Budapest: Akademiai Kiado 1984)Google Scholar
  9. [9]
    Giegerich, R.: Code selection by inversion of order-sorted derivors. Theor. Comput. Sci.73, 177–211Google Scholar
  10. [10]
    Giegerich, R., Schmal, K.: Code selection techniques: pattern matching, tree parsing, and inversion of derivors. In: Ganzinger, H. (ed.) ESOP 88 (Lect. Notes Comput. Sci., vol. 300, pp. 247–268) Berlin, Heidelberg, New York, Springer 1988Google Scholar
  11. [11]
    Glanville, R.S.: A machine independent algorithm for code generation and its use in retargetable compilers. Ph.D. Thesis, University of California, Berkeley, 1977Google Scholar
  12. [12]
    Glanville, R.S., Graham, S.L.: A new method for compiler code generation. In: Proceedings of the 5th ACM Symposium on Principles of Programming Languages, 1978, pp. 231–240Google Scholar
  13. [13]
    Gräf, A.: Left-to-right tree pattern matching. In: Book, R.V. (ed.) Rewriting techniques and applications (Lect. Notes Comput. Sci., vol. 488, pp. 323–334) Berlin, Heidelberg, New York: Springer 1991Google Scholar
  14. [14]
    Henry, R.R.: Graham-Glanville code generators. Ph.D. Thesis, University of California, Berkeley, 1984Google Scholar
  15. [15]
    Henry, R.R., Damron, P.C.: Algorithms for table-driven code generators using tree-pattern matching. Technical Report #89-02-03. University of Washington, Seattle, 1989Google Scholar
  16. [16]
    Henry, R.R., Damron, P.C.: Encoding optimal pattern selection in a table driven bottom-up tree-pattern matcher. Technical Report #89-02-04, University of Washington, Seattle, 1989Google Scholar
  17. [17]
    Hoffmann, D.M., O'Donnell, M.J.: Pattern matching in trees. J. ACM29(1), 68–95 (1982)Google Scholar
  18. [18]
    Kron, H.: Tree templates and subtree transformational grammars. Ph.D. Thesis, University of California, Santa Cruz, 1975Google Scholar
  19. [19]
    Mathis, N.: Weiterentwicklung eines Codeselektorgenerators und Anwendung auf den NSC32000. Diplomarbeit, Universität des Saarlandes, 1990Google Scholar
  20. [20]
    Möncke, U.: Simulating automata for weighted tree reductions. Technischer Bericht Nr. A10/87, Universität des Saarlandes, 1987Google Scholar
  21. [21]
    Nivat, M., Podelski, A. (eds.) Tree automata and languages. Amsterdam: Elsevier 1992Google Scholar
  22. [22]
    Möncke, U., Weisgerber, B., Wilhelm, R.: Generative support for transformational programming. In: ESPRIT: Status Report of Continuing Work. Brussels: Elsevier 1986Google Scholar
  23. [23]
    Pelegri-Llopart, E.: Rewrite systems, pattern matching, and code generation. Ph.D. Thesis, University of California, Berkeley, 1988Google Scholar
  24. [24]
    Pelegri-Llopart, E., Graham, S.L.: Optimal code generation for expression trees: an application of BURS theory. In: Proceedings of the 15th ACM Symposium on Principles of Programming Languages, 1988, San Diego, CA, pp. 294–308Google Scholar
  25. [25]
    Peper, C.: Generische Baumanalysatoren-Generatoren. Diplomarbeit Universität des Saarlandes, 1994Google Scholar
  26. [26]
    Ripken, K.: Formale Beschreibungen von Maschinen, Implementierungen und optimierender Maschinencode-Erzeugung aus attributierten Programmgraphen. Dissertation, TU München, 1977Google Scholar
  27. [27]
    Weisgerber, B., Wilhelm, R.: Two tree pattern matchers for code selection. In: Hammer, D. (ed.) Compiler compilers and high speed compilation (Lect. Notes Comput. Sci., vol. 371, pp. 215–229) Berlin, Heidelberg, New York: Springer, 1988Google Scholar

Copyright information

© Springer-Verlag 1994

Authors and Affiliations

  • Christian Ferdinand
    • 1
  • Helmut Seidl
    • 1
  • Reinhard Wilhelm
    • 1
  1. 1.FB 14-InformatikUniversität des SaarlandesSaarbrückenGermany

Personalised recommendations