CMPSC 160 - Translation of Programming Languages - Winter 2012



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.
Prerequisites: CMPSC 130A, CMPSC 138

Instructor: Tevfik Bultan, E-mail: bultan@cs.ucsb.edu, Office Hours: Tuesdays & Thursdays 11:00-12:00PM, HFH 2123
Teaching Assistants:
Ivan Bocic, E-mail: bo@cs.ucsb.edu, Office Hours: Monday & Wednesday 1:00-2:00PM, Phelps 1413

Abdulbaki Aydin, E-mail: baki@cs.ucsb.edu, Office Hours: Monday & Wednesday 2:00-3:00PM, Phelps 1413


Class homepage: http://www.cs.ucsb.edu/~cs160/

Class mailing list: cs160@cs.ucsb.edu
Messages sent to this address is forwarded to the Instructor the TAs and ALL the students in the class. For questions you do not want to share with the rest of the class send an e-mail to BOTH the TAs and the Instructor.
Class Times: Tuesday/Thursday 12:30-1:45   Location: PHELP 1401
Discussion Times:
Section 1: Friday 11:00-11:50   Location: GIRV 1116
Section 2: Friday 2:00-2:50   Location: PHELP 2510

Course Work: The course requirements include five projects, a midterm and a final exam. The projects and exams are individual efforts. The final grade will be determined according to the following weight 50% projects and 50% exams (25% midterm, 25% final).

There will be five projects: 1) Calculator (10%), 2) Lexical and Syntax Analysis (20%), 3) Abstract Syntax Tree (20%), 4) Semantic Analysis (25%), 5) Code Generation (25%). The first project is an independent project for a parser for a simple expression calculator. The remaining four projects build on each other and together form a compiler for a simple programming language.


Final Exam will be at PHELP 1401 on Monday, March 19th, 12:00-3:00PM

Midterm Exam will be in Class on Tuesday, February 14

Midterm will include all the topics covered in Lectures 1 to 9, and the first three chapters of the book. The midterm will be closed book and notes. The handout for the parsing algorithms (available at the page for the lecture notes) will be given with the midterm.

Project Assignments


Practice Problems

These are practice problems to help you prepare for the exams. You do not have to turn them in but it would be good for you to solve them while studying for the exams.

Lecture and Discussion Notes and Reading Assignments


Textbook: Engineering a Compiler, Keith Cooper and Linda Torczon, Morgan Kaufmann, 2011. ISBN: 978-0-12-088478-0

Policy on Cheating and Plagiarism

You are allowed to discuss the project assignments with your classmates, but you cannot look at or copy someone else's code. Any copying of code is considered cheating. Cheating will result in a 0 grade for the assignment, and depending on severity, can result in a failing grade or possible administrative action by UCSB.