0% found this document useful (0 votes)
55 views7 pages

CS8602 CD Course Plan

This document provides a course plan for the subject "Compiler Design" (CS8602). The course will be taught over 3 hours per week for 1 semester. The document outlines 5 units that will be covered: 1) Introduction to Compilers, 2) Syntax Analysis, 3) Intermediate Code Generation, 4) Run-time Environment and Code Generation, and 5) Code Optimization. Each unit lists topics, reference materials, number of class periods, and learning outcomes. The course aims to teach students about the various phases of compiler design including lexical analysis, parsing techniques, code generation, and optimization.

Uploaded by

Prasanna Latha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views7 pages

CS8602 CD Course Plan

This document provides a course plan for the subject "Compiler Design" (CS8602). The course will be taught over 3 hours per week for 1 semester. The document outlines 5 units that will be covered: 1) Introduction to Compilers, 2) Syntax Analysis, 3) Intermediate Code Generation, 4) Run-time Environment and Code Generation, and 5) Code Optimization. Each unit lists topics, reference materials, number of class periods, and learning outcomes. The course aims to teach students about the various phases of compiler design including lexical analysis, parsing techniques, code generation, and optimization.

Uploaded by

Prasanna Latha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

COURSE PLAN

Subject code: CS8602 Branch/Year/Sem/Section: B.E CSE/III/VI


Subject Name: Compiler Design Batch:2017-2021
Staff Name:S.SRILEKAA Academic year:2019-2020

COURSE OBJECTIVE
 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.

TEXT BOOK:
T1. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Compilers: Principles, Techniques and Tools‖, Second
Edition, Pearson Education, 2009.

REFERENCES:
R1.Randy Allen, Ken Kennedy, Optimizing Compilers for Modern Architectures: A Dependence based Approach, Morgan
Kaufmann Publishers, 2002.
R2. Steven S. Muchnick, Advanced Compiler Design and Implementation‖, Morgan Kaufmann Publishers - Elsevier Science,
India, Indian Reprint 2003.
R3. Keith D Cooper and Linda Torczon, Engineering a Compiler‖, Morgan Kaufmann Publishers Elsevier Science, 2004.
R4. V. Raghavan, Principles of Compiler Design‖, Tata McGraw Hill Education Publishers, 2010.
R5. Allen I. Holub, Compiler Design in C‖, Prentice-Hall Software Series, 1993.

WEB RESOURCES
W1: http://nptel.ac.in/syllabus/syllabus_pdf/106108052.pdf
W2:www.wikipedia.org
W3: http://studentsfocus.com/

TEACHING METHODOLOGIES:
 BB - BLACK BOARD
 VIDEO - VIDEO TUTORIAL
 PPT - POWER POINT PRESENTATION

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 1 of 7


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CS8602 COMPILER DESIGN LTPC

3024

1. UNIT I INTRODUCTION TO COMPILERS 9

Structure of a compiler – Lexical Analysis – Role of Lexical Analyzer – Input Buffering –Specification of Tokens –
Recognition of Tokens – Lex – Finite Automata – Regular Expressions to Automata – Minimizing DFA.

2. UNIT II SYNTAX ANALYSIS 12

Role of Parser – Grammars – Error Handling – Context-free grammars – Writing a grammar –Top Down Parsing -
General Strategies Recursive Descent Parser Predictive Parser-LL(1)Parser-Shift Reduce Parser-LR Parser-LR
(0)Item Construction of SLR Parsing Table -Introduction to LALR Parser - Error Handling and Recovery in Syntax
Analyzer-YACC.

3. UNIT III INTERMEDIATE CODE GENERATION 8

Syntax Directed Definitions, Evaluation Orders for Syntax Directed Definitions, Intermediate Languages: Syntax
Tree, Three Address Code, Types and Declarations, Translation of Expressions, Type Checking.

4. UNIT IV RUN-TIME ENVIRONMENT AND CODE GENERATION 8

Storage Organization, Stack Allocation Space, Access to Non-local Data on the Stack, Heap Management - Issues in
Code Generation - Design of a simple Code Generator.

5. UNIT V CODE OPTIMIZATION 8

Principal Sources of Optimization – Peep-hole optimization - DAG- Optimization of Basic BlocksGlobal Data Flow
Analysis - Efficient Data Flow Algorithm.

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 2 of 7


TOTAL: 45 PERIODS
No of Cumulati
Topic Books For Teaching
Topic Name Page No periods ve
No reference Methodology
required periods
UNIT I INTRODUCTION TO COMPILERS (9)
1. Structure of a compiler T1 4-12 BB 1 1
Lexical Analysis, Role of Lexical
2. T1 109-114 BB 1 2
Analyzer
3. Input Buffering T1 115-116 BB 1 3
4. Specification of Tokens T1 116-125 BB 1 4
5. Recognition of Tokens T1 130-136 BB 1 5
6. Lex T1 140-144 BB 1 6
7. Finite Automata T1 147-149 BB 1 7
8. Regular Expressions to Automata T1 152-166 BB 1 8
9 Minimizing DFA T1 180-186 BB 1 9
LEARNING OUTCOME:
At the end of unit , the students will be able to
 Know the fundamentals of Compiler Design.
 Understand the structure of a compiler.
 Gain the knowledge about Lexical Analyser.
UNIT II SYNTAX ANALYSIS (12)
1 Role of Parser – Grammars T1 191-193 BB 1 10
Error Handling – Context-free
2 T1 194-206 BB 1 11
grammars
3 Writing a grammar T1 209-215 BB 1 12

4 Top Down Parsing T1 217-219 BB 1 13


General Strategies Recursive
5 T1 219-220 BB 1 14
Descent Parser Predictive Parser
6 LL(1)Parser T1 222-228 BB 1 15
7 Shift Reduce Parser T1 236-238 BB 1 16

8 LR Parser T1 241-242 BB 1 17
LR (0)Item Construction of SLR
9 T1 242-252 BB 1 18
Parsing Table
Introduction to LALR Parser
10 T1 266-270 BB 1 19
Analyzer
Error Handling and Recovery in
11 T1 281-285 BB 1 20
Syntax

12 YACC T1 287-295 BB 1 21

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 3 of 7


LEARNING OUTCOME:
At the end of unit , the students will be able to
 Define the Role of Parser.
 Understand the design principles of syntax analyzer.
 Gain the knowledge about types of the parser.

UNIT – III INTERMEDIATE CODE GENERATION (8)


1 Syntax Directed Definitions T1 303-306 BB 1 22
Evaluation Orders for Syntax
2 T1 309-314 BB 1 23
Directed Definitions
3 Intermediate Languages T1 357-358 BB 1 24
4 Syntax Tree T1 358-360 BB 1 25
5 Three Address Code, T1 363-369 BB 1 26
6 Types and Declarations T1 370-376 BB 1 27

7 Translation of Expressions T1 378-383 BB 1 28

8 Type Checking T1 386-395 BB 1 29


LEARNING OUTCOME:
At the end of unit , the students will be able to
 Understand the concept of SDD.
 Gain knowledge about Code generation.
 Define the Code optimization.
UNIT IV RUN-TIME ENVIRONMENT AND CODE GENERATION (8)
1 Storage Organization T1 427 BB 1 30

2 Stack Allocation Space T1 430-438 BB 1 31

3 Stack Allocation Space T1 -- BB 1 32

Access to Non-local Data on the


4 Stack
T1 441-449 BB 1 33

5 Heap Management T1 452-460 BB 1 34

6 Issues in Code Generation T1 505-511 BB 1 35

7 Design of a simple code generator T1 542-547 BB 1 36


8 Design of a simple code generator T1 -- BB 1 37
LEARNING OUTCOME:
At the end of unit , the students will be able to
 Understand the concept of Storage Organization.
 Known about the code generator.

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 4 of 7


UNIT V CODE OPTIMIZATION (8)

1 Principal Sources of Optimization T1 512-516 BB 1 38

2 Principal Sources of Optimization T1 -- BB 1 39

3 Peep-hole optimization T1 549-582 BB 1 40

4 DAG T1 533-535 BB 1 41

5 Optimization of Basic Blocks W3 533-541 BB 1 42

6 Basic Blocks Examples W3 525-531 BB 1 43

7 Global Data Flow Analysis W3 -- PPT 1 44

8 Efficient Data Flow Algorithm. W3 -- PPT 1 45

LEARNING OUTCOME:
At the end of unit , the students will be able to
 Understand the concept of Optimization.
 Gain knowledge about Risk management

 Understand the concept of Linux System


COURSE OUTCOME
 Know about the concept of Mobile OS - iOS and Android.
At the end of the course, the student should be able to:
 Understand the concept of Kernel Modules.
 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.
 Learn to implement code optimization techniques and a simple code generator.
 Design and implement a scanner and a parser using LEX and YACC tools.

CONTENT BEYOND THE SYLLABUS


Various code optimization technique and its complexity
CONTINUES INTERNAL ASSESSMENT DETAILS
ASSESMENT NUMBER I II MODEL
(UNIT) (1st & 2nd units) (3rd & 4th units) (units 1-5)

ASSIGNMENT DETAILS
ASSIGNMENT NUMBER I II III
TOPIC NUMBER FOR REFERENCE 1-18 (1st & 2nd units) 19-36 (3rd & 4th units) 1-45 (units 1-5)
DEAD LINE

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 5 of 7


ASSIGNMENT BATCH DESCRIPTIVE QUESTIONS/TOPIC
NUMBER (Minimum of 8 Pages)
1. Analysis-Synthesis model of Compilation
B1 (R.Nos 1-18) 2. Various Phases of a Compiler
3. Tool based approach to Compiler Construction
1. Lexical Analysis
I B2 (R.Nos 19-36) 2. Parser and Symbol Table,Token
3. Lexeme and Patterns

1. Error Reporting and Implementation


B3 (R.Nos 37-302)
2. Regular definition
3. Transition diagrams
1. LEX
B1 (R.Nos 1-18) 2. Syntax analysis
3. Context free Grammers

1. Top Down Parsing


II B2 (R.Nos 19-36) 2. Recursive Descent Parsing
3. Bottom Up Parsing

1. LR Parsers (SLR, LALR, LR)


B3 (R.Nos 37-302) 2. YACC
3. L- and S-Attributed Definitions

1. DAG Representation of Programs


B1 (R.Nos 1-18) 2. Code Generation from Dags
3. Peep Hole Optimization

1. Type Checking ,Run Time System


B2 (R.Nos 19-36) 2. Intermediate Code Generation
III
3. Code Generation and Instruction Selection

1. Global Dataflow Analysis


2. Code Improving Transformations
B3 (R.Nos 37-302)
3. Data Flow Analysis of Structured Flow Graphs

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 6 of 7


LIST OF EXPERIMENTS:

1. Develop a lexical analyzer to recognize a few patterns in C. (Ex. identifiers, constants, comments, operators
etc.). Create a symbol table, while recognizing identifiers.
2. Implement a Lexical Analyzer using Lex Tool
3. Implement an Arithmetic Calculator using LEX and YACC
4. Generate three address code for a simple program using LEX and YACC.
5. Implement simple code optimization techniques (Constant folding, Strength reduction and Algebraic
transformation)
6. Implement back-end of the compiler for which the three address code is given as input and the 8086 assembly
language code is produced as output.
Ses Teachin No. Cumulativ
sion Experimental concepts to be covered
g Aid of e No. of
No Hour Hours
s
2 5
Development of a lexical analyzer to recognize a few patterns in C.
1
2 Implementation of Lexical Analyzer using Lex Tool. 2 10
3 2 15
Implementation of Calculator using LEX and YACC.
4 2 20
Implementation of three address code using LEX and YACC PP
T
5 2 25
Implementation of Simple Code Optimization Techniques.

6 2 30
Implementation of back end of the compiler.

OUTCOMES:

Upon the completion of Compiler Design practical course, the student will be able to:

1. Understand the working of lex and yacc compiler for debugging of programs.

2. Understand and define the role of lexical analyzer, use of regular expression and transition diagrams.

3. Understand and use Context free grammar, and parse tree construction.

4. Learn & use the new tools and technologies used for designing a compiler.

5. Develop program for solving parser problems.

6. Learn how to write programs that execute faster.

PREPARED BY VERIFIED BY

S.SRILEKAA, AP/CSE HOD/CSE

APPROVED BY

PRINCIPAL

DSIT/CSE/III YEAR/COURSE PLAN/CS8602-CD Page 7 of 7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy