ABSTRACT
I report on an experience using the Coq proof assistant to develop a program verification tool with a machine-checkable proof of full correctness. The verifier is able to prove memory safety of x86 machine code programs compiled from code that uses algebraic datatypes. The tool's soundness theorem is expressed in terms of the bit-level semantics of x86 programs, so its correctness depends on very few assumptions. I take advantage of Coq's support for programming with dependent types and modules in the structure of my development. The approach is based on developing a library of reusable functors for transforming a verifier at one level of abstraction into a verifier at a lower level. Using this library, it's possible to prototype a verifier based on a new type system with a minimal amount of work, while obtaining a very strong soundness theorem about the final product.
- {App01} Andrew W. Appel. Foundational proof-carrying code. In LICS, pages 247--258, June 2001.]] Google Scholar
Digital Library
- {Ber01} Yves Bertot. Formalizing a JVML verifier for initialization in a theorem prover. In CAV, pages 14--24, London, UK, 2001. Springer-Verlag.]] Google Scholar
Digital Library
- {CCN06} Bor-Yuh Evan Chang, Adam Chlipala, and George C. Necula. A framework for certified program analysis and its applications to mobile-code safety. In VMCAI, January 2006.]] Google Scholar
Digital Library
- {CJPR04} David Cachera, Thomas Jensen, David Pichardie, and Vlad Rusu. Extracting a data flow analyser in constructive logic. In Proceedings of The European Symposium on Programming. Springer-Verlag, 2004.]]Google Scholar
Cross Ref
- {Cra03} Karl Crary. Toward a foundational typed assembly language. In POPL, volume 38(1) of ACM SIGPLAN Notices, pages 198--212, January 15-17 2003.]] Google Scholar
Digital Library
- {CX05} Chiyan Chen and Hongwei Xi. Combining programming with theorem proving. In ICFP, pages 66--77, 2005.]]Google Scholar
Digital Library
- {DLNS98} David L. Detlefs, K. Rustan M. Leino, Greg Nelson, and James B. Saxe. Extended static checking. SRC Research Report 159, Compaq Systems Research Center, 130 Lytton Ave., Palo Alto, December 1998.]]Google Scholar
- {HST+02} Nadeem A. Hamid, Zhong Shao, Valery Trifonov, Stefan Monnier, and Zhaozhong Ni. A syntactic approach to foundational proof-carrying code. In LICS, pages 89--100, Copenhagen, Denmark, July 2002.]] Google Scholar
Digital Library
- {KN01} Gerwin Klein and Tobias Nipkow. Verified lightweight bytecode verification. Concurrency-practice and experience, 13(1), 2001.]]Google Scholar
- {Ler06} Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL, pages 42--54, 2006.]] Google Scholar
Digital Library
- {MCGW03} Greg Morrisett, Karl Crary, Neal Glew, and David Walker. Stack-based typed assembly language. J. Funct. Program., 13(5):957--959, 2003.]] Google Scholar
Digital Library
- {MM04} Conor McBride and James McKinna. The view from the left. J. Funct. Program., 14(1):69--111, 2004.]] Google Scholar
Digital Library
- {MWCG99} Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From system F to typed assembly language. TOPLAS, 21(3):527--568, May 1999.]] Google Scholar
Digital Library
- {Nec97} George C. Necula. Proof-carrying code. In POPL, pages 106--119. ACM, January 1997.]] Google Scholar
Digital Library
- {She04} Tim Sheard. Languages of the future. In OOPSLA, pages 116--119, 2004.]] Google Scholar
Digital Library
- {WAS03} Dinghao Wu, Andrew W. Appel, and Aaron Stump. Foundational proof checkers with small witnesses. In PPDP, pages 264--274, August 2003.]] Google Scholar
Digital Library
- {WSW05} Edwin Westbrook, Aaron Stump, and Ian Wehrman. A language-based approach to functionally correct imperative programming. In ICFP, pages 268--279, 2005.]]Google Scholar
Digital Library
Index Terms
Modular development of certified program verifiers with a proof assistant
Recommendations
Modular development of certified program verifiers with a proof assistant
Proceedings of the 2006 ICFP conferenceI report on an experience using the Coq proof assistant to develop a program verification tool with a machine-checkable proof of full correctness. The verifier is able to prove memory safety of x86 machine code programs compiled from code that uses ...
Modular development of certified program verifiers with a proof assistant1,2
We report on an experience using the Coq proof assistant to develop a program verification tool with a machine-checked proof of full correctness. The verifier is able to prove memory safety of x86 machine code programs compiled from code that uses ...
A certified type-preserving compiler from lambda calculus to assembly language
PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe present a certified compiler from the simply-typed lambda calculus to assembly language. The compiler is certified in the sense that it comes with a machine-checked proof of semantics preservation, performed with the Coq proof assistant. The compiler ...







Comments