Exam Details
| Subject | advanced compiler design | |
| Paper | ||
| Exam / Course | m.tech. (computer science & engineering) | |
| Department | ||
| Organization | Government Degree College, Kamalpur | |
| Position | ||
| Exam Date | December, 2017 | |
| City, State | tripura, dhalai |
Question Paper
Page 1 of 3
Name
Reg No
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
07 THRISSUR CLUSTER
SECOND SEMESTER M.TECH. DEGREE EXAMINATION APRIL 2018
Computer Science and Engineering
Computer Science and Engineering
07CS6102
ADVANCED COMPILER DESIGN
Time 3 hours
Max. Marks: 60
Answer all six questions. Part of each question is compulsory.
Answer either part or part of each question
Q.no.
Module 1
Marks
1a
Explain the differences between inherited and synthesized attributes.
4
Answer b or c
b
Construct a Syntax-Directed Translation scheme that translates arithmetic expressions from infix to postfix notation. Solution should include the context-free grammar, the semantic attributes for each of the grammar symbols, and semantic rules. Show the application of the scheme to the input
5
c
Construct a SDD for simple type expression, give annotated parse trees for the following expressions
int
ii) float
5
Q.no.
Module 2
Marks
2a
Write in detail about translation of switch statement.
4
Answer b or c
b
Write the semantic rules for the generation of three address statements for Boolean expression and flow of control statements. Show the three address statements for The following statement
if( a>b ll a>c a
5
c
Write the three address code for the assignment
and implement using triples, quadruples and indirect triples.
5
Page 2 of 3
Q.no.
Module 3
Marks
3a
Explain concept of nonlocal data access on stack.
4
Answer b or c
b
Outline the heap management process. How allocation and deallocation of space within the heap can be managed?
5
c
What is an Activation tree? Discuss the significance of activation tree and activation records in Compiler.
5
Q.no.
Module 4
Marks
4a
Discuss different methods used in peephole optimization
4
Answer b or c
b
Describe code generation algorithm for translating intermediate code to target code.
5
c
Explain algorithm for partitioning Three-address Instructions into Basic Blocks. Draw the flow graph representation for the given intermediate code.
5
Q.no.
Module 5
Marks
5a
Explain about some semantic preserving transformations.
5
Answer b or c
b
For the program below:
1. Determine the corresponding control flow graph.
2. Determine the dominators of each node in the CFG
3. Show the immediate dominator tree
4. Identify the set of nodes in each natural loop. Are the loops nested? Why?
7
Page 3 of 3
c
Discuss about data flow analysis in detail.
7
Q.no.
Module 6
Marks
6a
Discuss about instruction level parallelism using the concept of pipelining.
5
Answer b or c
b
What are different code scheduling constraints? Explain in detail.
7
c
What is meant by basic block scheduling? Write an algorithm for list scheduling.
7
Name
Reg No
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
07 THRISSUR CLUSTER
SECOND SEMESTER M.TECH. DEGREE EXAMINATION APRIL 2018
Computer Science and Engineering
Computer Science and Engineering
07CS6102
ADVANCED COMPILER DESIGN
Time 3 hours
Max. Marks: 60
Answer all six questions. Part of each question is compulsory.
Answer either part or part of each question
Q.no.
Module 1
Marks
1a
Explain the differences between inherited and synthesized attributes.
4
Answer b or c
b
Construct a Syntax-Directed Translation scheme that translates arithmetic expressions from infix to postfix notation. Solution should include the context-free grammar, the semantic attributes for each of the grammar symbols, and semantic rules. Show the application of the scheme to the input
5
c
Construct a SDD for simple type expression, give annotated parse trees for the following expressions
int
ii) float
5
Q.no.
Module 2
Marks
2a
Write in detail about translation of switch statement.
4
Answer b or c
b
Write the semantic rules for the generation of three address statements for Boolean expression and flow of control statements. Show the three address statements for The following statement
if( a>b ll a>c a
5
c
Write the three address code for the assignment
and implement using triples, quadruples and indirect triples.
5
Page 2 of 3
Q.no.
Module 3
Marks
3a
Explain concept of nonlocal data access on stack.
4
Answer b or c
b
Outline the heap management process. How allocation and deallocation of space within the heap can be managed?
5
c
What is an Activation tree? Discuss the significance of activation tree and activation records in Compiler.
5
Q.no.
Module 4
Marks
4a
Discuss different methods used in peephole optimization
4
Answer b or c
b
Describe code generation algorithm for translating intermediate code to target code.
5
c
Explain algorithm for partitioning Three-address Instructions into Basic Blocks. Draw the flow graph representation for the given intermediate code.
5
Q.no.
Module 5
Marks
5a
Explain about some semantic preserving transformations.
5
Answer b or c
b
For the program below:
1. Determine the corresponding control flow graph.
2. Determine the dominators of each node in the CFG
3. Show the immediate dominator tree
4. Identify the set of nodes in each natural loop. Are the loops nested? Why?
7
Page 3 of 3
c
Discuss about data flow analysis in detail.
7
Q.no.
Module 6
Marks
6a
Discuss about instruction level parallelism using the concept of pipelining.
5
Answer b or c
b
What are different code scheduling constraints? Explain in detail.
7
c
What is meant by basic block scheduling? Write an algorithm for list scheduling.
7
Other Question Papers
Subjects
- advanced compiler design
- advanced networking technologies
- advanced parallel computing
- advanced software engineering
- algorithms and complexity
- bigdata analytics
- cloud computing
- computer vision
- distributed and mobile operating systems
- machine learning and language processing
- mathematical foundation of computer science
- softcomputing
- topics in database system and design