Effective interactive proofs for higher-order imperative programs

Adam Chlipala, Gregory Malecha, Greg Morrisett, Avraham Shinnar, Ryan Wisnesky

We present a new approach for constructing and verifying higher-order, imperative programs using the Coq proof assistant. We build on the past work on the Ynot system, which is based on Hoare Type Theory. That original system was a proof of concept, where every program verification was accomplished via laborious manual proofs, with much code devoted to uninteresting low-level details. In this paper, we present a re-implementation of Ynot which makes it possible to implement fully-verified, higher-order imperative programs with reasonable proof burden. At the same time, our new system is implemented entirely in Coq source files, showcasing the versatility of that proof assistant as a platform for research on language design and verification. Both versions of the system have been evaluated with case studies in the verification of imperative data structures, such as hash tables with higher-order iterators. The verification burden in our new system is reduced by at least an order of magnitude compared to the old system, by replacing manual proof with automation. The core of the automation is a simplification procedure for implications in higher-order separation logic, with hooks that allow programmers to add domain-specific simplification rules. We argue for the effectiveness of our infrastructure by verifying a number of data structures and a packrat parser, and we compare to similar efforts within other projects. Compared to competing approaches to data structure verification, our system includes much less code that must be trusted; namely, about a hundred lines of Coq code defining a program logic. All of our theorems and decision procedures have or build machine-checkable correctness proofs from first principles, removing opportunities for tool bugs to create faulty verifications.

ynot separation logic coq verification

download publisher's link

Citation (BibTex)

 author = {Chlipala, Adam and Malecha, Gregory and Morrisett, Greg and Shinnar, Avraham and Wisnesky, Ryan},
 title = {Effective {I}nteractive {P}roofs for {H}igher-order {I}mperative {P}rograms},
 booktitle = {Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming},
 series = {ICFP '09},
 year = {2009},
 isbn = {978-1-60558-332-7},
 location = {Edinburgh, Scotland},
 pages = {79--90},
 numpages = {12},
 url = {http://doi.acm.org/10.1145/1596550.1596565},
 doi = {10.1145/1596550.1596565},
 acmid = {1596565},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {dependent types, functional programming, interactive proof assistants, separation logic},