Synthesizing Lemmas for Inductive Reasoning

Recursively defined structures and properties about them are naturally expressed in first-order logic with least fixpoint definitions (FO+lfp), but automated reasoning for such logics has not seen much progress. Such logics, unlike pure FOL, do not even admit complete procedures, let alone decidable ones. In this paper, we undertake a foundational study of finding proofs that use induction to reason with these logics. By treating proofs as purely FO proofs punctuated by declarations of induction lemmas, we separate proofs into deductively reasoned components that can be automated and statements of lemmas that need to be divined, respectively. While humans divine such lemmas with intuition, we propose a counterexample driven technique that guides the synthesis of such lemmas, where counterexamples are finite models that witness inability of proving the theorem as well as other proposed lemmas. We develop relatively complete procedures for synthesizing such lemmas using techniques and tools from program/expression synthesis, for powerful FO+lfp logics that have background sorts constrained by natural theories such as arithmetic and set theory. We evaluate our procedures and show that over a class of theorems that require finding inductive proofs, our automatic synthesis procedure is effective in proving them.

[1]  Philippa Gardner,et al.  From Separation Logic to First-Order Logic , 2005, FoSSaCS.

[2]  Christof Löding,et al.  A First-Order Logic with Frames , 2019, ESOP.

[3]  Robert S. Boyer,et al.  A computational logic handbook , 1979, Perspectives in computing.

[4]  Sumit Gulwani Programming by examples: applications, algorithms, and ambiguity resolution , 2017, PPDP.

[5]  Cesare Tinelli,et al.  cvc4sy: Smart and Fast Term Enumeration for Syntax-Guided Synthesis , 2019, CAV.

[6]  James Brotherston,et al.  Automated Cyclic Entailment Proofs in Separation Logic , 2011, CADE.

[7]  Xiaokang Qiu,et al.  Natural proofs for structure, data, and separation , 2013, PLDI.

[8]  Zohar Manna,et al.  The calculus of computation - decision procedures with applications to verification , 2007 .

[9]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[10]  Jun Sun,et al.  A Decidable Fragment in Separation Logic with Inductive Predicates and Arithmetic , 2017, CAV.

[11]  K. Rustan M. Leino,et al.  Automating Induction with an SMT Solver , 2012, VMCAI.

[12]  Rajeev Alur,et al.  Search-based program synthesis , 2018, Commun. ACM.

[13]  Zoltán Ésik,et al.  Completeness of Park Induction , 1997, Theor. Comput. Sci..

[14]  Frank Piessens,et al.  VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java , 2011, NASA Formal Methods.

[15]  Viktor Kuncak,et al.  Decision procedures for algebraic data types with abstractions , 2010, POPL '10.

[16]  Kedar S. Namjoshi,et al.  Syntactic Program Transformations for Automatic Abstraction , 2000, CAV.

[17]  Grigory Fedyukovich,et al.  Lemma Synthesis for Automating Induction over Algebraic Data Types , 2019, CP.

[18]  Xiaokang Qiu,et al.  Natural proofs for data structure manipulation in C using separation logic , 2014, PLDI.

[19]  Philipp Rümmer,et al.  E-Matching with Free Variables , 2012, LPAR.

[20]  Panagiotis Manolios,et al.  Computer-Aided Reasoning: An Approach , 2011 .

[21]  Wei-Ngan Chin,et al.  Automated Mutual Explicit Induction Proof in Separation Logic , 2016, FM.

[22]  Xiaokang Qiu,et al.  Recursive proofs for inductive tree data-structures , 2012, POPL '12.

[23]  Sumit Gulwani,et al.  Automating string processing in spreadsheets using input-output examples , 2011, POPL '11.

[24]  Edmund M. Clarke,et al.  Model checking and abstraction , 1994, TOPL.

[25]  Joxan Jaffar,et al.  Automatic induction proofs of data-structures in imperative programs , 2015, PLDI.

[26]  Christof Löding,et al.  Foundations for natural proofs and quantifier instantiation , 2017, Proc. ACM Program. Lang..

[27]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

[28]  Clark W. Barrett,et al.  The SMT-LIB Standard Version 2.0 , 2010 .

[29]  Sumit Gulwani,et al.  Programming by Examples: PL Meets ML , 2017, APLAS.

[30]  Andrei Voronkov,et al.  First-Order Theorem Proving and Vampire , 2013, CAV.

[31]  J. Strother Moore,et al.  An Industrial Strength Theorem Prover for a Logic Based on Common Lisp , 1997, IEEE Trans. Software Eng..