Novdec2014 PDF

You might also like

Download as pdf
Download as pdf
You are on page 1of 2
(Common to PTCS 2352-Principles of Compiler Design ft Semester-Computer Science and Magineering-Re; 4 ‘Time : Downloaded From www.rejinpaul.com Reg. No. : | l Question Paper Code : 91355 B.BJB-Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2014. 4 Sixth Semester Computer Science and Engineering ~~ C8 2852/C8 62/10144 CS 602 — PRINCIPLES OF COMPILER aS (Regulation 2008/2010) \ < ‘art Time) Fifth jon 2009) ‘Three hours (7° Maximum : 100 merks Answer ALL qué PART A (10, Me ss) What is the role of lexical agglyzax? “yy Write regular expression to descrit’ a languages consist of strings mado of oven numbers a and b. \ List out the vasious stordge’@l cation strategies Write a CF grammay/to rebréent palindrome. What are the types ofintermediate languages? Give syntax directed, trenslation for case statement Differentidte batween basic block and flow graph. Draw DAtHo represent afi] = afd alf]=& Repzotent the following inflow graph 0) {seems = isi + +5} ta Sul = 0; while(é What is global data flow analysis? PART B — (6 x 16= 80 marks) (a) (i) Explain the need for grouping of phases of compiler. 8 4) Exploin a language for specifying the lexical analyzer, 8) Or ) G Write short notes on compiler construction tools. : (ii) Explain — specification and recognition of ‘se : (a) Cea ‘Grow With Us Be Sia) (b) 13. (a) ) 14. [a) ® Downloaded From www.rejinpaul.com Gyles ectiatatihel spantiiatinn Ge miniplattye ehacene @ Gi) Explain — runtime environment with suitable example. ® Or Find the LALR for the given grammar and parse the sentence (ath)*e ESEsTITE + T* PIF, BP (B)lid Gay Generate intermediate code for the following code segment along with the required syntax directed translation scheme ‘ While @<10) > If 4% 2==0) ie Need Evensum = evensum +i \ e Else Oddsum =oddsum + i sy Or aw (Geka ata ihtarhibtiale eras Worth iol rhea ceesee Menge the required syntax directed translation s a (6) s=stali)b]; @ Explain register allocatign altq,astignment with suitable example. a gn p ® ° @) Explain — cae ion phase with simple code generation algorithm. > @ Fis f Ve] “or @ DAG representation of the following code and list out tthe p ‘of DAG representation. ® |; wile G<=10) do. Am. ‘suit = afi]; “Gi) ‘Explain — Generating code from DAG with suitable example. (8) “@) Explain — principle sources of optimization, ® Gi) Illustrate optimization of basic blocks with an example. ® Or Explain poephole optimization and various © code improving ‘Transformations. (16) ‘ (SSprtinbit.com (Grow With Us

You might also like