CS31003/CS39003 Compilers: Theory and Laboratory | Autumn 2024 |
Schedule
Timing: Slot A3 [Mon (08:00am–10:00am), Tue (12:00pm–01:00pm)] Theory
Section 1 Students with even roll numbers
Instructor: Abhijit Das
Classroom: NC442Section 2 Students with odd roll numbers
Instructor: Bivas Mitra
Classroom: NC443Lab: Software Labs, Old Building, Slot J [Mon (02:00pm–05:00pm)]
Teaching Assistants
Abhijeet Singh
Aitipamula Anirudh
Anamitra Mukhopadhyay
Arpan Dam
Harsh Borse
Mradul Agrawal
Salma Mandi
Sugandh Pargal
Swarup Padhi
Tarannum Ara
Utsav BasuNotices and Announcements
- Jul 21, 2024
- 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
- 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]
- Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, and Sorav Bansal, Compilers: Principles, Techniques, and Tools, Updated 2nd Edition, Pearson, 2023
- 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
Tests
- Class Test 1: 30-Aug-2024 [ Questions with solutions ]
- Class Test 2: 04-Nov-2024 [ Questions | Answers ]
- Mid-Semester Test: 18-Sep-2024, FN [ Questions with solutions ]
- End-Semester Test: 19-Nov-2024, FN [ Questions with (partial) solutions | Remaining solutions ]
- Lab Test 1: 30-Aug-2024 [ Questions with solutions | Complete code ]
- Lab Test 2: 04-Nov-2024 [ Questions with solutions | Complete code ]
Lab Assignments and Tests
# Topic Date posted (type) More info A0 Warm-up assignment 22-Jul-2024 (in-lab, individual) A1 Using LEX 05-Aug-2024 (in-lab, individual) Solution: latex.l | procltx.c A2 Predictive parsing for LL(1) grammar 12-Aug-2024 (in-lab, individual) Sample 1 | Sample 2 | Solution TinyC: Part 1 Lexical analysis for TinyC 16-Aug-2024 (take-home, group) A3 Using YACC and LEX 02-Sep-2024 (in-lab, individual) Solution TinyC: Part 2 Parser for TinyC 05-Sep-2024 (take-home, group) A4 Syntax-directed translations 30-Sep-2024 (in-lab, individual) Solution A5 Intermediate code generation 14-Oct-2024 (in-lab, individual) Sample: input, output | Solution TinyC: Part 3 Intermediate code generation for TinyC 17-Oct-2024 (take-home, group) A6 Target code generation 04-Nov-2024 (in-lab, individual) Solution Submission site