CS3020: Principles of Compiler Design and CS6240: Advanced Compiler Design

August 2015 - Nov 2015


Instructor: Ramakrishna Upadrasta (U. Ramakrishna)
Email: Ramakrishna AT iith DOT ac DOT in
Office:

TAs (IITH email-IDs: <ID> AT iith DOT ac DOT in) : Agam Agarwal (CS12B1003), Ajay Brahmakshatriya (CS12B1004), Bhatu Pratik (CS12B1010), Adarsh Pugalia (ES12B1001), Siddhant Agarwal (ES12B1018@iith.ac.in), Utpal Bora (cs14mtech11017)

Discussion Google-group: iith-compilers-aug15 AT googlegroups DOT com Join Group (only with IITH email-IDs)
Classes: Mon: 10:30am-12:00noon, Thu: 9:00am-10:30am (B slot); Room: CL#205
Labs (CS3021) : Wed: 3:00pm-6:00pm (All Labs)


Credits: CS3020:CS3021 3:2; CS6240 3:0
Prerequisites: CS3020:CS3021 3rd year B.Techs; Also, a concurrent registration to both CS3020 and CS3021 is compulsory. CS6240: M.Techs and PhDs (Primarily 1st years: exceptions allowed. Please get a permission from me.)


Course Description (CS3020 and CS6240)

The objective of these courses is to learn basic principles and advanced techniques of compiler design. Both the courses will focus lexical analysis, syntactic analysis, semantic analysis, abstract syntax tree and code-generation as well as basic optimizations.

The initial part of both the courses will focus on the classic techniques of lexical analysis and scanning/screening, syntactic analysis like bottom-up and top-down parsing techniques, semantic analysis, type-checking, abstract syntax tree and code generation. The latter part will focus on intermediate representations and simple optimizations like register allocation and instruction scheduling.

A significant focus of these courses would be on designing and implementing parts of compiler for a subset of C++/Java. The language of implementation would be in C/C++/Java languages. There would also be effort to study modern compilers like LLVM in the form of mini-assignments.

Course Description (CS3021)

This is the B.Tech lab accompanying the corresponding B.Tech course CS3020. For registrants of CS3020, a registration to CS3021 is compulsory. The major means of evaluation of CS3021 would be the above mentioned project.

Course Description (CS6240)

This is a sister course to CS3020 being offered to B.Techs. This beginning level M.Tech/PhD course would have additional project work, a paper presentation, and some research component.


Lecture Schedule

3rd-Aug-2014 Organization & Logistics,
An Overview of Compilers PDF
Acknowledgements

Guest Lecture by Prof. Sanjay Rajopadhye from Colorado State University
"Scheduling Reductions"
Readings: ALSU, Ch.1
6th-Aug-2014 An Overview of Compilers (contd.)
Introduction to Lexical Analysis PDF1

Finite Automata (Deterministic and Non-deterministic),
Regular Expressions, Transition Diagrams.
Code Examples Regular expressions.
Readings (All) ALSU, Sec. 2.6
10th-Aug-2014 Lexical Analysis (contd.) PDF1 PDF2

Finite Automata (Deterministic and Non-deterministic),
Regular Expressions, Transition Diagrams.
Code Examples Regular expressions.
Readings (All) ALSU, Sec. 2.6
13th-Aug-2014 Lexical Analysis (contd.) PDF1 PDF2

Finite Automata (Deterministic and Non-deterministic),
Regular Expressions, Transition Diagrams.
Code Examples EDG study: float, integer literals.

Readings (All) ALSU, Sec. 2.6
Readings (All) Cool-manual PDF and Cool Tour PDF
TBD

References:

  • [Text Book] Compilers: Principles, Techniques, and Tools ("Dragon book") by Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, 2006
  • [Ref. Book] Compiler Design "Syntactic and Semantic Analysis" by Reinhard Wilhelm, Helmut Seidl and Sebastian Hack, 2013
  • [Adv. Ref. Book] Advanced Compiler Design and Implementation by Steven Muchnick, 1997
  • [NPTEL] NPTEL course on Principles of Compiler Design by Prof. Y.N. Srikant from Indian Institute of Science, 2012-2014 IITM Link
  • [Coursera] Coursera course on Compilers by Prof. Alex Aiken at Stanford, 2012-2014 Coursera Compilers
  • [Gradiance] Gradiance System by Prof. Jeffrey D. Ullman newgradiance link
  • .....

  • Some Class Links:

  • news
  • doc
  • .....

  • Suggested readings:

  • .....

  • Grading (CS3020)

    Activity Weight
    Class Participation and Attendance 10%
    Gradiance + Written Homeworks 10%
    Mini Prog. Assignments (LLVM) 15%
    Mid Term Exam 25%
    End Term Exam 30%
    Project 10%


    Grading (CS3021)

    Activity Weight
    Programming Assignments (Project) 60%
    Mini Prog. Assignments (LLVM) 15%
    Programming Exam 25%


    Grading (CS6240)

    Activity Weight
    Mid Term Exam 15%
    End Term Exam 25%
    Project + Mini Prog. Assignments (LLVM) 25+10=35%
    Gradiance Homeworks 10%
    Paper Presentation + Writeup 10+5=15%

    Important: Plagiarism Policy of IITH-CSE Department.