Compiler 2015
News
- (Mar 27) Hello, world!
Introduction
Compiler 2015: Introduction by example
Compiler 2015: An appetizer (important)
Compiler 2015: Grammar (typedef example)
Compiler 2015: Standard libraries
Compiler 2015: Semantic specification
Compiler 2015: Phase 2: Testing environment specification - midterm
Compiler 2015: Phase 5: Testing environment specification - final
Students who are going to use a language other than Java MUST apply explicitly. Whatever language you use, only the following tools are allowed: lex, yacc, Quex, flex, Bison, re2c, lemon, JFlex, CUP, ANTLR, Ragel, Gson.
Schedule
* 周日晚6点到9点,教室为致远601
Date | Lecture | Project | Deadline |
---|---|---|---|
Introduction, Overview & Syntactic Analysis | Syntactic Analysis | 2015/04/18 23:59 | |
2015/04/12 18:00-21:00 | Phase1 Presentation, Phase1 Code Review | Syntactic Analysis | - |
2015/04/19 18:00-21:00 | Semantic Check | Semantic Analysis | 2015/05/02 23:59 |
2015/04/26 18:00-21:00 | Phase2 Presentation, Phase2 Code Review | Semantic Analysis | - |
2015/05/03 18:00-21:00 | Intermediate Representation | Translating to Intermediate Code | 2015/05/16 23:59 |
2015/05/10 18:00-18:35 | Phase3 Code Review | Translating to Intermediate Code | - |
2015/05/10 18:35-19:35 | Code Generation & Register Allocation | Generating MIPS Code | 2015/05/23 23:59 |
2015/05/10 19:35-21:00 | Phase3 Presentation | Translating to Intermediate Code | - |
2015/05/17 18:00-21:00 | Optimization, Peephole Optimization and Constant Propagation | Optimization | 2015/05/31 23:59 |
2015/05/24 18:00-21:00 | Phase4 Code Review | Generating MIPS Code | - |
2015/05/31 18:00-21:00 | Phase5 Code Review, Report Deadline, Final Testing Deadline | Optimization | - |
Grading
- correctness, code review, report (80 points)
- bonus (20 points)
Penalty
If you submit your code n days after deadline, you will get a max(5,n)*10% penalty. For example, if a submission is made within 1 days after deadline, it will be scored at most 90%.
Bonus
Item | Points | Test Type | Deadline | Resources |
---|---|---|---|---|
handwritten lexer and parser | 1 ~ 3 | presentation | phase 1 | 1 2 |
pretty printer | 1 ~ 2 | presentation | phase 2 | 1 2 |
interpreter | 2 ~ 3 | presentation | phase 2 | |
typedef & undimensioned array | 1 ~ 2 | presentation | phase 2 | |
high-order function | 1 ~ 3 | presentation | phase 3 | |
single static form(SSA) | 1 ~ 3 | presentation | phase 3 | |
function pointer | 1 ~ 3 | presentation | phase 3 | |
x86 code generation | 1 ~ 2 | data | phase 4 | |
JVM code generation | 1 ~ 2 | data | phase 4 | |
framework refinement | 1 ~ 2 | TA | phase 4 | |
providing test data | 0.1 per case | TA | phase 4 | |
using C programming language | 3 | data | phase 5 | |
bootstrap | 2 | data | phase 5 | |
optimization | 0 ~ 10 | data | phase 5 |
Presentation
Name | Phase | Bonus | Date |
---|---|---|---|
翁健 | 1 | handwritten lexer & parser | 2015/04/12 19:10 - 19:20 |
魏楚 | 1 | handwritten lexer & parser | 2015/04/12 19:20 - 19:30 |
白志豪 | 1 | handwritten lexer & parser | 2015/04/12 19:30 - 19:40 |
周耀达 | 1 | handwritten lexer & parser | 2015/04/12 19:40 - 19:50 |
高宇 | 1 | handwritten lexer & parser | 2015/04/12 19:50 - 20:00 |
pretty printer 每人3分钟 | |||
typedef & undimensioned array 每人5分钟 | |||
interpreter 每人5分钟 | |||
邵俊儒 | 2 | pretty printer | 2015/04/26 |
邵俊儒 | 2 | typedef & undimensioned array | - |
马豪君 | 2 | pretty printer | 2015/04/26 |
李佳骏 | 2 | pretty printer | 2015/04/26 |
翁健 | 2 | pretty printer | 2015/04/26 |
翁健 | 2 | typedef & undimensioned array | - |
魏楚 | 2 | pretty printer | 2015/04/26 |
高剑飞 | 2 | pretty printer | 2015/04/26 |
徐亦飞 | 2 | pretty printer | 2015/04/26 |
高宇 | 2 | interpreter | 2015/04/26 |
吉妍 | 2 | pretty printer | 2015/04/26 |
陈昕昀 | 2 | pretty printer | 2015/04/26 |
陈昕昀 | 2 | typedef & undimensioned array | - |
陈迪 | 2 | interpreter | 2015/04/26 |
陈迪 | 2 | pretty printer | - |
柏钧文 | 2 | pretty printer | 2015/04/26 |
娄毅文 | 2 | pretty printer | 2015/04/26 |
郑宜霖 | 2 | pretty printer | 2015/04/26 |
施韩原 | 2 | pretty printer | 2015/04/26 |
陈子豪 | 2 | pretty printer | 2015/04/26 |
姚思秋 | 2 | pretty printer | 2015/04/26 |
姚京韬 | 2 | pretty printer | 2015/04/26 |
倪昊斌 | 2 | pretty printer | 2015/04/26 |
倪昊斌 | 2 | typedef & undimensioned array | - |
倪昊斌 | 2 | interpreter | - |
每人每个bonus 5分钟 | |||
邵俊儒 | 3 | Higher-Order Function | 2015/05/10 |
邵俊儒 | 3 | Function Pointer | - |
邵俊儒 | 3 | SSA | - |
高宇 | 3 | SSA | 2015/05/10 |
陈迪 | 3 | SSA | 2015/05/10 |
周耀达 | 3 | SSA | 2015/05/10 |
倪昊斌 | 3 | Higher-Order Function | 2015/05/10 |
倪昊斌 | 3 | Function Pointer | - |
倪昊斌 | 3 | SSA | - |
Version Control
- You are required to use BitBucket.
- Cheat is forbidden.
Preparation
- Create a Bitbucket account and a private git repository
compiler2015
- Add username
acmcompiler
to your repository withread
permission
Refer to Bitbucket 101 on how to install git and how to create accounts and repos, etc.
Warning: You must create a private repository so others cannot access your code. If you share code with others, you will get a score of zero for this course.
It is recommended to create the .gitignore
file with the following content.
bin/ *.class
Resources
Please inform us if you find a file unaccessible.
Google Group
Books
- Essentials
- Parsing with ANTLR
- Theory
- Standard
- Others
Papers
Useful links about the MIPS Assembly Language
- MIPS-SPIM document (pdf, 356KB) and its summary (pdf, 43KB)
- SPIM MIPS Simulator, SPIM reference, and SPIM with statistics
- MIPS Calling Convention
Other Useful links
- Abstract vs. Concrete Syntax Trees
- Understanding C namespaces
- Linux assemblers: A comparison of GAS and NASM
- IA-32 Assembly for Compiler Writers
- AST and IR generation 1 2 3
- Regular expression for a string literal in flex/lex
- Understanding the Stack
- Lambda expressions in Java 8
- Eclipse IDE for Java Developers
- Compiler 2012
- Compiler 2013
- Compiler 2014
Tutors
Name | |
---|---|
孙锴 | sunkaicn [at] gmail.com |
蒋舜宁 | jiangshunning [at] gmail.com |
廖超 | zeonsgtr [at] gmail.com |
刘爽 | liushuang931006 [at] gmail.com |
许文 | hotdog3645 [at] gmail.com |