GATE 2009
March 14, 2025
GATE 2008
March 14, 2025
GATE 2009
March 14, 2025
GATE 2008
March 14, 2025

GATE 2009

Question 42

Which of the following statements are TRUE?

    I.There exist parsing algorithms for some programming languages whose complexities are less than θ(n3).
    II.A programming language which allows recursion can be implemented with static storage.
    III.No L-attributed definition can be evaluated in the framework of bottom-up parsing.
    IV.Code improving transformations can be performed at both source language and intermediate code level.
A
I and II
B
I and IV
C
III and IV
D
I, III and IV
Question 42 Explanation: 
Statement II is false, as a programming language which allows recursion requires dynamic storage allocation. Statement III is false, as L-attributed definition (assume for instance the L-attributed definition has synthesized attribute only) can be evaluated in bottom up framework.
Statement I is true, as the bottom up and top down parser take O(n) time to parse the string , i.e. only one scan of input is required.
Statement IV is true,Code improving transformations can be performed at both source language and intermediate code level. For example implicit type casting is also a kind of code improvement which is done during semantic analysis phase and intermediate code optimization is a topic itself which uses various techniques to improve the code such as loop unrolling, loop invariant.
Correct Answer: B
Question 42 Explanation: 
Statement II is false, as a programming language which allows recursion requires dynamic storage allocation. Statement III is false, as L-attributed definition (assume for instance the L-attributed definition has synthesized attribute only) can be evaluated in bottom up framework.
Statement I is true, as the bottom up and top down parser take O(n) time to parse the string , i.e. only one scan of input is required.
Statement IV is true,Code improving transformations can be performed at both source language and intermediate code level. For example implicit type casting is also a kind of code improvement which is done during semantic analysis phase and intermediate code optimization is a topic itself which uses various techniques to improve the code such as loop unrolling, loop invariant.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x