Certified Programming with Dependent Types

Harvard COMPSCI 252, Fall 2008

Instructors: Adam Chlipala, Greg Morrisett

Lectures: MW 3:00-4:30, Maxwell Dworkin 323 (time changed, based on scheduling discussion at first meeting!)

First Meeting: Monday, September 15



This class is about how to use the Coq proof assistant to get real work done, even on projects not focused on formal proofs or verification, by proving mechanically that your programs are correct. We will focus on dependent types and custom, scripted proof automation as means to this end. There will be a special focus on applications in programming languages and compilers, though most of the material will be relevant to mechanized theorem proving and certified programming in general.

[ More detailed course description ]


Prerequisites

Basic discrete math and logic; experience with functional programming, especially in statically-typed languages like Haskell and ML

Texts

Course Requirements

Schedule

9/15 Welcome & logistics; some verified compilers in Coq [Slides: OpenOffice, PDF] Chap. 1, 2
9/17 Introducing induction and recursion [Announcements: OpenOffice, PDF] Chap. 3 PS1 out
9/22 No class (Adam and some other folks at ICFP)
9/24 Greg runs a Coq programming workshop; bring a laptop!
9/29 Inductively-defined judgments [Announcements: OpenOffice, PDF] Chap. 4 PS1 due [solution]
10/1 Finish inductive judgments; infinite data structures and proofs [Announcements: OpenOffice, PDF] Chap. 4, 5 PS2 out
10/6 Programming with subset types and friends Chap. 6
10/8 More dependent types Chap. 7 PS2 due [solution]; project proposals due; PS3 out
10/13 No class (Columbus Day)
10/15 Alternatives for defining dependent data structures Chap. 8 PS3 due [solutions: 5, 6, 7]; PS4 out
10/20 The weird world of equality Chap. 9
10/22 No class (Sustainability Celebration) PS4 due [solution]; PS5 out
10/27 Backtracking search via pattern-matching Chap. 10
10/29 Proof by reflection Chap. 11 PS5 due; PS6 out
11/3 First-order representations of language syntax Chap. 12 First project checkpoint
11/5 Higher-order abstract syntax Chap. 13
11/10 Dependently-typed PHOAS interpreters galore Chap. 14
11/12 Certifying extensional transformations Chap. 15 PS6 due, PS7 out
11/17 Certifying intensional transformations Chap. 16
11/19 Modeling impure languages Chap. 17
11/24 Ynot: Imperative programming with specifications in Coq Second project checkpoint
11/26 No class (Thanksgiving pre-holiday) PS7 due
12/1 Datatype-generic programming with dependent types Chap. 18
12/3 Epigram and Agda
12/8 Project presentations (and maybe something else)
12/10 Project presentations
12/15 Project presentations
1/12 Final project reports due