JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III COMPILER DESIGN Previous Question Paper (February - 2023 - R16)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
PART A
Define linker and loader.
Answer
A linker is a program that takes one or more object files generated by a compiler and combines them into a single executable file by resolving external references. A loader is a part of the operating system that places the executable file into main memory and prepares it for execution.
Write a short note on regular expression.
Answer
A regular expression is a notation used to define the set of strings accepted by a finite automaton. It uses operators like union (|), concatenation, and Kleene closure (*) to describe patterns in lexical analysis, providing a concise way to represent tokens in a programming language.
Explain context free grammar.
Answer
Sign in to view the complete answer paper.
Compute FIRSTs and FOLLOWs for the following grammar R→R+R, R→R*R, R→R/R, R→(R), R→id
Answer
Sign in to view the complete answer paper.
What are the evaluation orders for syntax directed definitions?
Answer
Sign in to view the complete answer paper.
Explain the variants of syntax trees.
Answer
Sign in to view the complete answer paper.
What is trace based collection?
Answer
Sign in to view the complete answer paper.
Explain the addresses in the target code.
Answer
Sign in to view the complete answer paper.
Define strength reduction.
Answer
Sign in to view the complete answer paper.
Discuss about common sub expression elimination.
Answer
Sign in to view the complete answer paper.
PART B
Define compiler. Explain various phases of compiler with neat sketch.
Answer
Sign in to view the complete answer paper.
Explain various error recovery strategies in lexical analysis.
Answer
Sign in to view the complete answer paper.
Construct a Finite automata and scanning algorithm for recognizing identifiers, numerical constants in ‘C’ language.
Answer
Sign in to view the complete answer paper.
What is left recursion? Describe the algorithm used for eliminating left recursion.
Answer
Sign in to view the complete answer paper.
Eliminate left recursion in the following grammar: E → E + T / T, T → T * F / F, F → (E) / id
Answer
Sign in to view the complete answer paper.
Write an algorithm for computing LR(K) item sets.
Answer
Sign in to view the complete answer paper.
Differentiate between Top down and Bottom up parsing techniques.
Answer
Sign in to view the complete answer paper.
Construct a Quadruple, Triple and Indirect triple for the statement a + a * (b – c) + (b – c) * d
Answer
Sign in to view the complete answer paper.
How are inherited attributes differ from synthesized attributes?
Answer
Sign in to view the complete answer paper.
Give syntax directed translation scheme for simple desk calculator.
Answer
Sign in to view the complete answer paper.
Explain various storage allocation strategies with an example.
Answer
Sign in to view the complete answer paper.
What is a basic block? How to construct a basic block?
Answer
Sign in to view the complete answer paper.
Explain peephole optimization with an illustrative example.
Answer
Sign in to view the complete answer paper.
Explain the following with an example: a) Constant Propagation b) Partial Redundancy Elimination.
Answer
Sign in to view the complete answer paper.
Explain loop optimization techniques with example.
Answer
Sign in to view the complete answer paper.
Explain various notations used in data flow analysis.
Answer
Sign in to view the complete answer paper.