課程資訊
課程名稱
編譯程式設計
Compiler Design 
開課學期
102-1 
授課對象
電機資訊學院  資訊工程學系  
授課教師
徐慰中 
課號
CSIE3230 
課程識別碼
902 39200 
班次
 
學分
全/半年
半年 
必/選修
選修 
上課時間
星期四6,7,8(13:20~16:20) 
上課地點
資104 
備註
限電資學院學生(含輔系、雙修生)
總人數上限:106人 
Ceiba 課程網頁
http://ceiba.ntu.edu.tw/1021compiler 
課程簡介影片
 
核心能力關聯
核心能力與課程規劃關聯圖
課程大綱
為確保您我的權利,請尊重智慧財產權及不得非法影印
課程概述

Overview
Design of a simple compiler
Theory and practice of Scanning
Formal grammars and parsing
Top-down parsing
Bottom-up parsing
Syntax-directed compilation
Declaration processing and Symbol tables
Semantic analysis
Code generation
Program analysis and Optimization
 

課程目標
This course is an introduction to compiler design and development. Its focus is on the process and
techniques in constructing a compiler, including lexical analysis, parsing, symbol table manipulation, and code generation. The theory, techniques and algorithms associated with a compiler can be applied to a wide range of problems in software design and development. The goal of this course is to provide students with the essential theory and techniques in building a simple yet complete compiler.  
課程要求
 
預期每週課前或/與課後學習時數
 
Office Hours
備註: Thursday 34 in room 313 
指定閱讀
Textbook Title: Crafting a Compiler with C
Authors: Charles N. Fischer, Ron K. Cytron, Richard J. LeBlanc, Jr.
Publisher: Pearson Education Taiwan Ltd. 2010 
ISBN: 10:0-13-801785-9 
參考書目
A.V. Aho, M. Lam, R. Sethi, and J.D. Ullman
“Compilers: Principles, Techniques and Tools”
2nd edition, 2007
ISBN 0-321-48681-1
 
評量方式
(僅供參考)
 
No.
項目
百分比
說明
1. 
Compiler Implementation 
45% 
A) One simple compiler and optimization implemented in Java B) One complete compiler implemented in C or C++ 
2. 
Midterm Exam 
25% 
In-class 
3. 
Final Ex 
25% 
In-class 
4. 
Quizzes and Class participation 
5% 
 
  1. 本校尚無訂定 A+ 比例上限。
  2. 本校採用等第制評定成績,學生成績評量辦法中的百分制分數區間與單科成績對照表僅供參考,授課教師可依等第定義調整分數區間。詳見學習評量專區 (連結)。
 
課程進度
週次
日期
單元主題
第1週
9/12  Overview 
第2週
9/19  mid-autumn festival (no classes) 
第3週
9/26  Chapter 2: Design of a simple compiler 
第4週
10/03  Chapter 2: Design of a simple compiler 
第5週
10/10  Chapter 3: Theory and Practice of Scanning 
第6週
10/17  Chapter 3: Theory and Practice of Scanning 
第7週
10/24  Chapter 4: Formal Grammar and Parsing 
第8週
10/31  Chapter 5: Top-Down Parsing 
第9週
11/07  Chapter 6: Bottom-up Parsing 
第10週
11/14  Chapter 6: Bottom-up Parsing 
第11週
11/21  Chapter 7: Syntax Directed Translation 
第12週
11/28  Chapter 8: Declaration Processing and Symbol Tables 
第13週
12/05  Chapter 9: Semantic Analysis 
第14週
12/12  Code Generation I
 
第15週
12/19  Code Generation II 
第16週
12/26  Code Generation III 
第17週
1/02  Register Allocation and Code Scheduling