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

Discussion

A directed acyclic graph used as an intermediate representation differs from a syntax tree by

  • A.sharing a single node between identical subexpressions
  • B.removing all the operator nodes from the structure
  • C.allowing cycles that represent loops in the program
  • D.recording the order in which operations must execute

Answer: A

Common subexpressions are identified by construction, since a node is reused rather than duplicated. This makes the graph a natural vehicle for local common subexpression elimination. The sharing happens as a side effect of building the structure at all.

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

Post your comment

Please log in or register to post a comment.