Compiler Design

Learning Outcomes: 
After learning the course the students should be able to:
• Understand the basic concepts and application of Compiler Design
• Understand various Code optimization Techniques and Error Recovery mechanisms.
• Understand and Implement a Parser.
• Apply their basic knowledge Data Structure to design Symbol Table, Lexical Analyzer, Intermediate Code Generation, Parser (Top Down and Bottom Up Design) and will able to understand strength of Grammar and Programming Language.

Based on Theory Concepts

Syllabus: 
Unit NoTopics
1

Introduction:

Overview of the Translation Process, A Simple Compiler, Difference between interpreter, assembler and compiler. Overview and use of linker and loader, types of Compiler, Analysis of the Source Program, The Phases of a Compiler, Cousins of the Compiler, The Grouping of Phases, Lexical Analysis, Hard Coding and Automatic Generation Lexical Analyzers, Front-end and Back-end of compiler, pass structure 

2

Lexical Analyzer:

 Introduction to Lexical Analyzer, Input Buffering, Specification of Tokens, Recognition of Tokens, A Language for Specifying Lexical Analyzers, Finite Automata From a Regular Expression, Design of a Lexical Analyzer Generator, Optimization of DFA 

3

Parsing Theory:

 Top Down and Bottom up Parsing Algorithms, Top-Down Parsing, Bottom-Up Parsing, Operator-Precedence Parsing, LR Parsers, Using Ambiguous Grammars, Parser Generators, Automatic Generation of Parsers. Syntax-Directed Definitions, Construction of Syntax Trees, Bottom-Up Evaluation of S-Attributed Definitions, L-Attributed Definitions, syntax directed definitions and translation schemes 

4

Error Recovery:

Error Detection & Recovery, Ad-Hoc and Systematic Methods 

5

Intermediate Code Generation:

Different Intermediate Forms, Syntax Directed Translation Mechanisms And Attributed Mechanisms And Attributed Definition. 

6

Run Time Memory Management:

Source Language Issues, Storage Organization, Storage-Allocation Strategies, and Access to Non local Names, Parameter Passing, Symbol Tables, and Language Facilities for Dynamic Storage Allocation, Dynamic Storage Allocation Techniques. 

7

Code Optimization:

Global Data Flow Analysis, A Few Selected Optimizations like Command Sub Expression Removal, Loop Invariant Code Motion, Strength Reduction etc.

8

Code Generation:

Issues in the Design of a Code Generator, The Target Machine, Run-Time Storage Management, Basic Blocks and Flow Graphs, Next-Use Information, A Simple Code Generator, Register Allocation and Assignment, The DAG Representation of Basic Blocks, Peephole Optimization, Generating Code from DAGs, Dynamic Programming Code-Generation Algorithm, Code-Generator Generators. 

Text Books: 
Name : 
Compilers: Principles, Techniques and Tools
Author: 
By Aho, Lam, Sethi, and Ullman,
Publication: 
Pearson, 2014
Edition: 
Second Edition
Reference Books: 
Name: 
Compilers: Principles, Techniques and Tools
Author: 
By Aho, Sethi, and Ullman
Publication: 
Addison-Wesley, 1986
Name: 
Compiler Design in C
Author: 
By Allen I. Holub,
Publication: 
Prentice-Hall/Pearson.
Name: 
Advanced Compiler Design and Implementation
Author: 
By Much nick, Morgan and Kaufmann
Edition: 
1998.
Syllabus PDF: 
AttachmentSize
PDF icon Compiler Design.pdf185.11 KB
branch: 
CBA
BDA
MA
Course: 
2014
Stream: 
B.Tech