RTMNU · Third Year B.Tech Computer Science & Engineering · NEP 2020
Compiler Design
BCSE6T22 · Semester VI · 3 credits · College 30 + university 70
Unit 1: Introduction to Compiler
7 hoursCompilers, interpreters and assemblers; the phases of a compiler and construction tools (LEX and YACC); bootstrapping and cross-compilers; error handling; top-down parsing with FIRST and FOLLOW and the LL(1) parser.
Examined in the 70-mark end-semester paper
- Language processors: compilers, interpreters, assemblers, linkers and loaders
- Phases of a compiler
- Bootstrapping and compiler-construction tools
- Lex and Flex
- Error detection and recovery in compilers
- Top-down parsing: recursive descent and LL(1)
- FIRST and FOLLOW sets and predictive parsing tables
Unit 2: Syntax Analysis
8 hoursBottom-up parsing: shift-reduce parsing and LR parsing — SLR, CLR and LALR; operator grammars; ambiguity; parser generators (yacc, bison).
Examined in the 70-mark end-semester paper
- Bottom-up parsing and shift-reduce
- LR parsers: SLR, CLR and LALR
- Operator-precedence parsing
- Ambiguous grammars
- Parser generators: YACC and Bison
Unit 3: Semantic Analysis & Symbol Table
7 hoursAttribute grammars, syntax-directed definitions and the evaluation and flow of attributes in a syntax tree; syntax-directed translation; the symbol table — structure, attributes and management; the run-time 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
Unit 4: Intermediate Code Generation
7 hoursTranslating language features and the forms of intermediate code; 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: 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
Unit 5: Architecture Dependent Code Improvement
7 hoursInstruction scheduling for pipelining and loop optimisation for the cache; register allocation and target-code generation; type systems, data abstraction, compiling object-oriented features and non-imperative languages.
Examined in the 70-mark end-semester paper
- Code generator design and the target machine
- Register allocation and assignment
- Loop optimisation: code motion, induction variables, unrolling and jamming
- Type checking
Unit contents are summarised from the official RTMNU syllabus . AiCanCode.org is not affiliated with Rashtrasant Tukadoji Maharaj Nagpur University (RTMNU).