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

Discussion

A cycle in the dependency graph of an annotated parse tree means

  • A.the grammar is ambiguous and must be rewritten
  • B.the definition is L-attributed rather than S-attributed
  • C.evaluation will simply take longer than usual to complete
  • D.the attributes cannot be evaluated in any order at all

Answer: D

Correct answer: the attributes cannot be evaluated in any order at all

A cycle means each attribute in it needs one of the others before it can be computed, so no ordering exists - the definition is circular and not merely slow. It is a defect in the definition rather than in the grammar, so rewriting the grammar is not the remedy.

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

Post your comment

Please log in or register to post a comment.