Skip to Content.
Sympa Menu

coq-club - [Coq-Club] A book on program proof in Coq [revisited]

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] A book on program proof in Coq [revisited]


Chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] A book on program proof in Coq [revisited]
  • Date: Wed, 11 Aug 2021 12:58:17 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=adamc AT csail.mit.edu; spf=Pass smtp.mailfrom=adamc AT csail.mit.edu; spf=None smtp.helo=postmaster AT outgoing-stata.csail.mit.edu
  • Ironport-hdrordr: A9a23:3bQOo6Fc7OthXXxfpLqE2ceALOsnbusQ8zAXPidKOH5om62j5qOTdZEgvyMc5wx9ZJhNo7y90cu7L080hKQU3WB5B97LNzUO01HIEGgN1+TfKhTbaknD398Y+6d8UrR0TOb9B1hijcr8/U2RHts6zMOcmZrY4Nvj8w==
  • Ironport-phdr: A9a23:yXU4qxY/QxnrQJRD1ihor+f/LTH/0IqcDmcuAnoPtbtCf+yZ8oj4OwSHvLMx1gePDdyQuqMMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+5YHfbx9LiTagbr9/KBG7phjNu8cLhodvNrw/wQbTrHtSfORWy2JoJVaNkBv5+8y94p1t/TlOtvw478JPXrn0cKo+TbxDETQpKHs169HxtRnCVgSA+H0RWXgLnxVSAgjF6Bb6Xortsib/q+Fw1jWWMdHwQLspXzmp8qVlRwLyiCofNzA37X/ZhM9+gq1Vrx2uuwdyzJTIbIyPLvdyYq3QcNEcSGFcXshRTStBAoakYoYTEuUOJ+NYpJTjqlsOqRu+BBGsC/nryjBSm3T72rc13Pk7HgHDwAMtBM4BsG/Oo9X0MKceS+W1zKjUzTnZcfxZxCr95ZHOfxs8rv6CQah+ftDNyUkzCQzFlFOQpJTrMT6b0ukDs3aX4/R+WO+ui2AqqQ98rzahy8oyl4XEh4AYxFDK+yt5wIg5ON+1RFBmbdK4DJZdtyOXOohqTs4gRWxjpSg0yroDuZGhfSgKzowqyALfa/yDcoiI+gjsVOKLLjtignJqZq6/ihCv+kaj0u3xTtS43EhJoyZfnNTAqmoB2wLJ5sSZV/dx4l+t1DSB2gzJ9O1IPEQ5mbDaJpMh2LI8i4QfvVjFEyTrgkv5lrWWeV8h+uWw6+TofLHmppiEOo9zlwH+Lqsumsu+AeQ+PQgCRnOb+fim273/50L1WqlFjuYsnanYtJDWP8Ebpq+lAwNPzIks9gu/Ay+n0NQeg3YHMEpIdA+Zg4XqIV3DLuz0Ae2hj1i2jjtn2uzKMqXkAprXL3jDlLnhfax6605Z0Ac8181Q6IhRCr4dO//8RlTxu8bZDh89KQC0xufnCMln2owARG2PH7eVMLnOvl+Q+uIvP+6MaZcJtzb6Mvgp/uLhjXskmVAGZqSpxpsWaHWgHvt8OUmZYHzsgs0AEWgQpAY+Qvbq2xW+VmtYYG/3VKYh7Bk6DpinBMHNXNODmruEiQ63F5geTWBCC0iFFX6gI4yIUvIHQCmJK85l1DkFSf6sR5J3hkLmjxPz17cydrmcwSYfr5+2jLCdCMXYjhgz8XpxDtjb3m2QHTgcdoIgQCIq06d+p0M40UuKzaE+iOdRFNgV4vJVFAo2KMyEpwSfI9vpUwPFONKIVBCrTsj0WVkM

I wrote to this list about five years ago to announce Formal Reasoning About Programs (FRAP), an online book I've been developing to teach students some of the most classic approaches in program verification, using the Coq proof assistant.  In the mean time, I've used the book in four more editions of the class I teach with it, and I'm glad to report that the materials (including homework assignments) now seem to be in good shape for others to pick up and use at their institutions.  I'd be glad to correspond with anyone who's curious about perhaps offering a related course.

What's different about FRAP as compared to e.g. Software Foundations, the alternative I know best?

Cons

  • From students, FRAP requires the levels of mathematical & programming sophistication that we associate with undergraduates just about finished with their CS degrees and headed to PhDs.  Students really do already need to be familiar with mathematical rigor and proof by induction, whereas Software Foundations does a good job of reinforcing those topics for students who never really "got" them the first time around (doing proofs without machine checking).

Pros

  • As a result, we can get a lot further in sophistication of program-reasoning techniques.  For instance, I usually spend the last month or so of class on concurrency.  We look at shared-memory concurrency via model checking (with partial-order reduction) and concurrent separation logic (with shared mutable, linked data structures), and we look at message-passing concurrency via process calculus and session types.  Proofs are highly automated throughout, at the same time as all reasoning techniques are proved from first principles.
  • I try to highlight commonalities across techniques that are rarely called out elsewhere.  For instance, about 3/4 of the techniques we look at (after the first month or so of class) are instances of finding and proving strengthened invariants for transition systems.  Then the rest are instances of finding simulation relations for pairs of labeled transition systems, and there is a clear family resemblance here to invariant-finding.  Common approaches to abstraction and modularity then apply throughout.
  • We work up more quickly to more realistic programming languages, using a trick I call "mixed embeddings" that is somewhat similar to how Haskell imports side effects via monads.  We can add arbitrary side effects to Coq's core functional language, which lets us write and verify pretty sophisticated programs without needing to formalize the purely functional constructs we rely on.  At the same time, we can do most of the usual metatheory without compromising on rigor.  I have a functional-pearl paper on this part at ICFP in about two weeks, and I'll be available in the associated Q&A sessions.

I'm glad to discuss by whatever medium with folks who might want to make use of these materials.



  • [Coq-Club] A book on program proof in Coq [revisited], Adam Chlipala, 08/11/2021

Archive powered by MHonArc 2.6.19+.

Top of Page