Project Overview
The compiler construction project will involve development of a compiler for Decaf language. The language is a subset of C++ and Java. The projects will cover implementation of lexical scanning, parsing, abstract syntax trees, semantic analysis, intermediate code generation , and code generation for the Decaf language. Startup files for the projects will be distributed through CTools .
Collaboration:
All projects are to be completed on your own or within a team of 2 members. We expect adherence to the Engineering Honor Code in all assignments. More here.
Late Policy:
Each group has a total of three late days. You may apply these late days in any way that you choose across the five projects. Late days can only be claimed in units of full days. If you are one hour late, that counts as being one day late. After your group has used up the three late days, a 25% penalty will be imposed for each additional calendar day.
Grading Policy:
The grading will be done using an auto grader followed by manual correction of the files. The grades will be based on the number of test cases your submission can handle correctly.
Feedback Policy:
You are allowed to submit your work once for feedback before the programming assignment is due. The projects' due dates will fall on Monday. You should submit your work before Wednesday (6:00 PM) of the previous week in order to get a feedback. The feedback will be mailed within a day or two of your submission. The feedback will tell you how many test cases you are able to pass. You are encouraged to sumbit your project for feedback much earlier than the Wednesday of the project week, so that you have sufficient time to address any issue.
Additional Resources
Flex - a lex compatible scanner
Flex documentation by Vern Paxson
Bison - a yacc compatible parser
Bison Documentation by Charles Donnelly and Richard Stallman
SPIM - a simulator for the MIPS architecture
The SPIM Manual - Appendix from Hennessy & Patterson's architecture book
Acknowledgment:
This project is derived from the Decaf Compilers project at Texas A&M. We thank Lawrence Rauchwerger for giving us the opportunity to use this material. Acknowledgement in his website reads: "The material for this project was originally developed by Dr. Margaret Johnson at Stanford University for her undegraduate compiler class. Due to its novelty it is somewhat experimental and covered by a COPYRIGHT application. We gratefully acknowledge Maggie Johnson for giving us the opportunity to become a second test site for this material. The project materials have been adapted and modified by Lawrence Rauchwerger and Francisco Arzu."
