Anda di halaman 1dari 9

Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


SrN Question:
Overview of System Software and Language Processor
1 Explain the difference between Derivation and Reduction by taking suitable example.
2 To recognize valid string which of these will use
1) Derivation 2) Reduction
3 A college uses a student code which is obtained by concatenation the branch id of a student, which is alphabetic
in nature, with numeric code. Student code can be specified as
1) <branch code> ::= l | <branch code> l
<numeric code>::= d| <numeric code> d
<student code>::= <branch code><numeric code>
2) <br_code>::=l | d | <br_code> l|<br_code> d
3) 1) and 2) both are correct.
4 Explain classification of Grammer.
5 If you have given following grammar:
<Sentence> = <NounPhrase><Verb hrase>
<Noun Phrase> = <Article> <Noun>
<Article> = a | an | the
<Noun> = Government | College
<Verb> = made
If the input string is “the Government made a college” then performs reduction operation stepwise.

6 Define the following: Specification gap, Execution gap, Alphabet, Production, Binding, Non- terminal symbol,
Tokens.
7 Generate IR (Intermediate Representation) for the following program and show the steps for doing lexical
analysis, syntax analysis and semantic analysis:
int i;
float a, b;
a=b + i ;
8 Define programming language grammar.
9 What are the main activities of synthesis phase?
10 Which grammar is suited for programming language specification? Define it.
11 Define: Translator, System software, Non terminal symbol
12 What is grammar? Give classification of the grammar along with its example.
13 State True or false and justify:
1. A preprocessor is a language processor that bridges execution gap by generating an object code.
2. Syntax analysis is performed to check the validity of a production rule.
3. A non terminal symbol always appears as a leaf node of AST.
4. The term binding is an association of, a value of an entity with its attribute.

14 Define: 1. Language Processor 2. Binding 3. Scanning and Parsing


4. Expression tree 5. Grammer
15 Write a short account on the front end and back end processing of a toy compiler.
Language processor and Data Structure
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


1 Why an Allocation Data Structure used? How the memory areas are allocated and deallocated by
various types of allocation data structure.
2 Which technique is better for memory allocation. 1) First fit 2) Best fit
3 Discuss the problem of deletion of entries in the sequential search organization.
4 Define: Hybrid entry format
5 Differentiate between static memory allocation and dynamic memory allocation.
6 Differentiate between search data structure and allocation data structure.
7 Explain the significance of search and allocation data structures.
8 True/False? Justify : Stack is used as an allocation data structure.
9 Give differences for the following:
a. Allocation data structures and Search data structures
b. Literals and Declare constant
10 Write a short note on extended stack model.
Scanning and Parsing
1 Generate the parser table for an LL(1) parser for following Grammar using FIRST and FOLLOW technique.

E = T E’
E’ = , T E’ | ε T = V T’
T’ = / V T’ | ε V = < id >

And also give the sequence of prediction made by parser for the source string like
├ < id > / < id > , < id > ┤.

2 How can you differentiate DFA with FSA? Build the DFA for regular expression (a|b)*bb(a|b)*.
3 What do you understand by operator precedence parsing? Parse the following string giving the Diagrammatic
trace of the algorithm.
<id>a + <id>b * <id>c
4 Write note on LL(1) parser
5 What is Parsing? Differentiate between parse tree and abstract syntax tree.
6 How continuation check and backtracking is performed in top down parsing?
7 List bottom up parsing algorithm. Also discuss drawbacks of this algorithm.
8 Define finite state automaton.
9 What is parsing? What are the basic problems faced by the Top-down parser? Explain in brief.
10 Differentiate top-down parsing and bottom-up parsing.
11 Write a regular expression for a real number with optional fraction.
12 Define: DFA and Regular Expression.
13 True/False. Justify : The term CSF in parsers refer to current sentential form.
14 Explain the significance of parsing. Given a string |- a - b * c + d -| draw operator precedence table for the symbols
present in the string. Using this table check the validity of the string.
Show all the intermediate steps of generating an AST.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


15 Given the following grammar, left factor the grammar and generate LL(1) parse table from it. Parse the string to |-
id + id * id -| to check whether it is valid or not using LL(1) parsing
S ::= A + S | A A ::= B * A | B
B ::= id

16 State true or false and justify your answer: RD parser is a top-down parser.
17 Using the following grammar of RD Parser show whether the following strings are valid or not:
E ::= T {+ T}*
T ::= V {* V}* V ::= <id>
Input String:
1) <id> * <id> * <id>
2) <id> + <id> * <id> <id>

18 Using the following LL(1) grammar show whether the following strings are valid or not:
E ::= TE’
E’ ::= -T E’ | ε T ::= VT’
T’ ::= /V T’ | ε V ::= <id>
Input String:
1) <id> - <id> / <id> 2) <id> / <id> - <id>

Assembler
1 Explain ORIGIN, EQU and LTORG assembler directives in detail.
2 Discuss Pass I of the assembler in detail.
3 What will be effect of statement A DS 200
1) 1 word will reserve for A with value 200.
2) 200 words will reserve and associate with name A
4 Describe the architecture of 8088 microprocessor in detail.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


5 Given the following program: START 300
ID1 DS 5
L1 MOVER AREG, D ADD AREG, C
SUB AREG, ID2 MOVEM AREG, ID1
D EQU ID2
L2 PRINT D

ORIGIN ID1-1 C DC ‘9’


ORIGIN L2+1 STOP
ID2 DC ‘13’
END L1
Show the contents of symbol table and intermediate code using variant 1 at the end of pass-1

6 What do you mean by forward reference? How single pass assembler take care of forward- reference?

7 Define: Forward reference


8 List and explain all data structures used in pass-I of an assembler.
9 Compare Variant I and Variant II.
10 List and explain advantages of an Assembly language over machine language.
11 Explain pass II of the Assembler algorithm.
12 Explain the term – Backpatching in single pass assembler.
13 What is an expression tree?
14 What is the use of BC instruction in assembly language?
15 Write an algorithm for the 1st pass of a two-pass assembler.
16 Explain the three features of assembly language that makes it better than machine language.
17 What are the kinds of statements in assembly language program?
18 True/False. Justify: The mnemonic MOVER falls under the category of assembler directive.
19 Discuss the problems encountered during the single pass assembly.
20 Draw a flow chart or write an algorithm for pass II of multi pass assembler. How many passes can a multi pass
assembler have?
21 How does single pass assembler differ from multi pass assembler? Explain the significance of FRT, SRTAB_ARRAY
and CRT.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


22 Given the following assembly program, show the contents of all the tables
generated after pass I. Also generate IC using Variant I.

START 300
B DC 3
MOVER AREG, =’5’
MOVEM AREG, A
L1 MOVER CREG, B ADD CREG, =’1’
COMP CREG, AREG
BC NE, NX
LTORG
=’5’
=’1’
NX SUB AREG, =’1’
COMP CREG, AREG
BC LT, LS
LS STOP
ORIGIN L1 + 2
MULT CREG, B
A DS 1
END

23 True/False. Justify: LTORG is an imperative statement.


24 Discuss the various types of assembly statements.
25 Explain the various data structures used during Pass-I and Pass-II of an assembler.
26 Explain Variant – I and Variant – II for IC generation
27 Differentiate : Literals and Declare constant
Macro and Macro Preprocessor
1 Construct all data structures for Macro given below MACRO
MCA &X , &Y , &REG = BREG AIF (&Y EQ 0 )
.ERR MOVER &REG , &X
DIV &REG , &Y
.ERR MEND
Also generate the statements for these two Macro call.
i. MCA 5 , 5 , REG = AREG
ii. MCA 2 , 0

2 Explain the Algorithm for Macro Expansion.


3 Explain the procedure for expansion of Nested Macro calls in detail.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


4 For storing parameters name and values which data structure is better? Why?
1) APT with ( name, value) fields
2) PNTAB with (name) field and APTAB with (value) field.

5 Explain the entry format for the macro name table(MNT).


6 Given the following macro definition : MACRO
CLEARMEN &X, &N, &REG= AREG LCL &M
&M SET 0
MOVER &REG, =’0’
.MO MOVEM &REG, &X + &M &M SET &M +1
AIF (&M NE &N) .MO MEND
Show the contents of the data structures deployed by the macro-processor for
the call.
CLEARMEN AREA, 10

7 Explain data structures used for Macro Processing.


8 In an assembly language program, a certain action is required at 10 places in the program.
Under what conditions would you code this action as
a. A macro?
b. A sub-routine?
9 List and explain all the data structures used in Pass – I of Macro preprocessor.
10 List and explain Pass – I algorithm of Macro preprocessor.
11 Define macro.
12 Discuss the points to be taken care while designing a macro preprocessor.
13 Discuss different types parameters used in macro with example.
14 What is a macro? Given the following macro show all the data structure entries during macro definition and call. If
call is made as CLEAR Arr,5.

MACRO
CLEAR &X, &Y, &Z = AREG LCL &A
&A SET 5
MOVER &Z, 0
.MORE MOVEM &Z , &X + &A &A SET &A + 1
AIF ( &A NE &Y) .MORE MEND

15 True/False? Justify : Whenever a macro is called the macro code gets executed.
16 What is a macro? Give the various types of parameters used in macro definition.
17 Write a brief account on Expansion time variables.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


18 For the given macro create the various data structures required for the macro call INCR A, 5, AREG when the
given code is given: PTO

MACRO
INCR &MEM_VAL, &INCR_VAL, &REG
MOVER &REG, &MEM_VAL
ADD &REG, &INCR_VAL
MOVEM &REG, &MEM_VAL MEND

Compiler
1 What is an overall procedure for compilation of expression? Briefly explain the use of Operand Descriptors and
Register Descriptors in expression compilation.
2 Explain with example , The role of static and dynamic pointer for accessing local and nonlocal variable in block
structured language.
3 Write a short note on “Code Optimization”.
4 True/False? Justify : For accessing non local variable which pointer will be used?
1) Static Pointer
2) Dynamic Pointer
5 For evaluation of expression (a+b) / (c+d) which operation should perform first so that fewer MOVEM/MOVER
instructions required in generated code.
1) (a+b)
2) (c+d)
3) Any one of above
6 Explain allocation and access of local and non-local variable for a block structured language with below
given code.
void main()
{
int i=5;
{
int j=7;
{
int k=10, l=15; k=i;
}
}
}

7 Define Optimizing Transformations. Explain with suitable example.


8 Define Local Optimization and Basic block. Explain with suitable example - how value number technique is
applied on basic block.
9 Write short note on Parameter passing mechanism.
10 Write short note on – control flow analysis.
11 Write short note on Triples and Quadruples with suitable example.
12 Explain Static and Dynamic memory allocation in block structured programming language.
13 Define the control structure.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


14 What is the format of Triples?
15 Explain code optimization phase of compiler in detail.
16 Operand Descriptor. Explain.
17 Given a postfix string |- a b c * + d e f ^ * + -| generate triples, indirect triples and quadruples. Explain the
significance of these forms.
18 What do you mean by code optimization? Explain the five optimizing transformation with example.

19 Format of quadruple
20 Consider the following expression: a + b * c ^ d / e.
Construct the corresponding triple and quadruple format of the above expression.
21 Write a short note on code optimization
Loader and Linker
1 What is Program Relocation? Explain the use of EXTRN and ENTRY statements in linking.
2 What is the advantage of Overlay? How it works? Explain in detail.
3 A compiler typically generates a .OBJ file, which is later converted into .EXE or a .COM File.
Clearly describe the difference between the three files.

4 Explain an algorithm for pass 1 of linker.


5 Write the advantages of overlay techniques.
6 Write a short note on program relocation with suitable example.
7 Explain Object module and its components.
8 Write short note on Absolute Loader and Relocatable loader.
9 Define: Translated origin, Linked origin and Load origin.
10 Write short note on Self-relocatable programs.
11 What is the job of linker?
12 What is linked address?
13 Define overlay.
14 What is object module?
15 Explain non-relocatable, relocatable and self-relocating programs.
16 Differentiate between compilation and interpretation.
17 Differentiate between pure and impure interpreter.
18 Explain the design and operation of an interpreter.
19 What is the function of loader? Define an absolute loader.
20 Define the following terms:
1. Translated time origin
2. Linked origin
3. Relocation factor
4. Overlay
5. Loader
6. Object Module
7. Binary Program
21 Draw the block diagram of SEGDEF, EXTDEF, LEDAT and FIXUP records of an object record. Explain the
significance of each of them.
Important Questions: Gujarat Technological University Questions

Sub: System Programming Code: 2150708


22 Define: Linked time address
23 True/False? Justify: An object module is a binary program.
24 What are overlays?
25 Write a short note on:
a. Object Module
b. Self-locating programs
26 Define the following:
a. Public Definitions
b. External variables
c. Translated origin
d. Program relocation
e. Address sensitive instruction
f. Load time address
g. Absolute loader
System Software tools Interpreter and debugger
1 Discuss the following terms. i. Editors ii. Debug Monitors
2 Write a short note on Debug Monitor.
3 Draw and explain the structure of User Interface. Also explain Menulay and Hypercard UIMS.
4 Discuss the design of an Editor. Also explain all types of editors.
5 What is the importance of user interface in system software development?
6 Explain the facilities provided by Debug monitors.
7 Define: Structure Editor.
8 Write a short note on Debug Monitors

Anda mungkin juga menyukai