Compiler Course Project
Spring 2007, ACM Honored Class
News
-
虽然这个课程设计结束了快3年了,不过还是不断有人访问这个主页。我非常高兴它还能给大家带来帮助。这个课程设计基本按照虎书第二版来进行,虎书的网址在这里。它的要求是写出能将一个简单的函数语言翻译成可执行汇编指令的编译器,工作量大概是100小时。这个对以前都是将代码写在一个文件中的大家来说还是相当有难度。感觉无助?不知如何下手?这都很正常。在你历经痛苦完成它的时候,你会看到你的代码能力突飞猛涨。如果你还继续坚持完成接下来的操作系统和数据库的话,那你的代码能力就在绝大数人之上了。加油!
如果你已经痛苦了几个月却进度缓慢,dealine马上就要来了,而你确实想独立完成这个作业的话,请看最后。不过,请注意,如果你从了这根最后的救命稻草,这个课程设计对你的帮助就会大打折扣了。- Mu December 7, 2010
- 新的几个测试数据过一会儿会上传:)
- ftp上传权限重新开放,截至到7月11日晚上8点
- 评分标准[pdf, 76kb] July 10
- Lecture 4: 18:30, 3-406, SEIEE Building May 16
- Lecture 3: 18:30, 3-406, SEIEE Building May 9
- Testcase updated! 9th May
- Specification for submission re-updated! May 9
- Specification for submission updated! April 11
- Lecture 2: 18:30, 3-416 SEIEE Building April 11
- 站直了,别趴下! April 4
Overview
The goal of our project is to translate Tiger codes into Mips assembly codes and correctly run the assembly codes on SPIM.
Here is our discussion group; you can send e-mail to acm05@googlegroups.com directly
Schedule
- Final submit deadline: July 8
- Midterm submit deadline: April 30 (specification [pdf, 100KB]) Top
Lectures
- Introduction & Lexer, by Ma, Rong, April 4 [rar, 458KB]
- Parsing, AST & semantic [ppt, 370KB], Java & Eclipse [ppt, 110KB], by Li, Mu, April 11
- MIPS Preliminary and Activation
Record [rar, 662KB]
There are some shortcuts of Eclipse, use them to accelerate your coding. - Code Generation [ppt, 2,800KB], by Li, Mu June 6 Top
Resources
Documents:
- Specification for submission [pdf, 188KB] (make your project tidy)
- Some testcases [rar, 25KB] (you want to pass all of them before submitting)
- Scanned version of the tiger book "Modern Compiler Implementation in Java" [rar, 181MB]
- Tiger language reference manual [pdf, 56KB] (keep it in your pocket, read it, then re-read it)
- MIPS-SPIM document [pdf, 356KB] and its summary [pdf, 43KB]
- Java JDK 1.5 Document [zip, 44MB] (use it with Eclipse)
Codes:
- Codes from the tiger book [zip, 79KB]
- Basic runable codes of compiler [zip, 48KB] (begin your project with it)
- MIPS common library [zip, 2KB]
Tools:
- Java JDK 1.5 [exe, 60MB]
- Eclipse SDK 3.2.2 [zip, 124MB] (recommended IDE)
- Lexical tool: JFlex-1.4.1 [zip, 967KB]
- Syntactic tool: Java_CUP_v10k [gz, 187KB]
- MIPS simulator: PCSpim [zip, 1MB]
- A sample compiler implemented in C [zip, 98KB] Top
A guide document (in Chinese):
- "Compiler, Step by Step", by Qian, Feng [pdf, 890KB]
Call for TAs
Any questions? please feel free to contact us.