0% found this document useful (0 votes)
11 views17 pages

Compiler Design Course Overview 2025-26

The document outlines the course file for Compiler Design (03BTCS518) taught by Ms. Pooja Sharma in the Computer Science and Engineering department for the academic session 2025-2026. It includes the course objectives, syllabus, lecture plans, and various assessments such as mid-term tests and assignments. Additionally, it details program educational objectives, outcomes, and specific course outcomes related to compiler design knowledge and skills.

Uploaded by

principooja
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)
11 views17 pages

Compiler Design Course Overview 2025-26

The document outlines the course file for Compiler Design (03BTCS518) taught by Ms. Pooja Sharma in the Computer Science and Engineering department for the academic session 2025-2026. It includes the course objectives, syllabus, lecture plans, and various assessments such as mid-term tests and assignments. Additionally, it details program educational objectives, outcomes, and specific course outcomes related to compiler design knowledge and skills.

Uploaded by

principooja
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

COURSE FILE

DEPARTMENT : COMPUTER SCIENCE AND ENGINEERING

NAME : MS. POOJA SHARMA

SUB NAME : COMPILER DESIGN

SUB. CODE : 03BTCS518

SEM/SECTION : V SEM/CSE

SESSION : 2025-2026(ODD)
INDEX
1. TIME TABLE OF FACULTY
2. SYLLABUS
3. CO-PO MAPPING
4. EXTRA TOPIC CO-PO MAPPING WITH JUSTIFICATION
5. LECTURE PLAN
6. LECTURE NOTES
7. I-II MID TERM TEST
8. I-II MID TERM ANSWER SCHEME
9. I-II MID TERM ATTENDENCE SHEET
10. I-II MID TERM MARK SHEET
11. UNIT TESTS
12. ASSIGNMENTS

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Dr. K. N. MODI UNIVERISTY NEWAI RAJASTHAN
Department of Computer Science & Engineering ( W.E.F. 01/07/2025)
Mrs. POOJA SHARMA
9:15-10:05 10:05-10:55 10:55-11:45 11:45-12:35 12:35-01:35 01:35-02:25 02:25-03:15 03:15-04:05 04:05-04:55
Mrs. POOJA SHARMA
Mrs. Pooja Mrs. Pooja Pooja Sharma
01BC108 & SECP18
Sharma Sharma 02BTCS302
MONDAY Programming
03BC501 Core 03BTCS518 Data Structure
Principle &
JAVA Compiler Design using C
Algorithm

Mrs. POOJA SHARMA


Mrs. Pooja Mrs. Pooja Pooja Sharma
01BC108 & SECP18
Sharma Sharma Internet of Things Lab (BTECH 02BTCS302
TUESDAY Programming
03BC501 Core 03BTCS518 ME) Data Structure
Principle &
JAVA Compiler Design using C
Algorithm

Mrs. POOJA SHARMA Mrs. Pooja Mrs. Pooja


Mrs. Pooja Mrs. Pooja
01BC108 & SECP18 Sharma Sharma
Sharma Sharma
WEDNESDAY Programming 02BPCS302 02BPCS302
03BC501 Core 03BTCS518
Principle & Data Structures Data Structures
JAVA Compiler Design
Algorithm Using C Lab Using C Lab
LUNCH

Mrs. Pooja Mrs. Pooja


Mrs. POOJA SHARMA
Mrs. Pooja Mrs. Pooja Sharma Sharma
01BC108 & SECP18 Pooja Sharma
Sharma Sharma SECP018 SECP018
THURSDAY Programming 02BTCS302 Data
03BC501 Core 03BTCS518 Programming Programming
Principle & Structure using C
JAVA Compiler Design for Problem for Problem
Algorithm
Solving Lab Solving Lab

[Link]
Mrs. Pooja Mrs. Pooja [Link] Sharma
Pooja Sharma Sharma
Sharma Sharma 03BPCS518
FRIDAY 02BTCS302 Data 03BPCS518
03BC501 Core 03BTCS518 Compiler Design
Structure using C Compiler
JAVA Compiler Design Lab
Design Lab

Mrs. Pooja Sharma 01BP108 & SECP18


Programming Pooja Sharma 03BP501 Core JAVA
SATURDAY
Principle & Lab
Algorithm Lab

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

COURSE: [Link]. SEMESTER: V SECTION: CSE

SUBJECT CODE & NAME: 03BTCS518, COMPILER DESIGN

LTP
5 0 0
Objectives: To study the concepts of Compiler Design

Pre-requisites: AUTOMATA THEORY

Unit – I

Introduction to Compiler, Phases and passes, Bootstrapping, Finite state machines and regular expressions
and their applications to lexical analysis, Optimization of DFA-Based Pattern Matchers implementation
of lexical analyzers, lexical-analyzer generator, LEX-compiler, Formal grammars and their application to
syntax analysis, BNF notation, ambiguity, YACC. The syntactic specification of programming languages:
Context free grammars, derivation and parse trees, capabilities of CFG.

Unit – II

Basic Parsing Techniques: Parsers, Shift reduce parsing, operator precedence parsing, top down parsing,
predictive parsers Automatic Construction of efficient Parsers: LR parsers, the canonical Collection of
LR(0) items, constructing SLR parsing tables, constructing Canonical LR parsing tables, Constructing
LALR parsing tables, using ambiguous grammars, an automatic parser generator, implementation of LR
parsing tables.

Unit – III

Syntax-directed Translation: Syntax-directed Translation schemes, Implementation of Syntax directed


Translators, Intermediate code, postfix notation, Parse trees & syntax trees, three address code, quadruple
& triples, translation of assignment statements, Boolean expressions, statements that alter the flow of
control, postfix translation, translation with a top down parser. More about translation: Array references
in arithmetic expressions, procedures call, declarations and case statements.

Unit – IV

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Symbol Tables: Data structure for symbols tables, representing scope information. Run-Time
Administration: Implementation of simple stack allocation scheme, storage allocation in block structured
language. Error Detection & Recovery: Lexical Phase errors, syntactic phase errors semantic errors.

Unit – V

Code Generation: Design Issues, the Target Language. Addresses in the Target Code, Basic Blocks and
Flow Graphs, Optimization of Basic Blocks, Code Generator. Code optimization: Machine-Independent
Optimizations, Loop optimization, DAG representation of basic blocks, value numbers and algebraic
laws, Global Data-Flow analysis

References:

1. Aho, Sethi & Ullman, "Compilers: Principles, Techniques and Tools”, Pearson Education
2. V Raghvan, “ Principles of Compiler Design”, TMH
3. Kenneth Louden,” Compiler Construction”, Cengage Learning.
4. Charles Fischer and Ricard LeBlanc,” Crafting a Compiler with C”, Pearson Education
5. K. Muneeswaran,Compiler Design,First Edition,Oxford University Press.
6. J.P. Bennet, “Introduction to Compiler Techniques”, Second Edition, Tata McGrawHill, 2003.
7. Henk Alblas and Albert Nymeyer, “Practice and Principles of Compiler Building with C”, PHI, 2001.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Department of Computer Science & Engineering
Program Educational Objectives (PEO)

PEO 1. The graduate of CSE will have a strong foundation in mathematical, scientific and
engineering fundamentals necessary to formulate, solve and analyze engineering problem in their
career.

PEO 2. The graduate of CSE will have the ability to analyses the requirements, understand the
technical specification and design the much engineering solutions by applying computer science
theory and principles.

PEO 3. The graduates of CSE will have exposure to work as teams on emerging cutting-edge
technologies with effective communication skills and leadership qualities.

PEO 4. The graduates of CSE will have successful career by engaging in lifelong learning.

PEO 5. The graduates of CSE will have skills to work collaboratively on multidisciplinary
projects and exhibits high levels of professional and ethics values.

Program Outcomes (PO)

Engineering Graduates will be able to:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex Computer Science &
Engineering problems.

2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.

3. Design/development of solutions: Design solutions for complex Computer Science &


Engineering problems and design system components or processes that meet the specified needs
with appropriate consideration for the public health and safety, and the cultural, societal, and
environmental considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and research


methods including design of experiments, analysis and interpretation of data, and synthesis of the
information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex Computer Science &
engineering activities with an understanding of the limitations.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.

8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.

9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex Computer Science & engineering


activities with the engineering community and with society at large, such as, being able to
comprehend and write effective reports and design documentation, make effective presentations,
and give and receive clear instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.

12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological changes in the field of
Computer Science.

Program Specific Outcomes (PSOs)

PSO 1: Ability to exhibit analytical & logical skills and apply knowledge of Maths and
Computer Science to design, develop, test and maintenance of software solutions.

PSO 2: Ability to identify, formulate and resolve real life/social problems by using current
computer technology.

Course Outcomes: Compiler Design


(W.e.f. Session: 2023-24)

AT THE END OF THE COURSE, STUDENTS WILL BE ABLE TO:

CO1: Acquire knowledge of different phases and passes of the compiler and also able to use the
compiler tools like LEX, YACC, etc. Students will also be able to design different types of
compiler tools to meet the requirements of the realistic constraints of compilers.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
CO2: Understand the parser and its types i.e. Top-Down and Bottom-up parsers and construction
of LL, SLR, CLR, and LALR parsing table.

CO3: Implement the compiler using syntax-directed translation method and get knowledge about
the synthesized and inherited attributes.

CO4: Acquire knowledge about run time data structure like symbol table organization and
different techniques used in that.

CO5: Understand the target machine’s run time environment, its instruction set for code
generation and techniques used for code optimization.

Updated PO-CO MAPPING

(W.e.f. Session: 2025-26)

Program Outcomes (PO)


Course PSO
Course Code
Outcom
& Title
es PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2

C 302.1 1 1 1 1 1 3 1 1
03BTCS518 C 302.2 3 3 2 3 3 3 2 2
(Compiler C 302.3 3 3 2 3 3 3 2 2
Design) C 302.4 3 3 2 3 3 3 2 2
C 302.5 1 1 1 1 1 3 1 1
3-Strongly Related, 2-Moderately Related, 1-Slightly Related, Blank-Not Related

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Extra Topic CO-PO Mapping with Justification

Relevance
S. Relate Relevanc
Topic to Justification
No. d Unit e to COs
POs/PSOs

Compiler Writing PO1-PO3, These systems are facilitating


1 1 CO1
systems PSO1 different phases for processing.

It is tool to generate lexical


PO3, PO5,
2 FLEX 2 CO2 analyzer and help to understand its
PSO2
functionality
Checking System
PO4, PO5, This topic thoroughly connects the
Rules Using
3 3 CO3 PO12, semantic action associated with
System-Specific
PSO1,PSO2 attributes of the program
Programmer
User Interaction This topic expands the different
PO1,PO2,P
4 Issues in Defect 4 CO4 bugs detection processes and
O12, PSO1
Detection Tools provide tools to clear them
This provide a detail structure of a
A simple code PO2-PO4, code generator phase which is
5 5 CO5
generator PSO1 helpful to understand the machine
code.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Department of Computer Science & Engineering
Lesson Plan

Course Name: B Tech Department: CSE


Semester: V Year: 2025-26
Course Title:: COMPILER DESIGN Course Code: 02BTCS518
Total Contact Hours: 4 Exam marks: 100
Lesson Plan Author: Ms. Pooja Sharma Date:

UNIT-1: Introduction to compilers


No. of No. of
[Link] Held on
Topic Lectures Lectures Remarks
. Date
Required Held

1 Phases and passes 1

2 Bootstrapping 1

Finite state machine and regular


3 1
expressions
Their application to Lexical
4 1
analysis
Optimization of DFA-Based
5 Pattern Matchers implementation 1
of lexical analyzers,
lexical-analyzer generator, LEX-
6 1
compiler
Formal grammars and their
7 application to syntax analysis, 1
BNF notation, ambiguity.
The syntactic specification of
8 programming languages, Context 1
free grammars.
Derivation and parse trees,
9 1
capabilities of CFG.
Lectures Scheduled = 09 Lectures held =

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
UNIT-II: Basic Parsing Techniques
No. of No. of
Held on
[Link]. Topic Lectures Lectures Remarks
Date
Required Held
1. Parsers, Shift reduce parsing 01
2. operator precedence parsing 01
3. top down parsing 01
4. predictive parsers 01
Automatic Construction of
5. 01
efficient Parsers: LR parsers,
Canonical Collection of LR(0)
6. 01
items,
7. Constructing SLR parsing tables 01
Constructing Canonical LR
8. 01
parsing
Constructing LALR parsing
9. 01
tables
10. Using ambiguous grammars 01
11. An automatic parser generator 01
Implementation of LR parsing
12. 01
tables

Lectures Scheduled = 12 Lectures held =

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
UNIT III: Syntax Directed Translation
S.N Topic No. of No. of Held on Remarks
o Lectures Lecture Date
Require s Held
d
Syntax-directed Translation
1 01
schemes,
Implementation of Syntax directed
2 01
Translators
3 Intermediate code, postfix notation 01

4 Parse trees & syntax trees 01


Three address code, Quadruple &
5 01
triples
Translation of assignment
6 01
statements
Boolean expressions and flow
7 01
control
Postfix translation, Translation
8 01
with a top down parser
Array references in arithmetic
9 01
expressions
Procedures call & Declarations
10 01
and case statements
Lectures Scheduled = 10 Lectures held =

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
UNIT IV : Symbol Table and Run Time Administration

[Link]. Topic No. of No. of Held Remarks


Lectures Lectu on
Required res
Held Date

1 Data structure for symbols tables 1

2 representing scope information 1

Run-Time Administration: Implementation of


3 1
simple stack allocation scheme

4 storage allocation in block structured language 1

5 Error Detection & Recovery: Introduction 1

6 Lexical Phase errors 1

7 syntactic phase errors 1

8 semantic errors 1

Lectures Scheduled = 8 Lectures held =

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
UNIT V : Code Generation

[Link]. Topic No. of No. of Held on Remarks


Lectures Lectur
Required es Held Date

1 Design Issues, the Target Language 1

2 Basic Blocks and Flow Graphs 1

Optimization of Basic Blocks, Code


3 1
Generator

4 Code Optimization 1

5 Machine-Independent Optimizations 1

6 Loop optimization, 1

7 DAG representation of basic blocks 1

8 value numbers and algebraic laws 1

9 Global Data-Flow analysis

Design Issues, the Target Language.


10
Addresses in the Target Code

Lectures Scheduled = 10 Lectures held =

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
ADDITIONAL TOPICS BEYOND SYLLABUS:

[Link] Topic No. of Related No. of Held on Remarks


. Lectures Unit Lecture
Require s Held Date
d

1 Compiler Writing systems 1 1

2 FLEX 1 2

Checking System Rules Using


3 1 3
System-Specific Programmer

User Interaction Issues in Defect


4 1 4
Detection Tools

5 A simple code generator 1 5

Text books:
T1. Aho, Sethi & Ullman, "Compilers: Principles, Techniques and Tools”, Pearson Education

Reference Books:
R1. V Raghvan, “Principles of Compiler Design”, TMH
R2. Kenneth Louden,” Compiler Construction”, Cengage Learning.
R3. Charles Fischer and Ricard LeBlanc,” Crafting a Compiler with C”, Pearson Education

Web References:
W1. [Link]/

W2. [Link]/

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
Department of Computer Science & Engineering
ASSIGNMENT SHEET 1

1. What do you understand by single pass and multi pass compiler? Discuss their merits and
demerits.

2. Explain the role of lexical analyzer during compilation process. Also explain the concepts
of input buffering and preliminary scanning.

3. Explain the difference between compiled languages and an interpreted language with
examples.

4. Finding FIRST and FOLLOW for the grammars given below and constructing parsing
table. Also show the predictive parser operation for the languages generated by the
grammars.

(a) SAbC/ad
AeS/Cr
Cf/p

(b) SXZY/ZbY/Ya
Xda/YZ
Yg/ε
Zh/ε

(c) SaXb
Xgh/ij

(d) SABD
Aa/BSB
Bb/D
Dd/ε

(e) ABCD
BhB/ε
CCg/g/Ch/i
DAB/ε

5. Explain Boolean expression. What are the different methods available to translate
Boolean expression?
6. Explain array references in arithmetic expression.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]
ASSIGNMENT SHEET 2

1. Explain the error detection and recovery techniques for the following phases of compiler
design.
a. Lexical analysis
b. Syntax analysis
c. Semantic analysis
2. Describe the representation of scope information in the symbol table consider the
following program structure and give its symbol table organization
Program main
Var x,y: integer;
Procedure p
Variable x,a:Boolean;
Procedure Q
Var x,y,z:real;
3. What do you understand by scoping in the symbol table? Give the difference between
scope of numbering and scope of location .
4. What is DAG? How DAG is created from three address code? Write algorithm for it and
explain it with a relevant example.
5. What are different issues in code optimization? Explain it with proper example.
6. What is Global data flow analysis? Explain in detail.

Ms. Pooja Sharma Mr. Amit Verma


[Subject Teacher] [HOD, CSE]

You might also like