Home/Degree/CS3501
Back to Degree
CS3501Actively Used

Compiler Design

This course is part of the B.E. Computer Science Engineering curriculum under Anna University Regulation 2021. The knowledge from this course continues to be actively applied in professional software development.

Semester 5 (Third Year)
4 Credits
60 Lecture Hours

Course Overview

  • UniversityAnna University
  • Regulation2021
  • Semester5
  • Credits4
  • TypeCore
  • Units5

Course Objectives

1

To understand the design of lexical analyzers

2

To learn syntax analysis techniques

3

To understand syntax directed translation

4

To learn about runtime environments and code generation

5

To understand code optimization techniques

Syllabus

Detailed unit-wise breakdown of the course curriculum as per Anna University Regulation 2021.

1

INTRODUCTION TO COMPILERS & LEXICAL ANALYSIS

12 Hours
Introduction to TranslatorsCompilation and InterpretationLanguage processorsPhases of CompilerRole of Lexical AnalyzerInput BufferingSpecification of TokensRecognition of TokensFinite AutomataRegular Expressions to AutomataNFA, DFAMinimizing DFALex tool
2

SYNTAX ANALYSIS

12 Hours
Role of ParserGrammars and Context-free grammarsWriting a grammarTop Down ParsingRecursive Descent ParserPredictive Parser LL(1)Shift Reduce ParserLR Parser – LR(0) ItemSLR Parsing TableLALR ParserError Handling and RecoveryYACC tool
3

SYNTAX DIRECTED TRANSLATION & INTERMEDIATE CODE

12 Hours
Syntax directed DefinitionsConstruction of Syntax TreeBottom-up EvaluationS-Attribute DefinitionsDesign of predictive translatorType SystemsType Checker specificationType EquivalenceType ConversionsSyntax TreeThree Address CodeBack patching
4

RUN-TIME ENVIRONMENT AND CODE GENERATION

12 Hours
Runtime EnvironmentsSource language issuesStorage organizationStorage Allocation – Static, Stack, HeapParameter PassingSymbol TablesDynamic Storage AllocationCode generator design issuesBasic Blocks and Flow graphsSimple Code GeneratorOptimal Code GenerationDynamic Programming Code Generation
5

CODE OPTIMIZATION

12 Hours
Principal Sources of OptimizationPeep-hole optimizationDAG representationOptimization of Basic BlocksGlobal Data Flow AnalysisEfficient Data Flow AlgorithmsRecent trends in Compiler Design

Course Outcomes

Upon completion of this course, students will be able to:

CO1

Design and implement lexical analyzers

CO2

Construct parsers using various techniques

CO3

Implement syntax directed translation

CO4

Generate intermediate and target code

CO5

Apply code optimization techniques

Industry Application & Relevance

How the concepts learned in this course are applied in real-world software development projects across Banking, Healthcare, and Enterprise domains over 20+ years of experience.

Professional Application

Code parsing, DSL development, transpilers

Textbooks & References

Textbooks

  • Alfred V. Aho et al., 'Compilers: Principles, Techniques, and Tools', Pearson
  • Keith Cooper, Linda Torczon, 'Engineering a Compiler', Morgan Kaufmann

Reference Books

  • Andrew W. Appel, 'Modern Compiler Implementation in C', Cambridge University Press
  • Charles N. Fischer et al., 'Crafting a Compiler', Pearson