18CSC304J - Compiler Design
18CSC304J - Compiler Design
Course Learning Rationale (CLR): The purpose of learning this course is to: Program Learning Outcomes (PLO)
Learning
CLR-1 : Utilize the mathematics and engineering principles for the Design of Compilers 1 2 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CLR-2 : Acquire knowledge of Lexical Analyzer from a specification of a language's lexical rules
Analysis, Design,
Communication
CLR-5 : Analyze the methods of implementing a Code Generator for compilers
Environment &
Sustainability
CLR-6 : Analyze and Design the methods of developing a Code Optimizer
Research
PSO – 3
PSO - 1
PSO - 2
Ethics
Course Learning Outcomes (CLO): At the end of this course, learners will be able to:
CLR-1 : Utilize the mathematics and engineering principles for the Design of Compilers 3 80 70 H H H H M L L L M M L H H H H
CLR-2 : Acquire knowledge of Lexical Analyzer from a specification of a language's lexical rules 3 85 75 H H H H M L L L M M L H H H H
CLR-3 : Acquire knowledge of Syntax Analyzer for parsing the sentences in a compiler grammar 3 75 70 H H H H M L L L M M L H H H H
CLR-4 : Gain knowledge to translate a system into various intermediate codes 3 85 80 H H H H M L L L M M L H H H H
CLR-5 : Analyze the methods of implementing a Code Generator for compilers 3 85 75 H H H H M L L L M M L H H H H
CLR-6 : Analyze and Design the methods of developing a Code Optimizer 3 80 70 H H H H M L L L M M L H H H H
Duration (hour) 15 15 15 15 15
SLO-1 Compilers – Analysis of the Syntax Analysis Definition - Role of parser Bottom Up Parsing Intermediate Code Generation Code optimization
source program
S-1
SLO-2 Phases of a compiler – Cousins of Reductions Intermediate Languages - prefix - postfix Introduction– Principal Sources of
Lexical versus Syntactic Analysis
the Compiler Optimization
SLO-1 Grouping of Phases – Handle Pruning Quadruple - triple - indirect triples Function Preserving Transformation
Representative Grammars
Compiler construction tools Representation
S-2
SLO-2 Lexical Analysis – Role of Lexical Shift Reduce Parsing Syntax tree- Evaluation of expression - Loop Optimization
Syntax Error Handling
Analyzer three-address code
SLO-1 Input Buffering Elimination of Ambiguity, Left Recursion Problems related to Shift Reduce Parsing Synthesized attributes – Inherited Optimization of basic Blocks
S-3 attributes
SLO-2 Specification of Tokens Left Factoring Conflicts During Shift Reduce Parsing Intermediate languages – Declarations Building Expression of DAG
SLO-1 Lab 1 - Implementation of Lexical Lab 4Elimation of Ambiguity, Left Lab 7 - Shift Reduce Parsing Lab 10-Intermediate code generation – Lab 13 Implementation of DAG
S 4-5
SLO-2 Analyzer Recursion and Left Factoring Postfix, Prefix
SLO-1 Finite automation - deterministic Top down parsing LR Parsers- Why LR Parsers Assignment Statements Peephole Optimization
S-6 SLO-2 Finite automation - non Recursive Descent Parsing, back tracking Items and LR(0) Automaton, Closure of Boolean Expressions, Case Statements Basic Blocks, Flow Graphs
deterministic Item Sets,
S-7 SLO-1 Transition Tables Computation of FIRST LR Parsing Algorithm Back patching – Procedure calls Next -Use Information
SLO-2 Acceptance of Input Strings by Problems related to FIRST Operator Precedence Parser Computation Code Generation Introduction to Global Data Flow Analysis
Automata of LEADING
SLO-1 State Diagrams and Regular Computation of FOLLOW Computation of TRAILING Issues in the design of code generator Computation of gen and kill
Expressions
S-8
SLO-2 Conversion of regular expression to Problems related to FOLLOW Problems related to LEADING AND The target machine – Runtime Storage Computation of in and out
NFA – Thompson’s TRAILING management
SLO-1 Lab 2 conversion from Regular Lab 5 -FIRST AND FOLLOW computation Lab 8- Computation of LEADING AND Lab 11 Intermediate code generation – Lab 14 : Implementation of Global Data
S 9-10
SLO-2 Expression to NFA TRAILING Quadruple, Triple, Indirect triple Flow Analysis
SLO-1 Conversion of NFA to DFA Construction of a predictive parsing table SLR Grammars A simple Code generator Parameter Passing.
S-11
SLO-2 Simulation of an NFA Predictive Parsers LL(1) Grammars SLR Parsing Tables Code Generation Algorithm Runtime Environments
SLO-1 Converting Regular expression Transition Diagrams for Predictive Parsers Problems related to SLR Register and Address Descriptors Source Language issues
directly to DFA
S-12
SLO-2 Minimization of DFA Error Recovery in Predictive Parsing Construction of Canonical LR(1) and LALR Generating Code of Assignment Storage Organization
Statements
SLO-1 Minimization of NFA Predictive Parsing Algorithm Construction of LALR Cross Compiler – T diagrams Activation Records
S-13 SLO-2 Design of lexical analysis (LEX) Non Recursive Predictive Parser Problems related to Canonical LR(1) and Issues in Cross compilers Storage Allocation strategies
LALR Parsing Table
SLO-1 Lab 3 Conversion from NFA to Lab 6 Predictive Parsing Table Lab9 Computation of LR(0) items Lab 12 : A simple code Generator Lab 15: Implement any one storage
S 14-15
SLO-2 DFA allocation strategies(heap, stack, static)
1. AlfredVAho,JefferyDUllman,RaviSethi,"Compilers,Principlestechniquesandtools",Pearson 4. K.Muneeswaran,,”CompilerDesign”,OxfordHigherEducation,Fourthedition2015
Learning Education2011 5. DavidGalles,“ModernCompilerDesign”,PearsonEducation,Reprint2012.
Resources 2. S.GodfreyWinster,S.ArunaDevi,R.Sujatha,”CompilerDesign”,YesdeePublishingPvt.Ltd,2016 6. RaghavanV.,“PrinciplesofCompilerDesign”,TataMcGrawHillEducationPvt.Ltd.,2010
3. WilliamM.WaiteandGerhardGoos.CompilerConstruction.Springer-Verlag,New York,2013.
Learning Assessment
Bloom’s Continuous Learning Assessment (50%weightage) Final Examination (50% weightage)
Level of Thinking CLA – 1 (10%) CLA – 2 (15%) CLA – 3 (15%) CLA – 4 (10%)#
Theory Practice Theory Practice Theory Practice Theory Practice Theory Practice
Remember
Level 1 20% 20% 15% 15% 15% 15% 15% 15% 15% 15%
Understand
Apply
Level 2 20% 20% 20% 20% 20% 20% 20% 20% 20% 20%
Analyze
Evaluate
Level 3 10% 10% 15% 15% 15% 15% 15% 15% 15% 15%
Create
Total 100 % 100 % 100 % 100 % -
# CLA – 4 can be from any combination of these: Assignments, Seminars, Tech Talks, Mini-Projects, Case-Studies, Self-Study, MOOCs, Certifications, Conf. Paper etc.,
Course Designers
Experts from Industry Experts from Higher Technical Institutions Internal Experts
1. Ms.R.Jeya
2. Mrs.J. Jeyasudha