Extensible Extraction of Efficient Imperative Programs with Foreign Functions, Manually Managed Memory, and Proofs
Author(s)
Pit-Claudel, Clément; Wang, Peng; Delaware, Benjamin; Gross, Jason S.; Chlipala, Adam
DownloadAccepted version (1.197Mb)
Open Access Policy
Open Access Policy
Creative Commons Attribution-Noncommercial-Share Alike
Terms of use
Metadata
Show full item recordAbstract
We present an original approach to sound program extraction in a proof assistant, using syntax-driven automation to derive correct-by-construction imperative programs from nondeterministic functional source code. Our approach does not require committing to a single inflexible compilation strategy and instead makes it straightforward to create domain-specific code translators. In addition to a small set of core definitions, our framework is a large, user-extensible collection of compilation rules each phrased to handle specific language constructs, code patterns, or data manipulations. By mixing and matching these pieces of logic, users can easily tailor extraction to their own domains and programs, getting maximum performance and ensuring correctness of the resulting assembly code. Using this approach, we complete the first proof-generating pipeline that goes automatically from high-level specifications to assembly code. In our main case study, the original specifications are phrased to resemble SQL-style queries, while the final assembly code does manual memory management, calls out to foreign data structures and functions, and is suitable to deploy on resource-constrained platforms. The pipeline runs entirely within the Coq proof assistant, leading to final, linked assembly code with overall full-functional-correctness proofs in separation logic.
Description
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12167).
Date issued
2020-06Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence LaboratoryJournal
IJCAR: International Joint Conference on Automated Reasoning
Publisher
Springer International Publishing
Citation
Pit-Claudel, Clément et al. "Extensible Extraction of Efficient Imperative Programs with Foreign Functions, Manually Managed Memory, and Proofs." IJCAR: International Joint Conference on Automated Reasoning, 12167, Springer International Publishing, 2020, 119-137. © 2020 Springer Nature Switzerland
Version: Author's final manuscript
ISSN
0302-9743
1611-3349