CS 160 @ UCSB

Translation of Programming Languages

This course is intended to provide understanding of fundamental concepts in compiler design and implementation. Compilers are ubiquitous in the Computer Science field, especially in an era where programmers use many languages and a single language does not dominate.

Catalog Description: Study of the structure of compilers. Topics include: lexical analysis; syntax analysis including LL and LR parsers; type checking; run-time environments; intermediate code generation; and compiler-construction tools.


  • Keith & Joseph will be hosting extra office hours on Thursday, 3/5 from 5-10pm in CSIL.
  • Project 6 is posted and due 3/14 at 23:59:59.
  • We have decided to allow late days to be used on P6. Because we know that some may have used late days based on this restriction, we have allowed all students another late day (there are now 4 total).
  • Project 5 is posted and due 3/5 at 23:59:59.
  • 1 side of handwritten notes is allowed for the exam. One sheet of information will also be provided.
  • Project 4 is posted and due 2/19.
  • The midterm exam will be in class on 2/12. Professor Sherwood is hosting a review on 2/10 at 8pm in Phelps 3526.
  • Practice problems for the midterm exam are posted. See the problems section.
  • Code buddies are now allowed! See the course details section for more information.
  • Project 3 is posted and due 2/5.
  • Class is cancelled on Thursday, January 22nd; use the extra time to work on your project!
  • Project 2 is posted and due 1/22.
  • The Resources page contains interesting papers and websites mentioned in lectures.
  • Keith's office hours for Wednesday 1/7 are rescheduled to Thursday 1/8 (same time and place).
  • Project 1 is posted and due 1/8.


As voted on in lecture, we will use Piazza for the course group this quarter. We will post important announcements and answer questions there, and it is important that you join as soon as possible. You cannot receive any points for Project 1 unless you join the course on Piazza.

You can find the course on Piazza at: https://piazza.com/ucsb/winter2015/cs160/home.

Practice Problems

The instructional staff have created some problem sets which you can use as part of your preparation for the midterm exam. You can find them below:


The important dates for the course are:


If you have any questions that are not specific to your code for your project solutions, please post them on Piazza so that the whole class has the opportunity to hear the answer.

Questions that include your specific solution should be CC'ed to both TAs, so that you can get a response as quickly as possible.

ProfessorTim Sherwood
Office:HFH 1119
Hours:Tuesday 12:15-1:30pm
TAKeith Avery
Office:Trailer 936, 103-104
Hours:Wednesday and Friday 4-6pm
TAJoseph McMahan
Office:Trailer 936, 103-104
Hours:Thursday 3-5pm

Course Details

Lectures are Tuesday and Thursday from 11am-12:15pm in GIRV 2128.

Discussion sections are Friday at 2pm in PHELP 1440 and 3pm in PHELP 1444.

Attendance to lectures and discussion sections is important and an immensely valuable resource to succeed in the course.


The coursework will be 6 projects, 1 midterm examination, and quizzes (most probably two of these). This is subject to change infrequently.


The grade breakdown will be 40% exams/quizzes and 60% projects.


The textbook for the course is Engineering a Compiler, 2nd Edition (9780120884780) by Keith Cooper and Linda Torczon. You can find it at the bookstore or on Amazon.

Late Policy

Each student will have 4 "slip days" to use over the quarter. Using a slip day allows one project to be turned in up to 24 hours after the deadline. Slip days are automatically applied by the TAs upon late assignment submission. Slip days can only be used in 24 hour increments: turning in an assignment 30 minutes late uses a slip day. If all slip days are expended, a late assignment will not be accepted.

Academic Honesty

Each student is responsible for their own work, and is expected to complete the assignment without collaborating with anyone else. High-level discussion of the concepts without anything specific to an assignment is OK. Talking specifically about the solution to an assignment or sharing code is not OK, with the only exception being your official code buddy. Violation of this policy can lead to an F on the assignment or, in extreme cases, an F for the entire course. When in doubt, refer questions to the professor or a TA. For more information on code buddies, see below.

Code Buddies

What is a code buddy? A code buddy is kind of like a partner, but different. You still must write your own solution but you are allowed to view and discuss your code buddy's code/solution. You still may not share with anyone that is not your code buddy. Your code buddy can be any other student, they do not have to be in the same section. If you do work with a code buddy, their name absolutely must appear in your README file and specify that they are your code buddy.