Automating Induction with an SMT Solver [chapter]

K. Rustan M. Leino
2012 Lecture Notes in Computer Science  
Mechanical proof assistants have always had support for inductive proofs. Sometimes an alternative to proof assistants, satisfiability modulo theories (SMT) solvers bring the hope of a higher degree of automation. However, SMT solvers do not natively support induction, so inductive proofs require some encoding into the SMT solver's input. This paper shows a surprisingly simple tactic-a rewriting strategy and a heuristic for when to apply it-that has shown to be useful in verifying simple
more » ... ve theorems, like those that can occur during program verification. The paper describes the tactic and its implementation in a program verifier, and reports on the positive experience with using the tactic. The implicit support of induction lets a user write programs whose correctness implies the validity of user-provided mathematical properties, essentially giving a manual way to write proofs using a program verifier [15, 17, 26, 13] . In this paper, I go one step further, introducing a tactic that heuristically identifies programmer-supplied properties whose proof may benefit from induction, then automatically sets up the induction hypothesis, and finally passes the proof obligation to an SMT solver. I have implemented the technique in the Dafny program verifier [19] 0 and have used it, for example, to automatically prove 45 of the first 47 problems in an evaluation corpus for automatic induction. The tactic is not nearly as powerful as what is used in provers like ACL2 or Zeno; indeed, it never strengthens or generalizes a property to be proved. Instead, the strong appeal of the present tactic lies in its simplicity and surprising effectiveness.
doi:10.1007/978-3-642-27940-9_21 fatcat:jghhbkqa7reknhxopc37vr5a7i