Code
No: 56031
Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL
UNIVERSITY HYDERABAD III B.Tech. II Sem., II Mid-Term Examinations, April – 2012
COMPILER
DESIGN
Objective Exam
|
Answer All
Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 10.
|
I
|
Choose
the correct alternative:
|
|
|
|
1.
|
Uniform symbol table
a) Contains all constants in the program
b) Is a permanent table of decision rules in the form of patterns for matching
with the uniform
|
[
|
]
|
symbol table to discover syntactic structure
|
5. An optimized compiler
[ ]
a) Is optimized to occupy less space b) Is optimized to take less time
for execution c) Optimize the code d)
Optimize to small typing font
6. At a point in a program if the value of the variable can be used subsequently,
then that variable is[ ]
a) Live b) Dead c) Duplicate d) Aliasing
7. Which of the following is not a
peephole optimization?
[ ]
a) Removal of unreachable code b)
Elimination of multiple groups c) Elimination of loop invariant compilation d) Loop unrolling
|
8.
|
In loop optimization technique whose body a) Dead
code b) Blank code
|
is rarely executed is
c) Redundant code d) Blank stripper
|
[
|
]
|
|
9.
|
Machine independent optimization is a) Register allocation
|
b) Frequency reduction
|
[
|
]
|
|
|
c) Data intermixed
with instructions
|
d) Machine features instructions
|
|
|
|
10.
|
In DAG the interior nodes are
labeled with
|
|
[
|
]
|
a) Number in DFS b) Number in BFS c) Identifiers d) Special colors
Code
No: 56031 :2: Set
No. 1
II Fill in the blanks
11. The allocation
which manages storage for all data
objects at compile time .
12. Dynamic
allocation of storage areas with VSAM
files is accomplished by .
13. A region of validity every name possesses
in the source program is .
14. Machine independent code optimization
can be applied to .
15. The evaluation which avoids the action
at all which is clearly advantageous
is .
16. Peep-hole optimization is form of .
17. The cannot be used to identify loops.
18. Deducing at compile time that the value
of an expression is a constant and using
that constant instead is
.
19. In DAG, interior nodes are labeled by .
20. Structure preserving transformations on basic blocks are .
-oOo-
Code
No: 56031
Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY
HYDERABAD III B.Tech. II Sem., II Mid-Term Examinations,
April – 2012
COMPILER
DESIGN
Objective Exam
|
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min.
Marks: 10.
|
I
1.
|
Choose
the correct alternative:
In analyzing the compilation of a program ‘machine
independent optimization’ is associated with [
|
]
|
|
|
a) Recognition
of basic syntactic construction
through reduction
b) Recognition of basic elements and creation of uniform symbols c) Creation of more optimal matrix
d) Use of macro processor to produce more
optimal assembly code
|
|
|
2.
|
An optimized compiler
[
a) Is optimized to occupy less space b) Is optimized to take less time for
execution c) Optimize the code d)
Optimize to small typing font
|
]
|
|
3.
|
At a point in a program if the value of the variable can be used subsequently, then that variable is[
|
]
|
a) Live b) Dead c) Duplicate d) Aliasing
4. Which of the following is not a
peephole optimization? [ ]
a) Removal of unreachable code b)
Elimination of multiple groups c) Elimination of loop invariant compilation d) Loop unrolling
|
5.
|
In loop optimization technique whose body a) Dead
code b)
Blank code
|
is rarely executed is
c) Redundant code d) Blank stripper
|
[
|
]
|
|
6.
|
Machine independent optimization is a) Register allocation
|
b) Frequency reduction
|
[
|
]
|
|
|
c) Data intermixed
with instructions
|
d) Machine features instructions
|
|
|
|
7.
|
In DAG the interior nodes are
labeled with
|
|
[
|
]
|
a) Number in DFS b) Number in BFS c) Identifiers d) Special colors
8. Uniform symbol table [ ]
a) Contains all constants in
the program
b) Is a
permanent table of decision
rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure
c) Consists of
full or partial list of tokens as they appear in program created by lexical
analysis and used for syntax analysis and interpretation
d) A permanent table which lists all
keywords and special symbols of language in symbolic
form
9. The storage strategy in which
activation record is maintained even after
the execution of a procedure is completed.
[ ] a) Stack allocation b)
Heap allocation c)
Static allocation d) Dynamic allocation
10. The following symbol table implementation
has the minimum
access time [ ]
a) Linear list b) Search tree c) Hash
table d) Self-organizing list
Code
No: 56031 :2: Set
No. 2
II Fill in the blanks
11. Machine independent code optimization
can be applied to .
12. The evaluation which avoids the action
at all which is clearly advantageous
is .
13. Peep-hole optimization is form of .
14. The cannot be used to identify loops.
15. Deducing at compile time that the value
of an expression is a constant and using
that constant instead is
.
16. In DAG, interior nodes are labeled by .
17. Structure preserving transformations on basic blocks are .
18. The allocation which manages storage for all data objects at compile time
.
19. Dynamic
allocation of storage areas with VSAM
files is accomplished by .
20. A region of validity every name possesses
in the source program is .
-oOo-
Code
No: 56031
Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL
UNIVERSITY HYDERABAD III B.Tech. II Sem., II Mid-Term Examinations, April – 2012
COMPILER
DESIGN
Objective Exam
|
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min.
Marks: 10.
I Choose the correct alternative:
1. At a point in a program if the value of the variable can be used subsequently,
then that variable is[ ]
a) Live b) Dead c) Duplicate d) Aliasing
2. Which of the following is not a
peephole optimization?
[ ]
a) Removal of unreachable code b)
Elimination of multiple groups c) Elimination of loop invariant compilation d) Loop unrolling
|
3.
|
In loop optimization technique whose body a) Dead
code b)
Blank code
|
is rarely executed is
c) Redundant code d) Blank stripper
|
[
|
]
|
|
4.
|
Machine independent optimization is a) Register allocation
|
b) Frequency reduction
|
[
|
]
|
|
|
c) Data intermixed
with instructions
|
d) Machine features instructions
|
|
|
|
5.
|
In DAG the interior nodes are
labeled with
|
|
[
|
]
|
a) Number in DFS b) Number in BFS c) Identifiers d) Special colors
6. Uniform symbol table
[ ]
a) Contains all constants in
the program
b) Is a permanent
table of decision rules in
the form of patterns for matching with the uniform symbol table to discover syntactic structure
|
10. An optimized
compiler
[ ]
a) Is optimized to occupy less space b) Is optimized to take less time
for execution c) Optimize the code d)
Optimize to small typing font
Cont……2
Code
No: 56031 :2: Set
No. 3
II Fill in the blanks
11. Peep-hole optimization is form of .
12. The cannot be used to identify loops.
13. Deducing at compile time that the value
of an expression is a constant and using
that constant instead is
.
14. In DAG, interior nodes are labeled by .
15. Structure preserving transformations on basic blocks are .
16. The allocation
which manages storage for all data
objects at compile time .
17. Dynamic
allocation of storage areas with VSAM
files is accomplished by .
18. A region of validity every name possesses
in the source program is .
19. Machine independent code optimization
can be applied to .
20. The evaluation which avoids the action
at all which is clearly advantageous
is .
-oOo-
Code
No: 56031
Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL
UNIVERSITY HYDERABAD III B.Tech. II Sem., II Mid-Term Examinations, April – 2012
COMPILER
DESIGN
Objective Exam
|
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min.
Marks: 10.
|
I
1.
|
Choose
the correct alternative:
In loop optimization technique whose body
|
is rarely executed is
|
[
|
]
|
|
|
a) Dead
code b)
Blank code
|
c) Redundant
code d)
Blank stripper
|
|
|
|
2.
|
Machine independent optimization is a) Register allocation
|
b) Frequency reduction
|
[
|
]
|
|
|
c) Data intermixed
with instructions
|
d) Machine features instructions
|
|
|
|
3.
|
In DAG the interior nodes are
labeled with
|
|
[
|
]
|
a) Number in DFS b) Number in BFS c) Identifiers d) Special colors
4. Uniform symbol table
[ ]
a) Contains all constants in
the program
b) Is a
permanent table of decision
rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure
|
8. An optimized compiler
[ ]
a) Is optimized to occupy less space b) Is optimized to take less time
for execution c) Optimize the code d)
Optimize to small typing font
9. At a point in a program if the value of the variable can be used subsequently,
then that variable is[ ]
a) Live b) Dead c) Duplicate d) Aliasing
10. Which of the following is not a peephole
optimization?
[ ]
a) Removal of unreachable code b)
Elimination of multiple groups c) Elimination of loop invariant compilation d) Loop unrolling
Cont……2
Code
No: 56031 :2: Set
No. 4
II Fill in the blanks
11. Deducing at compile time that the value
of an expression is a constant and using
that constant instead is
.
12. In DAG, interior nodes are labeled by .
13. Structure preserving transformations on basic blocks are .
14. The allocation
which manages storage for all data
objects at compile time .
15. Dynamic
allocation of storage areas with VSAM
files is accomplished by .
16. A region of validity every name possesses
in the source program is .
17. Machine independent code optimization
can be applied to .
18. The evaluation which avoids the action
at all which is clearly advantageous
is .
19. Peep-hole optimization is form of .
20. The cannot be used to identify loops.
-oOo-
Code No: 56031
Set No. 1
COMPILER DESIGN KEYS
I Choose
the correct alternative:
1. C
2. B
3. B
4. C
5. C
6. A
7. C
8. D
9. C
10. C
II Fill
in the blanks
11. Static
12. Control splits
13. Scope
14. Intermediate
representation
15. Lazy
16. Local optimization
17. Flow chart
18. Constant folding
19. Operator symbol
20. Dead code elimination
-oOo-
No comments:
Post a Comment