ACM Home Page
Please provide us with feedback. Feedback
The Generation of Optimal Code for Arithmetic Expressions
Full text PdfPdf (889 KB)
Source Journal of the ACM (JACM) archive
Volume 17 ,  Issue 4  (October 1970) table of contents
Pages: 715 - 728  
Year of Publication: 1970
ISSN:0004-5411
Authors
Ravi Sethi  Department of Electrical Engineering, Princeton University, Princeton, N.J. and Bell Telephone Laboratories, Inc., Murray Hill, New Jersey
J. D. Ullman  Department of Electrical Engineering, Princeton University, Princeton, N.J. and Bell Telephone Laboratories, Inc., Murray Hill, New Jersey
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 25,   Downloads (12 Months): 128,   Citation Count: 74
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/321607.321620
What is a DOI?

ABSTRACT

The problem of evaluating arithmetic expressions on a machine with N ≥ 1 general purpose registers is considered. It is initially assumed that no algebraic laws apply to the operators and operands in the expression. An algorithm for evaluation of expressions under this assumption is proposed, and it is shown to take the shortest possible number of instructions. It is then assumed that certain operators are commutative or both commutative and associative. In this case a procedure is given for finding an expression equivalent to a given one and having the shortest possible evaluation sequence. It is then shown that the algorithms presented here also minimize the number of storage references in the evaluation.



CITED BY  74

Collaborative Colleagues:
Ravi Sethi: colleagues
J. D. Ullman: colleagues