Back close

Course Detail

Course Name Compiler Design
Course Code 25CSA334
Program B. Sc. in Physics, Mathematics & Computer Science (with Minor in Artificial Intelligence and Data Science)
Semester Electives: Computer Science
Campus Mysuru

Syllabus

Unit I

Introduction to Compilers: Language Translators- Compilation and Interpretation-Languageprocessors –Introduction to compiler, The Phases of Compiler-Errors Encountered in Different Phases, symbol Table, Construction tools, and common programming language features.

Unit II

Lexical Anlysis: Role of Lexical Analyzer-Lexical Errors-Expressing Tokens by RegularExpressions-Converting Regular Expression to DFA- Minimization of DFA-Language forSpecifying Lexical Analyzers-LEX-Design of a simple lexical analyzer for a programmingLanguage.

Unit III

Syntax Analysis: Need and Role of the Parser-Context Free Grammars -Top Down Parsing-General Strategies Recursive descent parsing, Predictive Parser-LL(1) Parser, Shift ReduceParser-LR, Parser-LR (0)Item-Construction of SLR Parsing table.

Unit IV

Syntax Directed Translation: Syntax directed Definitions-Construction of Syntax Tree, Bottomup Evaluation of S-Attribute, Design of predictive translator – Type Systems-Specification of a simple type checker-Equivalence of Type Expressions-Type Conversions.

Unit V

Code Optimization and Code Generation: Introduction to code optimization, principalSources of Optimization-DAG- Optimization of Basic Blocks- Global Data Flow Analysis-Issues in Design of a Code Generator – A Simple Code Generator Algorithm.

Objectives and Outcomes

OBJECTIVE: To enable the students to understand the various stages of compiling a program including the process of code generation and optimization.

Course Outcome

CO1 Understand concepts in automata theory and theory of computation.
CO2 Understand the structure of compilers and the corresponding steps in the compilation process and explain scanning and lexical analysis in the context of the compilation process.
CO3 Define the various categories of languages and grammars
CO4 Gives an idea of various optimization techniques

CO – PO Mapping

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PSO1 PSO2 PSO3 PSO4
CO1 1 1 2 1 1 2
CO2 1 1 1 1
CO3 1 1 1 1
CO4 1 1 1 1 1 3

Text Books / References

TEXT BOOK:

  • Compilers-Principles, Techniques and Tools by Alfred V Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman. Pearson, 2nd edition, 2007

REFERENCES:

  • David Galles, “Modern Compiler Design”, Pearson Education Asia, 2007
  • Steven S. Muchnick, “Advanced Compiler Design & Implementation”, Morgan Kaufmann Pulishers, 2000.
  • C. N. Fisher and R. J. LeBlanc “Crafting a Compiler with C”, Pearson Education

DISCLAIMER: The appearance of external links on this web site does not constitute endorsement by the School of Biotechnology/Amrita Vishwa Vidyapeetham or the information, products or services contained therein. For other than authorized activities, the Amrita Vishwa Vidyapeetham does not exercise any editorial control over the information you may find at these locations. These links are provided consistent with the stated purpose of this web site.

Admissions Apply Now