Which of the following statements is strictly TRUE regarding the attribute dependency graph for a specific parse tree in a syntax-directed definition?
B
Step-by-Step Solution
Key idea: The dependency graph is dynamic (per parse tree) and must be acyclic to allow valid evaluation.
Step 1: The graph is constructed for each specific parse tree, not statically for the grammar (eliminates option A).
Step 2: A directed edge from X to Y means Y depends on X, so X must be evaluated before Y. This matches option B.
Step 3: The graph must never contain cycles; a cycle means the attributes cannot be evaluated (eliminates option C).
Step 4: The graph maps dependencies for both synthesized and inherited attributes (eliminates option D).
Answer: A directed edge from node X to node Y indicates that the semantic rule for Y requires the value of X.