The GATE Grind

GATE 2015 CS (CS2) – Question 27

Compiler Design · Code Optimization and Data Flow Analysis · 1 mark · Multiple choice

Match P: lexical analysis; Q: parsing; R: register allocation; S: expression evaluation. Techniques: 1 graph colouring; 2 DFA minimization; 3 postorder traversal; 4 production tree.

  1. P–2,Q–3,R–1,S–4
  2. P–2,Q–1,R–4,S–3
  3. P–2,Q–4,R–1,S–3
  4. P–2,Q–3,R–4,S–1

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) P–2,Q–4,R–1,S–3

Explanation

Lexical scanners use finite automata and DFA minimization, P–2. Parsing builds a production/parse tree, Q–4. Register allocation colours an interference graph, R–1. Expression trees are evaluated by postorder traversal, S–3. Thus C.

More Code Optimization and Data Flow Analysis questions

All Code Optimization and Data Flow Analysis questions →