BAMU Final Year AI & ML syllabus

BAMU · Final Year B.E. Artificial Intelligence and Machine Learning · CBCGS

Principles of Compiler Design

AIM402 · Semester VII · 4 credits · CT 20 + theory 80

All notes for this subject
  1. Unit 1: Introduction to Compilers

    8 hours

    Compilers 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
  2. Unit 2: Lexical Analysis

    10 hours

    Role 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
  3. Unit 3: Syntax Analysis

    12 hours

    Role 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
  4. Unit 4: Syntax-Directed Translation

    8 hours

    Syntax-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
  5. Unit 5: Intermediate Code, Symbol Table and Error Recovery

    10 hours

    Postfix 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
  6. Unit 6: Code Optimisation and Code Generation

    12 hours

    Sources 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).