Compiler 2013
News
- (Jun 18) Final testing results.
- (Jun 15) Updated testing results at 06/15.
- (Jun 14) Updated testing results at 06/14.
- (Apr 26) Today's code review is cancelled.
- (Apr 21) Updated testing results at 04/21.
- (Apr 20) Updated testing results at 04/20.
- (Apr 19) Updated testing results at 04/19.
- (Apr 13) Updated testing results at 04/13.
- (Apr 12) Updated testing results at 04/12.
- (Apr 11) Created SVN statistics.
- (Apr 9) Created a repository for testcase submission.
- (Mar 29) Mid-term specification and course schedule are updated.
- (Mar 21) The grammar and the semantic specification are revised.
- (Mar 15) The appetizer is finished.
- (Mar 13) Add some books.
- (Mar 6) Hello, world!
Introduction
Compiler 2013: Introduction by example
Compiler 2013: An appetizer (important)
Compiler 2013: Grammar (typedef example)
Compiler 2013: Semantic specification
Compiler 2013: Mid-term specification
Compiler 2013: Standard libraries
Compiler 2013: Command-line options
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 (v3 or v4), Ragel, Gson.
Schedule
Date | Lecture | Project | Code Review | Deadline |
---|---|---|---|---|
2013/03/15 7PM | Introduction, Overview, Lexical Analysis, Parsing | Syntactic Analysis | 2013/03/22 7PM | 2013/03/29 6PM |
2013/03/29 7PM | Syntax-Directed Translation, Type Checking | Semantic Analysis | N/A | 2013/04/19 6PM |
2013/04/12 7PM | Intermediate-Code Generation, Run-Time Environments | IR Generation | N/A | 2013/04/26 6PM |
2013/04/19 7PM | SSA, Code Generation | Code Generation | N/A | 2013/05/10 6PM |
2013/05/03 7PM | Liveness Analysis and Register Allocation | Register Allocation | 2013/05/24 7PM | 2013/05/31 6PM |
Grading
- correctness (30 points)
- performance (20 points)
- code review (10 points)
- bonus report (40+ points)
Bonus
- Bootstrapping C (will get full score)
- Pretty printer
- Parser combinator
- Parse with derivatives
- Interpreter (partial evaluation)
- Continuation-passing style (CPS)
- Static analyzer (abstract interpreter)
- Meta interpreter (
eval
) - Object-oriented programming
- Higher-order functions
- Concurrency and scheduling
- Compilation to Intel x86 or JVM
- Garbage collection
- Optimization
- Refine Wikipedia or translate into Chinese
In order to get bonus, students are required to submit a full-length paper or a technical report. If there's not much novelty in your work, you have to survey related work extensively. Submissions must be in ACM proceedings format, 9-point type, and may not exceed 8 pages (all inclusive). Word and LaTeX templates for this format are available at http://www.sigplan.org/authorInformation.htm . Submissions must be in PDF and printable on US Letter and A4 sized paper.
Version Control
- You are REQUIRED to use the provided Subversion service.
- If you prefer git, you can use git-svn.
- You are NOT allowed to publish your code on the Internet.
Suppose your login name for ACM Xiaoyou is "xjia
" (without the quotes).
- You can
svn checkout https://202.120.61.16/svn/xjia/
. - If you prefer git, you can install git-svn and
git svn clone https://202.120.61.16/svn/xjia/
. - You can also view your directory in the browser directly via
https://202.120.61.16/svn/xjia/
. - For this course project, you are REQUIRED to store your project at
https://202.120.61.16/svn/xjia/compiler2013/
.
If fortunately (or unfortunately) you are using Windows, you may prefer TortoiseSVN. However, a Linux box or a Mac is highly recommended.
Resources
Google Group
Books
- Essentials
- Parsing with C
- Parsing with ANTLR
- Functional compilation
- Theory
Papers
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
- MIPS Calling Convention
- Understanding the Stack
- Eclipse IDE for Java Developers
- Compiler 2012
- MIPS-SPIM document (pdf, 356KB) and its summary (pdf, 43KB)
- SPIM MIPS Simulator, SPIM reference, and SPIM with statistics
Contacts
Name | Phone | |
---|---|---|
贾枭 | xjia[at]cs.sjtu.edu.cn | 壹伍貳 1671 2262 |
杨欢 | yanghuanflc[at]gmail.com | 壹捌陸 1699 3631 |
戴勃 | doubledaibo[at]gmail.com | 壹捌捌 0196 9501 |
蒲悠儿 | puyouer[at]gmail.com | 壹捌捌 0196 5683 |