Course Plan
CS 338
Compiler Design
[Link] Mustaq Ahmed.A mustaqm55@[Link].i
COURSE PLAN\SAU\WADI-ARTS & SCIENCE\COMPUTER SCIENCE & INFORMATION © - AUGUST 2015 1
Compiler Design
IInd Semester 2014 -15
I. Course Identification
Instructor Credit Level Hours
[Link] Mustaq 3 7 Sun 1-2 PM
Ahmed.A Tues 10-12 Noon
II. Course Description
Curriculum Description
Introduction and an overview of compilation technology. Lexical Analysis (Scanning): regular
languages/expressions, finite state machines, and building regular expressions from a finite
automaton. Syntax Analysis (Parsing): Expressing Syntax, Context Free Grammars, Top-Down
Parsing, Bottom-Up parsing. Semantic Analysis: Context-sensitive analysis, Attribute Grammars,
Symbol Tables, Type Checking. Intermediate Representations: Properties, taxonomy, Graphical IRs,
Linear IRs. The Procedure Abstraction, Linkage convention, and Run-time storage organisation.
Code Shape, Instruction Selection, Register Allocation, and Instruction Scheduling. Code
Optimisation, and JIT Compilation.
Expectations and Goals
The purpose of the course is to give the participants knowledge of concepts and techniques required
to implement a modern compiler for a high level imperative programming language.
At the end of the course, the students is expected to be able to:
design scanners and parsers using top-down as well as bottom-up paradigms, both with and
without the use of tools, and build abstract syntax trees in connection with this
design symbol tables and account for the use of these for typechecking and other semantic
checks
account for how executable code can be generated from an abstract syntax tree
explain about various forms of code optimization, including detailed account of how liveness
analysis can be used for register allocation
PAGE 2
Prerequisites
CS337
III. Course Tentative Schedule
Week Topic Learning Objectives
Week 1 Introduction Introduction and an overview of
compilation technology
Week 2 Lexical Analysis (Scanning) regular languages/expressions
Week 3 finite state machines finite state machines, and building regular
expressions from a finite automaton
Week 4 Syntax Analysis (Parsing) Expressing Syntax
Week 5 Context Free Grammars Context Free Grammars
Week 6 Parser-I Top-Down Parsing
Week 7 Test 1 Revision: Week 1-6 & Test
Week 8 Parser-II Bottom-Up parsing
Week 9 Semantic Analysis Context-sensitive analysis, Attribute
Grammars Symbol Tables, Type
Checking
Week 10 Intermediate Representations-I Properties, taxonomy
Week 11 Intermediate Representations-II Types
Week 12 Test 2 Revision: Week 7-11 & Test
Week 13 Intermediate Representations-III The Procedure Abstraction, Linkage
convention, and Run-time storage
organisation
Week 14 Code Optimization Code Optimization, Peephole
Optimization
Week 15 Code Generation Code Shape, Instruction Selection,
Register Allocation, and Instruction
Scheduling
IV. Learning Resources
Required Text
"Compilers: Principles, Techniques and Tools", 2nd Edition, 2007 by Aho A., [Link], [Link] ,
Compiler Construction By Niklaus Wirth
Reference Materials
Compiler Construction By Niklaus Wirth
PAGE 3
V. Grading Policies
Type Sub Types Number Mark Distribution
(%)
Test 1 1 20
Test 1 1 20
Internal Assessments 10
Quiz 6
Assignment 6
Oral 4
Class Activity 4
Final Test 1 50
Total 100
VI. Promotion Policy
Attendance
Students must have a minimum of 75 % of attendance, failing which may result in
debarring from the course
Academic
Students must have a minimum of 60% mark, to pass the course.
Signature of the Staff
PAGE 4