Section: Y
Schedule: Mondays - 2PM to 4PM; Tuesdays - 2PM to 3PM.
Classroom - NAB 401
Class overview
How the programs written in high-level languages are converted to machine language programs, so that a computer can execute it? The objective of the class is to learn above process done by computer programs known as compilers.
Evaluation:
Continuous Assessment: 7 Homeworks (15 Marks)
Midsem: End-September (25 Marks) - Syllabus: Introduction, Scanner and Parser (upto Top-Down Parser).
Endsem: End-November (60 Marks)
Syllabus:
Idea of the difference between Compiler and other various Translators, Phases of a Compiler and Bootstrapping.
Understand Lexical Analyzer, Transition Diagram of different tokens, Reserved Word Strategy.
Idea of Syntax Analyzer, Ambiguity, Parse Tree, Top Down and Bottom Up Parser.
Concept of Semantic Analyzer, Semantic Actions, Intermediate Code, Virtual Machine. Lexical and Grammatical Errors.
Idea of Code Optimization, Criterion of Optimization, Different Local and Global Optimization Techniques.
Idea of Code Generation, Instruction Costs, Code Generation Algorithm, Run Time Store Management.
Symbol Table Design, Fixed Length and Variable Length Entry, Symbol Table Actions, Different Searches, Hash Table Organization, Different Deletions of Symbols, Linked List and Tree Representation.
Lecture Slides and Notes:
Lecture notes (PDFs) will be shared with the CRs.
Books:
Textbooks:
1. Compilers Principles, Techniques, and Tools, by A. V. Aho, Monica S. Lam, R. Sethi, & J. D. Ullman, 2nd ed., ISBN 978-81317-2101-8, Pearson Ed., 2008
2. Modern Compiler Design, by Dick Grune, Kees van Reeuwijk, Henri E. Bal, Ceriel J. H. Jacobs, Koen Langendoen, 2nd ed,, ISBN 978 1461 446989, Springer (2012).
3. Introduction to Compiling Techniques A first course using ANSI C, Lex and Yacc, by J. P. Bennett, ISBN 0-07-053073-4, TMH
4. Engineering a Compiler, by Keith D. Cooper & Linda Troczon, (2nd ed.), ISBN 978-93-80931-87-6, Morgan Kaufmann, Elsevier, 2012
References:
5. Programming Language Pragmatics, by Michael L. Scott, ISBN 81312-0737-4, Morgan Kaufmann, Elsevier, 2006
6. Advanced Compiler Design and Implementation by, Steven S. Muchnick, ISBN 981-4066-24-9, Morgan Kaufmann, Elsevier, 2000
7. Optimizing Compilers for Modern Architectures, by Randy Allen & Ken Kennedy, ISBN 81-8147-366-3, Morgan Kaufmann, Elsevier, 2002
8. Modern Compiler Implementation in C, by Andrew W. Appel, ISBN 81-7596-071-X, CUP
9. Practice and Principles of Compiler Building with C, by Henk Alblas & Albert Nymeyer, ISBN 81-203-1362-3, PHI
10. flex & bison by, John R levine, ISBN 81-8404-816-5, SPD- O’Reilly
11. http://www.compilerconnection.com- A compiler related home page.
12. Compiler Construction using Flex and Bison by Anthony Aaby, http://cs.wwc.edu/∼aabyan/464/Book.
Class News:
6/11/2024:
HW5 is now online.
Submission deadline 14th November, 5PM.
Syllabus of endsem is, Introduction, Lexical Analyser, Syntax Analysis, Syntax-directed Translation and Intermediate Code Generation.
Slides L1 to L11 are relevant (except whatever is not covered in class).
At the very least go through the slides before exam.
All the best for exams!
30/10/2024:
HW7 based on self-study of "Code Generation" is now online.
Submission deadline is 14th November, 5PM.
Study materials already shared.
29/10/2024:
HW6 based on self-study of "Run-time Environments" is now online.
Submission deadline is 14th November, 5PM.
Study materials on that chapter has already been shared.
22/10/2024:
I have shared yesterday's study materials.
Deadline of submission of HW4 is Thursday (24/10, 5PM).
I'll not take the extra class tomorrow.
Go through slides L6 and L7.
Alternate mid-sem is scheduled tomorrow, 3.30PM to 5PM in LGC1, the main CSE building.
15/10/2024:
I have shared this week's study materials with the CR.
I'll take an extra class next Wednesday (23/10/24), 2PM to 3PM.
Deadline of submission of HW4 is approaching (24/10/24, 5PM).
Relevant slides for this week's lectures are L6 and L7.
18/9/2024:
Next class will be on 14th October (Monday) 2PM to 4PM.
Submission deadline of HW4 is further extended to 24th October, 5PM.
11/9/2024:
Study well for mid-sem.
All the best for the mid-sem exams.
9/9/2024:
Syllabus of mid-sem is updated: Chapter 1 (Introduction), chapter 2 (Scanner) and chapter 3 (upto Top-Down parser).
Deadline of submission of HW3 is 11th September, 5PM.
Deadline of submission of HW4 is extended to 3rd October, 5PM.
At the very least, go through the slides (L1-L5, whatever is covered) before mid-sem.
4/9/2024:
Notes till today's class have been shared.
Follow slides of L6 for bottom-up parsing.
HW4 is online. But attempt it after evaluation of HW3. Deadline is 19th September, 5PM.
Syllabus of mid-sem is upto parsing top-down parsing, i.e., Chapter 1 (Introduction), 2 (Scanner) and 3 (Parser-upto Top-Down) - slides L1 to L6 L5 (whatever covered).
I am repeating multiple times: read notes and slides before attempting corresponding HW.
2/9/2024:
Notes on today's lectures have been shared.
Follow slides from L4 and L5 thoroughly.
HW3 is now online, deadline of submission is, 11th September, 5PM.
Read related notes (about 40 pages) and slides before attempting HW3.
This Wednesday (4/9/24), there will be an extra class from 2PM to 3PM.
LL(1), FIRST and FOLLOW will definitely be in midsem exam. So practise those topics well.
27/8/2024:
Notes on this week's lectures have been shared.
Follow the slides minutely for review and clarifications.
29th, 5PM is the deadline of submission of HW2. No late submissions will be evaluated.
Read notes and slide before attempting HW2 either concurrently or sequentially.
20/8/2024:
Homework 2 is now online. Deadline of submission is 29th August.
Collect your notebooks from Rimpa and write the answers to HW2 there and submit again.
Read the notes sent on scanners (about 75 pages) and slides of L2 before answering.
13/8/2024:
Notes on today's lecture have been shared. Chapter 2 (Scanners) has notes of about 75 pages. Read ASAP.
Also go through slides of L2.
Tomorrow is the deadline of submission of HW1 (based on chapter 1). No late submission will be entertained.
Read the notes sent till 5th August (about 30 pages) before attempting HW1.
HW2 will be uploaded next week.
Older:
Classes start from 29th July, Monday, 2PM.
Notes for lecture 1 and C reference manual have been shared with the CR.
Notes on lecture 2 have been shared with the CR.
Homework 1 will be uploaded by tomorrow, submission deadline is 14th August, 5PM to Rimpa Dutta (CSE Main Building, Second Floor, L-shaped Lab).
Notes on lecture 3 have been shared with CR and a PDF on assembly language.
Homework 1 has been uploaded. Submission deadline is 14th August, 5PM.
Notes on lecture 4 have been shared.
Notes on lecture 5 have been shared (with some extras). Only 55 pages. Read ASAP.
Go through the slides of L1 and L2 (only the parts covered in class). You may read POSIX regular expressions in the slides. It may be important (not for exam).
Just to remind you that 14th August, 5PM is the deadline of submission of HW1.