Principles of Compiler Design (Final Year Computer Engineering)

Subject Code : 410444
Subject Name : Principles Of Compiler Design

Theory: 100 Marks Duration : 3 Hrs

• 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 (YACC), YACC specifications
Semantic Analysis Need of semantic analysis, type checking and type conversion
10 Hours

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 YACC .
10 Hours

Runtime Storage Organization
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 organization and management
6 Hours

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 optimization, Generating code from a DAG, Dynamic programming, Code generator- The write-ups for any diagram can include small examples to cover notation that has not been referred to in your submitted diagram. Generally any UML diagram has accompanied document to explain the diagram further for example use case descriptions, non-functional requirements, scripts, notes, assumptions, project management aspects.
8 Hours

Unit VI:
Code Optimization
Introduction, Classification of optimization, Principle sources Of Optimization, optimization of basic blocks, Loops in flow graphs, Optimizing transformations: compile time evaluation, Common sub-expression elimination, variable propagation, code movement, strength reduction, dead code elimination and loop optimization, Local optimization, DAG based local optimization. Global Optimization: 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 -
1.K. Cooper, L, Torczon, "Engineering a Compiler", Morgan Kaufinann Publishers, ISBN 81-8147-369-8.
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 -061-X.
4.S. Chattopadhyay, "Compiler Design", Prentice-Hall of India, 2005, ISBN 81-203-2725-X.

Related Articles

Indian Premier League (IPL), show of BCCI's might

This article is about Indian Premier League (IPL), the brand sporting event organised by BCCI. This article reveals about the IPL's extragavancy and obviously the magnitude of money involved in the league which is known for its high magnitude entertainment. This article gives a clear picture about how the IPL make BCCI, franchise bank balances green, sponsors and the brand value of each team.

Buying Guide: How To Select A Computer?

Which computing device are you planning to buy? The more than a half dozen of computers available in the market such as tablets, all in ones, desktop, note or ultrabook have turn the confusion worse compounded as to which one to buy and which not. Don’t make haste!. Know before buying which computer would suit you the best. Just read this article to have some inkling of the idea needed before zeroing on a computer.

Time schedule of IPL 2012

In this article I am presenting the time schedule and time table of Indian Premier League IPL 2012. Four seasons of Indian premier league has passed now the time of IPL session 5 at April 4th. The first match between Chennai Super Kings v Mumbai Indians M.A. Chidambaram Stadium, Chennai.

IPL-5 auction news makers

This article deals with the interesting features of IPL-5 auctions held at Bengaluru on Saturday, the 4th of February 2012. The top pick of the IPL-5 was Ravindra Jadeja who bagged $2m (Rs.9.71crore). He is bought by Chennai Super Kings in a tie breaker with Deccan Chargers. 8 teams bid for 25 players. Mumbai Indians and Rajasthan Royals had maximum buys with 5 players each. The article names the top 5 picks of the IPL-5. The names of all the 25 players and the teams which bought them are given.

More articles: Computer Engineering Ipl


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: