0% found this document useful (0 votes)
55 views8 pages

Question Bank Toc&CD

Uploaded by

anilpreetham82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views8 pages

Question Bank Toc&CD

Uploaded by

anilpreetham82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY

(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

Theory of Computation and Compiler


Subject Code : A33110 Subject Name :
Design
Class/Section : CAI-A Year : III Semester : I

QUESTIONBANK
Name of Faculty:Dr.M.Janardhan and Dr.P.Suman Prakash

BLOOMS LEVEL
Remember L1 Understand L2 Apply L3
Analyze L4 Evaluate L5 Create L6

2 Marks Questions

Bloom’s
CO
UnitNo Q.No Question Mapped Taxonomy
Level
1 Define Finite Automata (FA). CO1 L1
2 What is a Deterministic Finite Automata (DFA)? CO1 L1
Explain the concept of Non-deterministic Finite L2
3 CO1
Automata (NFA).
4 What is an epsilon transition in NFA? CO1 L1
5 Explain the language accepted by a DFA. CO1 L2
Unit 1 6 What is the main difference between DFA and NFA? CO1 L1
7 Explain the role of the transition function in DFA. CO1 L2
What does it mean for two states to be equivalent in a
8 CO1 L1
DFA?
How does an NFA with epsilon transitions differ from
9 CO1 L1
an NFA without epsilon transitions?
10 What is the significance of the start state in a DFA? CO1 L1
Unit 2 1 What is a regular expression? CO2 L1
Define the relationship between finite automata (FA) CO2 L1
2
and regular expressions.
3 What is the basic syntax for a regular expression? CO2 L1
Explain the term "pattern matching" in the context of CO2 L2
4
regular expressions.
5 Define regular grammar. CO2 L1
6 What does the pumping lemma for regular languages CO2 L1
state?

Page 1 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

What is meant by closure properties of regular CO2 L1


7
languages?
How can a finite automaton be converted to a regular CO2 L1
8
expression?
Give an example of a simple regular expression and CO2 L1
9
the language it represents.
What is the significance of the Kleene star (*) in CO2 L1
10
regular expressions?

Page 2 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

1 What is a context-free grammar (CFG)? CO3 L1


2 Define a derivation in the context of CFG. CO3 L1
3 What is a parse tree? CO3 L1
4 Explain the concept of ambiguity in a CFG. CO3 L2
5 What is left recursion in CFG? CO3 L1
Unit 3
6 Define left factoring in CFG. CO3 L1
7 What are useless symbols in a CFG? CO3 L1
8 What is a unit production in CFG? CO3 L1
9 Define null production in CFG. CO3 L1
10 What does it mean to simplify a CFG? CO3 L1
What is syntax analysis in the context of compiler CO4 L1
1
design?
2 Define top-down parsing. CO4 L1
3 What is bottom-up parsing? CO4 L1
4 Explain operator-precedence parsing. CO4 L2
Unit 4 5 What is an LR parser? CO4 L1
6 Define SLR parser. CO4 L1
7 What does CLR stand for in parsing? CO4 L1
8 What is an LALR parser? CO4 L1
9 What is a parse table? CO4 L1
10 What is the role of a syntax tree in parsing? CO4 L1
What is an intermediate language in the context of CO5 L1
1
compiler design?
2 Define back patching. CO5 L1
3 What is a basic block in code optimization? CO5 L1
4 Explain the role of flow graphs in code optimization. CO5 L2
5 What is the purpose of intermediate code generation? CO5 L1
Define a declaration in the context of intermediate CO5 L1
Unit 5 6
code.
7 What is an assignment statement in intermediate code? CO5 L1
Explain the concept of Boolean expressions in CO5 L2
8
intermediate code.
What is a case statement in intermediate code CO5 L1
9
generation?
10 What does code optimization aim to achieve? CO5 L1

5 Marks Questions

Bloom’s
UnitNo Q.No Question COs Taxonomy
Level
Page 3 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

1 Devolop the process of converting an NFA to a DFA. CO1 L6


Explain how epsilon transitions work in an NFA and their CO1 L2
2
impact on state transitions.
3 Discuss the equivalence of NFA and DFA. CO1 L6
4 What are the steps involved in minimizing a DFA? CO1 L1
Explain the concept of state minimization in DFA with an L2
5 CO1
example.
6 Discuss how to determine if two DFAs are equivalent. CO1 L6
Unit 1
Explain the process of handling epsilon transitions during L2
7 CO1
NFA to DFA conversion.
What are the advantages and disadvantages of using DFA L1
8 CO1
over NFA?
Discuss the role of the transition table in DFA and how it is L6
9 CO1
constructed.
Discuss the method to check if a string is accepted by a L6
10 CO1
given DFA.
Discuss the process of converting a regular expression to a L6
1 CO2
finite automaton.
Explain the method of converting a finite automaton to a CO2 L2
2
regular expression.
Discuss how regular expressions are used in pattern CO2 L6
3
matching.
Explain the relationship between regular grammar and finite CO2 L2
4
automata.
How does the pumping lemma help in proving that a CO2 L1
5
language is not regular?
Unit 2
Discuss the closure properties of regular languages with CO2 L6
6
examples.
What are the steps involved in constructing a finite CO2 L1
7
automaton for a given regular expression?
Explain the significance of regular expressions in CO2 L2
8
programming languages and text processing.
Discuss how a regular grammar can be converted to a finite CO2 L6
9
automaton.
Explain how the union operation works in regular CO2 L2
10
expressions and provide an example.
Unit 3 1 Discuss the components of a context-free grammar (CFG). CO3 L6
Explain the process of deriving a string from a CFG with an CO3 L2
2
example
3 Discuss the role and structure of parse trees in CFG. CO3 L6
What causes ambiguity in CFGs, and how can it be CO3 L1
4
identified?
5 Explain the concept of left recursion and provide an CO3 L2
example.
Page 4 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

Discuss the process of left factoring in CFG with an CO3 L2


6
example.
Explain the method for eliminating useless symbols from a CO3 L2
7
CFG
Discuss how to eliminate unit productions from a CFG with CO3 L6
8
an example.
Discuss the process of removing null productions from a CO3 L6
9
CFG with an example.
Explain how to simplify a CFG and why simplification is CO3 L2
10
important.
1 Discuss the process of top-down parsing with an example. CO4 L6
2 Explain the working of bottom-up parsing. CO4 L2
Discuss the concept of operator-precedence parsing and its CO4 L6
3
application.
Explain the differences between SLR, CLR, and LALR CO4 L2
4
parsers.
5 Discuss the construction of an LR(0) parse table. CO4 L6
Explain the concept of FIRST and FOLLOW sets in top- CO4 L2
Unit 4 6
down parsing.
7 Discuss the role of shift-reduce actions in bottom-up parsing. CO4 L6
Discuss the process of handling ambiguities in operator- CO4 L6
8
precedence parsing.
Explain how a parse tree is generated using a bottom-up CO4 L2
9
parsing technique.
Discuss the advantages and disadvantages of using LR CO4 L6
10
parsers.
Unit 5 Discuss the advantages of using intermediate languages in CO5 L6
1
compiler design.
Explain the process of back patching and its importance in CO5 L2
2
code generation.
Discuss the structure and purpose of basic blocks in code CO5 L6
3
optimization.
Explain the significance of flow graphs in the analysis and CO5 L2
4
optimization of code.
Discuss how declarations are handled in intermediate code CO5 L6
5
generation.
Discuss the handling of assignment statements during CO5 L6
6
intermediate code generation.
Explain the evaluation of Boolean expressions in CO5 L2
7
intermediate code.
Discuss the implementation of case statements in CO5 L6
8
intermediate code.
9 Explain the concept and process of code optimization for CO5 L2
basic blocks.
Page 5 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

Discuss the organization and role of a code optimizer in the CO5 L6


10
compilation process.

10 Marks Questions

Bloom’s
UnitNo Q.No Question COs Taxonomy
Level
Compare and contrast DFA and NFA in terms of structure, CO1 L3
1
functionality, and computational power.
Discuss a detailed step-by-step process to convert an NFA CO1 L6
2
with epsilon transitions to an equivalent DFA.
Explain the algorithm for DFA minimization and illustrate it CO1 L2
3
with an example.
Discuss the significance of the pumping lemma in the L6
4 CO1
context of DFA and NFA.
Discuss in detail how to construct a DFA for a given regular L6
5 CO1
expression.
Unit 1
Explain the process of state elimination method for L2
6 CO1
converting DFA to regular expressions.
Discuss the Myhill-Nerode theorem and its implications for L6
7 CO1
DFA minimization.
Discuss a comprehensive explanation of how to prove the L6
8 CO1
equivalence of two DFAs using a formal method.
Describe the subset construction method for converting an L6
9 CO1
NFA to a DFA with an example.
Explain the concept of closure properties of regular L2
10 CO1
languages and how it relates to DFA and NFA.
Compare and contrast regular expressions and finite L3
1 automata in terms of their expressive power and CO2
applications.
Discuss a detailed explanation of the algorithm for CO2 L6
2 converting a finite automaton to a regular expression with an
example.
Describe the process of converting a regular expression to an CO2 L6
3
Unit 2 equivalent finite automaton and illustrate with an example.
Discuss the pumping lemma for regular languages and CO2 L6
4
provide an example to demonstrate its application.
Explain the closure properties of regular languages and CO2 L2
5
provide proofs for at least three properties.
Discuss the role of regular expressions in pattern matching CO2 L6
6
algorithms and their practical applications.
7 Provide a comprehensive explanation of how regular CO2 L6
Page 6 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

grammars relate to finite automata and give examples.


Describe the method of proving that a language is regular CO2 L6
8
using the Myhill-Nerode theorem.
Explain the process of constructing a deterministic finite CO2 L2
9
automaton (DFA) from a given regular expression.
Discuss the significance of regular expressions in modern CO2 L6
10 computing and provide examples of their use in different
domains.
Compare and contrast context-free grammars (CFGs) and CO3 L3
1 regular grammars in terms of their expressive power and
applications.
Discuss a detailed explanation of the derivation process in CO3 L6
2 CFG, including leftmost and rightmost derivations with
examples.
Describe the construction and significance of parse trees in CO3 L6
3
CFG, and illustrate with an example.
Discuss the concept of ambiguity in CFG, providing an CO3 L6
4 example of an ambiguous grammar and a method to resolve
it.
Explain the problem of left recursion in CFGs and provide a CO3 L2
5
Unit 3 step-by-step method to eliminate left recursion.
Discuss the technique of left factoring in CFGs with a CO3 L6
6
detailed example.
Describe the process of simplifying a CFG, including the CO3 L6
7 elimination of useless symbols, unit productions, and null
productions, with examples.
Explain the significance of eliminating null productions in CO3 L2
8
CFGs and provide a detailed method for this elimination.
Discuss how to identify and remove unit productions in a CO3 L6
9
CFG, including a comprehensive example.
Explain the importance of CFG simplification in compiler CO3 L1
10 design and parsing, providing examples to illustrate your
points.
Unit 4 Compare and contrast top-down parsing and bottom-up CO4 L3
1
parsing in terms of their strategies and applications.
Discuss a detailed explanation of the construction and CO4 L6
2
working of an SLR parser, including an example.
Describe the CLR parsing technique in detail, including the CO4 L6
3
construction of the CLR parse table with an example.
Explain the LALR parsing technique, highlighting its CO4 L1
4 advantages over SLR and CLR parsers, and provide an
example.
5 Discuss the concept of operator-precedence parsing in depth, CO4 L6
including the construction of the operator-precedence table
Page 7 of 8
G PULLAIAH COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous)
(Approved by AICTE | NAAC Accreditation with ‘A’ Grade |
Accredited by NBA (CIV, CSE, ECE & EEE) | Affiliated to JNTUA)
Nandikotkur Road, Venkayapalli (V), Kurnool - 518452, Andhra Pradesh

and parsing algorithm.


Describe the process of constructing a predictive parser for a CO4 L6
given grammar, including the computation of FIRST and
6
FOLLOW sets and the construction of the predictive parsing
table.
Explain the method of constructing an LR(1) parse table and CO4 L1
7
demonstrate with a comprehensive example.
Discuss the challenges of syntax analysis in compiler design CO4 L6
8 and how different parsing techniques address these
challenges.
Discuss a detailed explanation of the shift-reduce parsing CO4 L6
9 algorithm used in bottom-up parsing, including an example
with a parse tree.
Compare SLR, CLR, and LALR parsers in terms of their CO4 L3
10 parsing power, efficiency, and ease of implementation,
providing detailed examples and use cases.
Compare and contrast intermediate code generation with CO5 L3
1 direct machine code generation in terms of flexibility and
efficiency.
Discuss a detailed explanation of the process and techniques CO5 L6
2
used in back patching, including examples.
Describe the structure and construction of basic blocks and CO5 L6
3 flow graphs, and explain their roles in code optimization
with examples.
Discuss various techniques for optimizing basic blocks, CO5 L2
4
including examples to illustrate their effectiveness.
Explain the handling and generation of intermediate code for CO5 L1
5
declarations and assignment statements, including examples.
Describe the evaluation and generation of intermediate code CO5 L6
6
Unit 5 for Boolean expressions and case statements, with examples.
Discuss a comprehensive explanation of the organization of CO5 L6
7 a code optimizer, including its components and their
functions.
Discuss the role of data flow analysis in code optimization, CO5 L6
8 providing examples of its application in optimizing basic
blocks.
Explain the various methods of intermediate code CO5 L1
9 representation (such as three-address code, quadruples, and
triples) and compare their advantages and disadvantages.
Discuss the challenges and strategies in global code CO5 L6
optimization, providing detailed examples to illustrate the
10
optimization techniques used across basic blocks and flow
graphs.

Page 8 of 8

You might also like