Main Page

From CS164-Sp07

Jump to: navigation, search

Contents

The CS164 Spring 07 Page

Announcements

  • May 15: The grades for the final exam have been entered only now, due to (presumably) a technical problem. Apologies for the delay. The stats are here.
  • May 15: Project 5 grades have been entered into glookup. Please let us know (soon!) if your grade is missing. We will not be doing regrades for Project 5.
  • May 14: Solutions to the final exam have been posted.
  • May 14: The grades from the final exam will be posted tonight. Check glookup around 8pm; we hope to have the grades done by then. If you want to check your answers, you can see your graded final tomorrow (Tuesday) between 9am and 11am in Prof. Bodik's office (773 Soda).
  • May 8: Final Exam announcement: You will be allowed a two-sided, handwritten cheat-sheet on the exam. To clarify, the notes must be hand-written and can fill up both sides of an 8.5 x 11 piece of paper.
  • May 8: Project 4 grade logs have been emailed to one member of each group and grades have been entered into glookup. Please notify course staff immediately if you have not received a grade or a log. Re-grade requests must be emailed no later than 11:59:59 pm on Tuesday, May 15. Please include your patch and the logins of your team members when submitting.
  • May 8: A solution to HW3, Problem 3 has been posted to assist in preparation for the final.
  • May 8: Instruction ends today. James and Jason will not be holding their office hours Wednesday and Thursday.
  • May 7: Project 1 grade logs have been emailed and updated grades have been entered into glookup. Please notify course staff immediately if you have not received a log. Re-grade requests must be emailed no later than 11:59:59 pm on Monday, May 14. Please include your patch when submitting.
  • May 6: We have assigned tentative weights to the assignments in glookup. Your point totals will now more accurately reflect your course performance. (Note: project regrade scores have been given weight 0. If you have a regraded project, you will need to manually compute your actual project score.)
  • May 6: We have mailed the grading logs for Homework 1. Many students missed points because their Stackulators had the wrong operand ordering for non-commutative operators. Because of a lack of grader resources and the low weight of the homework, we will not be accepting regrade requests. If you are unhappy with your score on the homework, please remember that it is not a significant portion of your course grade.
  • May 1: Solutions to the midterms have been made available in electronic form in order to assist with preparation for the final exam on May 12. Download Midterm 1 Solutions and Midterm 2 Solutions
  • May 1: Project 3, Stage 2 grade logs have been emailed to one member of each group and grades have been entered into glookup. Please notify course staff immediately if you have not received a grade or a log. Re-grade requests must be emailed no later than 11:59:59 pm on Tuesday, May 8. Please include your patch and the logins of your team members when submitting.
  • April 30: Project 3, Stage 1 grade logs have been emailed to one member of each group and grades have been entered into glookup. Please notify course staff immediately if you have not received a grade or a log. Re-grade requests must be emailed no later than 11:59:59 pm on Monday, May 7. Please include your patch and the logins of your team members when submitting.
  • April 27: Project 5 is assigned; due May 8th. Please start early.
  • April 23: The Project 4 deadline has been extended to Tuesday, April 24 at 11:59:59pm. Contest entries will be due by Wednesday, April 25 at 11:59:59pm.
  • April 23: Due to a scheduling conflict, Jason's office hours are canceled today. Please send him an email to schedule an appointment if you had planned to attend. Alternatively, send an email to the staff at cs164 [at] eecs.berkeley.edu
  • April 21: The Project 4 remote tester is now running. However, you will need to flatten your test/ directory. All test files should be directly under the test/ root, not in the test/correct/ and test/error/ directories. Sorry for the inconvenience.
  • April 18: A second typo was recently discovered in the solutions to Midterm 1. The answer to problem 3, part 1 should read, "B and C may have produced the parse result shown"
  • April 16: We have posted the staff solution to Project 3 in the staff repository, in the folder proj3. You are welcome to use it for Project 4.
  • April 16: You can discuss plans for improving performance in Project 4 here.
  • April 16: Project 2 grade reports were originally mailed about a week ago. One email per submission was sent (one email for regular teams and two emails for coalition teams). A small number of teams reported that these emails were not received, but each team who reported a missing log should have had theirs manually sent by now. Patches for regrades should be sent to cs164 [at] cory.eecs.berkeley.edu by 11:59:59 pm on Friday, April 20. Teams who have had issues receiving email at their instructional accounts might want to try using the webmail interface.
  • April 16: A bug has been noted in the way Project 2 grade reports were generated. The ref_output and stu_output have been switched in the logs. This may have given some the impression that their tests were actually correct while the oracle was failing.
  • April 14: Project 4 is posted. Due Monday, 23 April at 11:59:59 pm.
  • April 13: The deadline for submitting the parser for Project 3 contest has been moved to Saturday 11:59pm. The rationale is that Saturday is the last day when slip days can submit Project 3, and they should be able to participate in the contest.
  • April 13: Midterm 2 stats are now posted. The paper exams will be returned in discussion next week.
  • April 10: We are now accepting test suites for the Project 3, Stage 2 grader. If you have a good test suite, please submit it to us by creating a tag called grading-proj3/, containing your grammar and test cases. You may submit one test suite with up to three test cases. The test cases can be either for JavaScript or another grammar. We prefer short test cases that your parser can parse in under 10 seconds on the instructional machines.
  • April 9: Enter the parser contest! Submit an entry by creating the tag tags/contest-proj3. You have until 11:59:59 Friday (the 13th) to create the tag. It should contain the same files in the same layout as your Project 3 Stage 2 submissions.
  • April 9: We will be using the JavaScript input 1+1+...+1; (40 1's with 39 +'s) to ensure your parsers run in a reasonable amount of time. The staff solution, which uses the CYK algorithm and is not particularly optimized, parses this input in about 20 seconds on quasar. If your solution takes roughly more than 10x this time, you may have a serious performance bug in your parser, such as using an exponential algorithm (you only need polynomial-time algorithms in this project). Please optimize the performance and/or look for your grave inefficiencies, and ask for help if you're having trouble.
  • April 9: We are still accepting test suites for the Project 3, Stage 1 grader. If you have a good test suite, please submit it to us by creating a tag called grading-proj3.1/, containing your grammar and test cases. You may submit one test suite with up to three test cases.
  • April 9: Per popular request, the remote tester is now using the staff JavaScript grammar when parsing your javascript_* test cases. That is, when running your test cases through the oracle, we replace your javascript.grm file with ours. The effect of this is that you can test your javascript parser against our javascript parser. This change will make it easier to compare your ASTs with ours. Please check your new test results.
  • April 8: The solution to HW4 is now posted.
  • April 7: The solution to HW3, problem 2 is now posted.
  • April 6: As requested in discussion, an optimistic coloring example where we consider a variable for spilling that we do not actually need to spill after all.
  • April 6: Homework 4 is now available to help you prepare for the midterm. Though it will not be collected, we strongly encourage you to work through it. Solutions will be released late on Saturday.
  • April 6: Midterm Reminder. The second midterm will be held Monday 4/9. You are allowed one side of one page of hand-written notes. The exam will cover material from syntax-directed translation (lecture 9) through register allocation (lecture 16). As usual, everything covered in lecture, discussion, or homework is fair game.
  • April 5: The deadline for Project 3 has been extended to Wed, April 11, 11:59pm. Note that the midterm exam is given on Mon, April 9.
  • April 4: A smart, hardworking student (GPA=3.9) is looking for a regular (non-coalition) partner for Projects 4 and 5. If you are interested in working with him, please contact the staff.
  • April 2: A local games company is looking for a full-time compiler engineer.
  • April 2: The deadline for Project 3 has been postponed till Thursday, April 5.
  • Mar 23: The solution to HW3, problem 1 is now posted. The solution may help you with project 3, Stage 2. We checked the solution carefully but let us know if you spot any mistakes.
  • Mar 20: The staff JavaScript grammar is now available in the staff repository at proj3/javascript.grm. The grammar may have some bugs. You still need to test it. You are not allowed to use the grammar for Stage 1. We will check for plagiarism.
  • Mar 20: Students asked for help with performance problems in their CYK implementations. (1) The first you may want to try is psyco, a Python specializer. Psyco may speedup your code, but it may also slow it down. Give it a try. Here is a sample Python program showing how to enable psycho. (2) Even if Psyco helps you, you will want to profile your code to discover performance bottlenecks an choose better data structures. The description of the Python profiler is here. They are simple to use and their output is informative.
  • Mar 19: The midterm has been postponed to April 9 (Monday) to avoid the conflict with Project 3 due date. Let us know if this causes a problem.
  • Mar 19: We have extended the due date for Project 3, Stage 1. You have until Wednesday, March 21 at 11:59:59PM, no later, to submit a final solution. We will take no late days for these submissions. If you already submitted your solution and fixed a bug since the submission, you can submit the improved version.
  • Mar 19: Students asked about computing their current standing in class. Run glookup to obtain your Total grade (for the assignments graded so far). Then run glookup -s Total to see the class-wide distribution of the Total grades.
  • Mar 16: Project 3, Stage 2 is posted. Due Wednesday, 4 April at 11:59:59 pm.
  • Mar 16: There was a problem emailing out the logs; we expect to get them out soon. We'll announce when this happens.
  • Mar 16: Project 1 grades have been entered, and test logs have been emailed out. If you there is a problem with your grade and your test logs, or if you submitted a solution but have not received a grade, please email the staff describing the situation as soon as possible.
  • Mar 13: Homework 3 is postponed till Monday Mar 19. The homework is due at the beginning of class.
  • Mar 13: Project 3, Stage 1 has been postponed till Thursday Mar 15, 11:59pm.
  • Mar 8: There is a typo in the midterm solutions. The regular expression for problem 2, language 1 should read:
(00 | 11)* ((00 | 11)*  (01 | 10)  (00 | 11)*  (01 | 10))* (00 | 11)*
  • Mar 8: Discussion 7 notes have been posted.
  • Mar 7: Homework 3 has just been posted. Due in a week.
  • Mar 5: We have updated the Project 3 starter kit. The change has been made in the staff repository. Please be sure to clear your browser cache before downloading these updated files (Ctrl-Shift-Delete). Or better, get them from the staff repository.
  • Mar 3: Project 3 is posted. Due Tuesday, 13 March at 11:59:59 pm.
  • Feb 28: Midterm stats are now posted.
  • Feb 27: We would like students to submit feedback on how to improve the course. We started by creating pages where you can leave feedback on the projects. You can also directly edit the project handouts. You can find the pages linked below under Projects. Thanks to those who already sent their feedback. Also, you can leave a feedback unrelated to projects here.
  • Feb 27: Reservoir Labs is looking for an entry-level compiler engineer. They work on a streaming compiler and a verification system.
  • Feb 25: Midterm Reminder. The first midterm will be held tomorrow, Monday 2/26. You are allowed one side of one page of handwritten notes. All material covered so far in all lectures, discussions, and assignments is fair game for the exam.
  • Feb 25: Discussion 6 notes have been updated. In particular, some missing edges were added to the diagram of the Earley example.
  • Feb 24: All answers to Hw2 have now been posted.
  • Feb 23: Midterm announcement. You will be allowed a one-page handwritten cheat sheet on the exam. To clarify, the sheet must be one side of a page, and it must be hand-written. (Apologies for announcing this late. I was under the impression that this was already on the wiki page.)
  • Feb 22: You can now view class-wide code-coverage statistics.
  • Feb 21: We have made a change to the specification of string literals in Project 2. Please see the updated handout.
  • Feb 21: If you left your cell phone in 306 Soda, claim it at the Soda Hall reception (3rd floor).
  • Feb 20: The remote tester is now running. If you have submitted, you should see new test results in your repository every 4 hours or so. Submit often! The remote tester can only help you; we're not grading the results.
  • Feb 19: The Hw2 is now complete. Also, a clarification for Problem 1 has been added (see the red sentence).
  • Feb 19: The Remote Testing View plugin for Eclipse has been released. We'll announce when the remote grader starts running.
  • Feb 18: Hw2 has been assigned.
  • Feb 16: Because of the holiday, Jason will not be holding office hours on Monday, February 19.
  • Feb 14: Project 2 is posted. Due Thursday, 22 February at 11:59:59 pm.
  • Feb 14: Due Friday 2/17: Come up with a creative name for your team and register your team. You will receive a confirmation e-mail within a day or so after registering. As the registration page requests, please enter your login, not your real name.
  • Feb 14: If you do not have someone to work with on Project 2, please add your name to the Orphans List. For those who have chosen partners, we will soon provide a form to submit this information.
  • Feb 14: As announced in lecture today, you should submit your test cases along with your code for Project 1.
  • Feb 12: We have updated the Project 1 starter kit and testing kit. Please be sure to clear your browser cache before downloading these updated files (Ctrl-Shift-Delete).
  • Feb 11: A Project 1 testing file has been updated. See the project page to download the latest version.
  • Feb 11: A student asked me to post slides before the lecture so that students can "prefetch" the new material. Unfortunately, many lectures this semester are new, and are finished just before the lecture. Still, to provide some background, I have posted some relevant material (old lectures on same topic or an external link). Find it on the Lectures page.
  • Feb 02: Project 1 has been assigned. Due Wed Feb 14.
  • Jan 30: Ras' office hours on Feb 1 (Thu) are canceled. Please schedule an alternative appointment.
  • Jan 29: Late Submission Policy has just been posted.
  • Jan 25: You can now submit Hw1. Run submit hw1.
  • Jan 25: You now must have a wiki account to edit pages. Please feel free to use any moniker you wish -- you don't need to use your course login or real name.
  • Jan 22: Some significant changes have been made to the notes for Discussion 1.
  • Jan 17: Hw1 has been assigned. Due Fri Jan 26.
  • Jan 17: Discussion sections are going to meet during the first week. The sections will introduce you to JavaScript, a language you will need to work on the project.
  • Jan 16: Welcome to CS164, Spring 2007! Tomorrow is the first lecture. Homework 1 will be assigned. See you in class.

Lectures

The lectures page contains slides, project handouts, homework handouts and solutions.

Discussions

The discussions page contains selected notes from the discussion sections.

Homeworks

Projects

Next to each project is a link to a student-editable page. use this page to correct or extend the handout. You can also just leave a suggestion for improvement. We are also interested in suggestions on how to improve the lectures so that they better prepare you for the project.

Exams and Grading

The first midterm will be held on 2/26. The second midterm will be held on 4/9.

The final exam will be held in 10 Evans on SATURDAY, MAY 12, 2007 12:30-3:30P.

The final grade will be computed according to the EECS guidelines. The contribution of individual course components are as follows:

Staff

To increase your chances of getting a timely response, it is suggested you post questions to the newsgroup ucb.class.cs164 (accessing the newsgroup). If you have a question you would rather email, address it to cs164 [at] cory.eecs.berkeley.edu.


  • Ras Bodik, instructor, bodik@cs.berkeley.edu, office hours: Monday 2:30-3:30, Wednesday 9:30-10:30
  • Chris Jones, courseware developer
  • James Hamlin, TA, cs164-tc [at] imail.eecs.berkeley.edu, office hours: Tuesday 3:00-4:00, Thursday 1:00-2:00
  • Jason Sanders, TA, cs164-ta [at] imail.eecs.berkeley.edu, office hours: Monday 4:30-5:30 , Wednesday 11:00-noon


Note: Jason and James hold office hours in 511 Soda.

Textbooks

No textbook is required. The following books are recommended:

Students, are there any other books you would like to recommend? If yes, enter them here.

The Project

We are going to develop an interpreter for JavaScript in JavaScript Python. In the process, we will write our own lexer and parser generator, to practice development and implementation of small languages useful in software development; the parser generator will be small but powerful enough to quickly develop a parser for JavaScript. We will then design and implement language extensions to JavaScript, based on our own critique of the language. If time permits, we will implement some static analysis for JavaScript, with the goal of identifying bugs and enabling compilation of of JavaScript.

Tools

We assume that you use Firefox 2.0. Browser incompatibilities are a major issue that is beyond the scope of this course. Therefore, while you can in principle use other browsers to develop your code, don't do it since we will grade it in Firefox.

You will find the Firebug debugger very useful (in fact, some assignments will assume that you have it installed). The current stable version will suffice; however, the more adventurous among you may wish to try the latest beta, which has a few more features than the stable version.

You are free to use any code editor you choose. We particularly recommend Eclipse, augmented with the JSEclipse plugin (setup guide). You might instead prefer to use emacs (setup guide), which can switch between multiple editing "modes" within the same file (for example, between HTML and JavaScript).

We'll be using this wiki for the course content. This has advantages for you as well as us. Want to get e-mail notification when we make a new announcement? Click the "watch" link at the top of this page. Want to see the edits we've made to an assignment? Click the "history" link at the top of that assignment's page.


Academic Honesty

It is expected that all students understand University policies on academic honesty. Cheating on assignments or exams is very serious and will not be tolerated. In this course, we will use a variation of the standard policy. In this class, it is permissible to talk to other students about assignments, to discuss particular solutions, and even to receive partial solutions (including code) from others. However, all assistance and cooperation must be cited in the assignment write-up. If you receive any assistance from anyone other than course staff or your partner on an assignment, you must acknowledge in the write-up for that assignment who gave assistance and what assistance was given. Grading will take into account how much help a student received from others (the more help, the lower the grade). Failure to acknowledge sources is plagiarism and will be treated as a serious breach of academic honesty. No assistance may be given or received on exams.

In order to participate in the course, you must read the departmental academic honesty policy: link.

You should know that fairly sophisticated plagiarism detection software will be used on the programming assignments.


Late Submission Policy

Each student is allocated three free late days (per semester) that can be used on any programming assignment. For example, you can submit the first programming assignment three days late (not a good idea, see below), or you can submit each of the last three programming assignments one date late.

The free late days are designed to help you deal with family emergencies, so we advice that you don't waste them on early programming assignments. Save them for the later, more difficult project assignment. No additional free late days will be awarded.

When a team decides to use a late day, both members lose a late day. It is possible that at some point, members of a team have each a different number of free late days left. For example, one team member has two days left, and the other has zero. In this case, the team has one free day left (computed as average of the two late days quotas, rounded up).

After the free late days are exhausted, there is a 10% penalty for each day, or partial day, that a programming assignment is late.

Late written assignments will receive no credit.


Regrade Policy

Soon after each project is due, we will mail a report of the tests you passed and failed. If you feel you failed a lot of tests because of a silly error -- for example, accidentally leaving in debugging statements -- you may submit a regrade request up to one week after the test results are mailed.

Your regrade request should be e-mailed to cs164@imail. The e-mail must include a patch file, created against your latest submission.

Regrade requests incur a penalty. If your original submission received X points, and your patched submission received Y points, you can only recover a fraction r of the point difference (Y - X). The fraction is computed according to the following formula:

r (p) = .5 + .4 tanh (2.8 - p.65)

The quantity p is computed by p = 100 * Sp / Ls, where Ls is the number of lines in the staff solution, and Sp is the "size" of your patch.

Let's consider an example. Suppose that you passed 10 out of 100 tests, for a score of 10. You failed most of the tests because you had accidentally left in 5 lines of code that printed debugging information. Your patch file has size 4 (+0/-4 lines). Your patched submission then passes 90 tests, for a score of 90. Your score on the project will now be 10 + r * (90 - 10). For this project, the staff solution was 300 lines of code. Therefore, the quantity p above would be 1.67. Then r (1.67) ~= .85, so your final project score would be 10 + .85 * (90-10) ~= 78.

When calculating the number of points you can receive from a regrade, you can approximate the number of lines in the staff solution by the number of lines in your own solution.

Where to Get Help

The newsgroup for this class is: ucb.class.cs164 (accessing the newsgroup). This should be your primary channel for asking questions. For more urgent matters, you can send email to cs164 [at] cory.eecs.berkeley.edu, or directly to Professor Bodik or one of the TAs.


Javascript/DOM

Firebug

Python

Subversion

Personal tools