On this page:
2.1 Questions
2.2 Projects

2 Questions and Projects

Assignments in CS 241 are divided into Questions and Projects.
  • Questions are typically short (but not necessarily easy) and test some specific aspect of the course material. Many will involve programming (some high-level in C++ or Racket, some low-level in MIPS machine or assembly language) but some will involve other tasks.

  • Projects ask you to write medium-sized C++ or Racket programs that form the major components of the compiler we want to write in this course, which translates a high-level C-like language called WLP4 into MIPS machine code.

Questions and Projects are both to be submitted to Marmoset, where they will be tested and graded automatically. There is no hand-marking.

When you submit to Marmoset, it will run your submission against a test suite. There are three types of tests on Marmoset:
  • Public tests are simple and usually just check that you have understood the input/output requirements. They are not worth any marks. Public test results are available immediately after Marmoset finishes testing your submission.

  • Release tests tend to be more in-depth and will include things like edge cases or tests of efficiency. To view release test results, you must spend a release token. After passing the public tests, you will see a link to spend a token and view the release test results. If you fail a release test, you will sometimes be given the test input that caused you to fail, but in some cases the test input is hidden.

    You get 1 release token for each Question or Project, and after spending the token, it takes 12 hours to regenerate. We recommend starting the assignments early so you get lots of chances to use release tokens. However, you should also do thorough testing on your own so that you don’t waste release tokens on silly mistakes.

  • Secret tests are only used in Projects. They are completely hidden on Marmoset until after the deadline. Before the deadline, you cannot even see how many marks are allocated to secret tests on Marmoset. However, the specification page for each Project will state how many marks are allocated to secret tests.

2.1 Questions

There will be 10 normal questions and 3 bonus questions. The normal questions will be released throughout the term at a rate of roughly 1–2 per week, stopping after Week 8. The bonus questions will be released when the relevant material is covered in class. You will typically have 1–2 weeks to complete normal questions; bonus questions will be available until the end of the term.

Question 1: Goose Byte Extraction
Due Friday, September 15, 11:59pm

Question 2: From Characters To Bits
Due Friday, September 15, 11:59pm

Question 3: MIPS Machine Language Programming
Due Friday, September 22, 11:59pm

Question 4: Two DFAs
Due Friday, September 29, 11:59pm

Question 5: MIPS Assembly Programming: Reading Decimal Numbers
Due Friday, October 20, 11:59pm

Question 6: MIPS Assembly Programming: Printing Decimal Numbers
Due Friday, November 3, 11:59pm

Question 7: MIPS Assembly Programming: Height Of A Binary Tree
Due Friday, December 1, 11:59pm

Question 8: Introduction to WLP4
Due Friday, November 10, 11:59pm

Question 9: Two CFGs
Due Friday, November 17, 11:59pm

Question 10: Printing Parse Trees
Due Friday, November 17, 11:59pm

Bonus Question 1: Writing A Loader
Due Tuesday, December 5, 11:59pm (hard deadline, extensions will not be given)

Bonus Question 2: Writing A Linker
Due Tuesday, December 5, 11:59pm (hard deadline, extensions will not be given)

Bonus Question 3: Writing A Memory Allocator
Due Tuesday, December 5, 11:59pm (hard deadline, extensions will not be given)

2.2 Projects

The following is a schedule for projects. Typically you will have around 2 weeks to complete each project.

Project 1: MIPS and WLP4 Scanners
MIPS Scanner Due Friday, October 6, 11:59pm
WLP4 Scanner Due Friday, November 3, 11:59pm

Project 2: MIPS Assembler
Due Monday, October 23, 11:59pm

Project 3: WLP4 Parser
Due Tuesday, Nov 21, 11:59pm

Project 4: WLP4 Semantic Analyzer
Due Tuesday, Nov 28, 11:59pm

Project 5: WLP4-to-MIPS Code Generator
Due Tuesday, Dec 5, 11:59pm