You are on page 1of 13

SYLLABUS:

CS6660

COMPILER DESIGN

LTPC
3003

Course Objectives:
The student should be made to:
1. Learn the design principles of a Compiler.
2.Learn the various parsing techniques and different levels of translation
3.Learn how to optimize and effectively generate machine codes
UNIT I
INTRODUCTION TO COMPILERS
5
Translators-Compilation and Interpretation-Language processors -The Phases of CompilerErrors Encountered in Different Phases-The Grouping of Phases-Compiler Construction Tools
Programming Language basics.
UNIT II
LEXICAL ANALYSIS
9
Need and Role of Lexical Analyzer-Lexical Errors-Expressing Tokens by Regular
Expressions- Converting Regular Expression to DFA- Minimization of DFA-Language for
Specifying Lexical Analyzers-LEX-Design of Lexical Analyzer for a sample Language.
UNIT III
SYNTAX ANALYSIS
10
Need and Role of the Parser-Context Free Grammars -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-Design of a syntax Analyzer for a Sample
Language .
UNIT IV SYNTAX DIRECTED TRANSLATION & RUN TIME ENVIRONMENT 12
Syntax directed Definitions-Construction of Syntax Tree-Bottom-up Evaluation of
S-Attribute Definitions- Design of predictive translator Type Systems-Specification of a simple
type checker- Equivalence of Type Expressions-Type Conversions.
RUN-TIME ENVIRONMENT: Source Language Issues-Storage Organization-Storage
Allocation- Parameter Passing-Symbol Tables-Dynamic Storage Allocation-Storage Allocation in
FORTAN.
UNIT V
CODE OPTIMIZATION AND CODE GENERATION
9
Principal Sources of Optimization-DAG- Optimization of Basic Blocks-Global Data Flow
Analysis- Efficient Data Flow Algorithms-Issues in Design of a Code Generator A Simple
Code Generator Algorithm.
TOTAL:
45 PERIODS
Course Outcomes:
At the end of the course, the student should be able to:
1. Design and implement a prototype compiler.
2. Apply the various optimization techniques.
3. Use the different compiler construction tools.

TEXTBOOK:
1. Alfred V Aho, Monica S. Lam, Ravi Sethi and Jeffrey D Ullman, Compilers
Principles, Techniques and Tools, 2nd Edition, Pearson Education, 2007.
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. Charles N. Fischer, Richard. J. LeBlanc, Crafting a Compiler with C, Pearson
Education, 2008.

CS6660

COMPILER DESIGN

Course Plan:
The course plan is meant as a guideline. There may probably be changes.
Lecture
No.

Learning Objective

UNIT I
1
2
3
4
5

Teaching
Reference Method

Testing
Method

INTRODUCTION TO COMPILERS
Explain the difference
between compiler and
interpreter
Know the functionality
of Language Processor
Know the functionality
of each phase of
compiler
List the errors in each
phase
Explain Grouping of
phase and compiler
software tools
Understand
Programming Language
Basics

UNIT II

Translators, Compilation
and Interpretation

T1(1-3)

Language processors

T1(1-3)

The Phases of Compiler

T1(4-10)

Errors Encountered in
Different Phases
The Grouping of PhasesCompiler Construction
Tools
Programming Language
basics

T1(11)

BB

Assignment

BB

Quiz

BB

Class Test

BB

Class Test

PPT

Class Test

BB

Assignment

BB

Quiz

BB

Assignment

T1(11-12)

T1(25-36)

LEXICAL ANALYSIS

Explain functions of
lexical analyzer
Identify lexical errors
and specifying tokens
8
through regular
expressions
Understanding Regular
9-10
expression and DFA
Know minimization of
11-12 DFA
7

13

Topics to be covered

Understand lexical
analyzer tool

14-15 Explain LEX tool

Need and Role of Lexical T1(109Analyzer


113)
Lexical Errors-Expressing
T1(116Tokens by Regular
124)
Expressions
Converting Regular
Expression to DFA

T1(152159)

BB

Class Test

Minimization of DFA

T1(180184)

BB

Class Test

T1(166172)

BB

Class Test

BB

Assignment

Language for Specifying


Lexical Analyzers
LEX-Design of Lexical
Analyzer for a sample
Language

T1(166172)

UNIT III

SYNTAX ANALYSIS

Know functions of
parser
Explain CFG and
17-18 Parsing types

Need and Role of the


T1(191BB
Class Test
Parser
192)
Context Free Grammars
PPT
Class Test
T1(197-Top Down Parsing
216)
-General Strategies
Solve recursive decent Recursive Descent Parser
BB
Class Test
T1(21719-20 parser problem
Predictive Parser-LL(1)
226)
Parser
Solve SR parser, LR and Shift Reduce Parser-LR
BB
Class Test
SLR parser problems
Parser-LR
T1(233(0)Item- Construction of 252)
21-23
SLR Parsing TableT1(266Introduction to LALR
268)
Parser
Know errors in Syntax Error Handling and
T1(194BB
Class Test
Analyzer and YACC
Recovery in Syntax
195),
24-25
tool
Analyzer Yacc (Design T1(287of syntax anayser)
295)
UNIT IV
SYNTAX DIRECTED TRANSLATION & RUN TIME ENVIRONMENT
16

Explain Syntax Tree


26

Syntax directed
Definitions-Construction
of Syntax Tree-

Understanding Syntax Bottom-up Evaluation of


tree with S-attribute
S-Attribute Definitions
Design predictive parser Design of predictive
28-29
translator
Know about type system Type Systems30-31
Specification of a simple
type checker
Explain Type conversion Equivalence of Type
32 and Type expressions
Expressions-Type
Conversions
Understand Source
RUN-TIME
33 Language Issues
ENVIRONMENT: Source
Language Issues
Understand Storage
Storage Organization34 organization and Storage
Storage Allocation
allocation
Explain Parameter
Parameter Passing35 passing and Symbol
Symbol Tables
Table
27

T1(303304)
T1(318321)
T1(310312)
T1(370376)
T1(370376)
T1(378391)
T1(426427)
T1(427429)
T1(441449)

BB

Class Test

PPT

Assignment

BB

Class Test

BB

Class Test

BB

Class Test

PPT

Assignment

BB

Class Test

BB

Class Test

Examine dynamic
Dynamic Storage
PPT
Class Test
T1(43036-37 storage-allocation
Allocation-Storage
438)
strategies.
Allocation in FORTAN
UNIT V
CODE OPTIMIZATION AND CODE GENERATION
Understand various code Principal Sources of
optimization techniques Optimization
Draw Dag and
DAG- Optimization of
39-40
optimization
Basic Blocks
Explain Data flow
Global Data Flow
41-42 analysis and algorithms Analysis- Efficient Data
Flow Algorithms
Explain issues in code Issues in Design of a Code
43
generator
Generator
Explain Simple code
A Simple Code
44-45
generation algorithm
Generator Algorithm
38

III YEAR CSE- A NAME LIST

T1(584596)
T1(533538)
T1(597610)
T1(505510)
T1(542547)

BB

Assignment

BB

Class Test

BB

Class Test

PPT

Quiz

BB

Class Test

S.NO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

ROLL NO

NAME

310114104
001
310114104
002
310114104
003
310114104
004
310114104
005
310114104
006
310114104
007
310114104
008
310114104
009
310114104
010
310114104
011
310114104
012
310114104
013
310114104
014
310114104
015
310114104
016
310114104
017
310114104
018
310114104
019
310114104
021
310114104
022
310114104
023
310114104
024
310114104
025

ABINAYA S

S.NO
27

ROLL NO

NAME

310114104028

HARINI G

ADITHYA K B R

28

310114104029

HEMAVATHY D

ANILA A

29

310114104030

JAYADURGA M

ANJALI P

30

310114104031

JAYARAJ J

ANUSHA M

31

310114104032

JAYASHRI S

ARUN B

32

310114104033

JAYASINDHA A

ASHIFA R

33

310114104034

JEEVITHA P

ASHOK KUMAR S

34

310114104035

JENIFER E

ASSUMPTA ROSY
S
AVINASH A R

35

310114104036

36

310114104037

JERTHRUTH
MARY V
KAMALI P

BALAJI K

37

310114104038

KAMALI R

BARATH KUMAR S

38

310114104039

KANNAN B

BHAGYASREE G

39

310114104040

BHARATH VAJ K

40

310114104041

KARTHIKA DEVI
V
KARTHIK R

BHAVYA S

41

310114104042

KAVIMALAR R

BHUVANESWARI T

42

310114104043

KAVITHA K

CHANDRA
SEKARAN S
CHARUMATHI M

43

310114104044

KEERTHANA P

44

310114104045

KIRUTHIKA P

DHILIPKUMAR T

45

310114104046

KISHORE G

DIVYA D

46

310114104047

KUMARESAN R

DIVYA R

47

310114104048

DONDAPATI
SOWMYA
GAUTHAM G

48

310114104049

LAKSHMI PRIYA
R
LOGANATHAN T

49

310114104050

GAYATHRI R

50

310114104051

310114104
026
310114104
027

GAYATRI J

51

310114104701

MAHALAKSHMI
R
MOHAMMED
FAIZ MOHIDEEN
M
PADMA PRIYA S

GOMATHI B

52

310114104702

AKALYA DEVI C

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


FACT SHEET

Course code

: CS6660

Course Name: Compiler Design

Academic year: 2016-2017

Year/ Sem/Sec: III/VI/A

Course Co-ordinator:N.Vasudevan AP/CSE

Date Of Commencement:

COURSE AIM
This course deals with the compiling, structure of compilers: syntax and lexical
analysis, parsing, introduction to type checking, intermediate code generation,
introduction to code generation and optimization. Discussion about tools for compilers
design (e.g. Lex and Yacc).
COURSE OBJECTIVES:
The student should be made to:
1. Learn the design principles of a Compiler.
2.Learn the various parsing techniques and different levels of translation
3.Learn how to optimize and effectively generate machine codes
PRE-REQISITES:
Theory of Computation, Discrete Mathematics
COURSE OUTCOMES (CO)
At the end of the course, the student should be able to:
1. Design and implement a prototype compiler.
2. Apply the various optimization techniques.
3. Use the different compiler construction tools.

PROGRAM OUTCOMES (PO)

The PO of this programme will be framed based inputs from Industrial and an academic
expert with reference to the university curriculum and Graduate Attributes (GA). The suggestion
from senior faculty members is also taken into consideration for framing the PO.
b.The students will have the ability to analyze a problem, and identify and formulate the
computing requirements appropriate to its solution.
d.The students will have the ability to formulate a rule/knowledge based method and to
apply heuristic approaches to interpret and analyze the data for the attainment of problem
optimization.
g.The students will have the potential to adopt systematic and effective approach in
developing an application specific modules based on the guidelines given by the
professional society.
h.The students will have the ability to exhibit effective teamwork during diverse and
multidisciplinary areas such as information management, human computer interaction,
programming, networking, web systems and pervasive computing.
j.The students will have the ability to device a strategic work plan for the design
problems and will document the evidence and future directions for the benefit of the
society.

CO & PO mapping:

Program Outcomes

Course
Outcomes

CO1
CO2
CO3

b
S
M
M

S
S

S
S

Teaching Aids:
1. Classroom teaching (Board)
2. PPT (LCD Projector)
COURSE SURVEY
Course
Outcomes
CO1
CO2
CO3
Strong[5]

Program Outcomes
a

b
S[5]
M[3]
M[3]

Moderate[3-4]

d
S[5]
S[5]

S[5]

j
S[5]

S[5]
Weak[1-2]

Assessment Methods Considered & CO Weightage Planned:


III -A

Assessment Details

Course
CO1

Continuous Assessment test

Monthly Test-I

[60%]

CO2

60%

Monthly Test-II

60%

Model Exam

Other

Assignments

60%

40%

Assignment-II

Co-Curricular
Activities
[40%]

Assignment-I

40%

Assignment-III
Class Test

CO3

40%

Class Test I
Class Test II

Guest Lecture
Quiz
Tutorial
TOTAL
ASSESSMENT PLAN FOR THE COURSE:

100%

100%

100%

S.N
o

Activity Name

No. of.
activities

Monthly Test

Model Exam

Details
Monthly Test I

: 1.5 Unit.

Monthly Test II

: 1.5 Unit.

Model Exam

: 2 Units.

Special test

Class test I
Class test II

Assignments

Assignment 1

Assignment 2

Assignment3

Assignment
Assessment Details
Discussion

Assignment 1

Course
CO1

Continuous Assessment test 3

Assignment
Monthly
Test-I2

[60%]
Assignment3
Monthly
Test-II

Model Exam

Assignment-I
Assignments

Assignment-III

Other
Co-Curricular
Activities
[40%]

Assignment-II

Class test
Guest Lecture
Quiz
Tutorial
TOTAL

Class test 1
Class test 2

CO2

CO3

HOD/CSE

CLASS COORDINATOR FILE


III-A & B/VI SEMESTER
2016-2017
OVERALL CO% ATTAINED
YEAR

SECTION

CO%

A+B
SECTION
CO1
CO2

CO3
2016-2017

CO1
B

CO2
CO3
CO3

Year

section

2016-2017

CO %

Co total (5
POINTS))

UNIVERSITY
RESULT

HOD/CSE

You might also like