Section outline


    •                                                   Welcome Message from Instructor

    • Instructor Name : Sharun Akter Khushbu                                                            

      Designation         : Lecturer
      Office Address    : Department of CSE
      Contact No          :  01730599307
      Email                    : sharun.cse@diu.edu.bd


               The course is intended to teach the students the basic techniques that underlie the practice of Compiler Construction. The course will introduce the theory and tools that can be standard employed in order to perform syntax-directed translation of a high-level programming language into an executable code. These techniques can also be employed in wider areas of application, whenever we need a syntax-directed analysis of symbolic expressions and languages and their translation into a lower-level description. They have multiple applications for man-machine interaction, including verification and program analysis.

                The main objective of this course is to introduce the major concept areas of language translation and compiler design and to develop an awareness of the function and complexity of modern compilers. This course is a study of the theory and practice required for the design and implementation of interpreters and compilers for programming languages.

      After successful completion of this course, the students should be able to
      • CO1 : Explain various phases of a compiler.
      • CO2 : Design token recognizer using modern tools.
      • CO3 : Design Top-down and Bottom-up parsing Techniques.
      • CO4 : Translate given input to intermediate code.
      • CO5 : Identify various types of optimizations on intermediate code and generate assembly code.


        Theory Course
      Lab Course
      Class Attendance: 7%
      Class Attendance: 10%
      Class Test/Quiz: 15%
      Lab Submissions: 40%
      Assignment: 5%
      Lab Performance: 25%
      Presentation: 8%
      Report Submission: 25%
      Midterm Examination: 25%
       
      Final Examination: 40%
       

    • Lab Course Outline [View]

    • Text Book

      1. Compiler Principles, Techniques and Tools By Aho, Ullman, Sethi [Download]

      Reference Books:

      1.  Implementations of Compiler, A new approach to Compilers including the algebraic methods By Yunlin su, Song Y. Yan. [Download]

      2. Compiler construction, Principles and Practice, By Kenneth C Louden. [Download]

      3. Basics of Compiler Design by Torben. [Download]


    • Permanent Live Class Google Meet Link [Join]
  • Week1

    The ability to research, understand and implement computer programs in the areas related to algorithms.

    compiler for debugging of programs.

    • Laboratory 1 Task: [View] Test Your Code Here


  • Week2

    Discussion Topics: 

    • Learn about the structure of a compiler.
    • Learn about the phases of a compiler.




    • Laboratory 2 Task: [View]

  • Week3


    • Laboratory 3 Task: [View]

  • Week4



    • Laboratory 4 Task: [View]

  • Week5


    • Laboratory 5 Task: [View]

  • Week6


    • Laboratory 6 Task: [View]

  • Week8

    Discussion Topics: 

    • Discuss about LMD and RMD
    • Discuss and Illustrate the elimination techniques

    Expected Learning Outcomes:

    • Recognize the elimination techniques
    • Understand the importance of Left Elimination

    Resources of Learning:


    • Laboratory 7 Task: [View]

  • Week9


    • Laboratory 8 Task: [View]

  • Week10

    Discussion Topics: 

    • Discuss and illustrate Kernel item, Non Kernel Item.
    • Discuss about Augmented grammar.
    • Discuss about Canonical Table.

    Expected Learning Outcomes:

    • Recognize kernel and non-kernel item.
    • Construct LR 0 Parser.
    • Design and construct canonical table.
    Resources of Learning:


    • Laboratory 9 Task: [View]

  • Week11

    Discussion Topics: 

    • Discuss abstract syntax trees and Directed acyclic graph
    • Discuss and illustrate three address code, quadruples, and triples.
    • Discuss about Class Text.

    Expected Learning Outcomes:

    • Recognize techniques to eliminate common sub tree.
    • Design triples.
    Resources of Learning:


    • Laboratory 10 Task: [View]

  • Week12

    Discussion Topics: 

    • Discuss about the rules for leader selection.
    • Discuss and illustrate the techniques to create basic block.
    • Discuss the techniques to design flow graph.

    Expected Learning Outcomes:

    • Recognize three address codes.
    • Design basic blocks for high level languages.
    • Understand the necessity of flow graph.

    Resources of Learning:

    • Lecture Slide (Basic Block)
    • Lecture Video
    • Test Question

    • Laboratory 11 Task: [View]

  • Week13

    Discussion Topics: 

    • Discuss about Machine independent code optimization.
    • Discuss and illustrate the techniques of code optimization.

    Expected Learning Outcomes:

    • Recognize machine independent code.
    • Able to apply techniques to optimize codes.

    Resources of Learning:


  • Week14

    Topics Covered for Final Examination

    • Left Recursion and Left Factoring Elimination
    • Determination of FIRST and FOLLOW Function
    • LR0 Parser and Canonical Table
    • Intermediate Code Generation
    • Code Generation and Basic Block
    • Code Optimization

    • Final Exam