JNTU
JNTU B.Tech III AUTOMATA AND COMPILER DESIGN Previous Question Paper (November/December - 2018 - R15)
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
Define DFA with example.
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.
Define the following terms - Compiler, Interpreter, and Translator.
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.
What are types of LR parsers? Compare them.
Answer
Sign in to view the complete answer paper.
What are the conflicts occur during shift-reduce parsing.
Answer
Sign in to view the complete answer paper.
What is meant by name equivalence? Give an example.
Answer
Sign in to view the complete answer paper.
Define CFG and CSG with an example.
Answer
Sign in to view the complete answer paper.
What are the limitations of static allocation?
Answer
Sign in to view the complete answer paper.
What is dead code elimination?
Answer
Sign in to view the complete answer paper.
What is relocatable machine code?
Answer
Sign in to view the complete answer paper.
Define address descriptor and discuss its importance.
Answer
Sign in to view the complete answer paper.
PART - B
Construct a NFA with Є equivalent to the regular expression: 10 + (0 + 11)0*1
Answer
Sign in to view the complete answer paper.
Explain the role Lexical Analyzer and issues of Lexical Analyzer in compiler design.
Answer
Sign in to view the complete answer paper.
Write a CFG that generates equal number of a’s and b’s.
Answer
Sign in to view the complete answer paper.
Construct the predictive parser the following grammar: S→(L)|a ; L→L,S|S
Answer
Sign in to view the complete answer paper.
Construct LALR parsing table for the grammar given below: S→CC; C →cC|d
Answer
Sign in to view the complete answer paper.
Write the short note on: i) Abstract syntax tree ii) Polish notation iii) Three address code
Answer
Sign in to view the complete answer paper.
What is dependency graph? What is its significance?
Answer
Sign in to view the complete answer paper.
Explain in detail Chomsky hierarchy of languages.
Answer
Sign in to view the complete answer paper.
Explain in detail type conversion with suitable examples.
Answer
Sign in to view the complete answer paper.
Give some solutions to resolve an overloaded symbol.
Answer
Sign in to view the complete answer paper.
Write short note on function overloading.
Answer
Sign in to view the complete answer paper.
Explain the different storage allocation strategies.
Answer
Sign in to view the complete answer paper.
Explain the principle sources of optimization.
Answer
Sign in to view the complete answer paper.
State and explain different machine dependent code optimization techniques.
Answer
Sign in to view the complete answer paper.
Explain why Next-use information is required for generating object code.
Answer
Sign in to view the complete answer paper.
Explain in detail about DAG for register allocation with example.
Answer
Sign in to view the complete answer paper.