Jawaharlal Nehru Technological University Kakinada 2009-1st Sem B.Tech Information Technology Code No: V3147/R07 I II Regular s, AUTOMATA AND COMPILER DESIGN - Question Paper
Saturday, 10 August 2013 04:35Web
Code No: V3147/R07
I II B.Tech I Semester Regular Examinations, November 2009
AUTOMATA AND COMPILER DESIGN
(Information Technology)
Time: three hours
Max Marks: 80
ans any 5 ques.
All ques. carry equal marks
1. (a) Design a DFA that accepts the language over the alphabet, S = {0, 1, 2}
where the decimal equivalent of the language is divisible by 3.
(b) Compare compiler and an interpreter with the help of suitable examples. [8+8]
2. Construct the predictive parse table for the subsequent grammar:
S iEtSS |a
S eS |
E b.
[16]
3. (a) discuss how to parse an ambiguous grammar.
(b) Construct the SLR parse table for the subsequent ambiguous grammar:
E E + E |E * E| (E) |a.
[6+10]
4. Generate the three-address code for the subsequent ?C? program fragment:
switch( i + j).
[16]
{
case 1: x = y + z;
default: c = c - 1;
case 2: u = v + w;
}
5. discuss the following:
(a) Substitutions
(b) Instances
(c) Uni cation
(d) kind variables.
[4×4]
6. (a) discuss the Dynamic storage allocation facilities given by C language?
(b) What is dangling reference in storage allocation? discuss with an example.
[8+8]
7. (a) What is global data ow analysis?
(b) Write brie y about different loop optimization techniques? [8+8]
8. discuss about Generic code generation algorithm?
[16]
Earning: Approval pending. |