Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech III COMPILER DESIGN Previous Question Paper (May - 2019 - R16)

B.Tech | III | II | R16 | May - 2019

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

Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.

Part A

1.a

Define regular expression.

2 marks

Answer

A regular expression is a notation used to define a regular language by describing a set of strings over a given alphabet. It is constructed recursively using basic operations: union (denoted by | or +), concatenation (denoted by juxtaposition), and Kleene closure (denoted by *), starting from the empty string, the empty set, and individual symbols from the alphabet.

1.b

Define linker and loader and explain briefly.

3 marks

Answer

A linker is a system program that takes one or more object files generated by a compiler or assembler and combines them into a single executable file. It resolves references to external symbols, such as functions or variables defined in separate modules or libraries, by assigning final memory addresses to them.

A loader is a part of the operating system that takes the executable file produced by the linker and places it into the main memory (RAM) to prepare it for execution. It performs tasks such as allocating memory space, initializing registers, and setting the program counter to the starting address of the program.

1.c

Define ambiguous grammar.

2 marks

Answer

Sign in to view the complete answer paper.

1.d

Compare SLR, CLR and LALR.

3 marks

Answer

Sign in to view the complete answer paper.

1.e

What is coercion?

2 marks

Answer

Sign in to view the complete answer paper.

1.f

How to find evaluation order for SDD’s?

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What are the limitations of static allocation?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

Write the fields and uses of symbol table.

3 marks

Answer

Sign in to view the complete answer paper.

1.i

What is common sub-expression elimination? Explain.

2 marks

Answer

Sign in to view the complete answer paper.

1.j

What are induction variables? What is induction variable elimination?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Explain the procedure to convert regular expression to Finite automata.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain various phases in the construction of compiler with a neat sketch.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

What is the functionality of preprocessing and input buffering?

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain compiler construction tools.

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: 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

What is ambiguous grammar? Show that following grammar is ambiguous or not. A → A + A | A − A | A * A | a

5 marks

Answer

Sign in to view the complete answer paper.

b

Verify whether the following grammar is LL(1) or not? E → E + T | T, T → T * F | F, F → (F) | a | b.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

What are three address codes? Explain different types of representations of three address code.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write three codes for x := A[y, z]

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

What is type checker? Explain the specification of a simple type checker.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain translation schema for array elements.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Explain about Heap management.

5 marks

Answer

Sign in to view the complete answer paper.

b

Define reference counting. What is the role of reference counting in garbage collection?

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Give the detailed description on DAG.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain different methods for register allocation and assignment.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Explain redundancy elimination techniques.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write the principal sources of optimization.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain loop optimization technique with example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain constant propagation with example.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of COMPILER DESIGN from Jawaharlal Nehru Technological University Hyderabad for B.Tech CSE III II, May - 2019, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in COMPILER DESIGN

Loading Question Papers

Fetching data from database...