CSE 302 Compiler Design (3)
Instructor:
Current Catalog Description
Principles of artificial language description and design. Sentence parsing techniques, including operator precedence, bounded-context, and syntax-directed recognizer schemes. The semantic problem as it relates to interpreters and compilers. Dynamic storage allocation, table grammars, code optimization, compiler-writing languages. Prerequisites: CSE 109 and CSE 318.
Textbook
Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman, Compilers: Principles, Techniques and Tools, ISBN 0201100886, Addison-Wesley. Optional text: Michael L. Scott, Programming Language Pragmatics, ISBN 1558604421, Morgan Kaufmann.
References:
Course Goals
To understand the theory and practice of compilation: in particular, the lexical analysis, parsing and code generation and optimization phases of compilation.
Prerequisites by Topic
Finite Automata (e.g., Subset Construction Algorithm); Names, Bindings, Type Checking and Scopes; Data Types; Expressions and Assignment Statements; Statement-Level Control Structures; Pointers and Binary Trees; Elementary Parsing; Elementary Code Generation.
Major Topics Covered in the Course
Lexical Analysis; Syntax Analysis; Syntax-Directed Translation; Type Checking; Run-Time Environments; Intermediate Code Generation; Code Generation; Code Optimization.
Laboratory projects (specify number of weeks on each)
Three major programming projects of three weeks duration each.
Estimate CSAB Category Content
CORE ADVANCED
Data Structures 0.0
Computer Organization and Architecture 0.0
Algorithms Software Design 0.5 1.0
Concepts of Programming Languages 0.5 1.0
Oral and Written Communications: Every student is required to submit at least __0___ written reports (not including exams, tests, quizzes, or commented programs) of typically __0__ pages and to make __0__ oral presentations of typically __0___ minutes duration. Include only material that is graded for grammar, spelling, style, and so forth, as well as for technical content, completeness, and accuracy.
Social and Ethical Issues:
Theoretical Content
Lexical Analysis (3 classes); Syntax Analysis (12 classes); Syntax-Directed Translation (3 classes); Type Checking (3 classes); Run-Time Environments (3 classes); Intermediate Code Generation (3 classes); Code Generation (6 classes); Code Optimization (6 classes).
Problem Analysis and Solution Design
Students are required to extend a context-free language and design and implement a lexer and bottom-up (SLR) parser for the language in the first programming exercise. In the second and third exercises, students are required to extend a context-free language and design and implement a complete compiler using compiler construction tools such as Bison and Yacc.