Compiler Design
Compiler Design
COURSE FILE
ON
COMPILER DESIGN
Course Code - CS601PC
Prepared by
Dr. SasiKumar D
Associate
Professor
R18 B.TECH CSE III YEAR
Mission:
IM1: To offer outcome-based education and enhancement of technical and practical skills.
collaboration..
IM4: To create an enterprising environment to ensure culture, ethics and social responsibility
Mission:
DM1 : To provide ambience that enhances innovations, problem solving skills, leadership
qualities, decision making, team-spirit and ethical responsibilities.
DM2 : To impart quality education with professional and personal ethics, so as to meet the
challenging technological needs of the industry and society.
DM3 : To provide academic infrastructure and develop linkage with the world class
organizations to strengthen industry-academia relationships for learners.
DM4 : To provide and strengthen new concepts of research in the thrust area of Computer
Science and Engineering to reach the needs of Government and Society.
R18 B.TECH CSE III
YEAR
PEO1: To develop trained graduates with strong academic and technical skills of modern
computer science and engineering.
PEO2: To promote trained graduates with leadership qualities and the ability to solve
real time problems using current techniques and tools in interdisciplinary
environment.
-
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITYHYDERABAD
B.Tech. in COMPUTER SCIENCE AND ENGINEERING
III YEAR COURSE STRUCTURE AND SYLLABUS(R18)
Applicable From 2018-19 Admitted Batch
III YEAR I SEMESTER
Course
S. No. Course Title L T P Credits
Code
1 CS501PC Formal Languages & Automata Theory 3 0 0 3
2 CS502PC Software Engineering 3 0 0 3
3 CS503PC Computer Networks 3 0 0 3
4 CS504PC Web Technologies 3 0 0 3
5 CS515PE Professional Elective -I 3 0 0 3
6 Professional Elective -II 3 0 0 3
7 CS505PC Software Engineering Lab 0 0 3 1.5
8 CS506PC Computer Networks & Web Technologies Lab 0 0 3 1.5
9 EN508HS Advanced Communication Skills Lab 0 0 2 1
10 *MC510 Intellectual Property Rights 3 0 0 0
Total Credits 21 0 8 22
Course
S. No. Course Title L T P Credits
Code
1 CS601PC Machine Learning 3 1 0 4
2 CS602PC Compiler Design 3 1 0 4
3 CS603PC Design and Analysis of Algorithms 3 1 0 4
4 Professional Elective – III 3 0 0 3
5 Open Elective-I 3 0 0 3
6 CS604PC Machine Learning Lab 0 0 3 1.5
7 CS605PC Compiler Design Lab 0 0 3 1.5
8 Professional Elective-III Lab 0 0 2 1
9 *MC609 Environmental Science 3 0 0 0
Total Credits 18 3 8 22
CS602PC:COMPILERDESIGN
IIIYearB.Tech. CSEII-Sem
LT PC
31 0 4
Prerequisites
1. A course on “Formal Languages and Automata Theory
2. A course on “Computer Organization and architecture”
3. A courseon“ Computer Programming and Data Structures”
Course Objectives:
Introduce the major concepts of language translation and compiler design and impart the
knowledge of practical skills necessary for constructing a compiler.
Topics include phases of compiler, parsing, syntax directd translation, type checking use of
symbol tables, code optimization techniques, intermediate code generation, code generation
and data flow analysis.
Course Outcomes:
Demonstratetheabilitytodesignacompilergivenasetoflanguagefeatures.
Demonstratethetheknowledgeofpatterns,tokens®ularexpressionsforlexical analysis.
Acquireskillsinusinglextool&yacctoolfordevleopingascannerandparser.
Design and implement LL and LR parsers
Designalgorithmstodocodeoptimizationinordertoimprovetheperformanceof aprogramin
terms of space and time complexity.
Design algorithms to generate machine code.
UNIT-I
Introduction: The structure of a compiler, the science of building a compiler, programming
language basics
Lexical Analysis: The Role of the Lexical Analyzer, Input Buffering, Recognition of Tokens,
The Lexical
AnalyzerGeneratorLex,FiniteAutomata,FromRegularExpressionstoAutomata,Designofa Lexical-
Analyzer Generator, Optimization of DFA-Based Pattern Matchers.
UNIT-II
Syntax Analysis: Introduction, Context-Free Grammars, Writing a Grammar, Top-Down
Parsing, Bottom-Up Parsing, Introduction to LR Parsing: Simple LR, More Powerful LR Parsers,
Using Ambiguous Grammars and Parser Generators.
UNIT-III
Syntax-DirectedTranslation:Syntax-Directed Definitions, EvaluationOrdersforSDD's,
Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, Implementing L-
Attributed SDD's.
Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and
Declarations, Type Checking, Control Flow, Switch-Statements, Intermediate Code for
Procedures.
UNIT-IV
Run-Time Environments: Stack Allocation of Space, Access to Nonlocal Data on the Stack,
Heap Management, Introduction to Garbage Collection, Introduction to Trace-Based
Collection.
Code Generation: Issues in the Design of a Code Generator ,The Target Language, Addresses int
he Target Code, BasicBlocksandFlowGraphs, Optimizationof BasicBlocks, ASimpleCodeGenerator,
PeepholeOptimization,RegisterAllocationandAssignment,DynamicProgrammingCode-Generation.
UNIT-V
Machine-Independent Optimization: The Principal Sources of Optimization ,IntroductiontoData-Flow Analysis,
Foundations of Data-Flow Analysis, Constant Propagation, Partial-Redundancy Elimination, Loops in Flow Graphs.
TEXTBOOK:
1. Compilers: Principles, Techniques and Tools, Second Edition, Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffry
D. Ullman.
REFERENCEBOOKS:
1. Lex&Yacc–JohnR.Levine,TonyMason,DougBrown,O’reilly
2. CompilerConstruction,Louden,Thomson.
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
Course Outcomes
C322.3 Design and implement LL and LR parsers and use YACC Tool for developing
a parser.(Synthesis)
C322.4 Explain the applications of SDT and different types of intermediate-
code generation (Comprehension)
C322.5 Identify the storage organization used to support the run-time environment ofa program and
effectively generate machine codes(Knowledge).
C322.6 Apply the several algorithms for collecting and optimizing the information using data
flow analysis(Application).
PO/PSO/
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
C322.1 3 - - - - - - - - - 3 - 3 1
C322.2 2 2 - 2 3 - - - - - 3 - 2 3
C322.3 2 2 - 2 3 - - - - - 2 - 2 2
C322.4 2 - - 2 3 - - - - - 1 - 1 2
C322.5 - 3 - 1 2 - - - - - - - 2 3
C322.6 - 3 - - - - - - 1 - - - - 1
C322 2.25 2.5 - 1.7 2.75 - - - 1 - 2.25 - 2 2
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
PSO1 Professional Skills: The ability to implement computer programs of varying complexity in the
areas related to web design, cloud computing and networking.
PSO2 Problem-Solving Skills: The ability to develop quality products using open ended
programming environment.
C322.1 Describe structure of a compiler and basics of programming
languages (Knowledge)
Justification
PO1 Gain knowledge on Phases of a compiler.(level 3)
PO11 Gain knowledge on programming language basics for project management.(level 3)
PSO1 Gain knowledge on design of compiler.(level 3)
PSO2 Recognise the concepts to develop products(level 1)
C322.3 Design and implement LL and LR parsers and use YACC Tool
for developing a parser.(Synthesis)
Justification
PO1 Gain knowledge ontop down and bottom up parsing.(level 2)
PO2 Designing of syntax analysis should know the basics of context free grammar.(level 2)
PO4 Recognizing the knowledge of LL(1) grammars and LR grammars(level 2)
PO5 Select YACC tool to design LALR bottom up parser.(level 3)
PO11 Demonstrate knowledge on YACC tool.(level 2)
PSO1 Ability to implement computer programs for Syntax analysis phase of a compiler.
(level 2)
PSO2 Ability to develop compiler product.(level 2)
C322.4 Explain the applications of SDT and different types of intermediate-
code generation (Comprehension)
Justification
PO1 Gain knowledge about SDT and intermediate code generation.(level 2)
PO4 Express problem analysis using SDT and intermediate code generation.(level 2)
PO5 Design semantic analysis phase of a compiler(level 3)
PO11 Explain the applications of SDT(level 1)
PSO1 Ability to implement computer programs for Semantic analysis phase of a compiler.
(level 1)
PSO2 Ability to develop compiler product.(level 2)
C322.5 Identify the storage organization used to support the run-time environment of
a program and effectively generate machine codes (Knowledge).
Justification
PO2 Analyze the storage organization.(level 3)
PO4 Analyze machine code generation efficiently .(level 1)
PO5 Gain knowledge on Heap Management and Dynamic Programming Code-Generation.
(level 2)
PSO1 Ability to optimize storage organization and effectively generate machine codes.(level 2)
PSO2 Ability to develop compiler product.(level 3)
C322.6 Apply the several algorithms for collecting and optimizing the information using
data flow analysis (Application).
Justification
PO2 Apply the several algorithms for data-flow analysis.(level 3)
PO9 Implement several algorithms for data flow analysis as a team.(level 1)
PSO2 Ability to develop compiler product.(level 1)
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
LESSON PLAN
Course Title COMPILER DESIGN
Course Code CS601PC
Programme B.Tech
Year & Semester III-year II-semester
Regulation R18
Course Faculty MrDr.Sasikumar D, AssociateProfessor , CSE
Constant Propagation
64 5 1 Black Board T1
Partial-Redundancy Elimination
65 Loops in Flow Graphs 1 Black Board T1
66 Tutorial5(Constant Propagation, Loops in 1 Black Board T1
Flow Graphs)
TEXT BOOKS
1. Compilers: Principles, Techniques and Tools, Second Edition, Alfred V. Aho, Monica
S. Lam, Ravi Sethi, Jeffry D. Ullman, Pearson.
REFERENCE BOOKS
WEB REFERENCES
LECTURE NOTES
UNIT-I
https://drive.google.com/file/d/1cu6GhBONlGcX4yyFc9o1ZeLfixzU4c7I/view?usp=s
haring
UNIT-II
https://drive.google.com/file/d/1zLUxbIrqW2ffBDXhHbbNrJ6hzrlAY5OK/view?usp
=sharing
UNIT-III
https://drive.google.com/file/d/19x8iWjCH2lplUnENgy5JX3HR5UB75ggv/view?usp=
sharing
UNIT-IV
https://drive.google.com/file/d/1os2vFlfM3WkwT_bxATZuTGtJzUfQJ6tn/view?usp
=sharing
UNIT-V
https://drive.google.com/file/d/13zvqvzrFnBlWtlv5UCcGyapHw5pCHTBn/view?usp
=sharing
2.a) Design the LEX program that recognizes the tokens of a C language and returns thetoken found.
b) Give the DFA and NFA to accept the strings containing a, b such that the stringcontains even
number of a’s and odd number of b’s. [7+8]
3.a) Remove the left recursion for the following grammar and also find FIRSTS andFOLLOWs.
E→E + T | T
T→T * F | FF → (E)/id
b) Write the steps/algorithm to construct the predictive parser table and explain with anexample. [7+8]
S→aSbS | bSaS | ℇ
4.a) Construct the Recursive Descent Parser with backtracking for the following grammar:
b) Compute LR(0) items for the following grammar and construct SLR parser table: [7+8]S→L=R | R
L→ *R | idR→L
5.a) Construct the syntax directed definition to convert infix notation into postfix notation.
b) Describe different ways of implementing intermediate code generation of a three-address statement. [8+7]
7. How is stack storage allocation strategy different from heap allocation strategy?Describe them mentioning
their merits and demerits. [15]
8. Explain the foundations and basic notations used in data-flow analysis for optimizationswith examples. [15]
---oo0oo---
University Question papers:2
CodeNo:156AH R18
JAWAHARLALNEHRUTECHNOLOGICALUNIVERSITY HYDERABAD
B.Tech IIIYear II SemesterExaminations,August/September-2021 COMPILER
DESIGN
(ComputerScienceandEngineering)
Time:3Hours Max.Marks: 75
Answer any five questions
Allquestionscarryequalmarks
---
3. a) What do you mean byAmbiguous Grammar? Check whether the following grammar
is Ambiguous or not
S→aAB,
A→bC/cd,
C→cd,
B→c/d
b) Writeanote onYacc. [8+7]
4. ConstructCLRparsingtableforthefollowingGrammar S
L=R
SR
L*R
Lid
RL(Writeallnecessaryprocedures). [15]
6. a) DifferentiateSynthesizedand InheritedAttributeswithexample.
b) GenerateIntermediatecodeforthefollowingcodesegmentalongwiththeSyntax Directed
Translation Scheme.
if (a >
b)
x=a+b;
else
x=a-b;
Where‘a’and‘x’areofrealand‘b’ofinttypedata. [7+8]
7. a) WhatisFlow-Graph?ExplainhowthegivenprogramcanbeconvertedintoFlow- Graph?
b) ConstructDAGforthefollowingbasicblock:
d:= b+c
e:=a+b
b:=b*c
a:=e-d [8+7]
---ooOoo---
University Question papers:3
CodeNo:156AH R18
JAWAHARLALNEHRUTECHNOLOGICALUNIVERSITY HYDERABAD
B.TechIIIYearIISemesterExaminations,February/March-2022
COMPILERDESIGN
(ComputerScienceandEngineering)
Time:3Hours Max.Marks: 75
Answer any five questions
Allquestionscarryequalmarks
---
Whatisleft-factoring?Writethealgorithmtoeliminateleft-factoringfromagrammar. Explain
the same with an example.
b) Consider the following grammar.
bexpr bexpr or bterm | bterm
btermbtermandbfactor|bfactor
bfactornotbfactor|(bexpr)|true|false
i) Constructaparsetreeforthesentencenot(true orfalse)
ii) Isthis
grammarambiguous? Why? [7+8]
5. a) Whatarethethreeformsofintermediatecoderepresentations?Explain them.
b) Givethesyntax-directeddefinitionofasimpledeskcalculatorandconstructan annotated
parse tree for the input expression (4*7+1)*2. [7+8]
6. ExplainaboutsyntaxdirectedtranslationofBooleanexpressionswithandwithout back
patching. [15]
---ooOoo---
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
I- Mid Examinations, MAY-2023 Set – I
Year &Branch: III-CSE(A,B,C) Date: 10/05/2023 (FN)
Subject:COMPILER DESIGN Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10
marks(This question paper is prepared with Course Outcome and BT’s mapping)
https://docs.google.com/document/d/1sTLz4NM4GnAiiZsG8DvjSp6Jb63auNXE/edit?usp=sharing&ouid=114024940021959755534&rtpof=true&s
d=true
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
I - Mid Examinations, MAY -2023 Set – II
Year & Branch: III-CSE(A,B,C) Date: 10/05/2023(FN)
Subject: COMPILER DESIGN Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10
marks(This question paper is prepared with Course Outcome and BT’s mapping)
1 .a) Differentiate between compiler and interpreter. (2) (C322.1) (Analysis)
b) Explain about input buffering (3) (C322.1)(Comprehension)
2. Construct DFA for (a|b)*abb by using direct method (5) (C322.2) (Synthesis)
EVALUAT
ANALYSI
C321.4 ION S
15% C321.1 15%
20%
25%
SYNTHES
IS
25%
C321.3 COMPRE
35% C321.2 HENSION
25% 40%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
I - Mid Examinations, MAY -2023 Set – II
Year & Branch: III-CSE(A,B,C) Date: 10/05/2023(FN)
Subject: COMPILER DESIGN Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10
Discriptive ANSWER KEY
https://docs.google.com/document/d/1_ibpuhs5i_DuCxOfQs4iie8PE509ZaNc/edit?usp=sharing&oui
d=114024940021959755534&rtpof=true&sd=true
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
B.TECH. IIIYEAR II SEM., I Mid Term Examinations, MAY – 2023
COMPILER DESIGN
Objective Exam
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 10.
I. Choose the correct alternative:
1. What is a compiler? [ ]
a) system program that converts instructions to machine language
b) system program that converts machine language to high-level language
c) system program that writes instructions to perform
d) None of the mentioned
2. Which of the following is a stage of compiler design? [ ]
a) Semantic analysis
b) Intermediate code generator
c) Code generator
d) All of the mentioned
3. What is the use of a symbol table in compiler design? [ ]
a) Finding name’s scope
b) Type checking
c) Keeping all of the names of all entities in one place
d) All of the mentioned
4. Which of the following error can a compiler check? [ ]
a) Syntax Error
b) Logical Error
c) Both Logical and Syntax Error
d) Compiler cannot check errors
5. A programmer, writes a program to multiply two numbers instead of dividing them by mistake,
how can this error be detected? [ ]
a) Compiler or interpreter
b) Compiler only
c) Interpreter only
d) None of the mentioned
6. Who is responsible for the creation of the symbol table? [ ]
a) Assembler
b) Compiler
c) Interpreter
d) All of the mentioned
7. Which of the following is known as a compiler for a high-level language that runs on one machine
and produces code for a different machine? [ ]
a) Cross compiler
b) Multipass compiler
c) Optimizing compiler
d) One pass compiler
8. Which of the following is a system program that integrates a program’s individually compiled
modules into a form that can be executed? [ ]
a) Interpreter
b) Assembler
c) Compiler
d) Linking Loader
9. Which of the following is a definition of compiler? [ ]
a) Acceptance of a program written in a high-level language and produces an object program
b) Program is put into memory and executes it
c) Translation of assembly language into machine language
d) None of the mentioned
10. Which of the following phase of the compiler is Syntax Analysis? [ ]
a) Second
b) Third
c) First
d) All of the mentioned
https://docs.google.com/document/d/1Enbh5j5LysgsVaGr2- SWc9uXXvxTMLrF/edit?
usp=sharing&ouid=114024940021959755534&rtpof=true&sd=true
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, JUNE-2023 Set – I
Year & Branch: III-CSE-A, B,C Date: 26/07/2023(FN)
Subject: COMPILER DESIGN Marks: 10 Time: 60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
(This question paper is prepared with Course Outcome and BT’s mapping)
C321.4 SYNTH
25% ESIS
25%
C321.6
40%
COMPREHENS
C321.5 ION
35% 75%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, JUNE-2023 Set – I
Year & Branch: III-CSE-A, B,C Date: 26/07/2023(FN)
Subject: COMPILER DESIGN Marks: 10 Time:
60 min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
ANSWER KEY
https://docs.google.com/document/d/1xt4e1PQ8c6Ulr8QIgmjFoePaRNGTgVzT/edit?usp=sharing&ouid=1
14024940021959755534&rtpof=true&sd=true
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, JUNE-2023 Set – II
Year & Branch: III-CSE-A, B,C Date: 26/07/2023(FN)
Subject: COMPILER DESIGN Marks: 10 Time: 60min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
(This question paper is prepared with Course Outcome and BT’s mapping)
1. Define following terms Type system, Type expression, Type equivalence, three address code, DAG.
(C322.4)(Knowledge) (5M)
2. Explain in detail about Mark-and-sweep garbage collector algorithm.(C322.5)(Comprehension) (5M)
3. Explain peephole optimization. (C322.5)(Comprehension) (5M)
4. Explain different principal sources of code optimization. (C322.6)(Comprehension) (5M)
QUESTION PAPER
QUESTION PAPER MAPPING
MAPPING WITH BT' S
WITH CO'S
ANALYSEVALUA
IS
C321.5 10% TION
15%
25% COMPR
KNOWL EHENSI
C321.4 EDGE ON
50% 35%
25%
SYNTHE
C321.6 SIS
25% 15%
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
II- Mid Examinations, JUNE-2023 Set – II
Year & Branch: III-CSE-A, B,C Date:
Subject: COMPILER DESIGN Marks: 10 Time:
60min
Answer any TWO Questions. All Question Carry Equal Marks 2*5=10 marks
ANSWER KEY:
htps:/docs.google.com/document/d/1YU58_iC-7r_VZinjRI8F5nOppqtK6qBf/edit?usp=sharing&ouid=114024940021959755534&rtpof=true&sd=true
Sri Indu Institute of Engineering & Technology
Sheriguda (V), Ibrahimpatnam (M), R.R.Dist-501 510
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
B.TECH. III YEAR II SEM., II Mid Term Examinations, JUNE – 2023
COMPILER DESIGN
Objective Exam
Name_______________________________________________________________Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10.
https://docs.google.com/document/d/1zKUhgpuELdpZa0BD9Gawi- VtFDYapj5b/edit?
usp=sharing&ouid=114024940021959755534&rtpof=true&sd=true
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act
1956 (Approved by AICTE, New Delhi and Affiliated to JNTUH,
Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana –
501 510Website: https://siiet.ac.in/
Assignment Questions-I
ASSIGNMENT -I
1. Explain about following: (C322.1) (Comprehension)
a) Static scope and block structure b) Environments and States
c) Parameter passing mechanism d) Role of a Lexical Analyzer.
2.Construct DFA for by using – ((a+b)* + (ac)*) by direct method. (C322.2) (Synthesis)
3. a) State FIRST and FOLLOW Rules and construct SLR parsing table for the grammar:
E→E+T/T, T→T*F/F, F→ (E)/id (C322.3) (Knowledge)
b) Write a short note on YACC (C322.3) (Knowledge)
4.a) Construct CLR Parsing table for the grammar: (C322.3) (Synthesis)
S → Aa/bAc/dc/bda
A→d and also parse the input bdc
b) Compare and contrast LR parsing techniques. (C322.3) (Evaluation)
Assignment Questions-II
Result Analysis:
Weak Students:
Advanced learners
1 20X31A0501
2 20X31A0502
3 20X31A0504
4 20X31A0510
8 20X31A0515
9 20X31A0516
10 20X31A0518
11 20X31A0519
12 20X31A0522
13 20X31A0523
14 20X31A0529
15 20X31A0534
16 20X31A0535
17 20X31A0537
18 20X31A0538
19 20X31A0539
20 20X31A0542
21 20X31A0544
22 20X31A0545
23 20X31A0549
24 20X31A0550
25 20X31A0551
. Lexical Analysis / Parsing/ Syntax-directed
26 20X31A0553 Translation/ Intermediate Code Generation/
Runtime Environment/
27 20X31A0556 Matching
28 20X31A0560
29 21X35A0501
30 21X35A0502
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Accredited by NAAC with A+ Grade, Recognized under 2(f) of UGC Act 1956
(Approved by AICTE, New Delhi and Affiliated to JNTUH, Hyderabad)
Khalsa Ibrahimpatnam, Sheriguda (V), Ibrahimpatnam (M), Ranga Reddy Dist., Telangana – 501 510
Website: https://siiet.ac.in/
70
60
50
40
APPEARED
30 PASSED
20
10
0
APPEARED PASSED
SRI INDU INSTITUTE OF ENGINEERING AND TECHNOLOGY
Department of Computer Science and Engineering
Target set by the 3.00 0.00 0.00 3.00 0.00 0.00 3.00 0.00 0.00 0.60 0.60 1.80 6.00 3.00
faculty / HoD
Number of
students 62 0 0 54 0 0 1 0 0 0 0 0 62 63
performed above
Number of
students 62 1 0 57 0 0 1 0 0 0 0 0 63 63
attempted
Percentage of
students scored 100% 0% 95% 100% 98% 100%
more than target
CO Mapping with Exam Questions:
CO -1 Y Y Y Y
CO -2 Y Y Y Y
CO -3 Y Y Y
CO -4
CO -5
CO -6
S.N HT No. Q1a Q1b Q1c Q2a Q2b Q2c Q3a Q3b Q3c Q4a Q4b Q4c Obj4 A4
Max. Marks ==> 2 3 2 3 5 5 10 5
1 20X31A0501 2 3 3 8 5
2 20X31A0502 2 3 5 8 5
3 20X31A0503 5 8 5
4 20X31A0504 2 3 5 7 5
5 20X31A0506 2 2 3 7 5
6 20X31A0507 3 4 7 5
7 20X31A0508 3 5 8 5
8 20X31A0509 2 3 8 5
9 20X31A0510 2 3 4 7 5
10 20X31A0511 2 2 7 5
11 20X31A0512 3 4 7 5
12 20X31A0513 2 3 3 8 5
13 20X31A0514 3 3 8 5
14 20X31A0515 2 3 5 7 5
15 20X31A0516 2 3 5 8 5
16 20X31A0517 2 2 5 8 5
17 20X31A0518 2 3 3 8 5
18 20X31A0519 2 2 3 7 5
19 20X31A0520 2 3 2 7 5
20 20X31A0521 3 4 7 5
21 20X31A0522 2 2 4 7 5
22 20X31A0523 2 3 5 7 5
23 20X31A0524 2 3 2 8 5
24 20X31A0525 2 3 4 8 5
25 20X31A0526 2 2 4 8 5
26 20X31A0527 2 3 7 5
27 20X31A0528 2 3 3 7 5
28 20X31A0529 4 5 7 5
29 20X31A0530 2 3 4 8 5
30 20X31A0531 2 3 5 8 5
31 20X31A0532 2 2 7 5
32 20X31A0533 3 3 7 5
33 20X31A0534 2 3 4 8 5
34 20X31A0535 2 3 4 9 5
35 20X31A0536 4 4 7 5
36 20X31A0537 2 3 4 7 5
37 20X31A0538 2 3 4 7 5
38 20X31A0539 2 2 5 7 5
39 20X31A0540 2 3 7 5
40 20X31A0541 2 3 4 7 5
41 20X31A0542 3 4 7 5
42 20X31A0543 2 2 4 8 5
43 20X31A0544 2 3 5 7 5
44 20X31A0545 5
45 20X31A0546 5
46 20X31A0547 5
47 20X31A0548 5
48 20X31A0549 5
49 20X31A0550 5
50 20X31A0551 5
51 20X31A0552 5
52 20X31A0553 5
53 20X31A0554 5
54 20X31A0555 5
55 20X31A0556 5
56 20X31A0557 5
57 20X31A0558 5
58 20X31A0559 5
59 20X31A0560 5
60 21X35A0501 5
61 21X35A0502 5
62 21X35A0503 5
63 21X35A0504 5
Target set by the 1.20 1.80 0.00 1.20 1.80 0.00 3.00 0.00 0.00 3.00 0.00 0.00 6.00 3.00
faculty / HoD
Number of students 6 5 0 37 50 0 18 0 0 39 0 0 61 63
performed above the
target
Number of students 6 5 0 37 50 0 18 0 0 44 0 0 63 63
attempted
Percentage of
students scored 100% 100% 100% ### 100% 89% 97% 100%
more than target
CO - 1
CO - 2
CO - 3
CO - 4 Y Y Y
CO - 5 Y Y Y Y
CO - 6 Y Y Y
% Students Scored
>Target % 100% 100% 100% 100% 100% 100%
CO Attainment based on Exam Questions:
CO - 1
CO - 2
CO - 3
CO - 4 100% 97% 100%
CO - 5 100% 100% 97% 100%
CO - 6 89% 97% 100%
CO-PO mapping
PO/PSO/
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO
C322.1 3 - - - - - - - - - 3 - 3 1
C322.2 2 2 - 2 3 - - - - - 3 - 2 3
C322.3 2 2 - 2 3 - - - - - 2 - 2 2
C322.4 2 - - 2 3 - - - - - 1 - 1 2
C322.5 - 3 - 1 2 - - - - - - - 2 3
C322.6 - 3 - - - - - - 1 - - - - 1
C322 2.25 2.5 - 1.7 2.75 - - - 1 - 2.25 - 2 2
PO-ATTAINMENT
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO1 PO12
CO
Attainme
nt 1.38 0.00 1.13 0.00 0.50 0.00 0.00 1.00 0.00 0.00 1.50 0.00
https://drive.google.com/file/d/1C1rC5dflM0Qrsx67Pxrmi-AtpHex00Rh/view?usp=sharing