At the end of the course, students should understand the overall structure of a compiler, and will have the knowledge of the significant details of a number of important techniques commonly used. The language features raise challenges for compiler builders are also introduced in this course.
- To teach students the basic concepts of compilers, their components and how they work together
- To get lexical analyzer and syntax analyzer implemented of any programming language
The students will learn through the combination of lectures, readings, presentations, and course project.
- Compiler Construction by Kenneth C. Louden and Glagotia
- Modern Compiler Implementation in C, By Andrew W. Appel, Maia Ginsburg, Contributor Maia Ginsburg, Cambridge University Press, 2004.
- Modern Compiler Design by Dick Grune, Henri E. Bal, Ceriel J. H. Jacobs, Koen G. Langendoen, 2003, John Wiley & Sons.
- Automata Theory
- Computer Programming
|Major Topics to be Covered|
Overview of Compilers, Compilation Process, Phases of Compiler,
Cousins of compiler
|Week 2||Lexical Analyzer
Overview and Role of Lexical Analyzer, Tokens, Lexemes, Patterns, Specification of tokens, recognition of tokens.
|Week 3||Lexical Analyzer (Continued)
Finite automata, NFA, DFA, Conversion from a regular expression to an NFA, NFA problems, NFA & DFA Comparison, Design of a Lexical Analyzer.
|Week 4||Symbol Table Manager
Overview, Symbol Table organization, Classification of the symbol table, symbol table operations, working, implementation.
|Week 5||Syntax Analyzer
Role of Parser, Context-Free grammars, writing a grammar, Types of Parsing, Top-down parsing, Bottom-up parsing
|Week 6||Syntax Analyzer (Continued)
Backtracking, Recursive Descent parsing, problems with RD parsing, Predictive parsing, Transition diagrams for predictive parsers, Non-Recursive Predictive Parsing
|Week 7||Syntax Analyzer (Continued)
Practical Examples and Parser Generators.
|Week 8||Semantic Analysis
Overview of Type Checking, specification of a simple type checker, Equivalence of type expressions
|Week 9||Semantic Analysis (Continued)
Type conversions, type rules, type constructors, Overloading of functions and operators, polymorphic functions
|Week 10||Semantic Analysis (Continued)
A simple type checker generator
|Week 11||Intermediate Code Generator
Intermediate languages, declarations, Three address code instructions, and their representations
|Week 12||Intermediate Code Generator (Continued)
Intermediate Code Generator examples
|Week 13||Code Optimization
Overview, the principal sources of optimization, optimization of basic blocks, loops, code improvement transformations.
|Week 14||Code Generation
Role of a code generator, Issues in the design of a code generator, Runtime storage management, simple code generator.
|Week 15||Detection and recovery from errors
Detection of syntax errors by compilers and their recovery mechanism
Overview of principles of programming languages. Criteria for selecting programming languages, Representing concurrency and analyzing concurrent designs
- List of Public service commissions - August 31, 2020
- Comparison of fee structure of Pakistani Universities - June 1, 2020
- Past Guess Paper of Auditing - May 12, 2020