JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III COMPILER DESIGN Previous Question Paper (February - 2023 - R16)

B.Tech | III | II | R16 | February - 2023

Answer PaperPaper Code: 136AQMaximum Marks: 75Time: 3 Hours

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

125 marks
a

Define linker and loader.

2 marks

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.

b

Write a short note on regular expression.

3 marks

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.

c

Explain context free grammar.

2 marks

Answer

Sign in to view the complete answer paper.

d

Compute FIRSTs and FOLLOWs for the following grammar R→R+R, R→R*R, R→R/R, R→(R), R→id

3 marks

Answer

Sign in to view the complete answer paper.

e

What are the evaluation orders for syntax directed definitions?

2 marks

Answer

Sign in to view the complete answer paper.

f

Explain the variants of syntax trees.

3 marks

Answer

Sign in to view the complete answer paper.

g

What is trace based collection?

2 marks

Answer

Sign in to view the complete answer paper.

h

Explain the addresses in the target code.

3 marks

Answer

Sign in to view the complete answer paper.

i

Define strength reduction.

2 marks

Answer

Sign in to view the complete answer paper.

j

Discuss about common sub expression elimination.

3 marks

Answer

Sign in to view the complete answer paper.

PART B

2

Define compiler. Explain various phases of compiler with neat sketch.

10 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Explain various error recovery strategies in lexical analysis.

5 marks

Answer

Sign in to view the complete answer paper.

b

Construct a Finite automata and scanning algorithm for recognizing identifiers, numerical constants in ‘C’ language.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

What is left recursion? Describe the algorithm used for eliminating left recursion.

5 marks

Answer

Sign in to view the complete answer paper.

b

Eliminate left recursion in the following grammar: E → E + T / T, T → T * F / F, F → (E) / id

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Write an algorithm for computing LR(K) item sets.

5 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between Top down and Bottom up parsing techniques.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Construct a Quadruple, Triple and Indirect triple for the statement a + a * (b – c) + (b – c) * d

6 marks

Answer

Sign in to view the complete answer paper.

b

How are inherited attributes differ from synthesized attributes?

4 marks

Answer

Sign in to view the complete answer paper.

OR
7

Give syntax directed translation scheme for simple desk calculator.

10 marks

Answer

Sign in to view the complete answer paper.

8

Explain various storage allocation strategies with an example.

10 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

What is a basic block? How to construct a basic block?

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain peephole optimization with an illustrative example.

5 marks

Answer

Sign in to view the complete answer paper.

10

Explain the following with an example: a) Constant Propagation b) Partial Redundancy Elimination.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain loop optimization techniques with example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain various notations used in data flow analysis.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPILER DESIGN from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE III II, February - 2023, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in COMPILER DESIGN

Loading Question Papers

Fetching data from database...