Machine-translated by Google. Questions are authored in English.
Top

Discussion

A phase of a compiler is distinguished from a pass in that a phase

  • A.always corresponds to exactly one reading of the source program
  • B.operates only on the front end while a pass covers the back end
  • C.is defined by the language standard while a pass is chosen freely
  • D.is a logical stage while a pass is one complete reading of the input

Answer: D

Correct answer: is a logical stage while a pass is one complete reading of the input

A phase is a conceptual division of the translation - lexical, syntax, semantic and so on. A pass is a physical one: one complete traversal of the program's representation.

The two need not correspond. Several phases are commonly folded into a single pass to avoid writing intermediate forms to disk, and one phase may occasionally need more than one pass. Confusing them is the standard error, and the question turns on nothing else.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.