Instructor:

Steve Zdancewic
    e-mail: cis341 (AT) seas.upenn.edu
    office hours: Thursdays 4:00-5:00pm (and by appointment) Levine 511

Teaching Assistants:

Dmitri Garbuzov
      e-mail: cis341 (AT) seas.upenn.edu
      office hours: Thursdays 1:30-3:30pm

Hongbo (Bob) Zhang
      e-mail: cis341 (AT) seas.upenn.edu
      office hours: Wednesday 3:00-5:00pm

Course information:

  time: TR 10:30-noon
  room: Moore 216
  piazza: cis341

Prerequisites: CIS 121 and CIS 240

Topics:

Reading and References

The following books contain useful course material, and much of the lecture content is derived from them (and other sources). Copies of these books are on reserve in the Penn Engineering Library.

In addition, the following papers and web sites provide supplementary material. Reading selections from these sources will be announced in class.

Projects: The Quaker OAT Compiler

There are a total of 8 projects. Project 0 is an individual project. The rest of the projects are pair-programming projects -- students are strongly encouraged to work in pairs, but may ask permission to work alone on them.

Submit

Here are instructions for getting access to the tools you need to complete course assignments.

Grading Criteria

Check your current scores.

Lecture Slides and Notes

Note: The following schedule is tentative!
Date Topic Slides Handouts
1/8

1/10
Introductions: Compilers, Interpreters, and OCaml lec01.pdf
Makefile foo.c simple.ml
1/15*
OCaml Crash Course
1/17
OCaml Modules / Bootstrapping Compilers / Metaprogramming
Lec02.zip
1/22
X86lite lec03.pdf
Lec03.zip
1/24
X86lite programming / C calling conventions lec04.pdf
Lec04.zip
1/29
Lexing: DFAs and ocamllex lec05.pdf
Lec05.zip
1/31
Parsing I: Context Free Grammars and ocamlyacc lec06.pdf
Lec06.zip
2/5
Parsing II: LL(k) parsing, LR(0) parsing lec07.pdf
Lec07.zip
2/7
Parsing III: LR parsing, ocamlyacc revisited lec08.pdf
Lec08.zip
2/12
Intermediate Representations lec09.pdf
Lec09.zip
2/14
LLVM IR, Contexts and Scoping lec10.pdf
2/19
Inference Rules, Compiling Control Flow lec11.pdf
oat0-defn.pdf scope.ml
2/21
Structured Data lec12.pdf
2/26
Structured Data II, First-class Functions lec13.pdf
struct.c struct.ll
2/28
Midterm Exam
3/5
no class
Spring Break
3/7
no class
Spring Break
3/12
First-class Functions: Interpretation and Typechecking lec14.pdf
fun.ml tc.ml
3/14
Closure Conversion; Types and Subtypes lec15.pdf
fun-lec15.ml cc.ml
3/19
Types II lec16.pdf
3/21
Objects and Dynamic Dispatch lec17.pdf
3/26
Multiple Inheritance, Typechecking Classes lec18.pdf
3/28
Typechecking OAT, Intro to Optimizations lec19.pdf
example.oat example.ll example.s example-opt.s example-hand.s
4/2
Optimizations lec20.pdf
4/4
Dataflow Analysis I lec21.pdf
4/9
Dataflow Analysis II lec22.pdf
4/11
Control Flow Analysis, SSA with Phi nodes lec23.pdf
4/16
Register Allocation, Manual Memory Management lec24.pdf
4/18
Garbage Collection lec25.pdf
4/23
Reference Counts / Oat Programming / Course Wrap-up lec26.pdf
4/25
lecXX.pdf
4/30
Final Exam
*Prof. Zdancewic will be absent.

Many of the slides in these lectures have been adapted (with permission) from course materials by Andrew Myers at Cornell University and Greg Morrisett at Harvard University.

Course Policies

General Project Guidelines

Submission Policy

Academic Integrity

This course will abide by the University's Code of Academic Integrity. In particular, for individual projects and group projects, the following guidelines should be followed:
Last modified: Sun Apr 28 14:51:03 EDT 2013