#1
September 22nd, 2016, 09:25 AM
| |||
| |||
PCD Pune University
I want the question paper of Principles Of Compiler Design of B. E. (Computer Engineering) of Pune University so can you provide me?
|
#2
September 22nd, 2016, 10:45 AM
| |||
| |||
Re: PCD Pune University
Ok, here I am providing you the question paper of Principles Of Compiler Design of B. E. (Computer Engineering) of Pune University Pune University B. E. CSE Principles Of Compiler Design question paper Time : 3 Hours Max. Marks : 100 Instructions : (1) Answers to the two sections should be written in separate answer-books. (2) Neat diagrams must be drawn wherever necessary. (3) Assume suitable data, if necessary. SECTION-I Q1 a) Discuss the action taken by every phase of compiler on following [6] string: A =B*C+D/E b) Construct Predictive Parser for following grammar. [8] S → a B D h B → B b | c D → E F E → g | 𝜖 F → f | 𝜖 c) What are the advantages and disadvantages of operator Precedence parser? OR Q2 a) Explain in detail the Front end – Back end arrangement of compiler [6] design. b) Construct SLR parser for following grammar: [8] S→ a SS b S→ a SSS S→c Show moves of above parser on one valid input string and one invalid input string. c) How YACC handles different types of conflits in parser? [4] Q3 a) Differentiate between S-attributed and L-attributed definitions. [4] b) What is need for semantic analysis? Explain type checker in detail. [6] c) Generate annotated parse tree for following expression: [6] a*b-c/e + f OR Q4 a) What is attributed grammar? Explain with example. [4] b) Explain bottom-up evaluation of L-attributed grammar [6] c) What is typecasting? What changes should be made in the semantic [6] analyzer to add typecasting? Q5 a) Generate three address code for following code fragment. [8] sum=0 for (j=1; j<=10; j++) sum= sum + a[j] + b[j] b) Write syntax directed translation scheme for simple assignment [8] statement. OR Q6 a) Write syntax directed translation scheme for boolean expression [8] and explain the need of backpatching. b) Generate quadruples and indirect triples for following statement. [8] a= b ^ (c + d) *f/g SECTION-II Q7 a) Discuss: Static and Dynamic Scope [6] b) Which are different data structures used for symbol table? Discuss. [6] c) Discuss various issues associated with source language. [6] OR Q8 a) Write short note: Activation record [4] b) Explain various parameter passing techniques with suitable examples. [8] c) Differentiate between block structured and non block structured languages [5] Q9 a) Explain Dynamic Programming code generation algorithm [8] b) Write short note: DAG [4] c) Discuss various issues in code generation. [4] OR Q10 a) Construct DAG for following [4] D = B*C E= A+B B= B*C A= E-D Which optimization is achieved using this DAG? b) What is “next use” information? Explain its use in code generation. [6] c) Explain the tree labeling algorithm with example. [6] Q11 a) Read following piece of code: [4] B1: j = j-1 t4 = 4*j t5 = a[t4] if t5>j go to B1 which optimization technique can be applied to this code? Explain it in detail. b) Explain how loops in flow graph are identified? [4] c) Explain fundamental data flow properties. [8] OR Q12 a) Write short note: Global optimization [4] b) Explain following optimization techniques: compile time evaluation, dead code elimination, code movement [6] c) What is “ud chain”? Explain Gen set and Kill set for ud chain. [6] Contact- Savitribai Phule Pune University Ganeshkhind, Pune, Maharashtra 411007 |