Code Generation = A* + BURS

A system called BURS that is based on term rewrite systems and a search algorithm A* are combined to produce a code generator that generates optimal code. The theory underlying BURS is re-developed, formalised and explained in this work. The search algorithm uses a cost heuristic that is derived from the termrewrite system to direct the search. The advantage of using a search algorithm is that we need to compute only those costs that may be part of an optimal rewrite sequence.

[1]  Christoph M. Hoffmann,et al.  Pattern Matching in Trees , 1982, JACM.

[2]  Nils J. Nilsson,et al.  A Formal Basis for the Heuristic Determination of Minimum Cost Paths , 1968, IEEE Trans. Syst. Sci. Cybern..

[3]  Joost-Pieter Katoen,et al.  Bottum-up tree acceptors , 1988 .

[4]  Thomas W. Christopher,et al.  High-quality code generation via bottom-up tree pattern matching , 1986, POPL '86.

[5]  David R. Chase,et al.  An improvement to bottom-up tree pattern matching , 1987, POPL '87.

[6]  Thomas W. Christopher,et al.  Using dynamic programming to generate optimized code in a Graham-Glanville style code generator , 1984, SIGPLAN '84.

[7]  Hans H. Kron,et al.  Tree templates and subtree transformational grammars. , 1975 .

[8]  R. G. G. Cattell,et al.  Automatic Derivation of Code Generators from Machine Descriptions , 1980, TOPL.

[9]  Nils J. Nilsson,et al.  Problem-solving methods in artificial intelligence , 1971, McGraw-Hill computer science series.

[10]  Eduardo Pelegrí-Llopart,et al.  Optimal code generation for expression trees: an application BURS theory , 1988, POPL '88.

[11]  Helmut Emmelmann,et al.  BEG: a generator for efficient back ends , 1989, PLDI '89.

[12]  Christopher W. Fraser,et al.  Engineering a simple, efficient code-generator generator , 1992, LOPL.

[13]  Robert Giegerich Code Selection by Inversion of Order-Sorted Derivors , 1990, Theor. Comput. Sci..

[14]  Roderic Geoffrey Galton Cattell,et al.  Formalization and Automatic Derivation of Code Generators , 1982 .

[15]  Robert E. Tarjan,et al.  More Efficient Bottom-Up Multi-Pattern Matching in Trees , 1992, Theor. Comput. Sci..

[16]  Robert Giegerich,et al.  Code Selection Techniques: Pattern Matching, Tree Parsing, and Inversion of Derivors , 1988, ESOP.

[17]  Nils J. Nilsson,et al.  Principles of Artificial Intelligence , 1980, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[18]  Bruce R. Schatz,et al.  An Overview of the Production-Quality Compiler-Compiler Project , 1980, Computer.

[19]  Eduardo Pelegri-Llopart,et al.  Rewrite systems, pattern matching, and code generation , 1988 .

[20]  Todd A. Proebsting BURS automata generation , 1995, TOPL.

[21]  Helmut Emmelmann Code Selection by Regularly Controlled Term Rewriting , 1991, Code Generation.

[22]  R. G. G. Cattell,et al.  Code generation in a machine-independent compiler , 1979, SIGPLAN '79.

[23]  Reinhard Wilhelm,et al.  Two Tree Pattern Matchers for Code Selection , 1988, CC.

[24]  Christopher W. Fraser,et al.  BURG: fast optimal instruction selection and tree parsing , 1992, SIGP.

[25]  Wen-mei W. Hwu,et al.  Inline function expansion for compiling C programs , 1989, PLDI '89.

[26]  Jean-Pierre Jouannaud,et al.  Rewrite Systems , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[27]  Joost-Pieter Katoen,et al.  Code generation based on formal BURS theory and heuristic search , 1997, Acta Informatica.

[28]  Dhananjay M. Dhamdhere,et al.  Efficient Retargetable Code Generation Using Bottom-up Tree Pattern Matching , 1990, Comput. Lang..

[29]  Vipin Kumar,et al.  Search in Artificial Intelligence , 1988, Symbolic Computation.

[30]  Alfred V. Aho,et al.  Code generation using tree matching and dynamic programming , 1989, ACM Trans. Program. Lang. Syst..