GATE Computer ScienceModerateGATE CS (PYQ pattern)
Which of the following about iterative data-flow analyses is/are true? I. Live-variable analysis is a backward problem whose meet operator is union. II. Available-expressions analysis is a forward problem whose meet operator is intersection. III. Reaching definitions is a forward problem whose meet operator is intersection. IV. Very-busy (anticipated) expressions is a backward problem whose meet operator is intersection.
- A. I, II and IV only
- B. I, II and III only
- C. II, III and IV only
- D. I and IV only
Correct answer: A. I, II and IV only
Reaching definitions is a 'may' problem, so it uses union (III is false); available and very-busy expressions are 'must' problems and use intersection; live variables is a backward 'may' problem.
More Compiler Design questions
- For the code 1: x = 0; 2: y = 1; 3: L1: if x > n goto L4; 4: if y > m goto L2; 5: y = y + x; 6: goto L3; 7: L2: x = x + 2; 8: L3: x = x +…
- For the grammar S → A B; A → a | ε; B → A b | c, what is FOLLOW(A)?
- Expressions are compared textually and an assignment to an operand kills the expressions that use it. Which expressions are available on…
- A scanner (longest match, ties to the earlier rule) has rules: COMMENT = //[^newline]; STR = "[^"]"; DIV = /; EQ = ==; ASSIGN = =; ID =…
- SDD for S → ( S1 S2 ) | a: the inherited attribute S.n is 1 at the root, and for S → ( S1 S2 ) the rules are S1.n = 2 × S.n and S2.n = 2 ×…
- Minimal SSA form (φ-functions placed at the iterated dominance frontier of each variable's definition blocks, without liveness pruning…