Presentation is loading. Please wait.

Presentation is loading. Please wait.

Proofs from SAT Solvers Yeting Ge ACSys NYU Nov 20 2007.

Similar presentations


Presentation on theme: "Proofs from SAT Solvers Yeting Ge ACSys NYU Nov 20 2007."— Presentation transcript:

1 Proofs from SAT Solvers Yeting Ge ACSys NYU Nov

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 …… 11/20/20072

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 11/20/20073

4 Naïve SAT algorithm To solve: 11/20/20074 UNSAT

5 DPLL algorithm dpll(Clauses C){ C = simplify(C); if ( C contains contradictions ) return UNSAT ; if ( no more free variables in C) return SAT ; choose a free variable v in C ; C1 = substitute(C, v, T ) ; if (SAT == dpll(Clauses C1)) return SAT ; else { C2 = substitute(C, v, F ) ; return dpll(Clauses C2) ; } 11/20/20075

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 11/20/20076

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,… 11/20/20077

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. 11/20/20078

9 From DPLL search tree to resolution proof Observation: A contraction  a resolution 11/20/20079 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/20/200710

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 11/20/200711

12 Learning and resolution: Implication graph 11/20/ ) 2) 3) 4) 5)

13 11/20/ ) 2) 3) 4) 5) Implication graph 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 11/20/ ) 2) 3) 4) 5) Implication graph: more learned clause Another clause

15 11/20/ ) 2) 3) 4) 5) Implication graph: more learned clause Yet another clause

16 11/20/ ) 2) 3) 4) 5) Implication graph: more learned clause

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 11/20/200717

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 11/20/200718

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 the smallest among all minimal unsat core, then s is the minimum unsat core It is difficult to obtain a minimum unsat core 11/20/200719

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 11/20/200720

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 11/20/200721

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 11/20/200722

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 11/20/200723


Download ppt "Proofs from SAT Solvers Yeting Ge ACSys NYU Nov 20 2007."

Similar presentations


Ads by Google