Reminders
Course Calendar ICS
Upcoming Deadlines
Recent Discussions
Thread title |
|---|
|
Announcements
Week 10 Lectures Posted
Final Posted
link in the "Upcoming Quizzes" box to the right of this announcement or
find it on the "Quizzes" page.
You may only take this exam once. You will have 4 hours from
when you click the "Start Quiz Now" button to submit your answers.
The final exam is due Sunday before midnight.
Any exam started by this time will receive full credit. Exams started
after this time will receive NO credit. Make sure to do the appropriate
math if you are in a different time zone.
The exam may cover material from the entire course, but more weight will
be given to material that came after the midterm.
Correct answers and explanations will be made available after the exam
period has finished. Until then, please avoid discussing the questions
(or answers!) on the forum. (Posts seeking clarification on the intent of
a question are of course permitted.)
Final Survey
Week 9 Lectures Posted
Fourth (and last!) Programming Assignment Available
Week 8 Lectures Posted
Week 7 Lectures Posted
Third Assignment Available
Week 6 Lectures Posted
DeduceIt Issues
Many students have pointed out that they have mysterious hangs when using DeduceIt, which obviously makes it a frustrating and rather uneducational experience to use. Thanks to some suggestions from students in the class I've been able to reproduce the problems in my own sessions---and have realized that this is not something I want to try to fix in real time during a class offering.
So, my apologies for the DeduceIt debacle. I regret wasting your time with software that isn't in a usable state. I'm canceling the remaining DeduceIt assignments (4-6); they won't appear. Since the first three assignments have already been out and some people have done them and others haven't, I'm extending those deadlines until the end of the class.
I realize this is not a perfect solution. Please keep in mind a few points that I think will address most concerns people may have:
First, you don't have to do any of the DeduceIt assignments. They are all extra credit (and always have been).
Second, you will get credit for any assignments you have already done. And to be fair, everyone who hasn't done the assignments posted so far can still do them until the end of the class with no late penalty.
Third, if you really want to do the remaining DeduceIt assignments, you can still go to deduceit.stanford.edu and do them. The system is still there and it is possible to work around the current issues if you really, really want to use it. But it is not going to be part of the rest of the course.
Again, apologies for the problems and the mid-course correction.
Alex
Week 5 Lectures Posted
Upcoming Midterm
will mark the course's midpoint, which means it is time for a midterm!
Here's how the midterm will work. It is a quiz, similar to the ones
you have already seen. It differs from normal quizzes in two important ways:
* You can only take the midterm once.
* The midterm is timed; you will have 2.5 hours to complete it. This
means that once you press the "start quiz" button, you must submit
your answers within 2.5 hours to receive credit for the midterm.
We've timed the quiz and we believe that 2.5 hours should be a very
conservative amount of time. We're making the time limit that long to
help deal with any issues people may have with connectivity, but it is
definitely a good idea to be in a place where you will have a decent
internet connection while you take the midterm, and you should allow
yourself the full 2.5 hours if you can. We think the midterm is
similar in length to the quizzes you have already done; the level of
questions is similar and there are about the same number of questions
as in a weekly quiz.
The midterm will cover the material through the first four weeks of
the class; this week's lectures (week 5) are NOT on the midterm.
Also, because of the midterm, there is no regular quiz nor any
DeduceIt problems this week, but keep in mind that some quizzes and
DeduceIt problems from previous weeks are still open if you haven't
done them yet.
Second Programmng Assignment Available
Week 4 Lectures Posted
Sample Bison Parser
Compilation instructions are in the comments at the top of sample.y. Unfortunately, we don't have a JCup version (sorry!).
Week 3 Lectures Posted
Example flex and jlex files
The particular language is not so important here as the structure of the lexical analyzer. Both flex and jlex files consist of three parts: a declarations section where you can put C/Java declarations you want to have available, a rules section where you can put regular expressions that will match parts of the input and then an action (in the form of C or Java code) that will fire when that pattern matches, and finally a code section where you can put other functionality (e.g., a main function).
Your lexical analyzer will of course be very different from this one - this example is not a partial solution to the assignment! But the example should help you understand how these tools work. You can also find much more information in the flex and jlex reference manuals.
Week 2 Lectures Posted
and finite automata have been posted.
First Programming Assignment is Available
Welcome!
The course will last eleven weeks. Starting with the second week, we'll begin having short in-lecture quizzes to help you master the material, as well as a weekly multiple-choice quiz. There will also be weekly homeworks using DeduceIt, a system for delivering free-form exercises in the form of derivations or proofs. Though completely optional, these experimental DeduceIt exercises aim to strengthen your understanding of the materials. We hope these assignments will help you learn the material at a level in a way that was previously impossible without one-on-one instruction. Halfway through the course there will be a midterm and at the end we'll have a final, both of which will be structured as longer, timed on-line quizzes.
No compiler course would be complete without the opportunity to have the experience of implementing a full compiler for at least a simplified programming language. We realize that many students will have claims on their time besides writing a substantial software system for an on-line class, but we will have a series of optional assignments that, if completed, will lead you to build a full compiler for COOL, the Classroom Object Oriented Language.
At the end of the class we'll issue certificates of accomplishment for those who finished the coursework, with an extra acknowledgment for those who have done the compiler project.
We hope you enjoy the course!
Cool Examples
- README
- arith.cl
- atoi.cl
- atoi_test.cl
- book_list.cl
- cells.cl
- complex.cl
- cool.cl
- g1.graph
- graph.cl
- hairyscary.cl
- hello_world.cl
- io.cl
- lam.cl
- life.cl
- list.cl
- new_complex.cl
- palindrome.cl
- primes.cl
- sort_list.cl
Descriptions of most of the programs are included in the README as well as in the comments at the top of each file.
Virtual Machine for Programming Assignments Available
Any questions or suggestions you have that aren't answered by one of the other
resources provided should be posted here.