MU Computer Engineering (Semester 6)
System Programming And Compiler Construction
May 2013
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) Differentiate between Application program and system program. Indicate the order in which following system programs are used, from developing program to its execution.
Assemblers, loaders, linker, macro processor, compiler, editor.
5 M
1 (b) Eliminate left recursion present in following grammar (Remove Direct and Indirect recursion both)
S → Aa |b
A → Ac | Sd | ε
5 M
1 (c) What is activation record? Draw the diagram of General Activation record and explain the purpose of different fields of an activation record.
5 M
1 (d) What are the different functions of loader? Explain in brief.
5 M

2 (a) With reference to assembler explain the following tables with suitable examples:
(i) POT
(ii) MOT
(iii) ST
(iv) LT
10 M
2 (b) Let L be the language consisting of strings of a's and b's having same number of a's and b's:
(i) Construct LL(1) grammer for L
(ii) Construct a predictive parsing table for the grammer obtained in (i).
10 M

3 (a) Explain different pseudo-ops used for conditional macro expansion, along with example.
10 M
3 (b) What are the different phases of compiler? Illustrate compilers internal presentation of source program for following statement after each phase =
position = initial + rate * 60
10 M

4 (a) Explain working of a direct linking loader with a proper example. Clearly show the entries in different databases built by the direct linking loader.
10 M
4 (b) Generate three address code for given expression
while (a < b) do
if (c < d) then
x = y + z
else
x = y - z
10 M

5 (a) For the given grammar below, construct operator precedence relations matrix, assuming *, + are binary operators and id as terminal symbol and E as non terminal symbol.
E → E + E
E → E * E
E → id
Apply operator precedence parsing algorithm to obtain skeletal syntax tree for the statement
id + id * id
10 M
5 (b) Explain role of code optimisation in compiler designing with suitable example.
10 M

6 (a) For regular expression (a|b)*abb construct NFA and construct it into DFA.
10 M
6 (b) With reference to stack allocation and heap allocation explain runtime storage organisation.
10 M

7 (a) Write a note on JAVA compiler environment.
5 M
7 (b) Explain synthesized and inherited attributes used in syntax directed definitions.
5 M
7 (c) Explain DAG.
5 M
7 (d) Find first and follow set for given grammar below:
E → TE' E' → + TE' | ε
T → FT' T' → *FT' | ε
F → (E) F → id
5 M



More question papers from System Programming And Compiler Construction
SPONSORED ADVERTISEMENTS