0% found this document useful (0 votes)
89 views8 pages

System Software Compiler Design Question Papers

Uploaded by

Sanjana S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
89 views8 pages

System Software Compiler Design Question Papers

Uploaded by

Sanjana S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
Sixth SemesteR Makeup/ Supplementary Semester } Course Title c + System Software & Compiler Design Course Code 18CS601 Duration 3 Hours 2100 pam r Maximum Marks ; 100 ructions to the Candidates : i) Answer any FIVE full questions it) Missing data, if any, may suitably be assumed. fii) On completing your answers, compulsorily draw diagonal cross lines on the remaining blank pages. Biutonomous Programme) -“caminations, September/ October 2021 modes supported by SIC architecture with examples emester End Examination” to another 1. a) Summarize various addres: b) Develop a SIC/XE program to copy a string “S ©) Illustrate the working of PASS-| assembler with an algorithm 2. a) Summarize the SIC machine architecture. 08 b) Design an SIC Program to calculate value = a+b*c-10 os ¢) Illustrate the working of multipass assembler. os 3. a) Illustrate the working of program reallocation with an algorithm. os b) Analyze the working of Bootstrap leader with an algorithm. 08 o4 ¢) Briefly explain the working of MS DOS linker. a) Identify the data structures involved in macro-processors. Also explain the same with 07 examples. 'b) Compare and contrast linkage editor and linkage loader. 07 06 ¢) Briefly explain Machine-independent macro processor features, a) Represent and explain the translation of the following statement through various phases of 10 3. compilation process. Value = xty*z. b) Construct transition diagrams for os i) Relational operators for a language (Ii) Unsigned numbers. ©) Illustrate the working of lexical analyzer with @ neat diagram. 0s 6. a) Identify the applications of compiler technology and explain them. 10 06 b) , Explain the concept of input buffering. ©) Compile the various errors identified in lexical analysis phase and strategies to overcame them. 04 10 = Revestinfef identity in any form in the answer book will be 1 ‘as malpractice. a 7. a) Construct predictive parsing table for the grammar. S> qABC ‘Aaj bbD Bale Coble Dele Es, b) Summarize error recovering strategies in syntax analyzer phase. os P.T.O, e ‘Semester End Examithations, December 2019 Course Title: System Software & Compiler Design Course Code: C$ $06 Duration 3 Hours ‘Maximum Marks: 100 Instructions othe Candida 1) Answer any FIVE full questions choosing test ne frm each at. 1) Missing dat, if any, may suitably be assume, |i) Om completing your answers, compulioly draw diagonal ros line om Uke remaining Bank pages COUNT! RESW 1 TABLE? RESW — 2000H TOTAL: RESW 1 PART—A 1. 8) Explain functions of Pass! and Pas? assembler. 06 jb) Explain the different registers, and instruction formats available in SIC/XE architecture. 08 i 3) Whee SKE open ose 20 tsi ns 0 2. a) Explain pass | algorithm of a2 pass assembler. 10 © 5). Generate the object code forthe fllowing SIC program. 10 I SUM START 1000 a FIRST ¢ CLEAR X 5 LDA #0 i +LDB.-KIOTAL : BASE TOTAL & LOOP ADD ‘TABLE, X g TX COUNT 5 “LT LOOP. § STA TOTAL : 2 3 END FIRST . PART-B 3. a) Write SIC/XE program for bootstrap loader. 10 J cei rea sont erin 10 4, a) Explain algorithm for define and expand procedures. 0 b) Explain MASM macro processors. 06 ¢) Briefly explain concatenation of macro parameters. 06 PART-C 5. 8). Write the differences between compiler and interpreter. 0s ) Explain the applications of compiles. 0s PTO. | i . l i 3 > C8506 ith a neat block diagram explain the diferent phases of compiler Mention the input and output 10 phase forthe expression os = inital + rate *60.0. Explain Input Buffering with sentinels. Construct transition diagrams to recognize following tokens. ') Unsigned number (i) Relational operator (i) Identifier 3 PART-D ‘With an example explain i) Left recursion ii) Left factorization Consider the below grammar to find the first and follow set S$ ACB | CbB| Ba Ada |BC Bogle Cohle Consider the below grammar i) Eliminate left recursion and perform left factoring Find the first and follow sets }) Check whether the grammar is in LL(1) or not by constructing table ‘Sit iEtSeS fa Eb lustrate the working of shifl/ reduce parser forthe string il*id2 forthe below grammar ESE+T|T TOTeFIF® Foid Explain with an example the conflicts that occur during shiftreduce pas Construct the SLR Parse table forthe below grammar As (Ayla Note: Revealing of identity in any form in the answer book will be treated a: ..alpractice. IN: |4|M}C MALNAD COLLEG! Fifth Semesteky tonomous Programme) Makeup Semester End Examinations, January/ February 2019 Course Title: System Software & Compiler Design Course Code Duration —: 3Hours Maximum Marks Instructions tothe Capdidates: 1), Answer any FIVE full questions choosing atleast one from each part. Missing deta, if any, may suitably be assumed. iil) Om completing your answers, compulsorily draw diagonal cross lines on the remaining blank pages. PART=A 1. a) Explain the SIC machine erchitecture in detail. : b) What are the different types of assemblers and explain the features used in assemblers b) Give the algorithm for Pass-1 and Pass-2 assembler. PART-B a) Explain machine dependent features of loader. ) Explain the absolute loader and write its algorithm. s 8) With an algorithm, explain Poss-1 of linking loader. dynamic linking. PART-C a) Explain with a neat diagram, phases of a Compiler. b) Explain the applications of Compiler Technology. a) Explain with a neat diagram, role of lexical analyzer. b) Explain the use of sentinels in input buffering. PART-D a) Construct Predictive Parsing table for grammar G: S-+(L)ja LL, SS b) Construct FIRST () & FOLLOW (set for grammar EOETT TTF Fo) S$ $S+/ SS*la b) Construct the LR(0) item set for grammar S-> 01/01. )i, What is program relocation? Explain the problem associated with it and there solution. b) What is Dynamic linking? Explain the process of loading and calling a subroutine using i NGINEERING, HASSAN + CS 506 2100 ‘What is handle Pruning? Give bottom up parse for input string aaa*a+ using the grammar: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 eae ren OM oy SP to bs sees AS vy MSN: [4 [Mic] | | MALNAD COLLEGE Fifth Semestek omomous Programme) WNGINEERING, HASSAN Supplementary Semester Bd Examinations, October 2020 Course Title: System Software & Compiler Design Course Code: CS 506 Duration 3 Hours Maximum Marks: 100 Instructions to the Candidates : i) Answer any FIVE fll questions choosing atleast ONE rom each pr. i) Missing dua, ifany, may suitably be asumed |i) On completing your answers, compulsory drew diagonal cos ines om the remaining blank pages. PAR’ 1. a) Explain SIC/XE machine architecture. ) List the functions of Pass-l and Pass-2 of a two pass assembler, ©) List and explain the data structures used in assembler, 2. a) Explain the concept of literals wth examples 1) Briefly explain the concep of contol section and program inking PART-B 3.) Write an algorithm fora simple Bootstrap loader and explain the same. )_ Briefly explain linking loader and linkage loaders with neat diagram, 49 ws 1) List and explain the data strictures involved in macro processor with a neat diagram, PART-C 5. 8) With the help ofan example explain the various phase of compile. 1) Explain he various applications of compiler technology. an algorithm for a one-pass macro processor. 6. a) Explain the concept of input buffering inthe lexical analysis. b)_ Write the regular definition and transition diagram forthe following. i) Wentifiers Unsigned numbers iil) Relop operator PART-D 7.) Define an ambiguous grammar consider the grammar nd the input string id id * id EE+E(E* Ej(E)|id i) Write LMD forthe given input i) Wete RMD forthe given input ) Construct pase te for both LMD and RMD iv) Check whether is ambiguous grammar or not )_Find the FIRST and FOLLOW forthe following grammar S>L=RR LR lid ROL 4 0 10 PTO. 8. a) Form the Action/Goto table forthe following grammar. oo SOL=RR Lo Rid Roe Justify whether the grammar is LR(O) or not. bs 1) Consider the following grammar. 10 sce Cet {) Compute sets of LR(I) items Construct canonical LR(1) parsing table ‘Show the parsing steps forthe string “ced” ’ | i i 2 | e i i : v N: [4 [Mic] INGINEERING, HASSAN Pp atonomos Programe) ations, January/ February 2020 Course Title: System Software & Compiler Design Course Code CS 506 Duration: 3 Hours Maximum Marks: 100 Instruction tthe Candidates: 1)hnwer any FIVE fl queso chosing sss one fom exch ar. ih ising dai an, ma satay be asues Cn compli yout ontwarscompaory drow gona ros ler nthe remaining lank pe PART=A 1.8) Explain SICIXE machine architecture in dt 0 1) Define System Software Distinguish between System Software and Application Software, 06 «)_ Write a sequence of instruction fr SICIXE to clear a 20-bye sting toll blanks os 2.8) Expain the data structure and PASS-1 algorithm of SIC assembler. 10 8) Generate the symbol table and write the object coe forthe following SIC/XE program 10 (Given that: LDX = 08, LDA = 00, LDB = 68, ADD = 18, TIX = 2C, JLT™= 38, STA = OC, RSUB=4C) SUM START. 0 FIRST «LOX #0 WA #0 +LDB TABLE? BASE, TABLE? Loop = ADD. TABLE, ADD TABLED, X TIX COUNT IT LOOP 4STA TOTAL RSUB couNT RESW TABLE RESW 2000 TABLE? —RESW 2000 TOTAL = -RESW END FIRST PART-B 2) Whatisa loader? Develop an algoritim for Boosrap loader and explain the same, 10 ) Explain Dynamic linking with suitable diagram. os «)_ Briefly explsn linking loader an linkage editor wih suitable diagram. os ‘Note: Revealina of identity in any form in the answer book willbe treated as malpractice, 2) What is Macro? Briel discuss various data stcture required for a design of Macroprcessor_08 wih example +) With egurdto Machine-Independent Macroprocesor features, explain he allowing 2 1. Concatenaton of Macro Parameters it) Generation of unique labels it) Condtonl Macro Expansion iy) Keyword Maoro Parameters PTO. ‘Note: Revealing of identity in any form in the answer book wil be treated as malpractice. a » ®) » 9 a » 2 a) » CS 506 > 3s the various phases ofa compiler. Show the translation forthe assignment statement. Position = initial + rate * 60. iscuss the applications of compiler. Explain the concept of input buffering, Write a lookahead code for sentinels. Give the formal definitions of operations on languages with notations. ‘Construct transition diagram to recognize the tokens given below i) Mdentifier. Relation operator (iii) Unsigned numbers. PART-D Define leftrecursion grammar. Eliminate lef-tecursion fom the following grammar E+E+TT ToT? FF F >| ‘Show that the following grammar is ambiguous S>S+S|S*S|id Consider the following grammar S—>aABb AsCle ‘Construct LL) parsing table ‘ Is this grammar LL (1)? iv) Parse the input string acd Explain the working of shift-reduce parser. Parse the input str STL; T=» iftoat LL, idlid ‘Consider the following grammar S>L=RR LR RoL i) Construct LR(O) items ii) Construct SLR parsing table ii) Check whether the given grammar is SLR or not R

You might also like