BAMU · Final Year B.E. Artificial Intelligence and Machine Learning · CBCGS
Principles of Compiler Design
AIM402 · Semester VII · 4 credits · CT 20 + theory 80
Unit 1: Introduction to Compilers
8 hoursCompilers and translators, the structure of a compiler, bootstrapping, compiler-construction tools and programming-language basics.
Examined in the 80-mark end-semester paper
- Compilers, translators and interpreters
- Phases and structure of a compiler
- Bootstrapping and compiler-construction tools
Unit 2: Lexical Analysis
10 hoursRole of the lexical analyser, input buffering, specifying and recognising tokens, finite automata, and designing a lexical-analyser generator.
Examined in the 80-mark end-semester paper
- Role of the lexical analyser
- Input buffering
- Specification and recognition of tokens
- Finite automata for lexical analysis
- Lexical-analyser generators
Unit 3: Syntax Analysis
12 hoursRole of the parser; shift-reduce and top-down parsing; predictive parsing with FIRST and FOLLOW and parsing tables; LR parsers, the canonical LR(0) items and LALR; YACC programs and error handling.
Examined in the 80-mark end-semester paper
- Role of the parser
- Top-down and predictive parsing
- FIRST and FOLLOW sets
- Shift-reduce parsing
- LR(0) items and SLR parsing
- LALR parsing
- Parser generators: YACC
Unit 4: Syntax-Directed Translation
8 hoursSyntax-directed definitions, building syntax trees, S-attributed and L-attributed definitions, top-down and bottom-up translation; type checking, type systems, type equivalence and conversions.
Examined in the 80-mark end-semester paper
- Syntax-directed definitions
- S-attributed and L-attributed definitions
- Type checking and type conversion
Unit 5: Intermediate Code, Symbol Table and Error Recovery
10 hoursPostfix notation, syntax trees and three-address code as quadruples, triples and indirect triples; symbol-table contents, data structures and scope; lexical, syntactic and semantic errors and their recovery.
Examined in the 80-mark end-semester paper
- Intermediate code: postfix and syntax trees
- Three-address code: quadruples and triples
- Symbol tables and scope
- Error detection and recovery
Unit 6: Code Optimisation and Code Generation
12 hoursSources of optimisation, basic blocks, flow graphs and loop optimisation; DAGs; global data-flow analysis; loop unrolling and jamming, constant folding; the code generator, run-time addresses, register allocation and peephole optimisation.
Examined in the 80-mark end-semester paper
- Basic blocks and flow graphs
- Loop optimisation
- DAG representation of basic blocks
- Data-flow analysis
- Issues in code generation
- Register allocation
- Peephole optimisation
Unit contents are summarised from the official BAMU syllabus . AiCanCode.org is not affiliated with Dr. Babasaheb Ambedkar Marathwada University (BAMU).