Trending ▼   ResFinder  

2003 Course Principles of Compiler Design

3 pages, 26 questions, 0 questions with responses, 0 total responses,    0    0
pune_eng
  
+Fave Message
 Home > pune_eng >

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

Total No. of Questions : 12] P1375 [Total No. of Pages :3 [3764] - 414 B.E. (Computer Engineering) PRINCIPLES OF COMPILER DESIGN (2003 Course) Time : 3 Hours] [Max. Marks:100 Instructions to the candidates: 1) Answers to the two sections should be written in separate books. 2) Neat diagrams must be drawn wherever necessary. 3) Figures to the right indicate full marks. 4) Your answers will be valued as a whole. 5) Assume suitable data, if necessary. SECTION - I Q1) a) Compare Compiler and Interpreter. [4] b) Define following : i) Cross compiler c) Write a LEX program for a subset of C. ii) Incremental Compiler [4] [8] OR Q2) a) b) Q3) a) b) Explain various Compiler Construction tools. [8] Write a LEX program to calculate number of words in the input C file. Program also should remove comments from the program. [8] Construct LALR parsing table for following grammar. S -> AA A -> aA A -> b Explain operator precedence parser. [10] [8] OR Q4) a) b) Show that following grammar is LL(1) but not SLR(1). S -> AaAb | BbBa A -> C B -> C Write a YACC program for a simple calculator. [9] [9] P.T.O. Q5) a) Explain what is inherited and synthesized attributes. With example explain how these are calculated. [8] b) Write Quadruple and Triple representation for following expression. [8] A=B+C*D/E+-F*-G OR Q6) a) b) Write intermediate code generated for following sentences. While a < b do If c < d then x = y+z Else x = y-z [8] Explain with example concept of backpatching. [8] SECTION - II Q7) a) b) What is the need of Activation record? With example explain how these are generated. [8] With example explain different parameter passing methods. [8] OR Q8) a) Enlist and explain in short different ways of accessing non-local names.[8] b) What are different storage allocation strategies. Explain any one in detail. [8] Q9) a) b) Explain peephole optimization in detail. [8] Explain the dynamic programming code generation algorithm. [8] OR Q10)a) b) Q11)a) b) Explain various transformations that can be done on basic blocks. [8] Write a note on code generator generators. [8] With example explain different types of loops in flow graph. [8] What is the need of code optimization? Discuss principal sources of code optimization. [10] OR [3764]-414 2 Q12)a) For the following three address code statements i) PROD = 0 ii) I = 1 iii) T2 = ADDR(A) - 4 iv) T4 = ADDR(B) 4 v) T1 = 4 * I vi) T3 = T2[T1] vii) T5 = T4[T1] viii) T6 = T3 * T5 ix) PROD = PROD + T6 x) I = I + 1 xi) IF (I <= 20) GOTO (V) [10] Compute basic blocks and draw the flow graph. b) Discuss algorithm for live variable analysis. kbkb [3764]-414 3 [8]

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : Pune, Engineering, University of Pune, Engineering question papers, Pune University, previous year question papers, question papers, india, model question paper, pune university paper pattern, pune university syllabus, old question papers  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

pune_eng chat