Compiler Design

Paper Code: 
MCA 524F
Credits: 
04
Periods/week: 
04
Max. Marks: 
100.00
Objective: 

 The course will enable the students to

  1. Understand, design and implement a lexical analyzer.
  2. Understand, design and implement a parser.
  3. Evaluate intermediate languages and procedure calls.
  4. Understand, design code generation schemes.
  5. Understand optimization of codes and runtime environment.

 

Course Learning Outcomes (CLOs):

 

Learning Outcome (at course level)

Students will be able to:

Learning and teaching strategies

Assessment Strategies

  1. Learning of design code generation schemes.
  2. Learning of codes and runtime environment
  3. To understand Compiler design process manufacturing perspectives of ERP.
  4. Apply for various optimization techniques for dataflow analysis.
  5. Develop the parsers and experiment the knowledge of different parser design.

Approach in teaching:

Interactive Lectures,

Modeling, Discussions, implementing enquiry based learning, student centered approach, Through audio-visual aids

 

Learning activities for the students:

Experiential Learning, Presentations, Discussions, Quizzes and Assignments

 

  • Assignments
  • Written test in classroom
  • Classroom Activity
  • Continuous Assessment
    • SemesterEnd Examination

 

14.00
Unit I: 
INTRODUCTION TO COMPILING

Compilers – Analysis of the source program – Phases of a compiler – Cousins of the Compiler – Grouping of Phases – Compiler construction tools - Lexical Analysis -Role of Lexical Analyzer – Input Buffering – Specification of Tokens.

12.00
Unit II: 
SYNTAX ANALYSIS

Role of the parser –Writing Grammars –Context-Free Grammars – Top Down parsing - Recursive Descent Parsing - Predictive Parsing – Bottom-up parsing - Shift Reduce Parsing – Operator Precedent Parsing - LR Parsers - SLR Parser - Canonical LR Parser - LALR Parser.

14.00
Unit III: 
INTERMEDIATE CODE GENERATION

Intermediate languages – Declarations – Assignment Statements – Boolean Expressions – Case Statements – Back patching – Procedure calls

13.00
Unit IV: 
CODE GENERATION

Issues in the design of code generator – The target machine – Runtime Storage management – Basic Blocks and Flow Graphs – Next-use Information – A simple Code generator – DAG representation of Basic Blocks – Peephole Optimization.

13.00
Unit V: 
CODE OPTIMIZATION AND RUN TIME ENVIRONMENTS

ntroduction– Principal Sources of Optimization – Optimization of basic Blocks – Introduction to Global Data Flow Analysis – Runtime Environments – Source Language issues – Storage Organization – Storage Allocation strategies – Access to non-local names – Parameter Passing.

ESSENTIAL READINGS: 
  • Alfred Aho, Ravi Sethi, Jeffrey D Ullman, “Compilers Principles, Techniques and Tools”, Pearson Education Asia, 2003.
  • HenkAlblas and Albert Nymeyer, “Practice and Principles of Compiler Building with C”, PHI, 2001.
  • Kenneth C. Louden, “Compiler Construction: Principles and Practice”, Thompson Learning, 2003vs
REFERENCES: 
  • Allen I. Holub “Compiler Design in C”, Prentice Hall of India, 2003.
  •  C. N. Fischer and R. J. LeBlanc, “Crafting a compiler with C”, Benjamin Cummings, 2003.
Academic Year: