Programming Languages and Compilers

CS 164 @ UC Berkeley, Fall 2025

Schedule

Important Dates

Week # Activities, Class Compiler Implementation Guides Date Notes Homework Due(Due @ 9 PM PT) Drill Due(Due @ 9 PM PT)
0 What is a compiler?
FP in OCaml §1.1–1.5
FP in OCaml §2.1–2.21
OCaml Activity 1 (Pattern Matching)
Thu Aug 28
1 Reflection Activity
OCaml Activity 2 (Types, Custom Types)
Tue Sep 2
Thu Sep 4 Homework 0 Drill 1
2 S-Expressions
Unary Operations
Correctness and Testing
Booleans: Interpreter Edition
Tue Sep 9
Thu Sep 11 Drill 2
3 Booleans: Compiler Edition
Conditionals
Tue Sep 16
Wed Sep 17 Deadline to Drop Courses or Change School of Eng Grading Options
Thu Sep 18 Homework 1 Drill 3
4 Binary Operations
Reflecting on Binary Operations
Naming Expressions (Let): Interpreter Edition
Naming Expressions (Let): Compiler Edition
Tue Sep 23
Thu Sep 25 Drill 4
5 Pairs
Handling Errors
Tue Sep 30
Thu Oct 2 Drill 5
6 Interacting with the Environment (Input)
Memory Understanding Activities
Interacting with the Environment (Output)
Tue Oct 7
Thu Oct 9 Drill 6
7 Functions Tue Oct 14
Thu Oct 16 Drill 7
8 Tail Call Optimization
Parsing
Tue Oct 21
Thu Oct 23 Drill 8
9 Midterm Week
Regular Expressions Activity
Tue Oct 28
Thu Oct 30 No Drill (Midterm Week)
Fri Oct 31 Deadline to Change L&S Grading Options
10 Parsing
First-Class Functions (Function Pointers)
Tue Nov 4
Thu Nov 6 Drill 9
11 First-Class Functions (Lambdas) Tue Nov 11 Veteran's Day (break)
Thu Nov 13 Drill 10
12 Optimization
Optimization (Constant Folding)
Intermediate Representations
Register Allocation Activity
Tue Nov 18
Thu Nov 20 Drill 11
13 Garbage Collection Activity Tue Nov 25
Thu Nov 27 Thanksgiving (break) No Drill (Break)
14 Type Checking Activity
Reflections on Trusting Trust
Tue Dec 2
Thu Dec 4 No Drill (Read Reflections on Trusting Trust)
Fri Dec 5 Deadline to Submit L&S or School of Eng Late Change of Class Schedule
15 RRR Week Tue Dec 9
Thu Dec 11

🚩 indicates a particularly difficult homework! We encourage you to start early!

Sections

  1. Introduction to OCaml
  2. Testing
  3. Interpreters & compilers

Synchronous Events