KTU 2024 Scheme · Semester 6 · Common to CS/CD/CU/CC/CN/CB
Compiler Design (PCCST601) Syllabus
Official KTU 2024 Scheme syllabus for Compiler Design, Semester 6, Common to CS/CD/CU/CC/CN/CB (Computer Science and Engineering).
Course Code
PCCST601
Credits
4
Teaching Hours
3:1:0:0 (L:T:P:R)
CIE Marks
40
ESE Marks
60
Exam Duration
2 Hrs 30 Min
Prerequisites
PCCST302 (Theory of Computation)
Semester
Semester 6
Course Objective
To provide a comprehensive understanding of the compiler construction process through its various phases — lexical analysis, parsing, semantic analysis, code generation, and optimization — and to introduce compiler construction tools like Lex and YACC.
Module-wise Syllabus
Module 1
6 contact hoursIntroduction: compiler structure, overview of translation — the front end, the optimizer, the back end.
Module 2
10 contact hoursScanners: recognizing words, regular expressions, from regular expression to scanner (FSA — brush-up only), implementing scanners; hands-on with Lex for recognizing words and regular expressions.
Module 3
16 contact hoursParsing: introduction, expressing syntax. Top-Down Parsing: transforming a grammar — eliminating left recursion, backtrack-free parsing, left-factoring, recursive descent parsers, table-driven LL(1) parsers. Bottom-Up Parsing: shift-reduce parser, the LR(1) parsing algorithm, building LR(1) tables, errors in table construction, reducing table size; hands-on building a calculator with YACC. Intermediate Representations: an IR taxonomy, graphical IRs (syntax-related trees, graphs), linear IRs (stack-machine code, three-address code). Syntax-Driven Translation: translating expressions and control-flow statements.
Module 4
14 contact hoursCode Generation: code shape — arithmetic operators, boolean and relational operators, control-flow constructs (conditional execution, loops and iteration, case statements only), procedure calls. Code Optimization: introduction, opportunities and scope of optimization. Local Optimization: local value numbering, tree-height balancing. Regional Optimization: superlocal value numbering, loop unrolling. Global Optimization: finding uninitialized variables with live sets, global code placement.
Course Outcomes
- CO1Use lexical analysis techniques to build a scanner for a given language specification.
- CO2Construct parse trees for input programs using parsing algorithms and detect syntactic errors.
- CO3Develop semantic analysis techniques to check program correctness.
- CO4Build intermediate code representations by applying intermediate code generation techniques.
- CO5Optimize generated code using code optimization strategies to improve performance.
Assessment Pattern (CIE: 40 marks, ESE: 60 marks)
Continuous Internal Evaluation (CIE)
| Attendance | 5 |
| Assignment / Microproject | 15 |
| Internal Examination 1 (Written) | 10 |
| Internal Examination 2 (Written) | 10 |
End Semester Examination (ESE)
Total 60 marks, 2 Hrs 30 Min. See the official KTU syllabus document for the exact Part A / Part B question pattern for this course.
Textbooks & Reference Books
Textbooks
- Engineering a Compiler — Keith D. Cooper, Linda Torczon (Elsevier Science, 3rd edition, 2023)
- Lex and YACC — John R. Levine, Tony Mason, Doug Brown (O'Reilly, 2nd edition, 1992)
Reference Books
- Compilers - Principles Techniques and Tools — Aho A.V., Ravi Sethi and D. Ullman (Addison Wesley, 2nd edition, 2010)
- Compiler Construction - Principles and Practice — Kenneth C Louden (Thomson Learning, —)
- Compiler Design in C — Allen Holub (Prentice-Hall software series, —)
- Modern Compiler Implementation in C — Andrew W. Appel (Cambridge University Press, —)
Frequently Asked Questions
How many credits is KTU Compiler Design (PCCST601)?
4 credits, with 3:1:0:0 (L:T:P:R) teaching hours per week, under the KTU 2024 Scheme.
How many modules are in the PCCST601 syllabus?
4 modules, 46 total contact hours.
What is the CIE and ESE mark split for this course?
CIE (Continuous Internal Evaluation): 40 marks. ESE (End Semester Examination): 60 marks, 2 Hrs 30 Min. Total: 100 marks.
What are the recommended textbooks for PCCST601?
Engineering a Compiler (Keith D. Cooper, Linda Torczon); Lex and YACC (John R. Levine, Tony Mason, Doug Brown).
Is this syllabus specific to one branch, or common to others too?
This Semester 6 course is listed under Common to CS/CD/CU/CC/CN/CB at KTU under the 2024 Scheme — check the course header above for which branches it's common to.
Need help with KTU Compiler Design?
Learnizo offers live, 1-on-1 online tuition for KTU CSE subjects — matched to your exact module and semester.
Explore BTech CSE Tuition