320 likes | 442 Views
Tool Support for proof Engineering. Anne Mulhern. Ben Liblit. Charles Fischer. Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA mulhern@cs.wisc.edu www.cs.wisc.edu/~mulhern. Size of Proofs. Certified C compiler in Coq [Leroy et al]
E N D
Tool Support for proof Engineering Anne Mulhern Ben Liblit Charles Fischer Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA mulhern@cs.wisc.edu www.cs.wisc.edu/~mulhern
Size of Proofs • Certified C compiler in Coq [Leroy et al] • Compiler + proof that compiler preserves semantics • Back-end • One man-year • 35,000 lines of Coq scripts, definitions, and tactics • Front-end • 3/4 man-year • 6,000 lines of Coq scripts, definitions, and tactics Tool Support for Proof Engineering
Proof Material/Definitions Formal Certification of a Compiler Back-end or: Programming a Compiler with a Proof Assistant [Xavier Leroy, POPL 2006] Tool Support for Proof Engineering
Proof Objects/Proof Scripts • Proof objects can be an order of magnitude larger than proof scripts • Factors • Down • Good modularization • Up • Powerful tactics • Good use of hints Tool Support for Proof Engineering
Size of Linux Kernel • 1991 - 10,000 lines • 1996 - 800,000 lines • 2001 - 3 million lines • 2006 - 7 million lines Tool Support for Proof Engineering
Integrated Proof Environment • Abbreviated as IPE • Similar to an IDE (Integrated Development Environment) • Uncommon Tool Support for Proof Engineering
This is a position paper tools and techniques from IDEs can be transferred to IPEs tools and techniques from IDEs should be transferred to IPEs Tool Support for Proof Engineering
Outline • Motivation • Tools and Techniques • Mechanisms Tool Support for Proof Engineering
Outline • Motivation • Tools and Techniques • Mechanisms Tool Support for Proof Engineering
Motivation • Programming languages are my specialty • Formal proofs of programming language properties • The POPLmark challenge • Generation of certified programs by extraction • Formal Certification of a Compiler Back-end or: Programming a Compiler with a Proof Assistant [Xavier Leroy, POPL 2006] Tool Support for Proof Engineering
PL Proofs are different • Proofs should be easy to modify and reuse • For certified programs: structure of the generated proof matters • Proofs frequently proceed by induction • Inductive theorems are particularly challenging • On Strategies for Inductive Theorem Proving [Bernhard Gramlich, Strategies 2004 Invited Talk] Tool Support for Proof Engineering
Proofs are Programs • Theory • Curry-Howard isomorphism • Practice • Extend • Refactor • Debug • We can tackle similar problems with similar techniques Tool Support for Proof Engineering
PhoX Minlog HOL ACL2 Mizar Coq B method IMPS Theorema Alfa/Agda PVS Isabelle/Isar Otter/Ivy Metamath Lego Nuprl Omega “The Seventeen Provers of the World” [Wiedjik] Tool Support for Proof Engineering
Outline • Motivation • Tools and Techniques • Mechanisms Tool Support for Proof Engineering
Tools and Techniques • Common Conveniences • Proof Visualization in the Large • Navigation by Derivation Tool Support for Proof Engineering
Common Conveniences in IDEs • Multiple Views for understanding and navigation • Collapsed and expanded text • Outline Views • And so forth • Automatic Refactoring • Rewriting while preserving meaning or behavior Tool Support for Proof Engineering
Legend Tool Support for Proof Engineering
Common Conveniences in IPEs Tool Support for Proof Engineering
Make Variable Implicit • Variables whose value can be inferred from the type of other variables may be made implicit • If a variable is implicit its value mustnot be given • To make a variable implicit • Make implicit in definition • Change all uses of definition Tool Support for Proof Engineering
Tools and Techniques • Common Conveniences • Proof Visualization in the Large • Navigation by Derivation Tool Support for Proof Engineering
Software Visualization in the Large • Ball and Eick, 1996 • Unary properties • Color • Large projects • Multiple files Tool Support for Proof Engineering
Software Visualization in the Large [Ball and Eick, 1996] Tool Support for Proof Engineering
Proof Visualization in the Large • Lemma “hot spots” • Revision information • Proportion of proofs to definitions • Goal depth Tool Support for Proof Engineering
Goal depth { Tool Support for Proof Engineering
Tools and Techniques • Common Conveniences • Proof Visualization in the Large • Navigation by Derivation Tool Support for Proof Engineering
Navigation by Derivation • No obvious analog currently in IDEs but… • Numerous instances where original line numbering is preserved • Parsers map to grammar file line numbers • gcc maps to source file line numbers • Source/assembly navigation tool desirable Tool Support for Proof Engineering
Outline • Motivation • Tools and Techniques • Mechanisms Tool Support for Proof Engineering
Mechanisms • Textual Analysis on proofs or scripts • Multiple Views • Compiler/Debugger techniques • Navigation by derivation • Both • Refactoring • Proof visualization in the large Tool Support for Proof Engineering
Summary • IPEs non-existent • Proofs must be managed • Technology already exists • Considerable theoretical possibilities Tool Support for Proof Engineering
Tool Support for proof Engineering Anne Mulhern Ben Liblit Charles Fischer Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA mulhern@cs.wisc.edu www.cs.wisc.edu/~mulhern