ACM Home Page
Please provide us with feedback. Feedback
Optimal code generation for expression trees: an application BURS theory
Full text PdfPdf (1.39 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
San Diego, California, United States
Pages: 294 - 308  
Year of Publication: 1988
ISBN:0-89791-252-7
Authors
E. Pelegrí-Llopart  Computer Science Division, EECS Department, University of California, Berkeley
S. L. Graham  Computer Science Division, EECS Department, University of California, Berkeley
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 7,   Downloads (12 Months): 55,   Citation Count: 18
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/73560.73586
What is a DOI?

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
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
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

Collaborative Colleagues:
E. Pelegrí-Llopart: colleagues
S. L. Graham: colleagues