You are on page 1of 5

Galgotias University, Greater Noida

Fall Semester 2018-2019


Course Handout
Date: 03/08/2018

This documents gives specific details regarding the course.

Course No. : CSE313


Course Title : Compiler Design (Theory)
Instructor-in-Charge : Mr. Damodharan

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.

Scope & Objective:


This course helps the students to gather the knowledge about the compiler and they can
know how the compiler works. After the successful completion of the units student can able
to design their own compiler.
Course Content

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.

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, and 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, declaration sand case statements.

UNIT IV Symbol Table


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.

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:

R1 V Raghvan, “Principles of Compiler Design”, TMH, 2011.


R2 Kenneth Louden,” Compiler Construction”, Cengage Learning, 2002.
R3 Charles Fischer and Ricard LeBlanc,” Crafting a Compiler with C”, Pearson Education,1991.

Fall 2018 – 19
CSE313 – Compiler Design

  B.TECH CSE FIFTH


    SEMESTER      
Faculty Name: Mr. Damodharan.D

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

Bootstrapping, Finite state


2 18 July 2018
machines

Regular expressions and their


3 19 July 2018
applications to lexical analysis
Provide an Optimization of DFA-Based
4 3Aug 2018 understanding of Pattern Matchers
the fundamental Module - Chapter 1 ,2
principles in
implementation of lexical 1
9
of T1
5 4Aug 2018 compiler design analyzers, lexical-analyzer
generator, LEX-compiler
Formal grammars and their
6 4 Aug 2018 application to syntax analysis,
BNF notation
10 Aug
7
2018
ambiguity, YACC

8 11 August Context free grammars,


2018 derivation
11 August parse trees, capabilities of
9
2018 CFG

17 August
10
2018
Parsers, Shift reduce parsing

18 August operator precedence parsing,


11
2018 top down parsing
18 August
12 predictive parsers
2018
24 August LR parsers, the canonical
13
2018 Collection of LR (0) items
Provide an
25August understanding of constructing SLR parsing
14 Module- Chapter 3 of
2018 the fundamental tables, 9
2 T1
principles in
25 August compiler design constructing Canonical LR
15
2018 parsing tables
31 August Constructing LALR parsing
16
2018 tables
using ambiguous grammars,
17 01 Sep 2018
an automatic parser generator

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
compilers for quadruple & triples,
19 September translation of assignment
various
2018 statements Module- Chapter 4,5
situations that 8
3 of T1
15 one may Boolean expressions,
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 Error Detection & Recovery
2018
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 Optimization of Basic Blocks
2018
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.

Chamber Consultation Hour: Tuesday 10:10am to 11:00am


Wednesday 11:00am to 11:50am
Thursday 10:10am to 11:00am

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/ ”

Instructor-in-charge : Mr. Damodharan.D

You might also like