Skip to main content

Lecture Notes

The notes linked below are required reading, but they are not a substitute for attending lecture and recitation. The lectures and recitation sections are tightly coupled: Lectures will assume knowledge from previous sections, and vice-versa. These notes should be read sequentially (Monday's section, Tuesday's lecture, Wednesday's section, Thursday's lecture, etc.).

Lecture topics and assignment due dates are subject to change.

Introduction to Functional Programming
8/27 Lecture 1 Course overview and background on ML [Notes] [Code]
8/31 PS1 issued [PS1]
8/31 Recitation 1 Introduction to OCaml syntax [Notes]
9/1 OCaml demo, 7:30–9pm, Upson B7 Lab
9/1 Lecture 2 OCaml syntax and evaluation [Notes] [Code]
9/2 OCaml demo, 7:30–9pm, Upson B7 Lab
9/2 Recitation 2 Tuples, records, and pattern matching [Notes] [Code]
9/3 Lecture 3 Scope, currying and lists [Notes] [Code]
9/7 Recitation 3 Higher-order functions, anonymous functions, currying, side effects, printing, exceptions [Notes]
9/8 PS1 due, PS2 issued [PS1] [PS2]
9/8 Lecture 4 Variants, recursive types, and polymorphism [Notes] [Code]
9/9 Recitation 4 Pattern-matching pitfalls, more parameterized types [Notes]
9/10 Lecture 5 Map, fold and the map-reduce paradigm [Notes] [Code]
9/14 Recitation 5 Folding and tail recursion [Notes]
9/15 Lecture 6 Substitution model of evaluation [Notes]
9/16 Recitation 6 More about the substitution model [Notes]
Functional Data Structures
9/17 Lecture 7 Modules, structures, and signatures [Notes] [Code]
9/21 PS2 due, PS3 issued [PS2] [PS3]
9/21 Recitation 7 PS3 overview [Notes]
9/22 Lecture 8 Abstraction functions and representation invariants [Notes] [Code]
9/23 Recitation 8 Functional stacks and queues, dictionaries, fractions [Notes]
9/24 Lecture 9 Functors: parameterized modules [Notes] [Code]
9/28 Recitation 9 More about functors [Notes]
9/29 Lecture 10 Functional data structures: red-black trees [Notes] [Code]
9/30 Recitation 10 Functional Arrays [Notes] [Code]
10/1 Lecture 11 Mutable data structures: disjoint set-forests [Notes] [Code]
10/5 PS3 due, PS4 issued [PS3] [PS4]
10/5 Recitation 11 Mutability: refs and arrays [Notes]
10/6 Lecture 12 The Environment Model [Notes]
Verification and Testing
10/7 Recitation 12 Inductive correctness proofs [Notes]
10/8 Lecture 13 Logic for formal verification [Notes]
10/10–10/13 Fall Break
10/14 Recitation 13 Prelim 1 review [Notes] [Code]
10/15 Preliminary Exam, 7:30–9pm, OLH 165
10/15 Lecture 14 Verification cont'd [Notes]
10/19 Recitation 14 Testing and code review [Notes]
10/20 Lecture 15 Verification cont'd [Notes]
10/21 PS4 due, PS5 issued [PS4] [PS5]
10/21 Recitation 15 PS5 overview [PS5]
10/22 Lecture 16 Concurrency: multi-threading and mutexes [Notes] [Code]
10/26 Recitation 16 Concurrency: condition variables and message passing [Notes]
10/27 Lecture 17 Concurrency: producer-consumer and thread pools [Notes] [Code]
Data Structures and Analysis of Algorithms
10/28 Recitation 17 Asymptotic complexity and binary search trees [Notes]
10/29 Lecture 18 Asymptotic complexity and recurrences [Notes]
11/2 Recitation 18 Solving recurrences [Notes]
11/3 Lecture 19 Master method [Notes]
11/4 Recitation 19 Using the substitution and master methods [Notes]
11/5 Lecture 20 Amortized analysis and resizing hash tables [Notes]
11/9 Recitation 20 Amortized analysis examples [Notes]
11/10 Lecture 21 Representing and traversing directed graphs [Notes] [Code]
11/11 Recitation 21 Graph algorithms [Notes]
11/12 PS5 due, PS6 issued [PS5] [PS6]
11/12 Lecture 22 Memoization and dynamic programming [Notes] [Code]
11/16 Recitation 22 PS6 overview [PS6]
11/17 Preliminary Exam, 7:30–9pm, OLH 155
11/17 Lecture 23 Prelim 2 review [Notes]
11/18 Recitation 23 Locality [Notes]
11/19 Lecture 24 Streams and lazy evaluation [Notes] [Code]
11/23 Recitation 24 B-trees [Notes]
11/24 Lecture 25 Garbage collection [Notes]
11/25–11/29 Thanksgiving Recess
11/30 Recitation 25 Splay trees [Notes] [Code]
12/1 Lecture 26 Type inference and unification [Notes] [Code]
12/2 Recitation 26 Continuations and CPS conversion [Notes] [Code]
12/3 Lecture 27 Introduction to the λ-calculus [Notes]
Supplemental Fixpoints and recursion (for those interested—you are not responsible for this on the final) [Notes] [Code]
12/7 PS6 due [PS6]
12/13 The 312 Tournament, Upson B17, 7:30–9:30pm (pizza provided) [Info]
12/16 Final Exam, 2–4:30pm, Hollister B14