Sunteți pe pagina 1din 3

NIIT UNIVERSITY

NEEMRANA, Rajasthan-301705
Course Title: Compiler Design
Course Code: CS 332
LTPC: 3 1 0 4
COURSE HANDOUT
Semester: 6th
Session: January-June, 2016
Course-in-Charge: Dr. Soharab Hossain Shaikh
Course Description: This course is an introduction to theory of compiler design. This course

aims to teach students the principles involved in compiler design. It will cover all the
basic components of a compiler, but not the advanced material on optimizations and
machine code generation.
1. Detailed list of topics along with the number of lectures are given in the table below.
Sl. No.
1

Topic
Compiler structure: Analysis-synthesis model of
compilation, various phases of a compiler, tool based
approach to compiler construction.

No. of Lectures
4

Lexical analysis: Interface with input, parser and


symbol table, token, lexeme and patterns, difficulties
in lexical analysis, error reporting, and
implementation. Regular definition, Transition
diagrams, LEX.
Syntax analysis: Context free grammars, ambiguity,
associativity, precedence, top down parsing, recursive
descent parsing, transformation on the grammars,
predictive parsing, Bottom up parsing, operator
precedence grammars, LR parsers (SLR, LALR, LR),
YACC.
Syntax directed definitions: Inherited and
synthesized attributes, dependency graph, evaluation
order, bottom up and top down evaluation of
attributes, L- and S-attributed definitions.
Type checking: Type system, type expressions,
structural and name equivalence of types, type
conversion, overloaded functions and operators,
polymorphic functions.

Runtime system: Storage organization, activation


tree, activation record, parameter passing symbol
table, dynamic storage allocation.
Intermediate code generation: Intermediate
representations, translation of declarations,
assignments Intermediate Code generation for
control flow, Boolean expressions and procedure
calls, implementation issues.
Code generation and instruction selection: Issues,
basic blocks and flow graphs, register allocation, code
generation, DAG representation of programs, code
generation from DAGs, peephole optimization, code
generator generators, specifications of machine.

Code optimization: Source of optimizations,


optimization of basic blocks, loops, global dataflow
analysis, solution of iterative dataflow equations.
Code is improving transformations, dealing with
aliases, data flow analysis of structured flow graphs

2. Evaluation method:
Evaluation
Instrument
Mid-Term-I
Mid-Term-II

Assignments

Comprehensive

Date
To be
announced
To be
announced
All through the
semester
during tutorial
hours
To be
announced

Weightage

Time

Comment

20%

1 Hr

Closed Book

20%

1 Hr

Closed Book

20%

Continuous
Evaluation

40%

2 Hrs

Closed Book

3. Make up Policy:
There will be no makeup examination for the Assignments (20%) component. This is a
continuous evaluation component.
For all other components (Mid-term I/II/Comprehensive) only one makeup examination may
be conducted for the defaulters satisfying the following conditions:
i)

Applicable only for the students who missed the examination for genuine reasons
only.
2

ii)

The course-in-charge should be informed (by email or written application) in


advance or at least on the day before the commencement of the examination about
the inability of the student to sit for the examination. No request for make-up
examination will be entertained after the end of the particular examination.
The defaulter needs to submit the relevant documents in support of absence in the
scheduled examination (medical certificates, pathological test reports and a letter
from parents/guardians etc.).
The make-up examination will normally be held within seven days of the scheduled
examination. The course-in-charge will be the final authority to decide the dates of
makeup.
There will be ONLY ONE make up examination in all the components (Mid-term
I/II/Comprehensive), if required. Someone failing to be present in the make-up
examination will be given NO additional chance.

iii)

iv)

v)

The decision of the course-in-charge in this matter shall be the final.


4. Grading Policy:
The marks obtained in all the components of Evaluation shall be totaled and the final marks
shall be converted in the letter grades, namely, A, B, C, D and E.
The grading is relative and normally it is centered on the average in a class.
5. Consultation Hour:
Students may approach the course-in-charge anytime during office hours on working days for
any clarification of their difficulties. The students are free to approach on mail/phone any day
during the course.

6. Books:
Text Book:
1. A.V. Aho, M.S. Lam, R. Sethi, and J.D. Ullman, Compilers: Principles, Techniques, and
Tools, Pearson Education, 2007.
Reference Book:
1. K.D. Cooper, and L. Torczon, Engineering a Compiler, Elsevier, 2004.

S-ar putea să vă placă și