Automatically extracted historical question data. Academic accuracy and examination rules require verification.
Part A — 1
Define lexical analysis
. Consider the grammar: S -> aSbS | bSaS | €. Show that the grammar is ambiguous
for the sentence abab
. What are Inherited and synthesized attributes?
. How back patching process is used to avoid the problem of generating code in single pass?
. What is register allocation and assignment?
. Draw the expression tree labeled with Ershov Numbers for the expression: (a-b)+e*(c+d)
. Define basic blocks and flow graph
. Comment on Forward flow and backward flow problems
. Define Affine Partitioning and blocking
10. What is data dependence?
ie)
omonrAn uk W
DefinitionSource quality review required
Part B — 11a
(a) (i) Construct LALR Parsing Table for the following grammar (10)
S > Aa|bAc| Be| bBa
Avd
Bod
(ii) Construct Predictive Parsing Table for the following Grammar:
Other Or UnclassifiedSource quality review required
Part B — 12a
(a) (i) Translate the expression - (a+b)*(at+b)-(at+b)*d_ into a sequence of three address
statements and explain the representation with Quadruple, triple and Indirect triple
(10)
(ii) Draw the dependency graph and indicate the order of evaluation from the
topological sort of ” real id1,id2,id3” (6)
Other Or UnclassifiedSource quality review required
Part B — 12b
(b) Write down the semantic rules and label them using Back patching technique.
Assume the address of the first instruction generated is 100. (16)
a==b && (c= =d | | e= =f)
Other Or UnclassifiedSource quality review required
Part B — 13a
(a) (i) What is tree translation scheme and Generate code by Tree rewriting for Intermediate
code : afiJ=b+1 and explain (6)
(ii) Generate optimal code using Dynamic Programming technique for the assignment
statement x (ஊட * c) and explain. Assume unit instruction cost (10)
Other Or UnclassifiedSource quality review required
Part B — 13OR
௫) Draw labeled expression tree for the Expression (a-b)+e * (ct+d) and Generate
optimal code from this tree with only two registers available and explain (16)
Other Or UnclassifiedSource quality review required
Part B — 14a
(a) (i) Explain constant propagation and partial redundancy elimination with suitabie
example (10)
(ii) Explain in detail about peephole optimization techniques with suitable example (6)
Other Or UnclassifiedSource quality review required
Part B — 14b
(b) For the following flow graph, compute the definitions reaching each and every block
(16)
and explain the data flow analysis
ENTRY
வஹி
3
॥ ॥
pais
1
ல
oll
உ
ப்
>
(28
டட ம் d:=c-a NG
d:=b+d b:=atb
“| e:=c-a
|
d=a+b a= b*d
et b: = a-d
v
EXIT
Other Or UnclassifiedSource quality review required
Part B — 15a
(a).(i) Draw and explain about Iteration space, Data space, Processor space and mapping
among them for the following program : (16)
float z[50]:
for(i=03i<5;i++)
z[i+5]=z[il;
Other Or UnclassifiedSource quality review required
Part B — 15b
(b).(i) Explain Data Re-use with its various types. (10)
(6)
(ii) What is the need for Parallelism? Explain about loop level parallelism?
Other Or UnclassifiedSource quality review required