Compiler Design and Construction - Syllabus

Course Overview and Structure

Embark on a profound academic exploration as you delve into the Compiler Design and Construction course () within the distinguished Tribhuvan university's CSIT department. Aligned with the 2065 Syllabus, this course (CSC-352) seamlessly merges theoretical frameworks with practical sessions, ensuring a comprehensive understanding of the subject. Rigorous assessment based on a 60+20+20 marks system, coupled with a challenging passing threshold of , propels students to strive for excellence, fostering a deeper grasp of the course content.

This 3 credit-hour journey unfolds as a holistic learning experience, bridging theory and application. Beyond theoretical comprehension, students actively engage in practical sessions, acquiring valuable skills for real-world scenarios. Immerse yourself in this well-structured course, where each element, from the course description to interactive sessions, is meticulously crafted to shape a well-rounded and insightful academic experience.


Course Synopsis: Analysis of source program. The phases of compiler.
Goal:   This course introduces fundamental concept of compiler and its different phases.

Units

Key Topics

  • Compiler Structure
    UN-1.1

    Analysis and Synthesis Model of Compilation, including different sub-phases within analysis and synthesis phases.

  • Compiler Concepts
    UN-1.2

    Basic concepts related to Compiler, including interpreter, simple One-Pass Compiler, preprocessor, macros, symbol table, and error handler.

  • Search Structures
    UN-1.2.1

    Review of search structures including heaps, balanced trees, and hash tables.

  • Introduction to Knowledge Management
    UN-1.1.1

    This topic introduces the foundations of knowledge management, its multidisciplinary nature, and its cultural and technological aspects.

  • Decision Support Systems
    UN-1.1.2

    This topic covers the phases of decision making, components of decision support systems, and group decision support systems.

  • Challenges in Knowledge Management
    UN-1.2.2

    This topic discusses the key challenges facing the evolution of knowledge management, including security, technology, motivation, and data accuracy.

  • Ethics and Intellectual Property in KM
    UN-1.2.3

    This topic covers the ethics of knowledge management research, intellectual property rights, and the importance of ethical considerations in knowledge management.

Key Topics

  • Lexical Analysis
    UN-2.1

    The process of breaking the source code into a series of tokens. It involves the specification and recognition of tokens, input buffer, and finite automata relevant to compiler construction.

  • Syntax Analysis
    UN-2.2

    The process of analyzing the syntax of the source code. It involves basic parsing techniques, problem of left recursion, left factoring, ambiguous grammar, top-down parsing, bottom-up parsing, and LR parsing.

  • Context-Free Grammar
    UN-2.1.1

    Study of context-free grammar, including parse trees, derivation, and ambiguity. Normal forms of context-free grammar, such as CNF and GNF, are also explored.

  • Regular Grammars
    UN-2.1.2

    Introduction to regular grammars and their properties, including closure properties of context-free languages.

  • Push Down Automata (PDA)
    UN-2.2.1

    Definition and properties of push down automata (PDA), including language of PDA and equivalence with CFGs.

  • Deterministic and Non-deterministic PDA
    UN-2.2.2

    Study of deterministic and non-deterministic push down automata, including their properties and applications.

  • Equivalence of PDA's and CFG's
    UN-2.2.3

    Exploration of the equivalence between push down automata and context-free grammars, including conversion techniques.

Key Topics

  • Symbol Table Design
    UN-3.1

    Function of Symbol Table, Information provided by Symbol Table, Attributes and Data Structures for symbol table

  • Run-time Storage Management
    UN-3.2

    Managing storage during runtime

  • Turing Machines
    UN-3.1.1

    Introduction to Turing Machines, including their basic concept and computation process.

  • Variants of Turing Machines
    UN-3.1.2

    Exploration of different variants of Turing Machines, including their characteristics and applications.

  • Non-deterministic Turing Machines
    UN-3.1.3

    Study of non-deterministic Turing Machines, including their properties and differences from deterministic machines.

  • Church's Thesis and Algorithm
    UN-3.2.1

    Explanation of Church's Thesis and its significance in the theory of computation, including the concept of algorithm.

Key Topics

  • Undecidability
    UN-4.1.1

    Study of undecidable problems and languages, including recursive and recursively enumerable languages, universal language, and unsolvable problems by Turing machines.

  • Encoding of Turing Machine
    UN-4.1.2

    Techniques for encoding Turing machines, including unrestricted grammars and Chomsky hierarchy.

  • Unsolvable Problems by Turing Machines
    UN-4.1.3

    Problems that cannot be solved by Turing machines, including Post's Correspondence Problem.

  • Computational Complexity
    UN-4.2.1

    Measuring the complexity of computational problems, including class P and class NP.

  • Intractable Problems
    UN-4.2.2

    Problems that are difficult or impossible to solve in a reasonable amount of time, including NP-complete problems.

  • NP-Completeness and Problem Reduction
    UN-4.2.3

    Techniques for reducing problems to NP-complete problems, and the implications for computational complexity.

  • Assignment Statements
    UN-4.1.4

    Assignment statements are used to assign a value to a variable in a program.

  • Addressing Array Elements
    UN-4.1.5

    Addressing array elements involves accessing and manipulating individual elements of an array in a program.

  • Boolean Expressions
    UN-4.1.6

    Boolean expressions are used to evaluate conditions and make decisions in a program.

  • Case Statements
    UN-4.1.7

    Case statements are used to execute different blocks of code based on the value of an expression.

  • Procedure Calls
    UN-4.1.8

    Procedure calls involve invoking a subroutine or function in a program.

  • Backpatching
    UN-4.1.9

    Backpatching is a technique used to fill in missing information in a program during the compilation process.

  • Basic Blocks and Flow Graphs
    UN-4.2.4

    Basic blocks and flow graphs are used to represent the control flow of a program.

  • Next Use Information
    UN-4.2.5

    Next use information is used to determine when a variable is next used in a program.

  • Simple Code Generator
    UN-4.2.6

    A simple code generator is a basic code generator that generates code for a target machine.

  • Peephole Optimization
    UN-4.2.7

    Peephole optimization is a technique used to optimize code by examining a small window of instructions.