You are on page 1of 3

ARSI UNIVERSITY

Department of Computer
College of Computational Science
Science

Course Owner Department: Computer Science


Module Title: Compiler Development Module Code: CoSc-M3111

Module ECTS: 11
Course Title: Compiler Design Course Code: CoSc3112
Course Load: ECTS Lecture Laboratory Tutorial Home study Total
6 48 48 16 50 162
Course Prerequisite: 1. CoSc3111 - Formal Language and Automata Theory
Instructor’s Contact Information: Course Delivery Information:
Name: Academic Year:
Office: Semester:
Phone: Meeting date:
Email: Meeting time:
Office Hours: Meeting location:

1. Course Description:
The course builds on the student's core knowledge of languages, grammars and programming and
provides an opportunity to see how these core areas can come together to form an application area.
Also it imparts the knowledge about the following
 To learn basic techniques used in compiler construction such as lexical analysis, top-
down and bottom-up parsing, context-sensitive analysis, and intermediate code
generation.
 To learn basic data structures used in compiler construction such as abstract syntax
trees, symbol tables, three-address code, and stack machines.
 To learn software tools used in compiler construction such as lexical analyzer
generators, and parser generators.
2. Course Goals or Learning Outcome
By the end of this course, students will be able to:
 Implementing a small compiler using modern compiler writing tools.
 Providing the student with skills and knowledge (such as lexical analysis and parsing)
which are applicable to a broad range of computer science application areas (such as
text editors, information retrieval, etc...).
3. Content
Weeks Topic to be Discussed
Chapter One:
1,2 Phases of a Compiler
Computer Language Representation
Compiler Construction Tools
Token Specification
Recognition of Tokens
Recognition machine
3,4,5 NFA to DFA
Error Recovery
A typical lexical analyzer generator
DFA Analysis
Parsing Top Down Parsing
Predictive Parsing
Top-down parsing – Principles of CFG
Regular Expressions Vs Context Free Grammar
Top-down parsing implementation-Recursive Descent Parsing
Non recursive Predictive Parsing
LL(1) Grammar
Bottom-up parsing
5-8 Handles
Stack Implementation of Shift reduce Parsing
LR parsers-Implementation – LR Parsing Algorithm
SLR
Canonical & LALR
Error recovery
Parser generator
Syntax Directed Translation: Syntax-directed definitions, construction of syntax trees
9,10 Type Checking: Type systems, type conversions
Intermediate languages – Three Address Code rules
Quadruples
Declarations
11,12 Declarations in procedures
Flow control statements
Back patching
Procedure calls
Symbol table
13 Hash Tables
Representing Scope Information
Introduction to code optimization
Code generation –
Simple Code generator
14,15
Register Allocation
DAG representation
Peephole Optimization Techniques
16 Final Exam
4. Summary of Teaching Learning Methods:
The learning–teaching methodology will be student-centered with
appropriate guidance of instructor/s during the students‘ activities .There will
be Lecture, Demonstrations, and Tutorials, Reading assignments, Group
Discussions and Lab work.
5. Summary of Assessment Methods:
Evaluation will carry out based on relevant continuous assessments (class
assessments, assignments and laboratory works) and significantly scheduled
and designed final examination.
6. Re
qu
ire
d
Te
xt
 H
ar
d
w
ar
e
 Software
7. Required Texts:
 Text book:
1. T1: Alfred Aho, Ravi Sethi, V.Jeffery Ullman D.
―COMPILERS RINCIPLES, TECHINQUES AND TOOLS ―,
Addison- Wesley, 1988.
 Reference Books:
1. R1: Allen Holub l. ―Compiler Design in C‖, Prentice Hall of India. 1990.
2. R2: Charles N.Fischer Richard J.Leblanc, ―Crafting a
compiler with C‖, Benjamin Cummings, 1991

You might also like