編譯器設計概論
Intro. to Compiler Design
| 節 | 週三 | 週五 |
|---|---|---|
3 10:10–11:00 | 編譯器設計概論 EDB27 2 節連堂 | |
4 11:10–12:00 | ||
7 15:30–16:20 | 編譯器設計概論 EDB27 |
* 根據陽明交大上課時間表所列
This course is intended to explore the principal ideas and techniques of compiler construction. Topics include lexical analysis, syntax analysis including LL and LR parsers, type checking, run-time environments, symbol tables, code generation, and compiler-construction tools. This course aims to give you a solid foundation in the theory of compiler construction as well as the experience of building a compiler. Much of what you have learned about algorithms and data structures will come to bear as you study and implement the various components of a compiler. In a sense, compiler construction is a showcase for many other disciplines of computer science. Course Objectives: (1) To learn structure of compilers. (2) To learn basic techniques used in compiler construction such as lexical analysis, top-down and bottom-up parsing, context-sensitive analysis, and intermediate code generation. (3) To learn basic data structures used in compiler construction such as abstract syntax trees, symbol tables, three-address code, and stack machines. (4) To learn software tools used in compiler construction such as lexical analyzer generators (Lex), and parser generators (Yacc). (5) To construct a compiler for a small language using the above techniques and tools.
Programming Languages, Data Structures, and Assembly Language and System Programming
Course website and TAs will be announced in the first week of the semester.
1學期作業 The course involves a significant programming project - implementing a compiler for a simple programming language. The project will build the compiler as a series of phases and you must keep pace with the project in order to be successful in this course. The project draws heavily on much of what you have learned thus far and will stretch your programming skills. You are free to choose the language you will use for the programming project. You will be assigned to generate code for the Java virtual machine. The penalty for late homework is 15% per day (weekends count as 1 day). Late homework will not be accepted after the solutions have been posted. There will be NO CREDIT given for plagiarism. 2.考試狀況 Midterm and Final Exam 3.評量方法 Midterm Exam 20% Final Exam 20% Course Projects 50% Class Participation 10%
- Introduction
- Lexical analysis, scanning
- Syntax analysis, parsing
- Context-Sensitive Analysis
- Runtime environments
- Code generation
| 週次 | 主題 |
|---|---|
| 第 1 週 | Introduction |
| 第 2 週 | Regular and Context-Free Languages |
| 第 3 週 | Lexical Analysis |
| 第 4 週 | Lex - The Lexical-Analyzer Generator |
| 第 5 週 | Top-Down Parsing Bottom-Up Parsing |
| 第 6 週 | Bottom-Up Parsing |
| 第 7 週 | LR parsing I |
| 第 8 週 | LR parsing II |
| 第 9 週 | Midterm Exam |
| 第 10 週 | Yacc - The Parser Generator |
| 第 11 週 | Syntax-Directed Translation |
| 第 12 週 | Intermediate-Code Generation |
| 第 13 週 | Type Checking |
| 第 14 週 | Run-Time Environment I |
| 第 15 週 | Run-Time Environment II |
| 第 16 週 | Code Generation |
| 第 17 週 | Code Optimization |
| 第 18 週 | Final Exam |
Required textbook: Compilers: Principles, Techniques, and Tools (2nd edition), by Aho, Lam, Sethi, and Ullman, Addison Wesley, 2007. Reference book: Lex & Yacc, by Doug Brown, John Levine, and Tony Mason, O'Reilly Media, 1995.
- 地點
- EC708
- 聯絡方式
- 分機56688 ypyou@cs.nctu.edu.tw