Anda di halaman 1dari 3
Reg.No.:{ blo 1 [0 [5 |t [o [lolol T 3185 B.E/B.Tech, DEGREE EXAMINATION, APRIL/MAY 2008. Sixth Semester (Regulation 2004) Computer Science and Engineering CS 1352 — PRINCIPLES OF COMPILER DESIGN (Common to BE. (Part-Time) Fifth Semester Regulation 2005) ‘Time : Three hours Maximum : 100 marks 10, Answer ALL questions. PART A — (10 x 2 = 20 marks) Differentiate compiler and interpreter. Write short notes on buffer pair. Construct a parse tree of (a +b)'e for the grammar E> E+E/E EI(E) lid. Eliminate immediate left recursion for the following grammar E>E+TIT,T>T RiFF > (Eid ‘Write short notes on global data flow analysis, Define back patching with an example. Give syntax directed translation for the following statement Call pl (int a, int b). How can you find the leaders in basic block? Define Code motion. Define basie block and flow graph. ate 12. 13. (a) (b) (a) (b) (@) (b) PART B — (5 x 16 = 80 marks) (i) Explain the phases of compiler, with the neat schematic. (12) (ii) Write short notes on compiler construction tools. 4) Or (Explain grouping of phases ® (ii) Explain specification of tokens. ) Find the SLR parsing table for the given grammar and parse the sentence (a+b)'¢ E> E+E/EEAE)id . Or Find the predictive parser for the given grammar and parse the sentence (a+bye E>E+T/T,P>TFIF,P> (BVid. Generate intermediate code for the following code segment along with the required syntax directed translation scheme = (8) @ iffa>b) x=atb else x=a-b where a & x are of real and b of int type data Gi) inta,b; (8) float ¢ ; a=10; swith (a) {ease 10: case 20:¢= 1 Or (i) Generate intermediate code for the following code segment along with the required syntax directed translation scheme : (8) i=1;s=0; while (i <= 10) s=s+alil bil fi) isiel i) Write short notes on back-patching, ®) 2 T3185 CO 14 (a) G)__ Explain the various issues in the design of code generation, (6) Gi) Explain code generation phase with sian ple code generation algorithm, 10) Or (b) (Generate DAG representation of the following code and list out the applications of DAG representation <2) 1;s=0; while (é <= 10) +a [il [i] init () "Write short notes on next-use information with suitable example. w 19. (a) G) Explain — principle sources of optimization 3) (i) Write short notes on : 8) () Storage organization (2) Parameter passing. or (») @) Optimize the following code using various optimization technique : 12) =1;s=0; for i= 1;i<=8; i++) for j= 15; j<=3; j++) lil GI = cli) + afi) + obi ci) Write short notes on access to non-local names (4) 3 T3185

Anda mungkin juga menyukai

  • PCD ND07
    PCD ND07
    Dokumen3 halaman
    PCD ND07
    chituuu
    Belum ada peringkat
  • Toc MJ07
    Toc MJ07
    Dokumen4 halaman
    Toc MJ07
    chituuu
    Belum ada peringkat
  • Toc Am08
    Toc Am08
    Dokumen2 halaman
    Toc Am08
    chituuu
    Belum ada peringkat
  • MG1351 POM Nov/Dec Question Paper
    MG1351 POM Nov/Dec Question Paper
    Dokumen2 halaman
    MG1351 POM Nov/Dec Question Paper
    sinisterlm
    Belum ada peringkat
  • PCD Am08
    PCD Am08
    Dokumen3 halaman
    PCD Am08
    chituuu
    Belum ada peringkat
  • Document
    Document
    Dokumen1 halaman
    Document
    chituuu
    Belum ada peringkat
  • Document
    Document
    Dokumen1 halaman
    Document
    chituuu
    Belum ada peringkat
  • MPMC ND07
    MPMC ND07
    Dokumen2 halaman
    MPMC ND07
    chituuu
    Belum ada peringkat
  • Document
    Document
    Dokumen1 halaman
    Document
    chituuu
    Belum ada peringkat
  • Ai Am08
    Ai Am08
    Dokumen3 halaman
    Ai Am08
    chituuu
    Belum ada peringkat
  • Document
    Document
    Dokumen1 halaman
    Document
    chituuu
    Belum ada peringkat
  • DBMS MJ07
    DBMS MJ07
    Dokumen3 halaman
    DBMS MJ07
    chituuu
    Belum ada peringkat
  • CS1302 CN 2008 Question Paper
    CS1302 CN 2008 Question Paper
    Dokumen3 halaman
    CS1302 CN 2008 Question Paper
    sinisterlm
    Belum ada peringkat
  • Toc MJ07
    Toc MJ07
    Dokumen4 halaman
    Toc MJ07
    chituuu
    Belum ada peringkat
  • Toc Am08
    Toc Am08
    Dokumen2 halaman
    Toc Am08
    chituuu
    Belum ada peringkat
  • PCD ND07
    PCD ND07
    Dokumen3 halaman
    PCD ND07
    chituuu
    Belum ada peringkat