Science Center 264
F: 2-3:30, room 252
Mondays 2-3pm and by appointment
Final Exam: Tuesday May 12, 9am room 264 Sci. Center
CS75 is an introduction to compiling. We will study techniques used in
the design and implementation of modern compilers. Subjects include
scanning and regular expressions, context-free grammars and parsing,
syntax-directed translation, abstract syntax trees, scoping, symbol tables,
code generation, and code optimization. To make many of these concepts
more concrete we will write a complete compiler for a non-trivial subset of
the C programming language.
Prerequisite: CPSC 035 and experience in C or C++ (usually satisfied by
completing CPSC 33). If you have not used C or C++ in awhile, take a
look at C
programming references before the start of the semester.
Compilers, Principles, Techniques and Tools, 2nd Edition
by Aho, Lam, Sethi, Ullman
The following schedule is tentative; it will be updated as we go along.
I highly recommend doing the week's reading prior to the first class meeting of that week.
Grades will be weighted as follows:
|55% Project lab assignments|
|10% Homework and class participation|
The course project consists of several lab assignments that together
implement a compiler for most of the C programming language. You will work
with a partner on the project assignments.
About the CS Lab
The CS Lab (room 240) and the overflow lab (room 238) are open 24 hours
a day for CS students to work on their course assignments. When the
CS Lab is in use by a class, you should work in the overflow lab.
If you have not already done so, give Jeff the microprox number on
your student ID and he will enable your access to the lab and Science
Center after hours using your ID: wave your ID in front of the microprox
to gain entry to the CS Lab and the Science Center after building hours
(use the door between Martin and Cornell to get into the building after
Please read through the"Computer Lab Rules" under the "Introductions" section
of the CS help pages
You should work with a partner on programming projects.
To set up your development environment so that you and your partner can
access your joint project files while still protecting them from others,
see the following:
Safe File Sharing for Group Projects
You may want to use some type of revision control software to
help you coordinate shared accesses to project files by you and your partner
and to allow a way for you to back-up working versions of your code. I'd
Submitting Lab Assignments
Lab assignments will be submitted on-line using
. You can
submit the same assignment multiple times
up to the due date using cs75handin. Once you have
submitted your solution to an assignment, make sure to
keep a copy of it that you will not modify after you submit it (this way if
something goes wrong with cs75handin I can use the dates of your solution
files to determine when you submitted your solution).
Some lab assignments will include a demo. You will sign up for a demo
slot during which you and your partner will run your solution for me with
tests that demonstrate its correctness and its error handling capabilities.
Late Work Policy
Written homework assignments:
Homework assignments are due at the beginning
class on the due date. Late written homework assignments will not be
. However, it is still to your advantage to do written assignments
even if you do not turn them in; they help reinforce your understanding
of the lecture material and they are often typical of the types of questions
you may see on exams.
You and your partner are allowed to use up to 3 late days
turning in lab project assignments. However, at most 2 late days can be
used on an individual assignment. One day late means turned
in before the original time the assignment was due on the
next day class meets. For example, if the original assignment is
due on Tuesday before 1am, then if you submit it after Tuesday at
1am but before Thursday at 1am it is one day late.
Use late days wisely; once you have used up your late days, I reserve the
right to not accept any further late assignments from you, and if I do
accept further late assignments from you, you will receive a significant late
penalty on them. I strongly recommend
that you do not use any late days on the first two lab assignments.
CS Dept's Academic Integrity Policy
Under no circumstances may you hand in work done with (or by) someone else
under your own name. Your code should never be shared with anyone; you may not
examine or use code belonging to someone else, nor may you let anyone else look
at or make a copy of your code. This includes sharing solutions after the
due date of the assignment. Failure to abide by these rules constitutes
academic dishonesty and will lead to a hearing of the College Judiciary
Committee. According to the Faculty Handbook:
"Because plagiarism is considered to be so serious a transgression,
it is the opinion of the faculty that for the first offense, failure in the
course and, as appropriate, suspension for a semester or deprivation of the
degree in that year is suitable; for a second offense, the penalty should
normally be expulsion."
Discussing ideas and approaches to problems with others on a general level
is fine (in fact, we encourage you to discuss general strategies with each
other), but with the exception of your project partner, you should never
read anyone else's code or let anyone else read your code. If you are in
doubt about some help that you received, then credit the person(s) from
whom you got help by citing them in a comment at the top of the file and
discuss the situation with your instructor.
- C Programing (C style guide, compiling, linking and debugging help, etc.)
Read the "C Code Style Guide" before starting the first programming project
- The phases of compiling, linking, and loading C programs and
tools for examining the results of the different phases of this process
(objdump, gdb, nm, ldd, readelf)
- gdb and valgrind guides
- How to use cs75handin
- CS Department's Help Pages
- My Help Pages and Links (Unix help, Programming help, make, svn, gdb, ...)
- brief intro to MIPS and SPIM
specifically written for the CS75 course project
- spim and MIPS Overview of spim and
appendix A of Hennessy and Patterson's "Computer Organization
and Design: The Hardware/Software Interface"
(there are two hard copies of this in the CS labs)
- MIPS quick reference
- spim homepage