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.


  • Project 6 is posted and it is due December 10th.
  • We posted two problem sets for the final midterm solutions were posted to piazza.
  • Project 5 is posted and it is due November 23rd.
  • Project 4 is posted and it is due November 9th.
  • Here is a handout for the LL and LR parsing algorithms that we discussed. This handout will be given with the midterm.
  • Project 3 is posted and it is due October 22nd.
  • Midterm will on October 27th, Tuesday, in class.
  • Project 2 is posted and it is due October 13th.
  • Project 1 is posted and it is due October 1st.
  • September 24: First day of classes!


We will use Piazza for the course 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/fall2015/cs160.

Practice Problems

You can use the problems below as part of your preparation for the final exam.

You can use the problems below as part of your preparation for the midterm exam.


The important dates for the course are:

Reading Assignments

  • Weeks 9 and 10: Read Sections 5.3, 5.4, 5.5, 5.6 and Chapter 7 from the textbook
  • Week 8: Read Chapter 6 from the textbook
  • Week 7: Read Chapter 4 from the textbook
  • Week 6: Read sections 5.1 and 5.2 from the textbook
  • Week 5: Read sections 3.5, 3.6, 3.7 from the textbook
  • Week 4: Read section 3.4 from the textbook
  • Week 3: Read section 3.3 from the textbook
  • Week 2: Read Chapter 2 and sections 3.1 and 3.2 from the textbook
  • Week 1: Read Chapter 1 from the textbook


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.

ProfessorTevfik Bultan
Office:HFH 2123
Hours:Mondays 1:00 - 2:00PM, Wednesdays 11:00AM - 12:00PM
TAMehmet Emre
Office:Trailer 936, 103-104
Hours:Tuesday & Thursday 11:00 AM - 12:00 PM
TAMiroslav Gavrilov
Office:Trailer 936, 103-104
Hours:Monday & Wednesday 1:00 PM - 2:00 PM

Course Details

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

Discussion sections are Monday at 4pm in 387 104 and 5pm in GIRV 2116.

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


The coursework will be reading assignments from the textbook, 6 projects, 1 midterm exam, and 1 final exam.


The grade breakdown will be 25% midterm, 25% final and 50% projects. For the project, the grade breakdown is as follows: 5% Project 1, 15% Project 2, 15% Project 3, 20% Project 4, 22.5% Project 5, 22.5% Project 6.


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