You are on page 1of 2

Proceedings of the 26th Academic Council held on 18.5.

2012

CSE309 PROGRAMMING LANGUAGE TRANSLATORS  L  T  P  C 
  3  1  0  4 
Version No.  

Course  Computer Architecture and Organization


Prerequisites:  Theory of Computation

Objectives 
1. To provide foundation for study of high performance parallel compilers and
compiler design implementation.
2. To make students familiar with lexical analysis and parsing techniques.
3. To understand the principles of code optimization techniques.
4. To provide fundamental knowledge of various language translators.

Expected Outcome 
Students shall be able to
1. demonstrate the functioning of a Compiler and to develop a firm and enlightened
grasp of concepts such as higher level programming, assemblers, automata theory,
and formal languages, languages specifications, data structure and algorithms
2. Analyse the local and global impact of translators.
3. Develop language specifications using context free grammars (CFG).
4. Apply the ideas, the techniques, and the knowledge acquired for the purpose of
developing software systems

Unit I   INTRODUCTION TO COMPILATION AND LEXICAL ANALYSIS    9 + 3  hours  


Introduction to programming language translators, structure of a compiler, applications
of compiler technology, programming language basics, Lexical Analysis phase: - Design
issues-patterns, lexemes, Tokens-attributes- specification of tokens, Regular
expressions and Finite state automata, Optimization of DFA-based pattern matchers.
 
Unit II   SYNTAX ANALYSIS  9 + 3  hours 
Role of parser- Formal definition of grammars, Parse Tree- Ambiguity- Elimination of
ambiguity- Top down parsing: Recursive-Descent parsing, Non- recursive predictive
parsing; LL(1) grammars, Bottom-Up parsing:- Shift-Reduce parsers, LR parsers:-
Construction of SLR parser tables and parsing , CLR parsing-LALR parsing- Syntax
errors-YACC.
 
Unit III  SEMANTICS & RUNTIME ENVIRONMENTS  9 + 3  hours 
Syntax-directed definitions (SDD) , Evaluation order for SDD, Applications of Syntax
directed translation (SDT), SDT Schemes, Implementation of L-attributed SDD. Run­
time  environments:  Storage allocation, stack allocation of space, Access to non local
data on the stack, heap management, introduction to garbage collection,  

Unit IV  INTERMEDIATE CODE GENERATION & OPTIMIZATION  9 + 3 hours 


Variants of syntax trees, three address code, types and declarations, translation of
expressions, type checking, control flow, back patching, switch statements, intermediate
code for procedures, Loop optimizations.

142
Proceedings of the 26th Academic Council held on 18.5.2012

Unit V  CODE GENERATION & OTHER TRANSLATIONS ISSUES              9 + 3  hours 


Principal sources of optimization, introduction to data flow analysis, loops in flow
graphs, region based analysis, issues in the design of a code generator, target language,
basic blocks and flow graphs, optimization of basic blocks, peep hole optimization,
register allocation and assignment, instruction selection by tree rewriting.  

Text  / Reference Books
1. A. V. Aho, Monica S. Lam, Ravi Sethi and Jeffrey D. Ullman, Compilers: Principles,
techniques, & tools, Second Edition, Pearson Education, 2007.
2. K. D. Cooper and L. Torczon, Engineering a compiler, Morgan Kaufmann, 2nd edition,
2011.
3. Steven S.Muchnick “Advanced Compiler design implementation” Elsevier Science
India, 2003.

Mode of Evaluation  : Tests, Assignments, Seminars


Recommended by the Board 
of Studies on  :
 
Date of Approval by the 
Academic Council  :

143

You might also like