Caml
Power

Schedule

Warning: The schedule may change. Don't get more than a lecture or so ahead of the class. Refresh your browser to see updates!

Note: reading assigments in "RWO" refer to the Real World OCaml book, which is also available online.

Dates Topic Notes/Code Videos Reading
The Basics
W Sep 1 OCaml Introduction Intro, OCaml, Let, Functions, Tuples, hello.ml, sum.ml, Makefile, .merlin 01-02, 02-01, 02-02, 02-03 Functional Basics, Type Checking, Optional RWO: OCaml as Calculator, Functions and Type Inference
Sep 2-3 Precept 1: OCaml Intro precept1.zip ticket.ml .merlin fizzbuzz.ml (fizzbuzz solution) exercise1.ml
M Sep 6 Labor Day
W Sep 8 Simple Immutable Data: Options, Lists Options, Lists, Sort, Map/Reduce, Poly HO! 03-01, 03-02, 03-03, 04-02a, 04-03 Type-directed Programming;
Thinking Inductively;
Optional:variables and functionns, and other bits in RWO Chap 2, 3
Th Sep 9 Assign 1 Due
Sep 9-10 Precept 2: Lists, Options, Polymorphism precept2.zip precept2_solutions.zip
M Sep 13 Poly-HO: Polymorphism, Higher-Order Programming and Datatypes Datatypes, Inductive datatypes; gml.ml 04-02, 04-03, 05-01, 05-02 Polymorphism and Higher-order Programming
W Sep 15 SAT SAT Lecture Optional: RWO Chapter 6
Th Sep 16 Assign 2 Due
Sep 16-17 Precept 3: Assignment 3, Map, Fold and Datatypes precept3.zip; exercise3_sol.ml
Reasoning About Programs
M Sep 20 Building Interpreters Java Rant, C Rant, Abstract syntax, 03-04, 04-01, 06-01 Operational Semantics
W Sep 22 More Interpreters Substitution and evaluation, More features, Model of OCaml; simple interpreter code: eval0.ml; with recursive functions: eval3.ml 06-02, 06-03, 06-04
Sep 23-24 Precept 4: Assignment 4 and More About Closures precept4.zip;
precept4_sol.zip
M Sep 27 Assign 3 Due
M Sep 27 How OCaml uses memory Space model, Compiling OCaml and Garbage Collection, Pruning closures 09-01, 10-02, 11-03
W Sep 29 Proving Programs Correct Simple proofs, Induction for naturals, Induction for lists 08-01, 08-02, 08-03 Equational Reasoning
Sep 30-31 Precept 5: Mutually Recursive Types, Equational Reasoning theorems.ml;
exercise4.ml (#4) (Sample solution, with proofs);
exercise5.ml (solution)
M Oct 4 More Correctness Proofs Induction for datatypes, Proofs about programming languages 08-04, 08-05 Equational reasoning about data types
Optional Reading: Odd-Order Theorem; Four-Color Theorem
W Oct 6 Generalizing your Induction Hypothesis Generalizing your induction hypotheses, 10-01
Oct 7-8 Precept 6: Tail Recursion and More Equational Reasoning
M Oct 11 Assign 4 Due
M Oct 11 Type Checking Formal rules, OCaml implementation
Midterm review (in class)
W Oct 13 Type Inference Type inference 1, Type inference 2
Midterm review (in class)
Optional: Efficient Type Inference
Oct 16-24 Midterm break
Oct 25-26 Take home midterm exam
Modularity
W Oct 27 ML Modules, Assignment 5 Simple modules, Design choices, Functors, Module evaluation Optional: RWO Chap 4 (Modules), 9 (Functors)
Oct 28-29 Precept 7: Midterm recap
M Nov 1 Reasoning about Modules Representation Invariants, Proving Representation Invariants, More Representation Invariants, Module Equivalence Optional: Abstraction and Representation Invariants
W Nov 3 Effective ML LIVE Guest Lecturer: Yaron Minsky, Jane St. Optional: Jane St functional programming blog and podcast
Nov 4-5 Precept 8: Modules precept8.zip ; precept8_sol.zip
M Nov 8 Mutation Mutable References Optional: RWO Chapter 8
W Nov 10 Laziness Laziness Optional: RWO Chapter 8
Nov 11-12 Precept 9: More Modules range.mli;
exercise9.txt (Solution)
M Nov 15 Functional Parallelism Optional: RWO Chapter 8
W Nov 17 Functional Parallelism Optional: RWO Chapter 8
Th Nov 18 Assign 5 Due
M Nov 22 Logic and Lambda Calculus TBD Optional reading: The Birth of Computer Science at Princeton in the 1930s
Nov 23-28 Thanksgiving break
Nov 22-26 No precept this week
M Nov 29 Exam Q and A; Review
Nov 30-Dec 1 Take-home Midterm
Dec 2-3 Assignment 7 Precept
Dec 6 Last lecture: Assignment 7 Set-up
M Dec 14 Assign 7 Due (Dean's date)