Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
/EndSEM
B.E.(Information Technology) (SEM I)
Elective –II 414457 D
Compiler Construction (2015 Course)
------------------------------------------------------------------------------------------------
Instructions to candidates:
1) Figures to the right indicate full marks.
2) Assume suitable data if necessary.
Q.1 a) Obtain output of first three phases of compiler for following input string. [04]
p=e*10+c
b) Explain the algorithm of Mark-and-Sweep garbage collection. Derive the cost [08]
of garbage collection for it.
OR
Q.2 a) For the statement given below generate the intermediate code in the form of a [04]
quadruple, triple and indirect triple.
A=-P*(-Q+R)
b) Explain copying collection with a neat diagram. Write the algorithm for [08]
pointer forwarding.
Q.5 a) What are the different techniques used to speed-up dataflow analysis? [08]
b) What are reasons for variable aliases?Explain variable aliases based on type and [08]
based on flow.
OR
Q. 6.a) Expalin Explicit and Implicit parametric polymorphism with suitable examples [08]
in detail
b) Explain how type-checking for polymorphic language is done. [08]
Q.7 a) Compare Static Single Assignment with Classical Data-Flow analysis . [08]
b) Discuss following optimization with example. [08]
i) Dead-code Elimination and
ii) Code motion
OR
Q. 8.a) Explain how loop optimization is done w.r. t. Induction variable elimination. [08]
b) Write a algorithm to calculate dominators of flow graph. [08]
-----------------------------------------------------------------------------------------------