RTMNU Final Computer Engg syllabus

RTMNU · Final Year B.Tech Computer Engineering · CBCS

Compiler Design

BTCME703.1T · Elective V · Semester VII · 3 credits · College 30 + university 70

One of the Elective V options.

  1. Unit 1: Introduction and Lexical Analysis

    7 hours

    The phases of compilation; lexical analysis (the scanner), regular languages, and the lex and flex tools.

    Examined in the 70-mark end-semester paper

    • Phases of a compiler
    • Role of the lexical analyser and input buffering
    • Regular expressions to automata for lexers
    • Lex and Flex
  2. Unit 2: Syntax Analysis

    7 hours

    The parser: pushdown automata, top-down and bottom-up parsing, ambiguity, and the yacc and bison parser generators.

    Examined in the 70-mark end-semester paper

    • Pushdown automata
    • Top-down parsing: recursive descent and LL(1)
    • Bottom-up parsing and shift-reduce
    • LR parsers: SLR, CLR and LALR
    • Ambiguous grammars
    • Parser generators: YACC and Bison
  3. Unit 3: Semantic Analysis, Symbol Table and Runtime Environment

    8 hours

    Attribute grammars, syntax-directed definitions, their evaluation and the flow of attributes in a syntax tree; the 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 and translation schemes
    • S-attributed and L-attributed definitions
    • Symbol tables: entries, implementation and scopes
    • Run-time storage organisation and activation records
    • Access to non-local names and parameter passing
    • Storage allocation strategies
  4. Unit 4: Intermediate Code Generation and Optimisation

    7 hours

    Translating language features, intermediate forms; code improvement through control-flow and data-dependence analysis; local, global and peephole optimisation.

    Examined in the 70-mark end-semester paper

    • Intermediate code: syntax trees, postfix and three-address code
    • Translating to three-address code
    • Basic blocks and flow graphs
    • Data-flow analysis
    • Machine-independent optimisations
    • Peephole optimisation
  5. Unit 5: Architecture-dependent Code Improvement

    7 hours

    Instruction scheduling for pipelining, loop optimisation for cache memory, register allocation and target code generation.

    Examined in the 70-mark end-semester paper

    • Instruction scheduling for pipelines
    • Loop optimisation: code motion, induction variables, unrolling and jamming
    • Register allocation and assignment
    • Code generator design and the target machine

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