Syllabus

BSc CSIT · Semester VI

Compiler Design and Construction syllabus

Official TU syllabus for Compiler Design and Construction (CSC376): 4 units, 45 topics, 3 credit hours. Every unit links to its notes and solved questions.

1

Compiler Structure and Basic Concepts

3h · 6 Q
  • Compiler Structure: Analysis and Synthesis Model of Compilation
  • different sub-phases within analysis and synthesis phases
  • Basic concepts related to Compiler such as interpreter, simple One-Pass Compiler, preprocessor, macros, symbol table and error handler
2

Lexical, Syntax and Semantic Analysis

22h · 35 Q
  • Lexical Analysis: Its role
  • Specification and Recognition of tokens
  • Input Buffer
  • Finite Automata relevant to compiler construction syntactic specification of languages
  • Optimization of DFA based pattern matchers
  • Syntax Analysis: Its role
  • Basic parsing techniques: Problem of Left Recursion
  • Left Factoring
  • Ambiguous Grammar
  • Top-down parsing
  • Bottom-up parsing
  • LR parsing
  • Semantic Analysis: Static & Dynamic Checks
  • Typical Semantic errors
  • Scoping
  • Type Checking
  • Syntax directed definitions (SDD) & Translation (SDT)
  • Attribute Types: Synthesized & Inherited
  • Annotated Parse Tree
  • S-attributed and L-attributed grammar
  • Applications of syntax directed translation
  • Type Systems
  • Type Checking and Conversion
3

Symbol Table and Run-time Storage

4h · 7 Q
  • Symbol Table Design: Function of Symbol Table
  • Information provided by Symbol Table
  • Attributes and Data Structures for symbol table
  • Run-time storage management
4

Intermediate Code Generation, Code Generation and Optimization

16h · 19 Q
  • Intermediate Code Generator: High-level and Low-level Intermediate representation
  • Syntax tree & DAG representations
  • Three-address code
  • Quadruples
  • Triples
  • SDT for intermediate code
  • Intermediate code generation for Declarations, Assignments, Control Flow, Boolean Expressions and Procedure Calls
  • Back patching
  • Code Generator: Factors affecting a code generator
  • Target Language
  • Basic blocks and flow graphs
  • Dynamic programming code-generation algorithm
  • Code Optimization: Need and criteria of Code Optimization
  • Basic optimization techniques
  • Case Studies of some compilers like C compiler, C++ complier

Textbooks and references

  • Compilers Principles, Techniques, and Tools, Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman; Pearson Education
  • Introduction to Automata Theory, Languages, and Computation, Johne E. Hopcroft, Rajeev Motwani, Jeffrey D. Ulman, Pearson Education
  • Advanced Compiler Design and Implementation, Steven Muchnick, Morgan Kaufman Publication

Study CSC376 the smart way

Solved questions, flashcards & practice