A Verified SAT Solver Framework with Learn, Forget, Restart, and Incrementality

We developed a formal framework for conflict-driven clause learning (CDCL) using the Isabelle/HOL proof assistant. Through a chain of refinements, an abstract CDCL calculus is connected first to a more concrete calculus, then to a SAT solver expressed in a functional programming language, and finally to a SAT solver in an imperative language, with total correctness guarantees. The framework offers a convenient way to prove metatheorems and experiment with variants, including the Davis–Putnam–Logemann–Loveland (DPLL) calculus. The imperative program relies on the two-watched-literal data structure and other optimizations found in modern solvers. We used Isabelle’s Refinement Framework to automate the most tedious refinement steps. The most noteworthy aspects of our work are the inclusion of rules for forget, restart, and incremental solving and the application of stepwise refinement.

[1]  Tobias Nipkow,et al.  Teaching Semantics with a Proof Assistant: No More LSD Trip Proofs , 2012, VMCAI.

[2]  Filip Maric Formal Verification of Modern SAT Solvers , 2008, Arch. Formal Proofs.

[3]  Natarajan Shankar,et al.  The Mechanical Verification of a DPLL-Based Satisfiability Solver , 2011, LSFA.

[4]  Andrei Popescu,et al.  Unified Classical Logic Completeness - A Coinductive Pearl , 2014, IJCAR.

[5]  Armin Biere,et al.  Minimizing Learned Clauses , 2009, SAT.

[6]  Amit Goel,et al.  Architecting Solvers for SAT Modulo Theories: Nelson-Oppen with DPLL , 2007, FroCoS.

[7]  Niklas Sörensson,et al.  An Extensible SAT-solver , 2003, SAT.

[8]  Andrei Popescu,et al.  Mechanizing the Metatheory of Sledgehammer , 2013, FroCos.

[9]  Jim Woodcock,et al.  The Verification Grand Challenge , 2007, J. Univers. Comput. Sci..

[10]  Cesare Tinelli,et al.  Solving SAT and SAT Modulo Theories: From an abstract Davis--Putnam--Logemann--Loveland procedure to DPLL(T) , 2006, JACM.

[11]  Andrei Popescu,et al.  Soundness and Completeness Proofs by Coinductive Methods , 2016, Journal of Automated Reasoning.

[12]  Filip Maric,et al.  Formal verification of a modern SAT solver by shallow embedding into Isabelle/HOL , 2010, Theor. Comput. Sci..

[13]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[14]  David Zuckerman,et al.  Optimal speedup of Las Vegas algorithms , 1993, [1993] The 2nd Israel Symposium on Theory and Computing Systems.

[15]  R. Matuszewski,et al.  M IZAR : the first 30 years , 2005 .

[16]  Alexander Krauss Partial Recursive Functions in Higher-Order Logic , 2006, IJCAR.

[17]  Peter Schneider-Kamp,et al.  Efficient Certified RAT Verification , 2017, CADE.

[18]  Peter Lammich Refinement to Imperative/HOL , 2015, ITP.

[19]  Sascha Böhme,et al.  Semi-intelligible Isar Proofs from Machine-Generated Proofs , 2015, Journal of Automated Reasoning.

[20]  Peter Lammich The Imperative Refinement Framework , 2016, Arch. Formal Proofs.

[21]  Peter Lammich,et al.  Automatic Data Refinement , 2013, ITP.

[22]  Joao Marques-Silva,et al.  GRASP-A new search algorithm for satisfiability , 1996, Proceedings of International Conference on Computer Aided Design.

[23]  Anders Schlichtkrull,et al.  Formalization of the Resolution Calculus for First-Order Logic , 2018, Journal of Automated Reasoning.

[24]  Makarius Wenzel Isabelle/Isar — a Generic Framework for Human-Readable Proof Documents , 2007 .

[25]  Cesare Tinelli,et al.  Finding conflicting instances of quantified formulas in SMT , 2014, 2014 Formal Methods in Computer-Aided Design (FMCAD).

[26]  Theo Tryfonas,et al.  Frontiers in Artificial Intelligence and Applications , 2009 .

[27]  Michael J. C. Gordon,et al.  Edinburgh LCF: A mechanised logic of computation , 1979 .

[28]  Karem A. Sakallah,et al.  GRASP—a new search algorithm for satisfiability , 1996, ICCAD 1996.

[29]  Marijn J. H. Heule,et al.  Bridging the gap between easy generation and efficient verification of unsatisfiability proofs , 2014, Softw. Test. Verification Reliab..

[30]  Harald Ganzinger,et al.  Resolution Theorem Proving , 2001, Handbook of Automated Reasoning.

[31]  Holmes The Completeness Theorem , .

[32]  Benjamin C. Pierce Lambda, the ultimate TA: using a proof assistant to teach programming language foundations , 2009, ICFP.

[33]  Donald W. Loveland,et al.  A machine program for theorem-proving , 2011, CACM.

[34]  Christoph Weidenbach,et al.  A Verified SAT Solver Framework with Learn, Forget, Restart, and Incrementality , 2016, IJCAR.

[35]  Predrag Janicic,et al.  Formalization of Abstract State Transition Systems for SAT , 2011, Log. Methods Comput. Sci..

[36]  Andrei Voronkov,et al.  AVATAR: The Architecture for First-Order Theorem Provers , 2014, CAV.

[37]  Lawrence C. Paulson,et al.  Extending Sledgehammer with SMT Solvers , 2011, Journal of Automated Reasoning.

[38]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[39]  Kevin Clancy,et al.  versat: A Verified Modern SAT Solver , 2012, VMCAI.

[40]  Jasmin Christian Blanchette,et al.  Three years of experience with Sledgehammer, a Practical Link Between Automatic and Interactive Theorem Provers , 2012, IWIL@LPAR.

[41]  Tobias Nipkow,et al.  Code Generation via Higher-Order Rewrite Systems , 2010, FLOPS.

[42]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[43]  Florian Kammüller,et al.  Locales - A Sectioning Concept for Isabelle , 1999, TPHOLs.

[44]  F. Mari Formal verification of a modern SAT solver by shallow embedding into Isabelle/HOL , 2010 .

[45]  Armin Biere,et al.  Evaluating CDCL Variable Scoring Schemes , 2015, SAT.

[46]  Natarajan Shankar,et al.  Metamathematics, machines, and Gödels's proof , 1994, Cambridge tracts in theoretical computer science.

[47]  Dmitriy Traytel,et al.  Formalisation of Ground Inference Systems in a Proof Assistant Domain : Data Structures and Algorithms , 2015 .

[48]  Clemens Ballarin Locales: A Module System for Mathematical Theories , 2013, Journal of Automated Reasoning.

[49]  Sharad Malik,et al.  Chaff: engineering an efficient SAT solver , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

[50]  Tobias Nipkow,et al.  Concrete Semantics: With Isabelle/HOL , 2014 .

[51]  Marvin A. Carlson Editor , 2015 .

[52]  Niklaus Wirth,et al.  Program development by stepwise refinement , 1971, CACM.

[53]  Roberto J. Bayardo,et al.  Using CSP Look-Back Techniques to Solve Exceptionally Hard SAT Instances , 1996, CP.

[54]  Peter Lammich Efficient Verified (UN)SAT Certificate Checking , 2017, CADE.

[55]  Donald E. Knuth The Art of Computer Programming, Volume 4, Fascicle 6: Satisfiability , 2015 .

[56]  Peter Lammich,et al.  Refinement based verification of imperative data structures , 2016, CPP.

[57]  Sascha Böhme,et al.  Fast LCF-Style Proof Reconstruction for Z3 , 2010, ITP.

[58]  Christoph Weidenbach,et al.  Automated Reasoning Building Blocks , 2015, Correct System Design.

[59]  Tobias Nipkow,et al.  Automatic Proof and Disproof in Isabelle/HOL , 2011, FroCoS.

[60]  John Harrison,et al.  Formalizing Basic First Order Model Theory , 1998, TPHOLs.

[61]  Stéphane Lescuyer,et al.  Formalizing and Implementing a Reflexive Tactic for Automated Deduction in Coq. (Formalisation et developpement d'une tactique reflexive pour la demonstration automatique en coq) , 2011 .