0% found this document useful (0 votes)
20 views

Formal Languages and Compiler Design

Gj dl gl gl vo vo bll gk chivari fl dk fl sl yk cll ck dk sh dl vm cll cll cll so
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Formal Languages and Compiler Design

Gj dl gl gl vo vo bll gk chivari fl dk fl sl yk cll ck dk sh dl vm cll cll cll so
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Code: AM20APC504 R 20

B.Tech III Year I Semester Regular Examinations February - 2023


FORMAL LANGUAGES AND COMPILER DESIGN
(CSE(Artificial Intelligence & Machine Learning))
Time: 3 hrs. Max Marks: 60
PART-A
(Compulsory Question)
1. Answer the following 05 x 02 = 10 Marks
a) What is Finite State Machine? 2M
b) What is the difference between CFG and CSG? 2M
c) Consider a DFA M = (Q, ∑, δ, q0, F). What is the minimum and maximum number 2M
of initial states in it?
d) What is dead state? Give an example. 2M
e) What is code object forms? 2M
PART-B
Answer All five Units 05 x 10 = 50 Marks
UNIT-I
2. a) What are the different types of automata? How they are classified? Explain in 5M
detail.
b) Consider the below finite automata and check the strings are accepted or not 5M
(i) 1110 (ii) 0001 (iii) 1010

OR
3. a) Convert the following NFA with ε moves to DFA without ε moves. 5M

b) Define NFA. What are the differences between DFA & NFA? 5M
UNIT-II
4. a) Write the procedure and Eliminate left recursion from the following Grammar 5M

b) Explain about derivation and parse trees. Construct the string 0100110 from the 5M
Leftmost and Rightmost derivation.

OR
5. a) Explain Left recursion and Left factoring. 5M
b) Perform left factor for the following grammar 5M

Page 1 of 2
Code: AM20APC504 R 20

UNIT-III
6. a) What is Chomsky’s hierarchy? Explain 5M
b) Explain different Intermediate code generation techniques. 5M
OR
7. a) Write about context sensitive features using examples. 5M
b) Explain about type conversions with suitable examples. 5M
UNIT-IV
8. a) With a neat diagram explain the format of the Symbol Table and discuss the tree 5M
structures representation of scope information.
b) Explain the following code optimization techniques with examples. 5M
i) Constant propagation
ii) Strength reduction.
OR
9. a) What is an induction variable? Explain with an example. 5M
b) Explain about peephole optimization. 5M
UNIT-V
10. a) Explain various issues in the design of the code generation. 5M
b) Explain the code generation algorithm in detail. 5M
OR
11. a) What is DAG and flow graph? Explain their role in compilation process. 5M
b) What is the role of code Optimizer in compiler? Is it a mandatory phase? 5M

*****

Page 2 of 2

You might also like