JNTU

JNTU B.Tech III AUTOMATA AND COMPILER DESIGN Previous Question Paper (November/December - 2018 - R15)

B.Tech | III | I | R15 | November/December - 2018

Answer PaperPaper Code: 125DRMaximum Marks: 75Time: 3 hours

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.

PART - A

125 marks
a

Define DFA with example.

2 marks

Answer

A Deterministic Finite Automaton (DFA) is a 5-tuple (Q, Σ, δ, q0, F) where Q is a finite set of states, Σ is a finite set of input symbols, δ: Q × Σ → Q is the transition function, q0 is the start state, and F is the set of final states. For every state and input symbol, there is exactly one transition to a next state. Example: A DFA accepting strings over {0, 1} ending with '1' has states {q0, q1} with δ(q0, 0)=q0, δ(q0, 1)=q1, δ(q1, 0)=q0, δ(q1, 1)=q1, where q1 is the final state.

b

Define the following terms - Compiler, Interpreter, and Translator.

3 marks

Answer

Compiler: A program that translates source code written in a high-level language into machine code or assembly language in one go before execution. Interpreter: A program that translates and executes source code line-by-line or statement-by-statement. Translator: A generic term for any program that converts code from one programming language (source) to another (target) while preserving the original meaning.

c

What are types of LR parsers? Compare them.

2 marks

Answer

Sign in to view the complete answer paper.

d

What are the conflicts occur during shift-reduce parsing.

3 marks

Answer

Sign in to view the complete answer paper.

e

What is meant by name equivalence? Give an example.

2 marks

Answer

Sign in to view the complete answer paper.

f

Define CFG and CSG with an example.

3 marks

Answer

Sign in to view the complete answer paper.

g

What are the limitations of static allocation?

2 marks

Answer

Sign in to view the complete answer paper.

h

What is dead code elimination?

3 marks

Answer

Sign in to view the complete answer paper.

i

What is relocatable machine code?

2 marks

Answer

Sign in to view the complete answer paper.

j

Define address descriptor and discuss its importance.

3 marks

Answer

Sign in to view the complete answer paper.

PART - B

210 marks
a

Construct a NFA with Є equivalent to the regular expression: 10 + (0 + 11)0*1

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain the role Lexical Analyzer and issues of Lexical Analyzer in compiler design.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Write a CFG that generates equal number of a’s and b’s.

5 marks

Answer

Sign in to view the complete answer paper.

b

Construct the predictive parser the following grammar: S→(L)|a ; L→L,S|S

5 marks

Answer

Sign in to view the complete answer paper.

4

Construct LALR parsing table for the grammar given below: S→CC; C →cC|d

10 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Write the short note on: i) Abstract syntax tree ii) Polish notation iii) Three address code

6 marks

Answer

Sign in to view the complete answer paper.

b

What is dependency graph? What is its significance?

4 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Explain in detail Chomsky hierarchy of languages.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail type conversion with suitable examples.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Give some solutions to resolve an overloaded symbol.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write short note on function overloading.

5 marks

Answer

Sign in to view the complete answer paper.

8

Explain the different storage allocation strategies.

10 marks

Answer

Sign in to view the complete answer paper.

OR
9

Explain the principle sources of optimization.

10 marks

Answer

Sign in to view the complete answer paper.

10

State and explain different machine dependent code optimization techniques.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain why Next-use information is required for generating object code.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail about DAG for register allocation 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 AUTOMATA AND COMPILER DESIGN from JNTU for B.Tech IT III I, November/December - 2018, R15.

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

Other papers in AUTOMATA AND COMPILER DESIGN

Loading Question Papers

Fetching data from database...