Tags

Jan 24, 2010

Principles of Compiler Design

 Principles of Compiler Design Lab Manual


Download PCD Program

Download Compilers: Principles, Techniques, and Tools book


410444 Principles Of Compiler Design

Teaching Scheme                                                                                  Examination Scheme
Lectures: 4 hrslweek                                                                              Theory: 100 Marks Duration: 3 Hrs

Objectives
. To learn and understand the design of a compiler
. To learn and use tools for construction of a compiler

UNIT I:
Introduction to Compiler:
Translator issues, why to write compiler, compilation process in brief, front end and backend model, compiler construction tools, Interpreter and the related issues, Cross compiler, Incremental compiler, Boot strapping, byte code compilers
Lexical Analysis
Review of lexical analysis: alphabet, token, lexical error, Block schematic of lexical analyser,
Automatic construction of lexical analyser (LEX), LEX specification and features.               6 Hours

UNIT II : Syntax Analysis
Introduction: Role of parsers, Top down-RD parser, Predictive parsers, LL (k) parsers, Bottom up Parsers - Operator precedence parsers, shift-Reduce: SLR, LR (k), LALR etc. using ambiguous grammars, Error detection and recovery, Automatic construction of parsers (Y ACC), Y ACC specifications
Semantic Analysis
Need of semantic analysis, type checking and type conversion
10 Hours

UNIT III:
Syntax directed translation
Syntax directed definitions, construction of syntax trees, bottom-up evaluation of S-attributed definitions, L-attributed definitions, Top-down translation, bottom-up evaluation of inherited attributes
Intermediate Code Generation
Intermediate languages, declarations, assignment statements, iterative statements, case statements, arrays, structures, conditional statements, Boolean expressions, back patching, procedure calls,
Intermediate code generation using Y ACC                                                                      10 Hours

UNIT IV :
Run Time Storage Organisation
Source language issues, Storage organization and allocation strategies, for block structured and non block structured languages, Activation record, variable-length data, procedure parameters, nested procedures, access to non-local names, procedure Call and return, static and dynamic scope, Symbol Table organisation and management               6 Hour

UNIT V:
Code Generation:
Introduction: Issues in code generation, Target machine description, Basic blocks and flow graphs, next-use information, Register allocation and assignment, Dag representation of basic blocks, , Peephole optimisation, Generating code from a DAG, Dynamic programming, Code generator­,generator concept.
8 Hours

Unit VI :
Code Optimisation
Introduction, Classification of optimisation, Principle sources Of Optimisation, optimisation of
basic blocks, Loops in flow graphs, Optimising transformations: compile time evaluation, Common sub-expression elimination, variable propagation, code movement, strength reduction, dead code elimination and loop optimisation, Local optimisation, DAG based local optimisation. Global Optimisation: Control and data flow analysis, Computing Global Data flow information: meet over paths, Data flow equations, Data flow analysis, Iterative data flow analysis: Available expressions, live range identification                                                                                                                                      8 Hours

Text Books
1. A V Aho, R. Sethi, J D Ullman, "Compilers: Principles, Techniques, and Tools",
                 Pearson Education, ISBN 81 - 7758 - 590 - 8

Reference Books
l. K. Cooper, L. Torczon, "Engineering a Compiler", Morgan Kaufmann Publishers, ISBN 81 - 8147 - 369 -   
2. K. Louden, "Compiler Construction: Principles and Practice", Thomson Brookes/Cole
                 (ISE), 2003, ISBN 981 - 243 - 694 - 4                      .
3. J. R. Levine, T. Mason, D. Brown, "Lex & Yacc", O'Reilly, 2000, ISBN 81-7366­062 - X
4. Chattopadhyay, "Compiler Design", Prentice-Hall of India, 2005, ISBN 81-203­2725-X.

No comments:

Post a Comment