INSTRUCTION SETS FOR EVALUATING ARITHMETIC EXPRESSIONS.

E. G. Coffman, Ravi Sethi

Research output: Contribution to journalArticle

1 Citation (Scopus)

Abstract

The evaluation of arithmetic expressions on both register-oriented and stack-oriented machines can be studied using the same model because registers can be treated as a stack during the evaluation of expression trees, without loss in code efficiency. The machine model in this paper has a hardware stack in which all computations take place. Register-register and register-memory instructions are modeled by considering four possible instructions for each binary operator, depending on whether one or two operands are taken from the stack and on whether the left or the right operand is on top of the stack. There is a cost associated with each operation code, as well as costs for accessing a value in a register or in memory. The minimum cost of computing an expression tree is used to compare machines. As part of the framework that allows the comparisons to be performed, a parameterized algorithm for determining the number of stores that must occur in an optimal computation is developed. This algorithm forms the basis of an optimal code generation algorithm.

Original languageEnglish (US)
Pages (from-to)457-478
Number of pages22
JournalJournal of the ACM
Volume30
Issue number3
DOIs
StatePublished - Jul 1983
Externally publishedYes

Fingerprint

Data storage equipment
Costs
Parameterized Algorithms
Optimal Codes
Code Generation
Hardware
Evaluation
Binary
Computing
Operator
Model
Code generation
Form
Framework

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Computer Graphics and Computer-Aided Design
  • Hardware and Architecture
  • Information Systems
  • Software
  • Theoretical Computer Science

Cite this

INSTRUCTION SETS FOR EVALUATING ARITHMETIC EXPRESSIONS. / Coffman, E. G.; Sethi, Ravi.

In: Journal of the ACM, Vol. 30, No. 3, 07.1983, p. 457-478.

Research output: Contribution to journalArticle

Coffman, E. G. ; Sethi, Ravi. / INSTRUCTION SETS FOR EVALUATING ARITHMETIC EXPRESSIONS. In: Journal of the ACM. 1983 ; Vol. 30, No. 3. pp. 457-478.
@article{6d10fea3c3af4de99f9b80a86e3e10a4,
title = "INSTRUCTION SETS FOR EVALUATING ARITHMETIC EXPRESSIONS.",
abstract = "The evaluation of arithmetic expressions on both register-oriented and stack-oriented machines can be studied using the same model because registers can be treated as a stack during the evaluation of expression trees, without loss in code efficiency. The machine model in this paper has a hardware stack in which all computations take place. Register-register and register-memory instructions are modeled by considering four possible instructions for each binary operator, depending on whether one or two operands are taken from the stack and on whether the left or the right operand is on top of the stack. There is a cost associated with each operation code, as well as costs for accessing a value in a register or in memory. The minimum cost of computing an expression tree is used to compare machines. As part of the framework that allows the comparisons to be performed, a parameterized algorithm for determining the number of stores that must occur in an optimal computation is developed. This algorithm forms the basis of an optimal code generation algorithm.",
author = "Coffman, {E. G.} and Ravi Sethi",
year = "1983",
month = "7",
doi = "10.1145/2402.322388",
language = "English (US)",
volume = "30",
pages = "457--478",
journal = "Journal of the ACM",
issn = "0004-5411",
publisher = "Association for Computing Machinery (ACM)",
number = "3",

}

TY - JOUR

T1 - INSTRUCTION SETS FOR EVALUATING ARITHMETIC EXPRESSIONS.

AU - Coffman, E. G.

AU - Sethi, Ravi

PY - 1983/7

Y1 - 1983/7

N2 - The evaluation of arithmetic expressions on both register-oriented and stack-oriented machines can be studied using the same model because registers can be treated as a stack during the evaluation of expression trees, without loss in code efficiency. The machine model in this paper has a hardware stack in which all computations take place. Register-register and register-memory instructions are modeled by considering four possible instructions for each binary operator, depending on whether one or two operands are taken from the stack and on whether the left or the right operand is on top of the stack. There is a cost associated with each operation code, as well as costs for accessing a value in a register or in memory. The minimum cost of computing an expression tree is used to compare machines. As part of the framework that allows the comparisons to be performed, a parameterized algorithm for determining the number of stores that must occur in an optimal computation is developed. This algorithm forms the basis of an optimal code generation algorithm.

AB - The evaluation of arithmetic expressions on both register-oriented and stack-oriented machines can be studied using the same model because registers can be treated as a stack during the evaluation of expression trees, without loss in code efficiency. The machine model in this paper has a hardware stack in which all computations take place. Register-register and register-memory instructions are modeled by considering four possible instructions for each binary operator, depending on whether one or two operands are taken from the stack and on whether the left or the right operand is on top of the stack. There is a cost associated with each operation code, as well as costs for accessing a value in a register or in memory. The minimum cost of computing an expression tree is used to compare machines. As part of the framework that allows the comparisons to be performed, a parameterized algorithm for determining the number of stores that must occur in an optimal computation is developed. This algorithm forms the basis of an optimal code generation algorithm.

UR - http://www.scopus.com/inward/record.url?scp=0020781832&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0020781832&partnerID=8YFLogxK

U2 - 10.1145/2402.322388

DO - 10.1145/2402.322388

M3 - Article

AN - SCOPUS:0020781832

VL - 30

SP - 457

EP - 478

JO - Journal of the ACM

JF - Journal of the ACM

SN - 0004-5411

IS - 3

ER -