JNTU
JNTU B.Tech III COMPILER DESIGN Previous Question Paper (November/December - 2018 - R13)
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
Define Boot strapping?
Answer
Bootstrapping is the process of using a compiler (or assembler) to compile itself. It involves writing the initial version of a compiler in a lower-level language and then using it to compile a more advanced version of the same compiler written in the language it is intended to support.
What are the draw backs of predictive parsing?
Answer
The primary drawbacks of predictive parsing (specifically LL(1) parsers) include:
- It cannot handle left-recursive grammars, requiring grammar transformation.
- It requires the grammar to be left-factored to resolve ambiguities.
- It is limited in power compared to bottom-up parsers, as it cannot handle all context-free grammars.
What are the actions performed by Shift reduce parser?
Answer
Sign in to view the complete answer paper.
Differentiate between SLR, LALR and CLR parsers.
Answer
Sign in to view the complete answer paper.
What are the applications of DAG?
Answer
Sign in to view the complete answer paper.
What are the advantages of stack storage allocation strategy?
Answer
Sign in to view the complete answer paper.
Define Basic block. What are the rules for defining a basic block?
Answer
Sign in to view the complete answer paper.
What is common sub expression elimination?
Answer
Sign in to view the complete answer paper.
Define Dead code elimination?
Answer
Sign in to view the complete answer paper.
What is register allocation? Give a brief description.
Answer
Sign in to view the complete answer paper.
PART - B
Define Regular Expression. Explain about the Properties of Regular Expressions.
Answer
Sign in to view the complete answer paper.
Differentiate between Top down and bottom up parsing techniques.
Answer
Sign in to view the complete answer paper.
Define Compiler? Explain in brief about the types of lexical errors with example.
Answer
Sign in to view the complete answer paper.
Construct a Predictive parsing table for the Grammar E→E+T/T, T→T*F/F, F→ (E)/id?
Answer
Sign in to view the complete answer paper.
Construct LALR Parsing table for the grammar S→L=R/R, L→*R/id, R→L
Answer
Sign in to view the complete answer paper.
Define Ambiguous Grammar? Check whether the grammar S→aAB, A→bC/cd, C→cd, B→c/d Is Ambiguous or not?
Answer
Sign in to view the complete answer paper.
Construct SLR Parsing table for the grammar S→ (L)|a, L→L,s|s
Answer
Sign in to view the complete answer paper.
Discuss in brief about model of LR parser.
Answer
Sign in to view the complete answer paper.
Construct a Quadruple, Triple and Indirect Triple for the statement a+a*(b-c) +(b-c)*d?
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.
Construct an annotated parse tree for real id1, id2, id3.
Answer
Sign in to view the complete answer paper.
Explain in brief about equivalence of type expressions.
Answer
Sign in to view the complete answer paper.
Explain in brief about different Principal sources of optimization techniques with suitable examples.
Answer
Sign in to view the complete answer paper.
Define Flow Graph? Explain how a given program can be converted into flow graph?
Answer
Sign in to view the complete answer paper.
Explain in brief about function preserving transformations on basic blocks.
Answer
Sign in to view the complete answer paper.
Explain in brief about optimization of basic blocks.
Answer
Sign in to view the complete answer paper.
Explain in detail about global common sub expression elimination technique.
Answer
Sign in to view the complete answer paper.
Explain in brief about Induction variable elimination.
Answer
Sign in to view the complete answer paper.
Explain in brief about the issues in the design of code generator.
Answer
Sign in to view the complete answer paper.
Explain in detail about peep hole optimization.
Answer
Sign in to view the complete answer paper.