Compiler Design and Construction - Syllabus
Embark on a profound academic exploration as you delve into the Compiler Design and Construction course (compiler) within the distinguished Tribhuvan university's CSIT department. Aligned with the 2074 Syllabus, this course (CSC365) seamlessly merges theoretical frameworks with practical sessions, ensuring a comprehensive understanding of the subject. Rigorous assessment based on a 80+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 Description:
This course is designed to develop acquaintance with fundamental concepts of compiler design. The course starts with the basic concepts and also includes different phases of compilers like lexical analysis, syntax analysis, syntax-directed translation, type checking etc. in detail.
Course Objectives:
- To develop knowledge in compiler design
- To develop lexical analyzers, parsers, and small compilers using different tools
- To develop lexical analyzers, parsers, and small compilers by using general purpose programming languages.
Units
Key Topics
-
Compiler Structure
UN-1.1Analysis and Synthesis Model of Compilation, including different sub-phases within analysis and synthesis phases.
-
Compiler Concepts
UN-1.2Basic concepts related to Compiler, including interpreter, simple One-Pass Compiler, preprocessor, macros, symbol table, and error handler.
Key Topics
-
Lexical Analysis
UN-2.1The 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.2The 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.
-
Semantic Analysis
UN-2.3The process of analyzing the meaning of the source code. It involves static and dynamic checks, typical semantic errors, scoping, type checking, syntax directed definitions, and translation.
Key Topics
-
Symbol Table Design
UN-3.1Function of Symbol Table, Information provided by Symbol Table, Attributes and Data Structures for symbol table
-
Run-time Storage Management
UN-3.2Managing storage during runtime
Key Topics
-
Intermediate Code Generation
UN-4.1This topic covers the generation of intermediate code, including high-level and low-level representations, syntax trees, and three-address code. It also discusses the generation of intermediate code for declarations, assignments, control flow, boolean expressions, and procedure calls.
-
Code Generation
UN-4.2This topic explores the factors affecting code generation, including target language, basic blocks, and flow graphs. It also covers dynamic programming code-generation algorithms.
-
Code Optimization
UN-4.3This topic discusses the need and criteria for code optimization, as well as basic optimization techniques to improve code efficiency.
-
Compiler Case Studies
UN-4.4This topic presents case studies of compilers, including C and C++ compilers, to illustrate the application of compiler design principles.
Lab works
Laboratory Works:
The laboratory work develops practical knowledge on different concepts of compiler design.
Students should
- Create a project by using lexical analyzer generator or any high level language
- Create a parser by using parser generator or any high level language
- Write programs for intermediate code generation and machine code generation
- Create front end of a compiler and using general purpose programming languages