Due: August 25th
Welcome to ECE 468
40% of your course grade in this class comes from your course project: you will be building an end-to-end compiler that takes programs written a simple language, translates them to assembly code that can run on a simulator, and performs some basic optimizations.
Unlike in a lot of your previous classes, every assignment in this course builds on previous assignments. When you're done, you will have written a single program with thousands of lines of code. To make it easier to manage such a large project (and to keep you from waiting until the last week of class to try and write an entire compiler), we have broken up the project into a series of distinct steps, each of which will explore one aspect of what a compiler does.
You can (and are encouraged to) work on the project for this class with a partner. If you choose to work with a partner, you must let us know by Friday, August 25th. If you are working with a partner this will be your partner for the rest of the semester. We will not let you change partners. You and your partner will get the same grade on the project, even if one partner does more work than the other.
Because each step will depend on previous steps, you will essentially be writing a single program over the course of the semester. To facilitate this type of development strategy (which isn't all that different than what you'll encounter in the real world), we will be using version control to manage your source code. We will also use it to handle submissions.
This first step requires only that you correctly set up your repository, and correctly navigate the team-forming and submission process.
Instructions
Set up version control
-
Set up your Github account
Create a Github account (if you do not already have one). This is the account you should use to create and submit all of your assignments this semester.
-
Create a git repository for the assignment.
Log in to your Github account. Then click this assignment link. If your partner has already created a team, join their team. Otherwise, create a new team name for yourself.
Take note of the URL of the Github repository that gets set up!
-
Fill out the course questionnaire to let the instructor and TA know your github user name and the repository you (and your partner) will
be using -
Clone the repository to develop your assignment
Cloning a repository creates a local copy. Change your directory to whichever directory you want to create your local copy in, and type:
> git clone [your repository URL] project
This will create a subdirectory called
project
, where you will work on your code. -
As you develop your code, you can commit a local version of your changes (just to make sure that you can back up if you break something) by typing:
> git add <file name that you want to commit> > git commit -m "<describe your changes>"
git add <filename>
tells git to "stage" a file for committing. Staging files is useful if you want to make changes to several files at once and treat them as one logical change to your code. You need to call git add every time you want to commit a file that you have changed.git commit
tells git to commit a new version of your code including all the changes you staged withgit add
. Note that until you executegit commit
, none of your changes will have a version associated with them. You can commit the changes many times. It is a good habit committing often. It is very reasonable if you commit every ten minutes (or more often).Do not type
git add *
because you will likely add unnecessary files to the repository. When your repository has many unnecessary files, committing becomes slower. -
To copy your changes back to Github (to make sure they are saved if your computer crashes, or if you want to continue developing your code from another machine), type
> git push
If you do not push, the teaching staff cannot see your solutions.
Write a Makefile
Create a Makefile
in the main directory of your repository (we will be using Makefiles to drive the building and testing process of all of your code)
Create a target called team
that first prints out your team name (the same team name you used to create your Github repo), then prints out the following information for each member of the project:
- Full name (first and last)
- Github username
For example, if the instructor and TA were in a team called Instructors
, typing
make team
would print the following:
Team: Instructors
Milind Kulkarni
milindkulkarni
Chris Wright
cwright7101
Grading
We will use the information printed by your Makefile in our grading script. So if you make a formatting mistake, your grade may not be correctly computed. We will use this same team
target to collect user info for future steps, so if there is an error, this is your chance to correct it without any penalty.
Submitting your code
You will use git's "tagging" functionality to submit assignments. Rather than using any submission system, you will use git to tag which version of the code you want to grade. To tag the latest version of the code, type:
> git tag -a <tagname> -m "<describe the tag>"
This will attach a tag with name
> git tag -a step0-submission -m "Submission for step 0"
> git push --tags
This will create a tag named step0-submission
and push it to the remote server.
The grading system will check out whichever version you have tagged
step0-submission
and grade that.
If you want to update your submission (and tell the grading system to ignore any previous submissions) type:
> git tag -a -f step0-submission -m "Submission for step 0"
> git push --tags
This will overwrite any other tag named step0-submission
with one for the current
commit.
Please be careful about the following rules:
-
For each assignment, we will grade only the last commit tagged
step0-submission
It is your responsibility to tag the correct one. -
After tagging a version "submission", any modifications you make to your program will not be graded (unless you update the tag, as described above).
-
The grading program starts retrieving soon after the submission deadline of each assignment. If your repository has no version tagged
step0-submission
, it is considered that you are late. -
The time of submission is the time when you push the code to the repository, not the time when the grading program retrieves your code. If you push the code after the deadline, we will consider it late.
- You are encouraged to tag partially working programs for submission early. This can give you an opportunity to get partial credit (although there is no partial credit available for step 0) Please remember to tag improved version as you make progress.