Friday, November 20, 2009

automat and compiler design online bits

Code No: 07A5EC20 Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1.A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
2. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
3.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
4.A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
5. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
6.Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
7.An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
8. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
9. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
10.Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 1
II. Fill in the Blanks:
11. Implicit type conversions also called ____________
12. The runtime representation of an object program in the logical address space consists of ___________.
13. The static data objects are created at ___________________.
14. The activations of procedures during the running of an entire program by a tree called _________.
15. The substitution of values for names whose values are constant is known as ______.
16. Activation records are sometimes called ______________.
17. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
18. The code improvement phase consists of _____________ followed by the application of transformation.
19. The replacement of an expressive operation by a cheaper one is called ________.
20. The relative address for a field name is relative to the __________ for that record.
-oOo-
Code No: 07A5EC20 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
2. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
3. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
4. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
5. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
6. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
7. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
8. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
9. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
10.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 2
II. Fill in the Blanks:
11. The activations of procedures during the running of an entire program by a tree called _________.
12. The substitution of values for names whose values are constant is known as ______.
13. Activation records are sometimes called ______________.
14. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
15. The code improvement phase consists of _____________ followed by the application of transformation.
16. The replacement of an expressive operation by a cheaper one is called ________.
17. The relative address for a field name is relative to the __________ for that record.
18. Implicit type conversions also called ____________
19. The runtime representation of an object program in the logical address space consists of ___________.
20. The static data objects are created at ___________________.
-oOo-
Code No: 07A5EC20 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
2. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
3. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
4. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
5. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
6. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
7. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
8.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
9. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
10. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 3
II. Fill in the Blanks:
11. Activation records are sometimes called ______________.
12. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
13. The code improvement phase consists of _____________ followed by the application of transformation.
14. The replacement of an expressive operation by a cheaper one is called ________.
15. The relative address for a field name is relative to the __________ for that record.
16. Implicit type conversions also called ____________
17. The runtime representation of an object program in the logical address space consists of ___________.
18. The static data objects are created at ___________________.
19. The activations of procedures during the running of an entire program by a tree called _________.
20. The substitution of values for names whose values are constant is known as ______.
-oOo-
Code No: 07A5EC20 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
2. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
3. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
4. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
5. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
6.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
7. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
8. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
9. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
10. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 4
II. Fill in the Blanks:
11. The code improvement phase consists of _____________ followed by the application of transformation.
12. The replacement of an expressive operation by a cheaper one is called ________.
13. The relative address for a field name is relative to the __________ for that record.
14. Implicit type conversions also called ____________
15. The runtime representation of an object program in the logical address space consists of ___________.
16. The static data objects are created at ___________________.
17. The activations of procedures during the running of an entire program by a tree called _________.
18. The substitution of values for names whose values are constant is known as ______.
19. Activation records are sometimes called ______________.
20. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
-oOo-

No comments: