CourseOutline

Instructor:  Asma Sanam Larik Email: asma.sanam@khi.iba.edu.pk   Credit Hours: 3+1 Semester: Spring 2010 Pre-requisite: Discrete Structures and Theory of Automata Course Web Page: http://cse344compilerdesign.wikispaces.com The objective of this course is to provide students with an overview of the issues that arise in Compiler construction as well as to throw light upon the significant theoretical developments and tools that are deep rooted into computer science. This course will basically introduce the major phases of Compiler construction and also its theoretical aspects including regular expressions, context free grammars, Finite Automata etc. As a part of this course the students are required to design a compiler passing through the phases namely Lexical Analysis, Syntax Analysis, Semantic Analysis and Intermediate code generation for a small language. Overview of Compilation, Analysis of source program, phases of compiler, compiler construction tools namely Lex,Yacc etc. Specification and recognizing of tokens, Regular Expressions, Finite Automata (NFA, DFA), Algorithms for conversion from regular expression to NFA and from NFA to DFA. Implementation of Lexical Analyzer from DFA Context-free grammars, ambiguity specifying operator precedence, Overview of Parsing, Types of parsing including Top-down parsing, Bottom-up parsing, Operator-precedence parsing, LR parsers etc. Organization, operations issues such as scope and overloading and their effect on symbol table design, implementation, and operations Syntax-directed definitions, translation schemes, synthesized and inherited attributes, propagation of attribute values through syntax tree Binary tree representation of expressions and statements, construction of binary tree representation using a stack Rules that cannot be described using a context-free grammar, Type checking rules for expressions and statements and issues such as type equivalence, overloading of functions and operators Three-address code for expressions and statements including assignments, conditionals, loops, procedure calls and generation of temporary variables and tables Principal sources of optimization, Introduction to data flow analysis and equations, code improving transformations. Compilers: Principles, Techniques, & Tools Second Edition By: Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman Published By: Addison-Wesley ISBN: 9780321547989 ** Reference books: ** 1. Modern Compiler Design First Edition By: David Galles Published By: Addison-Wesley 2005 ISBN: 9781576761052 2. Art of Compiler Design, The: Theory and Practice First Edition By: ** Thomas Pittman, James Peters ** ** ISBN: **9780130481900 3. Engineering a Compiler First Edition By: Cooper and Torczon Published By: Morgan-Kaufmann imprint of Elsevier 2004 ISBN: 9780321547989 Midterm Exams || 30% ||  Assignments  || 10% ||  Quizzes  || 5% (best 5) || Project || 15% (3 phases) || Final || 40%  || ** Course Project: ** An integral part of this course is the project. Students are required to make group of 2 students from day one. Compiler construction would be accomplished in three phases during the semester and specifications would be provided on the course web page. Labs are conducted in order to verify the concepts built from theory discussed in class. Labs would be conducted on teaching students C sharp and demontration of ANTLR 3.0 project using Eclipse.
 * Complier Design (CSE344) **
 * BS (CS CORE) **
 * Objective: **
 * Syllabus: **
 * **__ Introduction to Compilers __**
 * **__ Lexical Analysis __**
 * **__ Syntax Analysis __**
 * **__Symbol Table Construction and Issues__**
 * **__ Syntax Directed Translation __**
 * **__ Construction of Abstract Syntax Tree __**
 * **__ Semantic Analysis __**
 * **__ Intermediate Code Generation __**
 * **__ Code Optimization __**
 * Text book: **
 * Published By: Prentice Hall 1992 **
 * Grading: **
 * Labs: **