|
ABSTRACT
A Rewrite System is a collection of rewrite rules of the form &agr; &bgr; where &agr; and &bgr; are tree patterns. A rewrite system can be extended by associating a cost with each rewrite rule, and by defining the cost of a rewrite sequence as the sum of the costs of all the rewrite rules in the sequence. The REACHABILITY problem for a rewrite system R is, given an input tree T and a fixed goal tree G, to determine if there exists a rewrite sequence in R, rewriting T into G and, if so, to obtain one such sequence. The C-REACHABILITY problem is similar except that the obtained sequence must have minimal cost among all those sequences writing T into G.
This paper introduces a class of rewrite systems called Bottom-Up Rewrite Systems (BURS), and a table-driven algorithm to solve REACHABILITY for member of the class. This algorithm is then modified to solve C-REACHABILITY and specialized for a subclass of BURS so that all cost manipulation is encoded into the tables and is not performed explicitly at solving time. The subclass extends the simple machine grammars [AGH84], rewrite systems used to describe target machine architectures for code generation, by allowing additional types of rewrite rules such as commutativity transformations.
A table-driven code generator based on solving C-REACHABILITY has been implemented and tested with several machine descriptions. The code generator solves C-REACHABILITY faster than a comparable solver based on Graham-Glanville techniques [AGH84] (a non-optimal technique), yet requires only slightly larger tables. The code generator runs much faster than recent proposals to solve C-REACHABILITY that use pattern matching and deal with costs explicitly at solving time [AGT86, HeD87, WeW86]. The BURS theory generalizes and unifies the bottom-up approaches of Henry/Damron [HeD87] and Weisgerber/Wilhelm [WeW86].
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
AUJ77
|
|
 |
AGT86
|
|
 |
AGH84
|
Philippe Aigrain , Susan L. Graham , Robert R. Henry , Marshall Kirk McKusick , Eduardo Pelegri-Llopart, Experience with a Graham-Glanville style code generator, Proceedings of the 1984 SIGPLAN symposium on Compiler construction, p.13-24, June 17-22, 1984, Montreal, Canada
|
 |
Cha87
|
|
| |
GaJ80
|
|
 |
GIG78
|
|
| |
GrH84
|
S. L. Graham and R. R. Henry, "Machine Descriptions for Compiler Code Generation: Experience Since JCIT-3", IEEE 1984 Proceedings of the 4th Jerusalem Conference on Information Technology (.ICIT), Jerusalem, Israel, 1984.
|
| |
Hat85
|
|
 |
HaC
|
|
| |
Hen84
|
|
| |
Hen87
|
R. R. Henry, Personal Communication, August 1987.
|
| |
HeD87
|
R. R. Henry and P. C. D~tmron, "Code Generation Using Tree Pattern Matchers", Technical Report 87-02-04, University of Washington, February 10, 1987.
|
| |
Joh78
|
S. C. Johnson, YACC: Yet Another Compiler- Compiler, Bell Laboratories, Murray Hill, NJ, July 1978.
|
 |
KMP84
|
S. E. Keller , J. A. Perkins , T. F. Payton , S. P. Mardinly, Tree transformation techniques and experiences, Proceedings of the 1984 SIGPLAN symposium on Compiler construction, p.190-201, June 17-22, 1984, Montreal, Canada
|
 |
Pat85
|
|
| |
Pel87
|
E. Pelegri-Llopart, Tree Transformation Systems in Compiler Systems (tentative title), Phi) Dissertation, EECS-University of California, Berkeley, December 1987.
|
| |
Rip77
|
K. Ripken, "Formale Beschreibung yon Maschinen, Implementieurungen und optimierender Maschinencodeerzeugung aus attributierten Programmgraphen", PhD Dissertation, Technische Universitat Munchen, Munich, West Germany, July 1977.
|
| |
Tha73
|
J. W. Thatcher, "Tree Automata: An informal Survey", in Currents in the Theory of Computing, A. V. Aho (editor), Prentice Hall, Englewood Cliffs, NJ, 1973, 143-172.
|
| |
WeW86
|
B. Weisgerber and R. Wilhelm, Two Tree Pattern Matcher for Code Selection (Including Targeting), Technical Report, Universitat des Saarlandes, Saarbrucken, W. Germany, February 1986.
|
CITED BY 18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Kazuaki Ishizaki , Mikio Takeuchi , Kiyokuni Kawachiya , Toshio Suganuma , Osamu Gohda , Tatsushi Inagaki , Akira Koseki , Kazunori Ogata , Motohiro Kawahito , Toshiaki Yasue , Takeshi Ogasawara , Tamiya Onodera , Hideaki Komatsu , Toshio Nakatani, Effectiveness of cross-platform optimizations for a java just-in-time compiler, ACM SIGPLAN Notices, v.38 n.11, November 2003
|
|
|
Gert Goossens , Johan Van Praet , Dirk Lanneer , Werner Geurts , Augusli Kifli , Clifford Liem , Pierre G. Paulin, Embedded software in real-time signal processing systems: design technologies, Readings in hardware/software co-design, Kluwer Academic Publishers, Norwell, MA, 2001
|
|
|
Vivek Sarkar , Mauricio J. Serrano , Barbara B. Simons, Register-sensitive selection, duplication, and sequencing of instructions, Proceedings of the 15th international conference on Supercomputing, p.277-288, June 2001, Sorrento, Italy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|