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 will be hosting extra office hours on Wednesday, December 17th from 4-8pm in CSIL.
  • The final exam is optional. If you want to take it, you must email Keith and Lawton by Monday at 12.
  • Project 6 has been posted, due December 18th. No slip days on this project.
  • Keith will be hosting extra office hours on Tuesday 12/2 from 8:00pm onwards in CSIL.
  • Discussion slides for Project 5 are posted on the Discussion Section page.
  • Keith is hosting a session for help with Project 3 and 4 Wednesday 11/25 from 2-4pm in the TA Office.
  • Project 5 has been posted, due December 2nd.
  • Keith will be hosting extra office hours on Thursday 11/20 from 6:30pm onwards in CSIL.
  • For the midterm, you are allowed one sheet of notes, handwritten only, front and back sides.
  • Practice Problem Solutions have been posted.
  • Project 4 has been posted, due November 20th.
  • Keith's office hours on Thursday, November 6th will be cancelled.
  • Keith will be hosting extra office hours on November 4th from 8:30pm in CSIL.
  • Project 3 has been posted, due November 4th.
  • Midterm exam will be held on November 13th.
  • Professor Hardekopf has added extra office hours on Friday from 2-3pm in his office, HFH 1119.
  • Project 2 has been posted, due October 23rd.
  • Project 1 has been posted, due October 9th.
  • Please complete the CS Upper-Division Advising Survey.
  • There will be no sections held on Thursday, October 2nd. Lecture will be held at the scheduled time.

Google Group

We have set up a Google Group for the course which will act as the course mailing list and a place to ask any course questions. We will post course updates and announcements there, and we request that you join as soon as possible (and joining will be a requirement for the first project).

You can find it online at https://groups.google.com/d/forum/cs160-f14-ucsb and you can send an email to the group with the email address cs160-f14-ucsb@googlegroups.com.


Professor Hardekopf has created handouts to describe various code generation and object programming features. Please bring these handouts to lectures so that you may follow along.

Practice Problems

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


The important dates for the course are:

  • 10/09: Project 1 Due
  • 10/23: Project 2 Due
  • 11/04: Project 3 Due
  • 11/13: Midterm Exam
  • 11/20: Project 4 Due
  • 12/02: Project 5 Due
  • 12/16: Optional Final Exam, 4-7pm
  • 12/18: Project 6 Due


If you have any questions that are not specific to your code for your project solutions, please post them on the Google Group 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.

ProfessorBen Hardekopf
Hours:Immediately Following Lecture
Hours:Friday 2-3pm in HFH 1109
TAKeith Avery
Office:Trailer 936, 103-104
Hours:Wednesday and Thursday 4-6pm
TALawton Nichols
Office:Trailer 936, 103-104
Hours:Wednesday 11am-12pm

Course Details

Lectures are Tuesday and Thursday from 2-3:15pm in PHELPS 3515.

Discussion sections are Thursday at 9am in GIRV 2108 and 10am in BSIF 1217.


The coursework will be 6 projects, 1 midterm examination, and 1 final examination.


The grade breakdown will be 40% projects, 20% midterm, and 40% final.


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 3 "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. Slip days may not be used on the last project of the quarter.

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. 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.