Professional Documents
Culture Documents
Objectives
Expected Outcome
On successful completion of the course, the student should be able to:
1. Design computational models for formal languages
2. Design scanners and parsers using top-down as well as bottomup paradigms
3. Design symbol tables and use them for type checking and other
semantic checks
4. Implement a language translator
5. Use tools such as lex, YACC to automate parts of
implementation process.
Module
1
Topics
SLO
L Hrs
9,6
5, 9
1, 6
6, 9
11
18
Recent Trends
1
Develop a lexical analyzer - Tools such as lex, flex for C++; jlex
for Java may be used
Input - Set of tokens
Output - recognizing tokens in the specified language as valid and
invalid
9, 18
Text Books
1. Introduction to Automata Theory, Languages, and Computation (3rd Edition), John E
Hopcroft, Rajeev Motwani, Jeffery D. Ullman, Pearson education, 2013.
2. Principles of Compiler Design, Alferd V. Aho and Jeffery D. Ullman, Addison Wesley,2006.
Reference Books
1. Introduction to Languages and the Theory of Computation, John Martin, McGraw-Hill
Higher Education,2010
2. Modern Compiler Implementation in Java, 2nd ed., Andrew W. Appel Cambrdige University
Press, 2012.
Theory of Computation and Compiler Design
Knowledge Areas that contain topics and learning outcomes covered in the course
Knowledge Area
17
19
KA
CS: AL /
CE: ALG
Basic Automata,
Computability
and
Complexity
Hours
CS: AL /
CE: ALG
Advanced
Automata
Theory and
Computability
CS: DS /
CE: DSC
Proof
Techniques
CS: DS /
CE: DSC
Graphs and
Trees
45
This course is a
Core subject
Suitable from 4th semester onwards.
Knowledge of any one programming language is essential.
What is covered in the course?
[A short description, and/or a concise list of topics - possibly from your course syllabus.(This is
likely to be your longest answer)]
The course gives an idea of different kinds of computational problems that are to be solved. All
the abstract computational models such as finite automata, pushdown automata and Turing
machines are taught to the students. Students are expected to design abstract models for the given
problems and also understand the limitations of such models. This course also gives complete
knowledge about how a high level language program is converted into the machine format that
can be understood by the machine. The subject gives the overall idea of the phases involved in
the conversion process and students are made to understand and apply the abstract machine
models for doing a particular task in a compilation process. The phases of compiler such as
lexical analysis, syntax analysis, code generation and code optimization are dealt in detail.
Overview of other phases of compilation is to be given in the course. Students are expected to
apply the acquired knowledge for designing a language translator.
Part 1: Abstract Models of Computation
This part of the course introduces languages and grammars and develops one of the three abstract
computational models such as finite automata, pushdown automata and Turing machines to
generate/accept the languages.
Part II: Lexical and Syntax Analysis
This part of the course deals with the algorithms and computational models that takes the high
level language program as input and check for correct syntax.
Part III: Code Generation and Optimization
The algorithms involved in generation of the code and optimization is explained to students in
this part of the course.
What is the format of the course?
[Is it face to face, online or blended? How many contact hours? Does it have lectures, lab
sessions, discussion classes?]
This Course is designed with 150 minutes of in-classroom sessions per week, 30 minutes of
video/reading instructional material per week, as well as 200 minutes of non-contact time spent
on implementing course related project. Generally this course should have the combination of
lectures, in-class discussion, guest-lectures, mandatory off-class reading material, quizzes.
Lab
Hour
Topic Covered
levels of
mastery
Reference
Book
Introduction
To Familiarity T1, T2
Languages,
Grammars
and Compilers
Overview
of
a
computational model Languages and grammars
alphabets Strings Operations on languages
Analysis of the Source
Program - Phases of a
Compiler
Remarks
Several
applications of
automata theory
such as Natural
language
processing,
bionformatics
may be quoted
and compiler
design shall be
introduced as a
applcation of
automata theory
that is to be dealt
in detail
Assignment1 with
exercise problems
in text/reference
book is to be
T1, R1
given
T1, R1
Assignment2 with
exercise problems
in text/reference
book is to be
given
Lexical
Analysis
- Familiarity T2, R2
Recognition of Tokens Designing
a
Lexical
Analyzer
using
finite
automata
Pumping
lemma
for
Regular languages (With
Proof)
CFG, PDAs and Turing
Machines
CFG Chomsky Normal
Forms
NPDA
DPDA
Membership algorithm for
CFG
Familiarity T1, R1
Usage
T1, R1
Familiarity T1, R1
Usage
T1, R1
LR Parsers
Turing
Machines
Usage
Recursive and recursively
enumerable languages
Linear bounded automata - Usage
Chomsky's hierarchy
Halting problem
Assignment3 with
exercise problems
in text/reference
book is to be
given
Assignment4 with
exercise problems
in text/reference
book is to be
given
Assignment5 with
exercise problems
in text/reference
book is to be
given
Familiarity T2, R2
T1, R1
T1, R1
Assignment6 with
exercise problems
in text/reference
book is to be
given
45 Hours
(3 Credit
hours
15 Weeks
schedule)
Intermediate
Code
Generation - Intermediate
Languages Declarations Assignment Statements Boolean Expressions - Case
Statements Backpatching
- Procedure Calls.
Code Optimization - Basic
Blocks and Flow Graphs
The DAG Representation
of Basic Blocks - The
Principal
Sources
of
Optimization
Optimization of Basic
Blocks - Loops in Flow
Graphs
Peephole
Optimization - Introduction
to
Global
Data-Flow
Analysis
Code Generation Issues
in the Design of a Code
Generator - The Target
Machine
Run-Time
Storage Management Next-Use Information Register Allocation and
Assignment - A Simple
Code
Generator
Generating Code from
DAG
Recent Trends Just-intime compilation with
adaptive optimization for
dynamic
languages
Parallelizing Compilers
Familiarity T2, R2
Familiarity T2, R2
Familiarity T2, R2
Familiarity T2, R2