JNTU
JNTU B.Tech III Year AUTOMATA AND COMPILER DESIGN Previous Question Paper (January/February - 2023 - R15)
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
(25 Marks)
Define Token ,Pattern and Lexeme.
Answer
A Token is a pair of the form (token-name, attribute-value). A Pattern is a rule that describes the set of strings that make up the token. A Lexeme is a sequence of characters in the source program that is matched by a pattern.
What is Context free grammar?
Answer
A Context-Free Grammar (CFG) is a formal grammar where each production rule is of the form A → γ, where A is a single non-terminal symbol and γ is a string of terminals and/or non-terminals. CFGs are used to describe the syntax of programming languages and are fundamental to parsing.
What are the actions performed by Shift reduce parser?
Answer
Sign in to view the complete answer paper.
List out the rules for FIRST and Follow.
Answer
Sign in to view the complete answer paper.
What is type checking?
Answer
Sign in to view the complete answer paper.
Draw the model of Chomsky hierarchy of grammars.
Answer
Sign in to view the complete answer paper.
Define a Flow Graph.
Answer
Sign in to view the complete answer paper.
What is dynamic storage allocation?
Answer
Sign in to view the complete answer paper.
Define Code generation.
Answer
Sign in to view the complete answer paper.
List out the issues in the design of a code generation.
Answer
Sign in to view the complete answer paper.
PART - B
(50 Marks)
Construct Finite Automata for the regular Expression 1(01+10)*00.
Answer
Sign in to view the complete answer paper.
Show that L={a^2n/n<0} is Regular.
Answer
Sign in to view the complete answer paper.
Define Derivation tree. Explain about LMD and RMD.
Answer
Sign in to view the complete answer paper.
Construct a derivation tree for the string abcd from the grammar: S→aAB, A→bC, B→d, C→cd ?
Answer
Sign in to view the complete answer paper.
Construct a LALR Parser for the Grammar S→CC,C→CC,C→c/d
Answer
Sign in to view the complete answer paper.
Construct a annotated parse tree for the expression 3*5+4/n.
Answer
Sign in to view the complete answer paper.
Construct SLR Parsing table for the grammar S→L=R/R, L→*R/id, R→L
Answer
Sign in to view the complete answer paper.
Write about inherited and synthesized attributes.
Answer
Sign in to view the complete answer paper.
Explain in brief about Type Conversion.
Answer
Sign in to view the complete answer paper.
Explain about the procedure for checking polymorphic functions.
Answer
Sign in to view the complete answer paper.
Explain in detail about Polymorphism.
Answer
Sign in to view the complete answer paper.
Explain in brief about Chomsky hierarchy of grammars.
Answer
Sign in to view the complete answer paper.
Differentiate between Static and Dynamic Storage allocation Strategies.
Answer
Sign in to view the complete answer paper.
Explain in brief about Heap Storage allocation strategy.
Answer
Sign in to view the complete answer paper.
List out and explain about the criteria are required for Code improving Transformations.
Answer
Sign in to view the complete answer paper.
Define Basic block. Explain in brief about optimization of basic blocks.
Answer
Sign in to view the complete answer paper.
Explain in detail the procedure that eliminates global common sub expression.
Answer
Sign in to view the complete answer paper.
What is an Induction variable? Explain it with an example.
Answer
Sign in to view the complete answer paper.
Explain reducible and non-reducible flow graphs with examples.
Answer
Sign in to view the complete answer paper.
Explain in detail about the garbage collection via Reference Counting.
Answer
Sign in to view the complete answer paper.