start
This is an old revision of the document!
Table of Contents
News
- Apr 12 — Add references and codes for code generation
- Apr 1 — Add SPIM reference
- Mar 28 — Add QuadPackage Quad for intermediate representation and slide for phase3 .
- Mar 26 — Add midterm submission specification
- Mar 15 — TAs have finished the compiler.
- Mar 13 — Add compilation model.
- Mar 4 — Checkout our test-case repository:
git clone git@giti.me:compiler-testcases.git
(it's public). - Mar 1 — Add resources for phase 1; update schedule; update overall page structure.
- Feb 21 — Clean up homepage.
- Feb 16 — Hello world!
Introduction
Welcome to CS216, Project Workshop of Compiler Principals! In this course, you will implement a compiler for a simplified version of Java from scratch, and by yourself.
Schedule
- Feb 29, 8:30pm: Course overview; syntactic analysis
- Mar 14, 8:30pm: Semantic analysis
- Mar 27: Mid-term submission (30% score)
- Mar 28, 8:30pm: Intermediate representation; code review of phase 1,2
- Apr 11, 8:30pm: Code generation; additional code review
- Apr 25, 8:30pm: Register allocation; code review of phase 3,4
- May 9 (tentative) — May 15: Test stage (70% score, test everyday)
Phase 1: Syntactic Analysis
- Compiler framework (you may start with it or write your own)
Phase 2: Semantic Analysis
Phase 3: Intermediate Representation
Phase 4: Code Generation
- A sample runtime library that is not worth referencing
Phase 5: Register Allocation
提倡使用Linear Scan代替传统图染色
Linear Scan
Grading
- Correctness
- Code reviews
Bonus
任务0: 使用git管理代码
- 任务描述与参与方法
- 使用giti.me服务管理本次大作业的代码
- 只使用git上传测试使用的jar文件不算
- 奖励
- 使用良好者最终成绩+1分,如果总分超过满分则只记满分
- 截止日期
- 2012年5月1日
任务1: Name Our New Language (1)
- 任务描述
- 取名最好和java类似,如lava,sava等
- 如果能带点hacker风格的recursive acronym更好,参考http://en.wikipedia.org/wiki/Recursive_acronym
- 参与方法
- 在google group对应的帖子中说明自己的想法
- 奖励
- 建议被采纳的同学最终成绩+1分,如果总分超过满分则只记满分
- 本奖励可能落空
- 截止日期
- 2012年5月15日,如果理想名字提前产生,活动将提前截止
任务2: Visitor Pattern (3)
- 任务描述
- 以文档的方式阐述以下问题:
- 解释什么是 Visitor Pattern,及几种实现方法,参考[1][2]
- 比较[3][4]中的Semantic Analysis模块是怎么设计的,有哪些要件,这些要件是如何协作的,顺序和流程为何?
- 如何在我们的编译器中使用Visitor Pattern?会出现什么问题?如何解决? -
- 制作成pdf版本或方便阅读的文档(比如写在自己的blog上),必要以具体的code说明,中英文均可
- 参与方法
- 在google group对应的帖子中公布自己的解答
- 奖励
- 文档被采纳的同学最终成绩+3分,如果总分超过满分则只记满分
- 可能有多人同时获得加分(1-3分不等)
- 只要有人参与,保证本奖励不会落空
- 截止日期
- 2012年5月15日,如果提前得到理想解答,截止日期也会提前
- 参考文献
- [1] Gamma, Helm, Johnson & Vlissides. Design Patterns (the Gang of Four book).
- [2] J Palsberg. The Essence of the Visitor Pattern
- [3] Andrew W. Appel. Modern Compiler Implementation in Java
- [4] Andrew W. Appel. Modern Compiler Implementation in Java (2nd Edition)
任务3: The Complier Killer (1-3)
- 任务描述
- 用新语言设计一个Killer程序,文本大小不超过1M,使得所有编译器的最短编译时间最长
- 要求提供构造的思路和说明
- 参与方法
- 在最终测试开始之前,将你编写的killer文件提交给助教
- 奖励
- 除自己的编译器之外,其他编译器编译的最短时间最长的为获胜者
- 如有多人参与,前三名分别得到3,2,1分
- 截止日期
- 期末测试开始之前
任务4: Test Cases(1-2)
- 任务描述
- 出第一轮测试的数据
- 要求在源文件中添加详细的说明,并附上自己的名字
- 参与方法
- 将自己写的testcase打包发到group中,确保没有重复并通过助教审核
- 奖励
- 每5个测试数据1分,2分封顶
- 没有合作
- 截止日期
- 2012年3月23日(含)
任务: (待发布,和中间代码有关,3分)
任务: (待发布,和寄存器分配有关,3分)
任务: (待发布,和优化有关,3分)
Links
Contacts
- Menghui Wang (王孟晖) —
wmhkebe [at] gmail.com
- Ruixin Qiang (强瑞鑫) —
ghost.gold [at] gmail.com
- Shijian Li (李诗剑) —
95588lsj [at] gmail.com
- Xiao Jia (贾枭) —
xjia [at] cs.sjtu.edu.cn
- Rong Ma (马融) —
marong1204 [at] gmail.com
start.1335325053.txt.gz · Last modified: 2012/04/25 03:37 by xjia