Вы находитесь на странице: 1из 6

ANAND INSTITUTE OF HIGHER TECHNOLOGY

KAZHIPATTUR – 603 103

Department of Computer Science and Engineering

Academic Year: 2019-2020 (Even Semester)

Regulation-2017

Lecture Plan

Course Code & Title: CS8602 & Complier Design

Semester & Branch: VI Semester B.E. Computer Science and Engineering

Name of the Faculty member: K.Amsavalli

Designation & Department: Assistant Professor- II & CSE

Course Objectives:

 To learn the various phases of compiler.


 To learn the various parsing techniques.
 To understand intermediate code generation and run-time environment.
 To learn to implement front-end of the compiler.
 To learn to implement code generator.

Course Outcomes:

On Completion of the course, the students should be able to:

 Understand the different phases of compiler.

 Design a lexical analyzer for a sample language.

 Apply different parsing algorithms to develop the parsers for a given grammar.

 Understand syntax-directed translation and run-time environment.

 Design and implement a scanner and a parser using LEX and YACC tools.

Assessment Methods followed:

1. Internal Tests (Monthly Tests) are conducted to assess continuous learning.


2. Assignment are given to encourage students’ self-learning.

3. Mini Projects are given to improve the experiential learning.

4. End Semester Examination is conducted to assess overall learning by students.

Lecture Date Topic(s) to be covered Teaching aids Teaching


No. (Board / Methodology
LCD) (Lecture
Role play
Group
Discussion
Quiz
Debates
Gamefication)

UNIT I- INTRODUCTION TO COMPILERS


Lecture
1 Structure of a compiler Board
Lexical Analysis – Role of Lexical Board Lecture
2
Analyzer
Group
3 Input Buffering Board
Discussion

Board Lecture
4 Specification of Tokens

5 Recognition of Tokens Board Lecture

Board Role Play


6 Lex

7 Finite Automata LCD Quiz

Lecture
8 Regular Expressions to Automata Board

Minimizing DFA. Quiz


9 Board

10 Unit Test – I

UNIT II SYNTAX ANALYSIS


Role Play
10 Board
Role of Parser
Lecture
11 Grammars Board
Lecture
12 Error Handling Board

Lecture
13 Context-free grammars – Writing a Board
grammar
Top Down Parsing – General Strategies
14 Recursive Descent Parser Predictive LCD Lecture
Parser.
Lecture
15 LL(1) Parser. LCD

Lecture
16 Board
Shift Reduce Parser
Quiz
LR Parser Board
17
LR (0)Item Construction of SLR Parsing Quiz
18
Table Board

19 Quiz
Introduction to LALR Parser Board
20 Error Handling and Recovery in Syntax Lecture
LCD
Analyzer
Lecture
21 Board
YACC
Unit Test –II
22

UNIT III INTERMEDIATE CODE GENERATION 

Lecture
23 Board
Syntax Directed Definitions
Evaluation Orders for Syntax Directed Board Role Play
24
Definitions
Board Lecture
25 Intermediate Languages: Syntax Tree

26 Three Address Code LCD Quiz

27 Types and Declarations LCD Lecture

28 Translation of Expressions, Type Board Lecture


Checking.
29 Unit Test –III

UNIT IV RUN-TIME ENVIRONMENT AND CODE GENERATION 


Board Lecture
30 Storage Organization

31 Stack Allocation Space Board Lecture

Lecture
32 Access to Non-local Data on the Stack, Board
33 Heap Management LCD Lecture
34 Issues in Code Generation LCD Lecture

LCD Group
35 Design of a simple Code Generator Discussion

36 Unit Test – IV

UNIT V CODE OPTIMIZATION 

37 Principal Sources of Optimization  Board Lecture

Board Lecture
38 Peep-hole optimization

39 DAG Board Quiz

40 Optimization of Basic Blocks Board Lecture

Board Group
41 Global Data Flow Analysis Discussion

42  Efficient Data Flow Algorithm. LCD Quiz

43 Unit Test – V
Content Beyond the Syllabus

Language Facilities For Dynamics LCD Lecture


44
Storage Allocation
Mini Projects

Create frameworks for syntax directed LCD Experiential


45 translation schemes, type checking and Learning
intermediate code generation.
Textbooks:

1. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Compilers:


Principles, Techniques and Tools‖, Second Edition, Pearson Education, 2009.

REFERENCES

1. Randy Allen, Ken Kennedy, Optimizing Compilers for Modern Architectures: A


Dependence based Approach, Morgan Kaufmann Publishers, 2002.
2. Steven S. Muchnick, Advanced Compiler Design and Implementation‖, Morgan
Kaufmann Publishers – Elsevier Science, India, Indian Reprint 2003.
3. Keith D Cooper and Linda Torczon, Engineering a Compiler‖, Morgan Kaufmann
Publishers Elsevier Science, 2004.
4. V. Raghavan, Principles of Compiler Design‖, Tata McGraw Hill Education Publishers,
2010. 5. Allen I. Holub, Compiler Design in C‖, Prentice-Hall Software Series, 1993.

Assignments:

Assignments – I

1.Design and implement lexical analyzer using LEX tool.

2. Apply context-free grammar and PDA design concepts to design parsers.

Assignment – II

1.Design and implement Bottom-Up parser using YACC.

2. Analyze various code optimization techniques and code generation.


Prepared by: Approved by:

K.Amsavalli AP/CSE Dr.S.Roselin Mary

(Name & Signature of Faculty member) (Name & Signature of HOD)

Вам также может понравиться