Model QP PCD
Model QP PCD
21.04.15
Subject
Code
CS2352
CSE
Part A
10*2=20
5*16=80
11. (a) (i) What are the various phases of the compiler? Explain each phase in detail.(8)
(ii) Briefly explain the compiler construction tools. (8)
OR
11. (b) (i) What are the issues in lexical analysis? (8)
(ii)Elaborate in detail the recognition of tokens. (8)
12. (a) (i) Construct the predictive parser for the following grammar. (8)
S->(L)/a
L->L,S/S
(ii)Describe the conflicts that may occur during shift reduce parsing. (8)
OR
12. (b) (i)Explain the detail about the specification of a simple type checker. (8)
(ii)How to subdivide a run-time memory into code and data areas. Explain(8).
13. (a) (i) Describe the various types of three address statements. (8)
(ii)How names can be looked up in the symbol table? Discuss. (8)
OR
13. (b) (i)Discuss the different methods for translating Boolean expressions in detail. (8)
(ii) Explain the following grammar for a simple procedure call statement S->call id
(enlist). (8)
SCE/AMC 1.14
Rev 0.0
01.01.2015
14. (a) (i) Explain in detail about the various issues in design of code generator. (8)
(ii)Write an algorithm to partition a sequence of three address statements into basic
blocks. (8)
OR
14. (b) (i)Explain the code-generation algorithm in detail. (12)
(ii)Construct the dag for the following basic block. (4)
d: =b*c
e: = a +b
b: =b*c
a: =e-d
15. (a) (i) Explain the principle sources of optimization in detail. (8)
(ii)Discuss the various peephole optimization techniques in detail. (8)
OR
15. (b) (i) How to trace data-flow analysis of structured program? (8)
(ii) Explain the common sub expression elimination, copy propagation, and
transformation for moving loop
invariant computations in detail. (8)
Prepared by
Verified by
K.Uma Maheswari
J.Sathish Kumar
Faculty
HD
Sign:
Name:
SCE/AMC 1.14
Rev 0.0
01.01.2015