Showing posts with label System Programming and Compiler Construction. Show all posts
Showing posts with label System Programming and Compiler Construction. Show all posts

Thursday, June 26, 2014

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) December 2013

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) December 2013

 

LJ-11568
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four from the remaining.  
  (3) Assume suitable data if wherever necessary.  
       
1. (a) Differentiate between a system program and an application program with example. 05
  (b) Explain the different ways of parameter passing in macros. 05
  (c) What are the different error handling techniques used in a compiler. 05
  (d) Explain the various function of a loader. 05
       
2. (a) Explain the working of single pass assembles. Show the structure of its database used. 10
  (b) Differentiate Top-Down and Bottom-up passing techniques. Explain shift-reduce passes in detail. 10
       
3. (a) Explain the working of Direct Linking Loader with neat flow charts. 10
  (b) Explain the different code optimization techniques in compiler design. 10
       
4. (a) What do you mean by ambiguity in grammar? How will you remove ambiguity from a grammar? use suitable examples. 10
  (b) Show whether the following grammar is LL (1). Construct the passing table.
S → AB / y Da
A → ab / c
B → dC
C → yC / y
D → xD/y
10
     
5. (a) What is binding? Explain static and dynamic binding. 10
  (b) Explain the features of JAVA Compiter Environment. 10
       
6. (a) Explain syntax directed translation. Give the syntax directed translation equations. for infix to prefix conversion. 10
  (b) With examples explain the different forms of intermediate code generated. 10
       
7. Write short notes on (any two) :- 20
  (a) Compiler - compiter  
  (b) Finite automata  
  (c) SPARC assembler  
  (d) Garbage collection and compaction.  

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) May 2013

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) May 2013

 

GS-1078
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
  (3) Assume suitable data if necessary and justify the same.  
  (4) Figures to right indicate full marks.  
       
1. (a) Differentiate between Application program and system program. Indicate the order in which following system program are used, from developing program upto its execution.
Assemblers, loaders, linker, microprocessor,  Compiler, editor.
05
  (b) Eliminate left recursion present in following grammar (Remove Direct and Indirect recursion both)
S → Aa | b
A → Ac | Sd | ∈
10
  (c) What is activation record? Draw the diagram of General Activation record and explain the purpose of different fields of an activation record. 05
  (d) What are the different functions of loader explain in brief. 05
       
2. (a) With reference to assembler explain the following tables with suitable example.
     (i) POT
     (ii) MOT
     (iii) ST
     (iv) LT
10
  (b) Let L be the language consisting of string of a's and b's having same number of a's and b's :
(i) Construct LL (1) grammar for L
(ii) Construct a predictive parsing table for the grammar obtained in (i).
10
       
3. (a) Explain different psudo-ops used for conditional macro expansion, along with example. 10
  (b) What are the different phase of compiler? Illustrate compiler internal presentation fo source program for following statement after each phase
     position = initial + rate * 60
10
       
4. (a) Explain working of a direct linking loader with a proper example. Clearly show the entries in different databases built by the direct linking loader. 10
  (b) Generate three address code for given expression
     while (a < b) do
           if (c < d) then
                x = y + z
    else
             x = y + z
10
     
5. (a) For the given grammar below, construct operator precedence relations matrix, assuming *, + are binary operators and id as terminal symbol and E as non terminal symbol.
E → E + E
E → E * E
E → id
Apply operator precedence parsing algorithm to obtain skeletal syntax tree for the statement
     id + id * id
10
  (b) Explain role of code optimization in compiler designing with suitable example. 10
       
6. (a) For regular expression (a | b)* abb construct NFA and construct it into DFA. 10
  (b) With reference to stack allocation and help allocation explain runtime storage organization. 10
       
7. (a) Write a note on JAVA compiler environment. 05
  (b) Explain synthesized and inherited attributes used in syntax directed definitions. 05
  (c) Explain DAG. 05
  (d) Find first and follow set for given grammar below.
 
E → TE'
T → FT'
F → (E)
E' → + TE' | ∈
T → * FT' | ∈
F →  id
05

Wednesday, June 25, 2014

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) December 2012

System Programming and Compiler
System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) December 2012

 
KR-8954
[Total Marks : 100]
 
N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
  (3) Assume suitable data if necessary.  
  (4) Draw Diagrams where required.  
       
1. (a) Explain with the help of flowchart the working of two-pass assembler along with the database used. 10
  (b) Modify the given grammar and construct a predictive parser table explaining each step :-
E → E + T | T
T → T * V|V
V → Id
10
       
2. (a) Explain the different error recovery techniques used in compilers. 10
  (b) Detail the different features used in macro processing. 10
       
3. (a) What is the need of linkage editor in System Programming? Explain its. working in detail. 10
  (b) Explain the working of Recursive Descent Parser and Operator Precedence Parser with example. 10
       
4. (a) Explain Run time storage Organization in detail. 10
  (b) Explain the different types of Garbage collection and compaction in compilers. 10
     
5. (a) Explain with flowchart the working of multiphase microprocessor and the database used. 10
  (b) What are the different types of intermediate Codes? Explain their implementation techniques. 10
       
6. (a) Distinguish between :-
     (i) Syntax tree and Parse trees
     (ii) LL Parser and LR Parser.
10
  (b) Explain the handling of control structure and procedures in code generation phase of compilers. 10
       
7. Write notes on any four :- 20
  (a) Dynamic loading and linking  
  (b) Java compiler Environment  
  (c) SPARC Assembler  
  (d) Code Optimization Techniques  
  (e) Syntax Directed Translation.  

Tuesday, June 24, 2014

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) May 2012

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) May 2012

 

GN-7202
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
       
1. Answer the following:- 20
  (a) What is System Software and application software?  
  (b) What is the use of ORG (ORIGIN)?  
  (c) What is positional parameter in macro?  
  (d) Differentiate between Parse tree and syntax tree.  
       
2. (a) For a regular expression (0+1) * 01, construct an NFA for this expression and convert this NFA into DFA. 10
  (b) Explain various phases of compiler with suitable example. 10
       
3. (a) Explain two pass assembler with flowchart. 10
  (b) What are different functions of Loader? Explain difference between linkage editor and linkage loader. 10
       
4. (a) Test whether following grammar is LL (1) or not. Construct LL (1) Parse table.
S → AB | g Da
A → ab | c
B → dC
C → gC | g
D → fD | g
10
  (b) Explain runtime storage organization in detail. 10
     
5. (a) Draw syntax tree and Directed Acylic Graph (DAG) for expression
     (a * b) + (c - d) * ( a * b) + b
10
  (b) What is binding ? Explain Static and dynamic binding. 10
       
6. (a) Explain two pass macro processor with flowchart and databases. 10
  (b) Explain various forms of intermediate code used by compiler. 10
       
7. Write detailed notes on any two :- 20
  (a) SPARC assembler  
  (b) LEX and YACC  
  (c) Debug monitor  
  (d) Macro assembler.  

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) December 2011

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) December 2011

 

 

1. Solve any four- 20
  (a) State the reason for the assembler to be a multi program.  
  (b) Explain the concept of macro definition within a macro.  
  (c) Explain dynamic linking loader.  
  (d) Explain different phases of compiler.  
  (e) Differentiate between machine dependent and machine independent code optimization.  
       
2. (a) What is forward reference problem? How is it handled in two-pass assembler? Explain with the help of neat flowchart the working of a two-pass assembler. Clearly showing the organization and uses of the databases. 15
  (b) Distinguish between DFA and NFA. 05
       
3. (a) How is macro defined, called and expanded? Explain the working of a single pass microprocessor. 10
  (b) What is the need of linkage editor in system programming? Explain its working in brief. 10
       
4. (a) What is code optimization? What are various strategies for code optimization? 10
  (b) Define and explain the following terms with suitable example.
(i) Parse tree
(ii) Syntax tree
(iii) Context  Free Grammar
(iv) Regular expression
(v) Handles.
10
     
5. (a) Differentiate between Top-down and Bottom-up parsing. Explain each of them with suitable example. 10
  (b) Explain the run time storage Organization in detail. 10
       
6. (a) Explain three-address code, its types and also implementation of three address statements. 10
  (b) Explain Syntax Directed Translation. Give syntax directed definition to translate infix expression to postfix expression. 10
       
7. Short notes on :- 20
  (a) Loading and linking scheme.  
  (b) Error recovery techniques used by compiler.  
  (c) Role of finite state automata in compiler theory.  
  (d) Syntax trees and their usage.  
  (e) Java compiler environment.  

Monday, June 23, 2014

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) May 2011

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) May 2011

 

 
       
1. (a) Explain local code optimization in brief. 05
  (b) Define macro. Explain macro calls within macro giving example. 05
  (c) Define Loader. Explain the functions of a loader in brief. 05
  (d) Explain the dangling references in run time storage allocation with example. 05
       
2. (a) Explain the working of a single pass macro assembler with the help of a neat flowchart. 10
  (b) Explain the LR parser. Write an algorithm for it Show the working of this algorithm with an example. 10
       
3. (a) Explain the working of a direct linking loader with a proper example.
Clearly show the entries in the different database built by the direct linking loader.
10
  (b) Explain the different types of intermediate code representation. 10
       
4. (a) Explain the database used by each pass of the 2-pass assembler. Explain how these database are used by the 2-pass assembler when it processes the source program with an example. Clearly show all the entries in the database built by the 2-pass assembler. 10
  (b) What is ambiguity? Explain the techniques to eliminate the ambiguity with an example. 10
     
5. (a) What is binding? Explain the static and dynamic binding. 10
  (b) Explain the working of linkage editor in the system programming. 10
       
6. (a) Define cross compiler. Explain in brief what activities are performed in various phases of the compiler. 10
  (b) What is relocation? Explain in brief various types of loaders with their Advantages and Disadvantages. 10
       
7. Write a Short notes on the following :- 20
  (a) Syntax directed translation.  
  (b) Lexical analysis  
  (c) Heap Allocation  
  (d) YACC  

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) December 2010

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) December 2010

 

GT-7563
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Solve any four questions out of remaining.  
  (3) Assume suitable data if necessary.  
       
1. (a) What is function of interpreter? 05
  (b) Explain operator precedence parsing. 05
  (c) Explain run time storage allocation strategies. 05
  (d) Explain the role of finite regular state automata in compiler design. 05
       
2. (a) Explain the design of direct linking loader in detail. 10
  (b) Explain with suitable flow chart working of single pass assembler. 10
       
3. (a) Explain design of one pass macro-processor to handle nested macro calls. 10
  (b) Explain difference between :-

(i) Procedure calls and macro cas.
(ii) Linker and Loaders.
10
       
4. (a) Explain difference between JAVA compiler and YACC compiler. 10
  (b) Explain difference between linkage editor and linkage loader. 10
     
5. (a) Explain various form of the intermediate code used by compiler. 10
  (b) What is source of optimization? 05
  (c) Explain role of lexical analyzer. 05
       
6. (a) Explain different phases of compiler in details. 10
  (b) Explain management of variable length block and storage allocation strategies. 10
       
7. Short notes on :- 20
  (a) implementation of three address statement  
  (b) Storage allocation strategies  
  (c) YACC  
  (d) SPARC assembler.  

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) May 2010

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) May 2010

 

AN-4468
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
       
1. Answer to the following questions in short (any four) :- 20
  (a) Differentiate between Parse tree and syntax tree.  
  (b) State the reasons for the assembler to be multiphase program.  
  (c) Explain role of the finite automata in compiler theory.  
  (d) With examples explain the process of elimination of left recursion.  
  (e) What is System Programming? List some System Programs and write their functions.  
       
2. (a) With the help of following grammar and given string explain role of operator precedence parser.
E → E + T / T
T → T * V / V
V → a / b / c / d
String to parse 'a + b * c * d'
10
  (b) Explain when will a macro be used in a program? how is macro different from subroutine? 10
       
3. (a) Generate three address code for a given expressions.
while (A < B) do
if (C < D) then X = Y + Z
10
  (b) (i) Write a note on JAVA Compiler and Environment.
(ii) What are assembler directives? Explain with example.
05
05
       
4. (a) Test whether the grammar is LL (1) or not, and construct a predictive parsing table for it.
S → AaAb / BbBa
A → ∈
B → ∈
10
  (b) Explain various phases of compiler with suitable example. 10
     
5. (a) With reference to assembler explain the following tables with suitable example.
(1)  POT     (2) MOT     (3) ST     (4) LT
10
  (b) What are different functions of loader? Explain difference between linkage editor and linking loader. 10
       
6. (a) Explain run time storage organization in detail. 10
  (b) Explain role of code optimization in compiler designing with suitable example. 10
       
7. (a) What is binding? Explain static and dynamic binding. 10
  (b) Explain syntax directed translaction with respect to construction of syntax tree. 10

Friday, June 20, 2014

System Programming and Compiler Construction (SPCC) Semester 4 (Revised Course) (3 Hours) December 2009

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 4 (Revised Course)
(3 Hours) December 2009

 

SP-8045
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
  (3) Figures to the right indicate full marks.  
  (4) Assume suitable data whenever required but justify the same.  
       
1. (a) Explain with neat flow charts working of single pass assembler, with database used. 10
  (b) Explain the LR parsers with suitable examples. 10
       
2. (a) What are the features provided by a macro? Explain with example. 10
  (b) Explain various phases of compiler with suitable example. 10
       
3. (a) What is binding? Explain static and dynamic binding. 10
  (b) Explain the design of two pass assembler with databases used. 10
       
4. (a) Construct the LALR parsing for the following grammar :-
S → S
S → CC
C → cC/d
10
  (b) Explain the design of Direct Linking Loader. 10
     
5. (a) Explain with the help of memory, data formats, registers, instruction format, addressing modes of traditional CISC machines. 10
  (b) Explain recursive descent parser with suitable example. 10
       
6. (a) Explain run time storage organization in detail. 10
  (b) Explain design of absolute loader. 10
       
7. Write detailed notes on any two :- 20
  (a) Macro assemblers  
  (b) LEX and YACC  
  (c) Dynamic Loading and Dynamic Linking..  

System Programming and Compiler Construction (SPCC) Semester 6 (Revised Course) (3 Hours) may 2009

System Programming and Compiler

System Programming and Compiler Construction (SPCC)
Semester 6 (Revised Course)
(3 Hours) May 2009

 

VR-5325
[Total Marks : 100]
 

N.B: (1) Question No. 1 is compulsory.  
  (2) Attempt any four questions out of remaining six questions.  
  (3) Figures to the right indicate full marks.  
       
1. (a) Explain with neat flow charts working of single pass assembler, with database used. 10
  (b) What are the features provided by a macro? Explain with example. 10
       
2. (a) Construct the LALR parsing table for the following grammer.
S → S
S → CC
C → cC | d
10
  (b) Differentiate between linkage editor and linking loader. 10
       
3. (a) Explain storage allocation and error handling phase of a computer. 10
  (b) Explain the design of Direct lining Loader. 10
       
4. (a) Describe the various forms intermediate code used by compilers. 10
  (b) What is binding? Explain static and dynamic binding. 10
     
5. (a) Write short notes on :-
     (i) SPARC Assembler
     (ii) Text Editors.
10
  (b) Explain with the help of memory, data formats, registers, instruction format, addressing mades of traditional CISC machines. 10
       
6. (a) Explain the LR parsers with suitable examples. 10
  (b) Explain with syntax directed translation. 10
       
7. Write short notes on :- 20
  (a) LEX and Y ACC  
  (b) Operator precedence parsing  
  (c) Macro assemblers.