RTMNU TY CSE (AI & ML) syllabus

RTMNU · Third Year B.Tech Computer Science & Engineering (AI & ML) · NEP 2020

Principles of Compiler Design

BCSEAI&ML6T22 · Semester VI · 3 credits · College 30 + university 70

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

    7 hours

    Compilers, interpreters and assemblers; the phases of a compiler; compiler-construction tools (LEX and YACC); bootstrapping and cross compilers; error handling; top-down parsing, FIRST and FOLLOW and the LL(1) parser.

    Examined in the 70-mark end-semester paper

    • Compilers, translators and interpreters
    • Phases and structure of a compiler
    • Bootstrapping and compiler-construction tools
    • Error detection and recovery
    • Top-down and predictive parsing
    • FIRST and FOLLOW sets
  2. Unit 2: Syntax Analysis

    8 hours

    Bottom-up parsing: shift-reduce and LR parsing with SLR, CLR and LALR; operator grammars; ambiguity; parser generators (yacc, bison).

    Examined in the 70-mark end-semester paper

    • Shift-reduce parsing
    • LR(0) items and SLR parsing
    • Canonical LR parsing
    • LALR parsing
    • Operator-precedence parsing
    • Parser generators: YACC
  3. Unit 3: Semantic Analysis & Symbol Table

    7 hours

    Attribute grammars, syntax-directed definitions, their evaluation and the flow of attributes in a syntax tree; syntax-directed translation; the structure, attributes and management of the symbol table; the run-time environment: procedure activation, parameter passing, value return and memory allocation.

    Examined in the 70-mark end-semester paper

    • Syntax-directed definitions
    • S-attributed and L-attributed definitions
    • Symbol tables and scope
    • Run-time storage organisation and activation records
  4. Unit 4: Intermediate Code Generation

    7 hours

    Translating language features; types of intermediate forms; code improvement, control flow, basic blocks and flow graphs, data dependence; local, global and peephole optimisation.

    Examined in the 70-mark end-semester paper

    • Intermediate code: postfix and syntax trees
    • Three-address code: quadruples and triples
    • Basic blocks and flow graphs
    • Data-flow analysis
    • Local and global optimisation
    • Peephole optimisation
  5. Unit 5: Architecture-Dependent Code Improvement

    7 hours

    Instruction scheduling for pipelines; loop optimisation for the cache; register allocation and target-code generation; type systems and data abstraction; compiling object-oriented features and non-imperative languages.

    Examined in the 70-mark end-semester paper

    • Instruction scheduling for pipelines
    • Loop optimisation
    • Register allocation
    • Issues in code generation
    • Type checking and type conversion
    • Compiling object-oriented and non-imperative languages

Unit contents are summarised from the official RTMNU syllabus . AiCanCode.org is not affiliated with Rashtrasant Tukadoji Maharaj Nagpur University (RTMNU).