| CS31003/CS39003 Compilers: Theory and Laboratory | Autumn 2026 |
Schedule
Timing: Slot D3 [Mon (12:00pm–01:00pm), Tue (10:00am–12:00pm)]
Theory
Section 1 Students with odd roll numbers
Instructor: Aritra Hazra
Classroom: NC241Section 2 Students with even roll numbers
Instructor: Abhijit Das
Classroom: NC242
Laboratory: Software Labs, Old and New Buildings, Slot L [Tue (02:00pm–05:00pm)]Teaching Assistants
Theory
Arijit Saha
Mithun Kumar Mahto
Narayan Sharma
Subhankar Jana
Laboratory
Aashray Tandon
Aditya Kumar Bharti
Antik Sur
Arnav Prakash Chaudhry
Arpit Sodhani
Ojas Dubey
Shreya Bose
Notices and Announcements
- Jun 25, 2026
- We can accept a few non-CSE students in the theory course. The only selection criterion is the applicants' CGPAs.
For space limitations, we cannot accept any non-CSE student in the lab.Tentative Coverage (Theory)
- Introduction
- Lexical analysis
- Parsing
- Syntax directed translation
- Intermediate code generation
- Target code generation
- Optimization
Books and References
The main textbook for this course is the following (called The Dragon Book).
- Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman, Compilers: Principles, Techniques, and Tools, 2nd edition, Addison-Wesley, 2006 [Indian edition by Pearson, 2014]
Here are some other references.
- Allen I. Holub, Compiler Design in C, Prentice-Hall, 1990
- Andrew W. Appel, Modern Compiler Implementation in C, Cambridge University Press, 1998
- Steven S. Muchnick, Advanced Compiler Design and Implementation, Morgan Kaufmann, 1997
For Lex and Yacc programming, the following book is a reference.
- John R. Levine, Doug Brown, Tony Mason, Unix Programming Tools: lex & yacc, second edition, O'Reilly, 1992
Tests
- Class Test 1: End of August
- Class Test 2: End of October
- Mid-Semester Test: To be decided by the institute
- End-Semester Test: To be decided by the institute
- Lab Test 1: End of August
- Lab Test 2: End of October
Lab Assignments
# Topic Date posted More info Lab Assignment 1 Design a simple interpreter without using lex or yacc 21-Jul-2026 Lab Assignment 2 Using lex 28-Jul-2026 Tutorial (slides) on lex Submission site