On the Power of Clause-Learning SAT Solvers with Restarts Knot Pipatsrisawat and Adnan Darwiche Computer Science Department UCLA CP-09
Boolean Satisfiability (SAT) Conjunctive Normal Form (CNF) (AvBvC) (~AvDvE) (~DvF) (~CvDvGvH) … clauses
CL SAT Solvers and Resolution Clause-learning SAT solvers Resolution Refutation proof of UNSAT CNF = C1, C2, C3, …, Ci, …, CN-1, false Clauses from CNF Empty clause
CL SAT Solvers and Resolution Clause-learning SAT solvers Resolution Refutation proof of UNSAT problem resolution (YvZvX) (~XvWvV) = C1, C2, C3, …, Ci, …, CN-1, false (YvZvWvV) Resolvents of earlier clauses resolvent Size of = || = # of clauses
CL SAT Solvers and Resolution Clause-learning SAT solvers Resolution Refutation proof UNSAT problem Asserting clause learning Non-chronological backtracking Restarting E.g., Chaff, MiniSat, PicoSat, Rsat, …
CL SAT Solvers and Resolution Decision heuristic 2 Decision heuristic 3 Decision heuristic … Decision heuristic 1 Does CLR contain short proofs for every UNSAT (compared to RES) ? Clause-learning SAT solvers UNSAT problems Restart policy 2 Restart policy … Restart policy 3 Restart policy 1 RES Proofs CLR Proofs … 1 2 3 … 1 2 3 … 1 2 3 …
Previous Results [Beame et al, JAIR 04] Yes, if you allow the solver to branch on assigned variables [Hertel et al, AAAI 08] Yes, if you first transform the problem [Buss et al, LMCS 08] Yes, if you first transform the problem
Our Results Yes. For any solvers that learn asserting clauses and restart
Clause-Learning SAT Solvers Decision: A=true Implications: B=true C=false D=false Decision: E=false Implications: F=true Decision: G=true Implications: H=false SATISFIABLE I=false
Clause-Learning SAT Solvers Decision: A=true Implications: B=true C=false D=false Decision: E=false Implications: F=true Decision: G=true Implications: H=false CONFLICT
Clause-Learning SAT Solvers Decision: A=true Implications: B=true C=false D=false Some of these are wrong! (~A v E v ~G) Decision: E=false (~A v D v H) Implications: F=true Decision: G=true Implications: H=false CONFLICT
Clause-Learning SAT Solvers Decision: A=true (~A v D v H) Implications: B=true C=false D=false Decision: E=false Implications: F=true Decision: G=true Implications: H=false CONFLICT
Clause-Learning SAT Solvers Decision: A=true (~A v D v H) Implications: B=true free literal C=false D=false Implications: H=true Decision: E=false Implications: F=true
Clause-Learning SAT Solvers Decision: A=true Restart = undo all decisions & consequent implications Implications: B=true C=false D=false Decision: E=false Implications: F=true Decision: G=true Implications: H=false
Clause-Learning SAT Solvers Decision: B=false Restart = undo all decisions & consequent implications Implications: D=true G=false
Clause-Learning Algorithm Falsified clause: (AvDvG) Unit clauses: (AvDvF) (Fv~G) (AvDvE) (Ev~F) (AvCvD) (AvCv~E) (AvBvC) (BvCv~D) Each derivation has at most n intermediate clauses! Intermediate clauses Conflict clause
What We Will Show Resolution refutation of CNF Given We will construct Resolution refutation of CNF CLR refutation ’ of CNF s.t. |’| = poly(||, ||)
What We Will Show Resolution refutation of CNF Given We will construct Resolution refutation of CNF CLR refutation ’ of CNF s.t. |’| poly(||, ||) n||
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false Past work simulated the solver to learn every clause in
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false We will learn only clauses in with certain properties
Clauses CL Solvers Can Learn CNF (XvYvZvW) X=false All literals in the clause are falsified … Y=false … These assignments clauses an immediate conflict Z=false … W=false CONFLICT
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false Ci Cj Ck Cm false We will learn only clauses in with certain properties
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false Ci Cj Ck Cm … false
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false 1 , Ci , 2 , Cj , 3 , Ck , 4 , Cm , 5 , …, false Intermediate clauses Each i has size at most n
Proof Ideas = C1, C2, C3, …, Ci, …, CN-1, false ’ = 1 , Ci , 2 , Cj , 3 , Ck , 4 , Cm , 5 , …, false Each i has size at most n |’| n ||
Clauses We Are After C = ( v l) is 1-empowering C is 1-provable Unit resolution cannot derive l when ~ is asserted Asserting ~C results in a conflict C allows unit resolution to see a new implication Easy to show that C is implied by the CNF Solvers can make decisions in order to falsify C Solvers will run into a conflict after falsifying C
How We Derive Them … CNF C = ( v l) : 1-provable, 1-empowering Set ~ as decisions No conflict! Because C is 1-empowering l, ~l are not implied Set ~l as the next decision CONFLICT Because C is 1-provable
How We Derive Them … CNF C = ( v l) : 1-provable, 1-empowering Set ~ as decisions No conflict! Because C is 1-empowering l, ~l are not implied Set ~l as the next decision CONFLICT Because C is 1-provable C can be derived by the “Decision” learning scheme
Putting It All Together UNSAT CNF = C1, C2, C3, …, Ci, …, CN-1, false Ci 1-provable & 1-empowering
Putting It All Together UNSAT CNF = C1, C2, C3, …, Ci, …, CN-1, false 1 Ci
Putting It All Together UNSAT CNF , Ci = C1, C2, C3, …, Ci, …, CN-1, false 1, Ci Restart before proceeding
Putting It All Together UNSAT CNF , Ci = C1, C2, C3, …, Ci, …, CN-1, false 1, Ci Cj
Putting It All Together UNSAT CNF , Ci, Cj = C1, C2, C3, …, Ci, …, CN-1, false 1, Ci , 2 , Cj
Putting It All Together UNSAT CNF , Ci, Cj, … = C1, C2, C3, …, Ci, …, CN-1, false ’ = 1, Ci ,2,Cj, … , false CLR proof
Conclusions CL SAT solvers have the full power of general resolution! Appropriate decision & restart heuristics required
Open Question & Future Work Are restarts necessary? Can we achieve the same result with no or bounded # of restarts?
Open Question & Future Work More attention on heuristics For guiding resolution as opposed to search Beyond resolution
Thank you!