CS593: Special Topics in Compiler Design

Offering: Aug-Dec 2019

Class strength: 29

  • “Amazing course! and how nicely it is covered by the course instructor. Really loved everything about the course, the assignments, the quizzes and the classes.”

  • “As far as I know, we were your first batch of students. You teach very well and I liked the efforts you put in the class. All the best for your teaching career ahead.”

  • “There are very few professors whose classes are this good. I had not planned to take this course, but I changed my plan after attending first class.”

  • “It would have been better if we had been made to create a new language compiler as part of assignments so that at the end of the course we have had a nice compiler as a project. Otherwise the course was good and well taught.”

  • “The course pace was a little fast, otherwise one of the useful courses of this semester.”

  • “A very good course content but requires to have some prerequisites to understand well.”

  • “Amazing Faculty … I wish sir would have had taught [many more courses] at my time.”

  • “… never reduce memes and puns, they bring smile, even on bad days :-)”

Course Objective

A compiler is a fundamental software necessary to translate computer programs to a form that can be executed on intended machines. Designing a compiler involves learning several aspects of computer science: logic, formalism, mathematics, data structures, algorithms, programming, optimizations, and so on. This course is intended as a primer to the various stages typical in the design of standard compilers, focusing on the front-end stages of compilation, but also giving a peek into the back-end and some recent advancements in the area. At the end of the course, students should be able to appreciate the underlying concepts in compiler design, and be motivated to learn the art of analyzing and transforming programs for performance.

Info for interested students:

  • A 3-credit course. Consists of theory (classes and exams) as well as practice (some tutorials followed by take-home programming assignments).

  • Prerequisites: CS202 (Data Structures and Algorithms).

  • Slot: D3 (Monday 11:00-11:50; Wednesday 9:00-9:50; Friday 10:00-10:50).

  • Classroom: A10-1A (North campus).

  • Instructor: Manas Thakur


1. Alfred V. Aho, Monica Lam, Ravi Sethi and Jeffrey D. Ullman. “Compilers: Principles, Techniques, and Tools”, Second Edition, Pearson Education, 2007.
2. Andrew W. Appel. “Modern Compiler Implementation in Java”, Second Edition, Cambridge University Press, 2002.

Course outline

0. Credits
1. Introduction
2. Lexical analysis
3. Syntax analysis
4. Semantic analysis
5. Intermediate code generation
6. Runtime environments
7. Code generation and optimization
8. Advanced topics


Theory (60%):

  • Quiz 1 (15): Topics 1-3; September 11th.

  • Quiz 2 (15): Topics 4-6; October 23rd.

  • End sem (30): Topics 1-8; November 26th.

Practice (40%):

  • A1   (5): Write to read. Deadline: September 2nd, 2019.

  • A2 (10): Atithi devo bhavah. Deadline: September 27th, 2019.

  • A3 (15): Simple is beautiful (but attaining simplicity is not easy). Deadline: October 20th, 2019.

  • A4 (10): Translators on steroids! Deadline: November 13th, 2019.


Month Dates Topic(s) Remarks
August 7, 9 INT Form 1; Form 2; Demo program
14, 16 LEX flex-demo.tgz
19, 21, 23 LEX, SYN IOL on 19th and 21st
26, 28, 30 SYN
September 2, 4, 6 SYN
9, 11, 13 SYN, SEM Aman Nougrahiya's slides on JTB/JavaCC
Quiz 1 on 11th at 8 am; venue: A13-2A
16, 18, 20, 20’ SEM Form 3; visitors-demo.tgz
Extra class on 20th at 5:30 pm; venue: A10-1C
23, 25, 27 ICG Form 4
30 IOL on 30th
October 4 ICG
7, 9, 11 RTE No class on 11th; Form 5
14, 16, 18 CGO
21, 23, 25 CGO Quiz 2 on 23rd at 8 am; venue: A13-2{A,B}
IOL on 25th
28, 30 CGO Form 6
November 1 CGO Form 6 (ATS election) result
4, 6, 8 ATS Paper on MLiCD
11, 13 ATS
18 ATS
26 End sem on 26th at 9 am; venue: A13-3A