Sei sulla pagina 1di 3

Course Description Document

Semester: Even Semester Year: 2019-20

Course Coordinator(s): Dr. Garima Verma and Mr. Saurabh Kr. Srivastava (Sub-Coordinator)

Course Instructor(s): Ms. Aditi Sharma, Ms. Zeya Umaya, Mr. Ashish Singh Parihar, Mr.
Ranjeet Kr. Singh, Ms. Maneesha

1. Department offering the course Computer Science and Engineering


2. Course Code CS304
3. Course Title Compiler Design
4. Credits (L:T:P:C) 3:0:1:4
5. Contact Hours (L:T:P) 3:0:2
6. Prerequisites (if any) CS213
7. Course Basket DC

8. Course Summary
The course is proposed to teach the students basic techniques that are used for the compiler design. The
course introduction to all the phases of compiler and will introduce the theory and tools that are standarly
employed in order to perform conversion of a high-level programming language into machine level code.

9. Course Objectives-
The main objective of this course in to learn about different phases of compiler design and various types
of grammars used in compiler design with practical exposure.

10. Course Outcomes –

On successful completion of the course students will be able to -


1. Find out the tokens from high level language program and also understand the working of lexical
analyzer.
2. Understand Different type of parsing techniques and will be able to differentiate between them.
3. Understand the importance of semantic rules.
4. Understand the organization of symbol table and runtime environment.
5. Understand the importance of code optimization and error handling while the compilation
process.

11. Curriculum Content


Unit I : Introduction: Review of Languages & Grammar, Compiler and Interpreter- Basic Concepts.
Phases and Passes, Design Issues using Finite State Machines, Scanner Generator- LEX. Formal
Grammar and their application to Syntax Analysis, Ambiguous Grammar, The Syntactic specification of
Languages: CFG, Derivation and Parse Trees, Capabilities of CFG, BNF Notation.

Unit II : Basic Parsing Techniques: Parsing-Top Down and Bottom-Up Strategies: General
Consideration.
Top Down Parsing: Brute-Force Method, Recursive Descent, & Predictive Paring.
Bottom-Up Parsing: Shift Reduce Parsing, Operator Precedence Parsing. LR Grammars-LR(0), SLR(1),
Canonical LR(1) & LALR(1) Parser, Comparison of parsing methods.

Unit III : Semantic Analysis: Basic Concepts, Syntax Directed Definitions-Inherited & Synthesized
Attributes, Evaluation Orders of SDDs. Syntax directed Translation Schemes, Intermediate Codes, Postfix
notation, Parse Trees and Syntax Trees, Directed Acyclic Graphs, Three address Codes: Quadruple &
Triples, Translation of Assignment Statements, Boolean expressions, Control Statements, Postfix
Translation, Translation with a Top Down Parser, Array References in Arithmetic expressions, Procedure
Calls, Declarations and Case statements Translations.

Unit IV : Symbol Tables: Organization of Non-Block Structured Language (Unordered /Ordered/ Tree/
Hash) and Block Structured Language (Stack Tables & Stack Implementation).
Runtime Storage Management: Static Allocation, Dynamic Allocation- Activation Records and their
usage, Recursive Procedure. Heap Allocation-Storage Registers and Release Strategies.

Unit V: Error detection and Recovery: Code Optimization- Basic Blocks and Optimization, Loop
Optimization, Flow Graph Analysis, Machine Dependent Optimization.
Error Handling: Detection, Reporting, Recovery and Maintenance, Compiler-Compiler—YACC, Code
Generation, Concept of Compiler Design for Object-Oriented Language.

Text Book:
1. Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, “Compilers-Principles, Techniques & Tools”,
Pearson Education
Reference Book (s):
1. Robin Hunter, “ Essence of Compilers”, Pearson Education
2. Steven S. Muchnick, Advanced Compiler Design & Implementation, Morgan Kaufmann Publishers

12. Teaching and Learning Strategy


All materials (pdf/ppts, assignments, labs, etc.) will be uploaded in Moodle. Refer to your
course in Moodle for details.

Evaluation Scheme

Description Marks
Mid Term 20
Class Test 10
Quiz 10
Lab Performance 10
Continuous Lab Viva 5
Lab Record 5
Internal Assessment 60%
End Term Exam 40
External Assessment 40%

Potrebbero piacerti anche