Textbooks and Software
The primary text is
Software Foundations
by Pierce et al., a software
verification and programming languages course available free and online.
We'll be using:
Before or just after the first day of class, I encourage you to download and install
the Coq proof assistant
(version 8.8), the tool upon
which Software Foundations is based.
Two IDEs for Coq are available, the Emacs-based ProofGeneral and CoqIDE
(bundled with Coq). I recommend CoqIDE for new Coq users (this is also
the IDE we'll be using in class); ProofGeneral is good but requires
more setup and some Emacs experience.
Periodically I may assign additional supplementary (optional
but recommended) readings from
Types and Programming Languages, Benjamin Pierce, and from
The Formal Semantics of Programming Languages, Glynn Winskel. Both
of these books are available on Amazon.
Prerequisites
CS 3200 but also:
Some mathematical maturity (at the level of "I've seen and done proofs before"),
facility with a couple different programming languages,
and a desire to learn.
Course Structure
The course consists of twice-weekly lectures (Mondays and Wednesdays)
and a weekly lab (Fridays), during which I'll
help with problems you may encounter while completing the homeworks.
Ocassionally during the weekly Friday lab, we'll cover material that
we didn't get a chance to cover during the MW lectures.
In addition to the weekly homework assignments, drawn primarily
from Software Foundations, there will be:
- an in-class written exam (Week 6, approximately 15% of your grade); and
- a take-home programming exam (Week 7, approximately 15% of your grade);
- a final project (finals week, approximately 20%).
The weekly homeworks and attendance at lecture
and lab are worth approximately 50%.
Blackboard will be used only to report grades.
Up-to-date information on all other
aspects of the course (assignment due dates, etc.) will be posted
on this website.
Homework Rubric
Homework will be graded on a 0-4 scale with 4 being the best and 0 the worst. To get
an A in the course, your homework grade needs to be close to 4.
In general, points are assigned to homeworks rougly according to the following rubric:
Point Grade | What's Required To Get It |
4 | Complete all or nearly all 1- through 4-star exercises in the assigned chapters, including all advanced but not necessarily all optional exercises. |
3 | Complete all or nearly all 1- through 3-star exercises in the assigned chapters, not necessarily including advanced or optional exercises. |
2 | Complete all or nearly all 1- through 2-star exercises in the assigned chapters, not including advanced and optional exercises. |
1 | Complete all or nearly all 1-star exercises in the assigned chapters, not including advanced and optional exercises. |
0 | Fail to complete nearly all 1-star exercises, or fail to turn in the assignment. |
5 (=4+1EC) | Complete all 1- through 5-star exercises in the assigned chapters, including all advanced exercises. |
"All or nearly all" means that you miss perhaps one or two exercises, at most a handful.
From Point Grades to Letter Grades
The following table gives a rough mapping of point grades to letter grades, to give you a sense
how much effort is required to get, e.g., a homework grade of A. Disclaimer: I reserve the right to change
this mapping. However, I will likely revise it only in a way that is beneficial to you.
Average Point Grade | Letter Grade |
>= 3.5 | A |
>= 2.5 | B |
>= 1.5 | C |
>= 0.5 | D |
< 0.5 | F |
Schedule
The schedule is subject to revision.
Introduction to Functional Programming and Coq
Week 1 (27 Aug.)
Week 2
More functional programming: polymorphism, implicit arguments,
higher-order functions. Coq proof strategies, additional tactics.
Reading:
Lists,
Poly.
A1: Complete the exercises in this week's assigned readings.
Due Monday of Week 3 by 11:59pm.
Monday, 3 September: Labor Day, no class
Logic in Coq
Week 3
Logic in Coq, inductively defined propositions.
Reading:
Tactics,
Logic.
Supplementary Reading:
How to Write a 21st Century Proof, by Leslie Lamport
A2: Complete the exercises in this week's assigned readings.
Due Monday of Week 4 by 11:59pm.
To get a 3, you may skip the "Additional Exercises" in
Tactics.v and all
exercises marked "Optional" in both
Tactics.v and
Logic.v.
Week 4 (17 Sep.)
Logic in Coq continued, proof objects.
Reading:
IndProp,
ProofObjects.
A3: Complete the exercises in this week's assigned readings.
Due Monday of Week 5 by 11:59pm.
Week 5
The little imperative language Imp.
Reading:
Maps,
Imp.
Supplementary Reading:
Winskel, Ch. 2, Secs. 2.1-2.5.
A4: Complete the exercises in this week's assigned readings.
Due Monday of Week 6 by 11:59pm.
Verified Functional Programming
Week 6
Verified functional programming in Coq.
Reading:
Perm (Vol. III),
Sort (Vol. III).
A5: Complete the exercises in this week's assigned readings.
Due Monday of Week 7 by 11:59pm.
1-3 October: Gordon away at conference,
class still held
Friday, 5 October: Fall Semester Reading Day,
no class
W7 (8 Oct.)
Programming Language Semantics
Week 8
Hoare Logic.
Reading:
Equiv,
Hoare,
Hoare2.
A6: Complete the exercises in this week's assigned readings.
Due Monday of Week 9 by 11:59pm.
Friday, 26 October: EECS Departmental Retreat,
no class
Week 9
Small-step operational semantics.
Reading:
Smallstep.
Supplementary Reading:
Winskel, Ch. 2, Sec. 2.6.
A7: Complete the exercises in this week's assigned readings.
Due Monday of Week 10 by 11:59pm.
Lambda Calculus and Type Systems
Week 10
Type systems.
Reading:
Types.
Supplementary Reading:
TAPL, Chs. 1 and 8.
A8: Complete the exercises in this week's assigned readings.
In addition, complete
Final Project Checkpoint #1 by sending me an
email describing, in a short paragraph, the topic on which you plan to do your
final project. See here for
final project ideas.
Both due Monday of Week 11 by 11:59pm.
Week 11 (5 Nov.)
Untyped Lambda Calculus, Simply-Typed Lambda Calculus.
Reading:
Stlc.
Supplementary Reading:
TAPL, Chs. 5 and 9.
A9: Complete the exercises in this week's assigned readings.
Due Monday of Week 12 by 11:59pm.
Week 12
STLC contd., progress and preservation
Reading:
StlcProp,
Typechecking.
Supplementary Reading:
TAPL, Ch. 11.
A10: Complete the exercises in this week's assigned readings.
Due Monday of Week 13 by 11:59pm.
Monday, 12 November: Veterans Day, no class
Week 13 (19 Nov.)
More STLC: let-bindings, pairs, unit, sums, lists, recursion.
Reading:
MoreStlc.
A11: Complete the exercises in this week's assigned readings.
Due Monday of Week 14 by 11:59pm. Make sure you're also ready to complete
Final Project Checkpoint #2.
21-25 November: Thanksgiving Break, no classes
Grab Bag (Instructor+Class Choice)
Week 14
Topic to be determined
Week 15 (3 Dec.)
Final project presentations
10-15 December: Final Exams
1. An ability to analyze a complex computing problem and to apply principles of computing and other relevant disciplines to identify solutions. Students will be able to:
-
Apply principles of mathematics and computing such as induction to prove properties of programs written in a functional programming language
-
Apply an understanding of fundamental computer science data structures such as inductively defined lists to prove the correctness of an implementation of a sorting algorithm such as insertion sort
-
Analyze the type system and operational semantics of a small imperative language in order to prove metatheoretic properties like type soundness
-
Analyze a program in order to identify specifications such as Hoare-logic pre- and post-conditions that capture the program's expected behavior
3. An ability to communicate effectively in a variety of professional contexts. Students will:
-
Give a presentation on the results of a final project related to software verification
6. An ability to apply computer science theory and software development fundamentals to produce computing-based solutions. Students will be able to:
-
Use an interactive theorem prover to construct a computer-checked proof of type soundness for a small arithmetic expression language
-
Use an interactive theorem prover to construct a computer-checked proof of type soundness for the simply-typed lambda calculus
-
Use an interactive theorem prover to construct a computer-checked Hoare-logic proof for a small imperative program
-
Use an interactive theorem prover or some other formal methods tool to reason about a software system of their choosing, in the context of an open-ended final project
Homework and Collaboration Policies
Academic Honesty Policy
Acceptable Collaboration Matrix
| Instructor/GA | Noninstructor (e.g., Another Student) |
You | all collaboration allowed | high-level discussion
(of the problems, not your code!)
allowed but only after you've started the assignment;
must be documented in README as described below |
You may discuss the homework with other students in
the class, but only after you've attempted the problems on your own
first. If you do discuss the homework problems with others, write the
names of the students you spoke with, along with a brief summary of
what you discussed, in a README comment at the top of each
submission. Example:
(*
README Gordon Stewart, Assn #1
I worked with X and Y. We swapped tips regarding the use of Coq's "rewrite" tactic. *)
However, under no circumstances are you permitted
to share or directly copy code or other written homework material,
except with course instructors.
If I discover that you've cheated on an
assignment, you'll get an automatic F for the course along with an immediate
referral to the
Office of Community Standards, which will likely
take disciplinary action against you.
Remember: homework is there to give *you* practice in
the new ideas and techniques covered by the course; it does you no
good if you don't engage!
In general, students in EECS courses such as this one must
adhere to the Russ College of Engineering and Technology Honor
Code, and to the OU
Student Code of Conduct. If you haven't ever read these documents,
please do so.
Students with Disabilities
If you suspect you may need an accommodation based on the impact of a
disability, please contact me privately to discuss your specific
needs. If you're not yet registered as a student with a disability,
contact the
Office of Student
Accessibility Services first.