Code No: 07A70511

R07

Set No. 2

IV B.Tech I Semester Examinations,MAY 2011 AUTOMATA AND COMPILER DESIGN Electronics And Computer Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) Define the following: i. Basic Block ii. Local Optimization iii. Global Optimization. (b) Explain about Algebraic Transformations? (c) “Copy propagation Leads to Dead code” - Justify the statement.

[6+6+4]

2. Generate code for following instructions and their associated cost, assume 3 registers are available and all variables are static. (a) X = a[i] + 1 (b) a[ i ] = b[ c[ i ] ] (c) a[i][j] = b[i][k] * c[k][j] [4 × 4]

(d) a[i] = b[i] + c[j].

3. (a) Find ∈-Closure(A) and ∈-Closure(C) for the Finite Automaton as shown in figure 3a.

Figure 3a (b) Explain the bootstrapping process with a suitable diagram. [6+10] 4. Describe, in detail, an operator precedence parsing with an example.

[16]

5. (a) Explain how scope information is represented in the symbol table for block structured language? (b) Write and explain about activation record? 1

[10+6]

Code No: 07A70511

R07

Set No. 2

6. (a) Construct triples of the expressions: a[i] := b and a := b[i] (b) Generate the three-address code for the following ‘C’ program fragment: for( i = 1; i <= 20; i++) if( a < b) x = y + z; [8+8] 7. (a) Distinguish static and dynamic Type checking? (b) Discuss in detail about semantic analysis phase?

[8+8]

8. (a) Test whether the following grammar is LL(1) or not. S → AaAb |BbBa A→ ∈ B →∈ (b) Construct the predictive parse table for the following grammar: S→A A → aB |Ad B → bBC |f C → g. ?????

2

[8+8]

Code No: 07A70511

R07

Set No. 4

IV B.Tech I Semester Examinations,MAY 2011 AUTOMATA AND COMPILER DESIGN Electronics And Computer Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) Write the algorithm to test structural equivalence of two type expressions s and t. (b) Write about type graph.

[8+8]

2. (a) Construct a Context Free Grammar(CFG) for generating the balanced parentheses, like ( ), [ ], [( ) ( ) ], ( [ ] ), etc. (b) Find the moves of the above grammar to derive the string: ( [ ( ) ] ( ) )[10+6] 3. Construct DAG for the following basic block: d: = b+c e: = a+b b: =b*c a: = e-d.

[16]

4. (a) Which data structure will be used to implement a symbol table in an efficient way? Give reasons. (b) Discuss and analyze about all the allocation strategies in run-time storage environment [8+8] 5. (a) Construct an NFA equivalent to the following Regular Expressions: i. (0 + 1(01)*)* ii. (00 +1)* (10)* (b) Compute the equivalent DFA for the NFA as shown in figure 5b. [4+4+8]

Figure 5b 6. What is the limit flow graph? Is the flow graph shown in figure 6 reducible? Explain. [16]

3

Code No: 07A70511

R07

Set No. 4

Figure 6 7. Generate the three-address code for the following executable statements of the ‘C?’ program fragment by assuming ?a? and ?b? are arrays of size 20 × 20 and there are 4 bytes per word. [16] void main() { int i = 1, j = 1, add=0; do { add = add + a[i][j] * b[j][i]; i = i + 1; j = j + 1; } while(i <= 20 && j <= 20); } 8. Consider the following grammar: E → E + T |T T → T ∗ F |F F → (E) |a (a) Construct the SLR parse table. (b) Find the moves made by the parser on the input string: a + a * a. ?????

4

[10+6]

Code No: 07A70511

R07

Set No. 1

IV B.Tech I Semester Examinations,MAY 2011 AUTOMATA AND COMPILER DESIGN Electronics And Computer Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) What is an LL(1) parse table? Explain. (b) Build an LL(1) parse table for the following production grammar: S → CC C → cC | d.

[6+10]

2. (a) What is a Syntax Directed Definition? Give an example. (b) Explain the Dependency Graph with an example.

[6+10]

3. (a) Explain scope and lifetime of variable with some suitable examples. (b) What is meant by dangling references? Explain.

[8+8]

4. Explain in detail various type of Grammars, Languages and its equivalent recognizers? [16] 5. (a) Construct a DFA accepting the set of strings with an odd number of 0’s and an odd number of 1’s over the alphabet Σ = {0, 1}. (b) Find the Regular expression for the Finite Automaton as shown in figure 5b. [16]

Figure 5b 6. Build the SLR(1) parsing table for the following grammar: E → E + T |T T → TF |F F → F∗ |a| b.

[16]

7. (a) Write and explain about Data-Flow Analysis of Structured Programs. (b) Write about Conservative Estimation of Data-Flow Information.

5

[8+8]

Code No: 07A70511

R07

Set No. 1

8. Generate optimal code for following assignment statements x=a+b+c x = ( a * -b ) + ( c - ( d + e ) ) x = ( a / b - c) / d x = a + ( b + c / d * e ) / ( f * g = h * i). ?????

6

[4×4]

Code No: 07A70511

R07

Set No. 3

IV B.Tech I Semester Examinations,MAY 2011 AUTOMATA AND COMPILER DESIGN Electronics And Computer Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. Explain the machines to accept context free language and recursively enumerable sets with examples. [16] 2. (a) Explain the Dynamic storage allocation facilities provided by C language? (b) What is dangling reference in storage allocation? Explain with an example. [8+8] 3. Explain about macros and their features?

[16]

4. Consider the following Syntax Directed Translation Schema: E→E + E { print ‘+’} E → E*E { print ‘*’} E → (E) { . } E →i { print ‘id.name’} An LR parser executes the actions specified within braces immediately after reducing with the corresponding production. Draw the decorated parse tree and find the translation of a string: (a + b) * (c + d) into another string using Syntax Directed Translation Schemes. [8+8] 5. Explain in detail the procedure that eliminating global common sub expression? [16] 6. (a) What is the time complexity of a parser to parse a string of ‘n’ tokens? (b) Consider the Grammar: G = ({S, A}, {a, b}, {S → aAa |bAb| |A, A → SS}, S) Find the leftmost derivation, rightmost derivation, and parse tree for the string: baabbb. [6+10] 7. Consider the grammar: S → (S) |a Construct the DFA for SLR(1), CLR(1), and LALR(1) parsers and find the number of states in each of the parser. [16] 8. (a) Design a DFA that accepts the language over the alphabet, Σ = {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] ?????

7

R07 IV B.Tech I Semester Examinations,MAY 2011 AUTOMATA ...

R07 IV B.Tech I Semester Examinations,MAY 2011 AU ... R DESIGN Electronics And Computer Engineering.pdf. R07 IV B.Tech I Semester Examinations,MAY ...

73KB Sizes 0 Downloads 156 Views

Recommend Documents

R07 III B.Tech I Semester Examinations,December 2011 AUTOMATA ...
There was a problem previewing this document. Retrying... Download. Connect more apps... R07 III B.Tec ... gineering.pdf. R07 III B.Tech ... ngineering.pdf.

R07 IV B.Tech I Semester Examinations,December 2011 ...
R DESIGN Electronics And Computer Engineering.pdf. R07 IV B.Tech I Semester Examinations,December 201 ... ER DESIGN Electronics And Computer ...

R07 IV B.Tech II Semester Examinations,APRIL 2011 ADVANCED ...
Give an example comparing RAID 3. and RAID 4/5 on small write updates. [8+8]. 7. (a) Write about cache and performance. (b) Calculate the cpu execution time ...

R05 III B.Tech I Semester Examinations,December 2011 AUTOMATA ...
R05 III B.Tech I Semester Examinations,December 20 ... logy, Computer Science And Systems Engineering.pdf. R05 III B.Tech I Semester Examinations ...

NR410404 IV B.Tech I Semester Supplementary Examinations ...
NR. IV B.Tech I Semester Supplementary Examinations, November 2005 ... NR size is smaller than the fiber core, and the small gap between the source and.

NR411304 IV B.Tech I Semester Supplementary Examinations ...
RELIABILITY & SAFETY ENGINEERING · (Electronics & Control Engineering) ... (a) Explain the following terms in connection with reliability evaluation. [2+3].

Code No.410309 IV /IV B.Tech. I-Semester Examination November ...
3.a) Discuss the aspects of Electro-chemical homing process. b) · Explain the fundamentals of chemical machining process with advantages and · applications.

NR410105 IV B.Tech I Semester Supplementary Examinations ...
NR. IV B.Tech I Semester Supplementary Examinations, November 2005 ... 3. Analyse the following frame using stiffness method. EI constant. (figure 3) [16].

NR412104 IV B.Tech I Semester Supplementary Examinations ...
What do you understand by Non-destructive testing techniques? List various tech- · nique of NDT and explain any three of them · [16]. 8. Write short notes on the ...

NR410204 IV B.Tech I Semester Supplementary Examinations ...
Using dynamic programming method, how do you find the most economical ... the additional reactive power requirement at the receiving end to meet a load of ...

Code No. 410558 IV/IV B.Tech. I-Semester Examination November ...
(Computer Science and Engineering,-OR/OOR) · Time: 3 hours ... Define a software and explain the software characteristics. 2. Compare the ... modeling the data processing involved when a customer withdraws cash from an · ATM machine.

Code No.411303 IV/IV B.Tech. I-Semester Examination November ...
b) Give the merits and demerits of a class-A commutation of SCR relative to other · methods? 3.a) Draw the circuit and explain the working of speed control of a ...

NR410505 IV B.Tech I Semester Supplementary Examinations ...
(b) Explain the architecture of Honeywell 60/66 multiprocessor system. [8+8] · 6. (a) Define the term nonpreemptive scheduling. With an example illustrate the.

NR410310 IV B.Tech I Semester Supplementary Examinations ...
(b) Write an ALP to implement unpacked BCD addition and subtraction. [8] · 3. (a) How procedures are used in assembly language programming of 8086.

NR411401 IV B.Tech I Semester Supplementary Examinations ...
5. (a) Compare and contrast adaptive and fuzzy control techniques used in motion- ... Discuss various application of microprocessor control programmable logic ...

NR410205 IV B.Tech I Semester Supplementary Examinations ...
(b) Back to back DC link along with AC feeder. 2. Clearly explain the different converter configurations commonly employed for HVDC · converter and bring out ...

NR410805 IV B.Tech I Semester Supplementary Examinations ...
... No: NR410805. NR. IV B.Tech I Semester Supplementary Examinations, November 2005 ... ideal, Raoult's and Dalton's laws are applicable. [16] · *****. 2 of 2.

NR412106 IV B.Tech I Semester Supplementary Examinations ...
(c) Discuss the panel method for compressible subsonic and supersonic flows [6] · 6. (a) Derive a descretized form of generic integral form of continuity and ...

NR410307 IV B.Tech I Semester Supplementary Examinations ...
7. Distinguish between the power transmission by chains, ropes and wire ropes in · hoisting equipment. [16] · 8. Sketch and explain a hydraulic jack. [16] · *****.

NR410112 IV B.Tech I Semester Supplementary Examinations ...
(b) Clearly explain the use of category analysis in Trip generation models. [6] · 5. Explain the concept of Trip distribution. Disucss about the various growth factor.

NR411302 IV B.Tech I Semester Supplementary Examinations ...
DISTRIBUTED COMPUTER CONTROL SYSTEMS · (Electronics & Control ... (b) Explain the design techniques in real time systems. [8+8] · 5. Explain in detail ...

NR410306 IV B.Tech I Semester Supplementary Examinations ...
[8+8] · 2. Explain the mathematical interpretation of finite element method for ... (a) Show that the value of the shape function N1 of node i and node k of a simplex.

NR411901 IV B.Tech I Semester Supplementary Examinations ...
IV B.Tech I Semester Supplementary Examinations, November 2005. INTERNET & JAVA PROGRAMMING · (Electronics & Computer Engineering) · Time: 3 hours · Max Marks: 80 · Answer any FIVE Questions · All Questions carry equal marks · ***** · 1. (a) Defferet

Code No. 410258 IV/IV B.Tech. I-Semester Examination November ...
2.a) Derive an expression for the hourly loss in economy due to error in the · representation of input data. ... from the power plant bus bars. - x - · AjntuWorld.in.