[email protected] Course Outline (To be covered in 30 Lectures) • Introduction to compilers : analysis-synthesis model of compilation, various phases of a compiler, tool based approach to compiler construction • Lexical Analysis: Interface with input, parser and symbol table, token, lexeme and patterns. Difficulties in lexical analysis. Error reporting. Implementation. Regular definition, Transition diagrams, LEX. • Syntax Analysis: CFGs, ambiguity, associativity, precedence, top down parsing, recursive descent parsing, transformation on the grammars, predictive parsing, bottom up parsing, operator precedence grammars, LR parsers (SLR, LALR, LR), YACC. • Semantic Analysis: Inherited and Synthesized attributes, dependency graph, evaluation order, bottom up and top down evaluation of attributes, L- and S-attributed definitions, type system, type conversion, overloaded functions and operators. • Intermediate representation and symbol table: Intermediate representations, issues, high-level, medium and low-level IR, three- address code, symbol table, data structure for symbol table, storage allocation information, global symbol table structure. • Intermediate Code Generation: Intermediate code generation, translation of declarations, assignments, control flow, Boolean expressions and procedure calls. Implementation issues. • Runtime System: storage organization, activation tree, activation record, parameter passing, symbol table, dynamic storage allocation. • Code generation: Code generation and Instruction selection, basic blocks and flow graphs, register allocation, code generation, dag representation of programs, code generation from DAGs, peephole optimization, code generator generators, specifications of machine. Textbooks • Dragon Book: Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman, “Compilers: Principles, Techniques and Tools”, 2nd edition, Pearson (Indian Edition) • https://www.amazon.in/Compilers-Principles-Techniques-Tools- Old/dp/8131721019 • Old Dragon Book: Aho, Alfred V., and Jeffrey D. Ullman. Principles of compiler design. Addison-Wesley. (Indian Edition) • https://www.amazon.in/Principles-Compiler-Design-Alfred- Aho/dp/8185015619 Textbooks • K.D. Cooper, and L. Torczon, “Engineering a Compiler”, 2nd edition, Elsevier • Andrew W. Appel, “Modern Compiler Implementation in ML”, Cambridge University Press Evaluation Mechanism (Tentative) Points for Evaluation • MS Teams Would be used for All Academic Activities (Assignments, Quizzes, Lecture etc.) • No Late submission of Assignments allowed. • Quizzes have a significant Weightage in evaluation • Attendance would be recorded for each class on MS Teams • Teacher’s Appraisal marks would depend on your performance in class. Other Information • Will share the PDF version of all Text and Referenced Books, however I will advise all the students to purchase the hard copy of these books. (You will find these books very useful in the future course of your study) • Will Upload other Referenced material on MS Teams time-by-time. • Students are advisable to have a read on the topic covered to be in the next class • Students are advisable to maintain the discipline during the online interaction. Strict action would be taken for students indulged in indiscipline behaviour. Questions?