RTMNU TY AI syllabus

RTMNU · Third Year B.Tech Artificial Intelligence · NEP 2020

Compiler Design

BAI6T23 · Elective II · Semester VI · 3 credits · College 30 + university 70

One of the Elective II options.

All notes for this subject
  1. Unit 1: Introduction and Lexical Analysis

    6 hours

    Phases of compilation; the scanner, regular languages, finite automata and regular expressions and their relation, and 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) bottom-up parsing, ambiguity, and parser generators (yacc, bison).

    Examined in the 70-mark end-semester paper

    • Role of the parser
    • 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

    6 hours

    Attribute grammars and syntax-directed definitions, attribute evaluation in a syntax tree; symbol-table structure and management; 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 and Code Improvement

    7 hours

    Translating language features, intermediate forms; control-flow and data-flow analysis, local, global, loop and peephole optimisation.

    Examined in the 70-mark end-semester paper

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

    6 hours

    Instruction scheduling for pipelines, 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
    • 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).