0% found this document useful (0 votes)
44 views

Model QP PCD

This document contains a model exam for the subject Principles of Compiler Design. The exam will take place on April 21st, 2015 from 10:00 AM to 1:00 PM for third and sixth semester CSE students. It contains 2 parts - Part A contains 10 multiple choice questions worth 2 marks each and Part B contains 5 descriptive questions worth 16 marks each. The questions cover topics like the phases of a compiler, lexical analysis, parser construction, syntax analysis, symbol tables, code generation, optimization techniques, and data flow analysis. The exam is prepared by faculty member K.Uma Maheswari and verified by the Head of Department J.Sathish Kumar.

Uploaded by

UmaMaheswari
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Model QP PCD

This document contains a model exam for the subject Principles of Compiler Design. The exam will take place on April 21st, 2015 from 10:00 AM to 1:00 PM for third and sixth semester CSE students. It contains 2 parts - Part A contains 10 multiple choice questions worth 2 marks each and Part B contains 5 descriptive questions worth 16 marks each. The questions cover topics like the phases of a compiler, lexical analysis, parser construction, syntax analysis, symbol tables, code generation, optimization techniques, and data flow analysis. The exam is prepared by faculty member K.Uma Maheswari and verified by the Head of Department J.Sathish Kumar.

Uploaded by

UmaMaheswari
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Vijayamangalam 638 056

Department: Computer Science and Engineering


Date: 16.04.2015
MODEL EXAM
Date of
Exam
Branch

21.04.15

Subject
Code

CS2352

CSE

Time & Duration of


10.00 A.M-01.00 P.M & 3 Hrs
Exam
Year &
III & VI
Max. marks:100
Semester
Subjects Name: Principles of Compiler Design

Part A

10*2=20

1. Mention few cousins of compiler.


2. What are the possible error recovery actions in lexical analyzer?
3. Define an ambiguous grammar.
4. What is dangling reference?
5. Why are quadruples preferred over triples in an optimizing compiler?
6. List out the motivations for back patching.
7. Define flow graph.
8. How to perform register assignment for outer loops?
9. What is the use of algebraic identities in optimization of basic blocks?
10. List out two properties of reducible flow graph?
Part B
Answer all the Questions

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

You might also like