KIT052-COMPILER-DESIGN
KIT052-COMPILER-DESIGN
BTECH
(SEM V) THEORY EXAMINATION 2023-24
COMPILER DESIGN
TIME: 3 HRS M.MARKS: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1
13
e. Define the syntax directed definition (SDD) with suitable and simple 2 3
_2
example.
2.
P1
24
(a*c)+b*((c*a)+d)
4D
5.
g. Compare between static and dynamic scope rule. 2 4
.5
P2
|1
j. Compute the number of nodes in Directed Acyclic Graph (DAG) for the 2 5
following C code segment executed in the sequence:
7
a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f;
4
8:
:3
SECTION B
13
input: c = a*b+10
01
1|Page
QP24DP1_290 | 24-01-2024 13:38:47 | 117.55.242.131
Printed Page: 2 of 2
Subject Code: KIT052
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
BTECH
(SEM V) THEORY EXAMINATION 2023-24
COMPILER DESIGN
TIME: 3 HRS M.MARKS: 100
SECTION C
3. Attempt any one part of the following:
a. Construct minimized DFA: 10 1
1
a. Construct parsing table for the following grammar using LALR parser: 10 2
13
S -> CC C -> aC | b
_2
2.
b. Verify that the following grammar is LL (1) 10 2
P1
24
5. Attempt any one part of the following:
4D
5.
a.
.5
Consider the following grammar and give the syntax directed definition 10 3
P2
b. Determine the quadruples, triples, and indirect triples for the following 10 3
8:
a. Explain the run-time storage allocation strategies with their merits and 10 4
limitations.
4
02
a. Explain what constitutes a loop in a flow graph and how will do you do 10 5
loop optimizations in code optimization of a compiler.
4-
b. Explain the need of data flow analysis in code optimization. Design the 10 5
|2
2|Page
QP24DP1_290 | 24-01-2024 13:38:47 | 117.55.242.131