1 / 23

Proofs from SAT Solvers

Proofs from SAT Solvers. Yeting Ge ACSys NYU Nov 20 2007. SAT solvers and proofs. SAT problem and solvers Given a propositional logic formula, a SAT solver outputs sat or unsat Proofs from SAT solvers are needed A certificate to show the solver is correct

brinda
Télécharger la présentation

Proofs from SAT Solvers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Proofs from SAT Solvers YetingGe ACSys NYU Nov 20 2007

  2. SAT solvers and proofs • SAT problem and solvers • Given a propositional logic formula, a SAT solver outputs sat or unsat • Proofs from SAT solvers are needed • A certificate to show the solver is correct • Required by applications • Planning • Calculation of interpolants • ……

  3. A bunch of SAT solvers • Complete / incomplete • Internal representation • BDD, circuit, CNF,…… • Search method • Depth first, breadth first • Most modern SAT solvers • Complete, CNF, breadth first • DPLL based

  4. Naïve SAT algorithm • To solve: UNSAT UNSAT UNSAT UNSAT UNSAT UNSAT UNSAT

  5. DPLL algorithm dpll(ClausesC){ C = simplify(C); if ( C contains contradictions ) returnUNSAT ; if (no more free variables in C) returnSAT ; choose a free variable v in C ; C1 = substitute(C, v,T ) ; if (SAT==dpll(ClausesC1)) returnSAT ; else { C2 = substitute(C, v,F ) ; return dpll(ClausesC2) ; } }

  6. DPLL algorithm • Two rules to simplify the CNF clauses • Unit propagation rule • If there is a clause contains only one literal, the literal is forced to be true. Propagate this new assignment immediately. • Given { , }, deduce and { }, then • One literal rule • Not used in most modern SAT solvers

  7. Modern SAT solvers • Efficient unit propagation • BCP(Boolean Constraints Propagation) • Efficient back-tracking • Iterative algorithm • Almost constant cost back-tracking • Better heuristics on what to do next • Conflict analysis • Look ahead heuristics • Fine tuning • Restart, preprocessing,…

  8. Resolution and SAT problem • Resolution • Given two clauses and , derive • From and , derive empty clause • Theorem • A set of CNF clauses is unsatisfiable if and only if there is a resolution derivation of empty clause • Proof: Based on induction.

  9. From DPLL search tree to resolution proof • Observation: • A contraction  a resolution UNSAT UNSAT UNSAT

  10. Naïve proof generation • Record the entire proof tree and reconstruct the resolution proof • Dump search trace • Modern SAT solvers employ unit propagation • Modern SAT solvers employ some learning techniques • New clauses are learned and added into the CNF clause set. • New clause could be used later

  11. Unit propagation (BCP) and resolution • Given a unit clause , only if there is a clause , we can generate a new clause • A special case of resolution • New unit clauses will be linked to their source clauses (implication graph) • Modern SAT solvers spent most of the time on BCP

  12. Learning and resolution:Implication graph 5) 1) 3) 5) 2) 4) 3)

  13. Implication graph 5) 1) 3) 5) 2) 4) 3) The contraction is due to: or We can learn a clause , which is the result of resolution of clause 4) and 5) contraction  resolution

  14. Implication graph:more learned clause 5) 1) 3) 5) 2) 4) 3) Another clause

  15. Implication graph:more learned clause 5) 1) 3) 5) 2) 4) 3) Yet another clause

  16. Implication graph:more learned clause 5) 1) 3) 5) 2) 4) 3)

  17. Resolution and learned clauses • Conflict clause • The learned clause that are fed back into SAT solver • Conflict clauses can be seen as the result of some resolution • Conflict clauses are redundant • Could be deleted later

  18. Proof generation • Whenever a learned clause is generated, record the clause and dump the reason for that clause • Recode all variables assigned at root level and the reasons • Re-construct the resolution proof from the last contradiction by searching the dumped trace and recorded information • Learned clauses are constructed if necessary

  19. Application of proofs:Small unsat core • Some applications require small unsat core • Given a set of unsatisfiable CNF clauses C, if and , then S is a minimal unsat core of C • If s is thesmallestamong all minimal unsat core, then s is the minimum unsat core • It is difficult to obtain a minimum unsat core

  20. Small unsat core from proofs • By Zhang et al. • Given a unsatisfiable set of clauses C • Collect all clauses appears in the unsat proof, say C1, which must be unsatifiable • Run SAT solver on C1 and collect all clauses appears in the unsat proof of C1, say C2 • Repeat until reach a fixpoint • There is no guarantee that the fixpoint is minimal

  21. Another kind of proof • Given a set of unsatisfiable CNF clauses F and all conflict clauses C found by the SAT solver, a conflict pair can be derived by performing BCP on F C only • If a set of CNF clauses is unsatisfiable, a conflict pair can be derive by resolution • All the result of non-BCP resolution are in C • The proof checking is time consuming • The checking procedure could give a small unsat core as a by-product

  22. Some future problems • A standard proof format • Dump of the resolution proof • Dump of conflict clauses • Better proof generation and checking • Big proofs • Proofs from SMT solvers • More difficult • There is no general standard format

  23. Summary • Proofs from SAT solvers are useful • Modern CNF based SAT solvers can generate proofs with little overhead • Construct the resolution proof might be a problem for large cases • Small unsat core could be obtained from proofs

More Related