Exam Details
Subject | compiler design | |
Paper | ||
Exam / Course | b.tech | |
Department | ||
Organization | Institute Of Aeronautical Engineering | |
Position | ||
Exam Date | November, 2018 | |
City, State | telangana, hyderabad |
Question Paper
Hall Ticket No Question Paper Code: AIT004
INSTITUTE OF AERONAUTICAL ENGINEERING
(Autonomous)
Four Year B.Tech V Semester End Examinations (Regular) November, 2018
Regulation: IARE R16
COMPILER DESIGN
Time: 3 Hours (Common to CSE IT) Max Marks: 70
Answer ONE Question from each Unit
All Questions Carry Equal Marks
All parts of the question must be answered in one place only
UNIT I
1. What are the difficulties with generalized Top down Parsing?
Left Recursive grammar
Backtracking
Rejection of valid string
Error reporting
Explain in detail about the phases of compiler and translate the statement while A>B do
A=A+B.
2. How do you eliminate left recursion for a given grammar? Write the procedure to remove left
recursion. Remove the left recursion for the given grammar: a jBa bjCb
cjAc
What are the First and Follow sets for the following grammar? The start non-terminal is E.[7M]
E A
E L
A n
A i
L
S S
S E
UNIT II
3. Show that the following simplified if-then-else grammar is not
ictS jictSeSj a
Explain various types of bottom-up parsers with example. Write the steps to construct
parsing table
Page 1 of 2
4. Find the SLR parsing table for the given grammar and parse the sentence c
E E E/E
Explain the LR parsing algorithm with an example.
UNIT III
5. What is the role of semantic analysis in compiler construction? How do we fix the attributes to
the grammar symbols representing the language construct?
What is syntax tree? Draw the annotated parse-tree for the input 3*5+4n.
6. Generate intermediate code for the following code segment along with the required syntax directed
translation scheme:
if a b
x a b
else
x a b
Where a and x are of real and b of int type data
How do you implement syntax directed definitions? Explain intermediate form of source program
with example.
UNIT IV
7. What is type checking? Explain type checking in compiler construction with a suitable example.
What are various storage allocations in runtime environment? Discuss the features of stack
memory allocation.
8. What is the concept of activation record? List and explain all elements related to activation
record. Also differentiate call by copy restore and call by name.
Explain single hash table to implement symbol table. Also define scope rules for the process of
implementation.
UNIT V
9. What is code optimization? Explain about various levels and types of optimizations.
What are the good and bad outcomes of optimization? Explain with example.
10. Write the simple code generation algorithm and generate the code for the statement
Explain the three techniques for loop optimization with examples
INSTITUTE OF AERONAUTICAL ENGINEERING
(Autonomous)
Four Year B.Tech V Semester End Examinations (Regular) November, 2018
Regulation: IARE R16
COMPILER DESIGN
Time: 3 Hours (Common to CSE IT) Max Marks: 70
Answer ONE Question from each Unit
All Questions Carry Equal Marks
All parts of the question must be answered in one place only
UNIT I
1. What are the difficulties with generalized Top down Parsing?
Left Recursive grammar
Backtracking
Rejection of valid string
Error reporting
Explain in detail about the phases of compiler and translate the statement while A>B do
A=A+B.
2. How do you eliminate left recursion for a given grammar? Write the procedure to remove left
recursion. Remove the left recursion for the given grammar: a jBa bjCb
cjAc
What are the First and Follow sets for the following grammar? The start non-terminal is E.[7M]
E A
E L
A n
A i
L
S S
S E
UNIT II
3. Show that the following simplified if-then-else grammar is not
ictS jictSeSj a
Explain various types of bottom-up parsers with example. Write the steps to construct
parsing table
Page 1 of 2
4. Find the SLR parsing table for the given grammar and parse the sentence c
E E E/E
Explain the LR parsing algorithm with an example.
UNIT III
5. What is the role of semantic analysis in compiler construction? How do we fix the attributes to
the grammar symbols representing the language construct?
What is syntax tree? Draw the annotated parse-tree for the input 3*5+4n.
6. Generate intermediate code for the following code segment along with the required syntax directed
translation scheme:
if a b
x a b
else
x a b
Where a and x are of real and b of int type data
How do you implement syntax directed definitions? Explain intermediate form of source program
with example.
UNIT IV
7. What is type checking? Explain type checking in compiler construction with a suitable example.
What are various storage allocations in runtime environment? Discuss the features of stack
memory allocation.
8. What is the concept of activation record? List and explain all elements related to activation
record. Also differentiate call by copy restore and call by name.
Explain single hash table to implement symbol table. Also define scope rules for the process of
implementation.
UNIT V
9. What is code optimization? Explain about various levels and types of optimizations.
What are the good and bad outcomes of optimization? Explain with example.
10. Write the simple code generation algorithm and generate the code for the statement
Explain the three techniques for loop optimization with examples
Other Question Papers
Subjects
- ac machines
- advanced databases
- aircraft materials and production
- aircraft performance
- aircraft propulsion
- aircraft systems and controls
- analog communications
- analysis of aircraft production
- antennas and propagation
- applied physics
- applied thermodynamics
- basic electrical and electronics engineering
- basic electrical engineering
- building materials construction and planning
- business economics and financial analysis
- compiler design
- complex analysis and probability distribution
- computational mathematics and integral calculus
- computer networks
- computer organization
- computer organization and architecture
- computer programming
- concrete technology
- control systems
- data structures
- database management systems
- dc machines and transformers
- design and analysis of algorithms
- design of machine members
- digital and pulse circuits
- digital communications
- digital ic applications using vhdl
- digital logic design
- digital system design
- disaster management
- disaster management and mitigation
- discrete mathematical structures
- dynamics of machinery
- electrical circuits
- electrical measurements and instrumentation
- electrical technology
- electromagnetic field theory
- electromagnetic theory and transmission lines
- electronic circuit analysis
- electronic devices and circuits
- elements of mechanical engineering
- engineering chemistry
- engineering drawing
- engineering geology
- engineering mechanics
- engineering physics
- english
- english for communication
- environmental studies
- finite element methods
- fluid mechanics
- fluid mechanics and hydraulics
- fundamental of electrical and electronics engineering
- fundamental of electrical engineering
- gender sensitivity
- geotechnical engineering
- heat transfer
- high speed aerodynamics
- hydraulics and hydraulic machinery
- image processing
- industrial automation and control
- instrumentation and control systems
- integrated circuits applications
- introduction to aerospace engineering
- kinematics of machinery
- linear algebra and calculus
- linear algebra and ordinary differential equations
- low speed aerodynamics
- machine tools and metrology
- mathematical transform techniques
- mathematical transforms techniques
- mechanics of fluids and hydraulic machines
- mechanics of solids
- mechanism and machine design
- metallurgy and material science
- microprocessor and interfacing
- modern physics
- network analysis
- object oriented analysis and design
- object oriented programming through java
- operating systems
- optimization techniques
- power electronics
- power generation systems
- probability and statistics
- probability theory and stochastic processes
- production technology
- programming for problem solving
- pulse and digital circuits
- reinforced concrete structures design and drawing
- software engineering
- strength of materials - i
- strength of materials - ii
- structural analysis
- surveying
- theory of computation
- theory of structures
- thermal engineering
- thermo dynamics
- thermodynamics
- tool design
- transmission and distribution systems
- unconventional machining processes
- waves and optics
- web technologies