Defining and Reasoning About Recursive Functions: A Practical Tool for the Coq Proof Assistant
We present a practical tool for defining and proving properties of recursive functions in the Coq proof assistant. The tool generates from pseudo-code the graph of the intended function as an inductive relation. Then it proves that the relation actually represents a function, which is by construction the function that we are trying to define. Then, we generate induction and inversion principles, and a fixpoint equation for proving other properties of the function. Our tool builds upon state-of-the-art techniques for defining recursive functions, and can also be used to generate executable functions from inductive descriptions of their graph. We illustrate the benefits of our tool on two case studies.
KeywordsType Theory Recursive Function Recursive Call Proof Obligation Proof Assistant
Unable to display preview. Download preview PDF.
- 10.Cachera, D., Jensen, T., Pichardie, D., Rusu, V.: Extracting a data flow analyzer in constructive logic. Theoretical Computer Science 342 (2005) (to appear)Google Scholar
- 13.Coq Development Team. The Coq Proof Assistant User’s Guide. Version 8.0 (January 2004)Google Scholar
- 18.Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In: Proceedings of POPL 2006. ACM Press, New York (2006)Google Scholar
- 22.Color Project, http://color.inria.fr
- 23.Shankar, N., Owre, S., Rushby, J.M.: The PVS Proof Checker: A Reference Manual. Computer Science Laboratory, SRI International (February 1993); Supplemented with the PVS2 Quick Reference Manual (1997)Google Scholar
- 24.Slind, K.: Reasoning about Terminating Functional Programs. PhD thesis, TU Münich (1999)Google Scholar