Académique Documents
Professionnel Documents
Culture Documents
The Class: CS143 is a first course in compilers, designed to introduce the student to
the principles and practices of programming language implementation.
We cover lexical analysis, parsing theory (LL, LR, and LALR parsing),
semantic analysis, runtime environments, code generation, and
optimization. The coursework will consist of regular programming
projects, a few pencil-and-paper problem sets, a midterm and a final
exam. The four programming projects comprise a series of milestones
that will ultimately lead to an operational compiler for a miniature
object-oriented programming language.
The Student: The prerequisites are CS103B/X and CS107. You should be familiar with
the CS103B content: regular expressions, graphs, sets, context free
grammars, and formal languages. If you’ve never heard of these things
before, well... you can still take the course, but you’ll need to work on
your own and learn the material. You should have well-developed
programming and debugging skills, understand simple code generation
and function calling conventions, and have some exposure to different
language paradigms. The projects will require you to manage unfamiliar
tools, complex algorithms, and advanced programming techniques. It all
goes much more smoothly if you already know how to code as well as a
CS107 graduate.
Sections: Starting next week, we’ll lead one discussion section every Friday at 1:15
p.m. in Skilling 191 (broadcast live on SCPD Channel E3). I suspect this
time isn’t all that good for some of you, but luckily the sections are
videotaped and available online via scpd.stanford.edu. Section
attendance isn’t required any more than lecture attendance is, but you
can only benefit by participating. All section materials will be posted as
handouts on the course web site.
Units: CS143 is offered for 3 or 4 units. Undergraduates must take the course
for 4 units of credit. Graduate students may enroll for 3 units if their
registration constrains it to be the case. The course requirements are the
same for everyone, regardless of registration status.
Textbook: The course handouts cover all the material you need. As an optional text,
you might purchase Compilers: Principles, Techniques, and Tools by
Aho, Sethi, and Ullman (a.k.a. the "red dragon" book). This book is the
classic compiler text that provides a very thorough and solid treatment of
the material in spite of the fact that it’s way more material than anyone
could ever cover in a ten-week quarter. This text is not at all required,
but some students find it helpful as a reference or supplemental source.
The easiest way to secure your own copy is to just order it online from
Amazon.
Web: Everything you always wanted to know about CS143, but were afraid to
ask: http://cs143.stanford.edu. This site is the place to grab handouts,
read late-breaking announcements, scan the syllabus, and get general
course information. We will also maintain a FAQ page with common
questions and answers, clarifications, etc. about the current assignment.
You should also check the web page periodically for course
announcements.
Mailing Lists: We’ll use a CS143 mailing list for important, late-breaking
announcements. All students enrolled in CS143 are automatically
subscribed to the cs143-aut0708-students@lists.stanford.edu mailing
list. The list server is in touch with Axess and automatically forwards all
messages to all those enrolled in the course. Please make it a point to
register for CS143 sometime before the weekend. You should inspect
your stanfordyou.stanford.edu privacy settings to ensure that some
email address is marked as public. If not, you’re excluded from the
mailing list, and you’ll miss out on all the gossip.
4
Staff email: You’re always welcome to email me directly, but there are times
when I’m away from a computer for more than a few hours. Unless
you need to address me specifically, you should probably send email
to all four of us, and you can more easily do that by emailing
compilers@cs.stanford.edu. The TAs have been instructed to
answer CS143 email as aggressively as possible, so you benefit by
mailing all of them at the same time. The TA who answers the most
email wins a brand new Wii.
Choose a partner you can trust. You can work individually on some
projects and with a partner on others, and you can switch partners any
time you want to. Feel free to use the newsgroup (su.class.cs143) to
find a partner if you want one.
Grading: This class is offered with both the graded and CR/NC options. The course
grading is divided between the programming assignments and problem
sets, a single midterm, and a final exam. The grade breakdown is:
Assignments 50 %
Midterm 20 %
Final 30 %
If you are taking the course CR/NC, you need to pull a C- or better in order
to pass. All students must take the final, including those taking the
course CR/NC who set the midterm curve and get perfect scores on every
single assignment.
5
The first is the normally scheduled time, and the second is during the
time slot immediately after the first. Just pick the time that’s more
convenient for you, and show up. If you can’t make either one of these
times, then you need to have an exquisite reason, and I need to know
about this reason now. The final exam will emphasize material not tested
on the midterm.
Late Policy: The class material builds on itself and getting behind is taboo, since it
tends to impede progress on the following assignments via a domino
effect.
That being said, we all have our little meltdowns. I have my own little
meltdowns from time to time, so I expect some of you will too. No need
to email me with extension request, because you get to grant a few of
your own. You get five free "late days" (24-hour periods) that you may
use to extend the due dates of any assignment without penalty. You can
use up to two late days on any particular programming project or
handwritten assignment. Problem sets are always due at 5:00 p.m., and
programming projects are always due at midnight (with a small grace
period allowed for those fumbling with the submission script).
If you submit your work two minutes late, then, yes, I’ll give you the late
day back. If you submit your work 30 minutes late, no, I will not. If you
email me arguing that yes, while your submission was technically more
than two minutes late, it was considerably less than 30 minutes late, you
6
consume a late day for being obnoxious. If you run out of freebies,
you can still turn in your work late, but it’ll cost you: I deduct 5% from
your homework average for each additional late day. This means you
don’t want to go beyond the five free ones.
Our late policy is pretty generous as far as late policies go. Requests for
additional late days are always denied unless the five free ones were
used for the very best of reasons.
Incompletes: You may take an incomplete in the class if and only if you've completed
everything except the last programming project and the final exam.
Unless you need the incomplete because of a personal emergency (death
of a close friend or family member, severe illness requiring you to remain
in bed or in the hospital), your grade will be capped at a B+.
Honor Code: Although you are encouraged to discuss ideas with others, your team’s
work is to be completed independently and should be original. Whenever
you obtain significant help (from other students, the TAs, students in other
classes) you should acknowledge their help in a README file or
somewhere on a written problem set submission, e.g. "The idea to use a
stack to help implement nested scopes came from a discussion with my
RCC, Scott 'Scooter' James." Any assistance that is not given proper
citation will be considered a violation of the Stanford Honor Code.
To be even more specific, you are not allowed to collaborate on the coding
of your programs, nor are you allowed to copy programs or even parts of
programs from other students. The following three activities are among
what I consider to be Honor Code violations in this course:
to make sure the consistently honest feel their honesty is valued and
rewarded. If the thought of copying code has never crossed your mind,
then you needn’t worry, because I’ve never seen a false accusation go any
further than a single email. But if you’re ever tempted to share code—
whether it’s because you don’t understand the material or you do
understand but you’re short on time—then you need to remember this
paragraph is here.