Code Generation for a One-Register Machine

  • Authors:
  • John Bruno;Ravi Sethi

  • Affiliations:
  • Computer Science Department, The Pennsylvania State University, University Park, Pennsylvania;Computer Science Department, The Pennsylvania State University, University Park, Pennsylvania

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 1976

Quantified Score

Hi-index 0.01

Visualization

Abstract

The majority of computers that have been built have performed all computations in devices called accumulators, or registers. In this paper, it is shown that the problem of generating minimal-length code for such machines is hard in a precise sense; specifically it is shown that the problem is NP-complete. The result is true even when the programs being translated are arithmetic expressions. Admittedly, the expressions in question can become complicated.