CSE313 Compiler Design Handout
CSE313 Compiler Design Handout
CSE313 Compiler Design Handout
Course Description:
This course discusses working procedure of the compiler. Starts with the phases of the
compiler and deals the each phases, Lexical analyzer, Syntax analyzer, semantic Analyzer,
Intermediate code Generator, Code optimizer and code generator. Each phases has its own
techniques and explains the various procedure to achieve each phases.
UNIT I Introduction
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.
Text Books:
T1 Alfred V Aho, Jeffrey D. Ullman, “Principles of Compiler Design”, Narosa Publishing House, 2002.
T2 Aho, Sethi & Ullman, "Compilers: Principles, Techniques and Tools”, Addison Wesley; 2nd
edition, 2006.
Reference Books:
Fall 2018 – 19
CSE313 – Compiler Design
Reference
Lectur Learning Course Total
Date Topics to be covered Chap./Sec.
e No. Objectives Module Lectures
(Book)
Introduction to Compiler,
1 17 July 2018
Phases and passes
17 August
10
2018
Parsers, Shift reduce parsing
implementation of LR parsing
18 07 Sep 2018
tables
CAT I EXAM
08 Syntax-directed Translation
16 September schemes, Implementation of
2018 Syntax directed Translators
08
September Intermediate code, postfix
17
2018 notation
14
Provide the Parse trees & syntax trees,
18 September
skills needed for three address code
2018
building
15 quadruple & triples,
compilers for
19 September translation of assignment
various
2018 statements Module- Chapter 4,5
situations that 8
15 one may Boolean expressions, 3 of T1
20 September encounter in a statements that alter the flow
2018 career in of control
21 Computer
Science. postfix translation, translation
21 September
2018 with a top down parser
22
Array references in arithmetic
22 September
2018 expressions
22
procedures call, declaration
23 September
2018 sand case statements
28 Learn the Data structure for symbols
24 September process of Module Chapter 6 of
2018 tables 8
translating a -4 T1
25 29 modern high- representing scope information
September
2018
29
Implementation of simple
26 September
2018 stack allocation scheme
05 October storage allocation in block
27 2018 structured language
06 October
28
2018
Error Detection & Recovery
06 October level language
2018 to executable
29 Lexical Phase errors,
code. Grasp of
compiler
construction syntactic phase errors semantic
30 12 October errors
2018
13 October
31
2018
CAT II Revision
CAT-2 Exam
13 October Design Issues, the Target
32 2018 Language
19 October Addresses in the Target Code,
33 2018 BasicBlocks and Flow Graphs
20 October
34 2018
Optimization of Basic Blocks
20 October Code Generator. Code
35 2018 optimization
26 October Learn the Machine-Independent
36 2018 Optimizations
process of
37 27 October
translating a Loop optimization
2018 modern high-
27 October level DAG representation of basic
38 2018 blocks
language to Module 9 Chapter
39 2 Nov 2018 value numbers and algebraic laws
executable -5 9 ,11 of T1
40 3 Nov 2018 code. Grasp Global Data-Flow analysis
03 of compiler
41 November
2018 construction.
09
42 November
2018
10
43 November
2018
10
44 November
2018
Evaluation Scheme:
EC
Evaluation Marks Nature of
No Duration Date &Time
Component (50) Component
.
1. CAT-1 90 mins 50 (15) Closed Book
2. CAT-2 90 mins 50 (15) Closed Book
3. Quiz-1 15 mins 5 Closed Book
4. Quiz-2 15 mins 5 Closed Book
5. Quiz-3 15mins 5 Closed Book
4. Assignment(s) - 5 Any time throughout the Open Book
semester
Teaching Pedagogy: Black Board, Power Point Presentations, Videos, Internet Resources,
Java Software Package.
Notices: All notices concerning this course will be displayed on the School Notice Board of
SECE and will also be available in the google site link
“https://sites.google.com/a/galgotiasuniversity.edu.in/wmc/ ”