RTMNU Final AI & DS syllabus

RTMNU · Final Year B.Tech Artificial Intelligence & Data Science · CBCS

Compiler Design

BTECHAI&DS701T · Semester VII · 3 credits · College 30 + university 70

  1. Unit 1: Introduction to Compilers

    6 hours

    The phases of compilation; lexical analysis with regular languages, finite automata and regular expressions and how they relate; scanner generators (lex, flex).

    Examined in the 70-mark end-semester paper

    • Phases and structure of a compiler
    • Role of the lexical analyser
    • Specification and recognition of tokens
    • Finite automata for lexical analysis
    • Lexical-analyser generators
  2. Unit 2: Syntax Analysis

    8 hours

    Context-free grammars and pushdown automata; LL(1) grammars and top-down parsing, operator grammars; LR(0), SLR(1), LR(1) and LALR(1) grammars and bottom-up parsing, ambiguity in LR parsing, and LALR parser generators (yacc, bison).

    Examined in the 70-mark end-semester paper

    • Role of the parser
    • Pushdown automata and acceptance
    • Top-down and predictive parsing
    • FIRST and FOLLOW sets
    • Operator-precedence parsing
    • LR(0) items and SLR parsing
    • Canonical LR parsing
    • LALR parsing
    • Parser generators: YACC
  3. Unit 3: Semantic Analysis, Symbol Table and Runtime Environment

    7 hours

    Attribute grammars and syntax-directed definitions, evaluating attributes over a syntax tree; symbol-table structure, attributes and management; the runtime 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 and Optimisation

    8 hours

    Translating language features into intermediate forms; code improvement — control flow and 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 and loop optimisation for caches; register allocation and target code generation; type systems, data abstraction, and compiling object-oriented 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).