Width-Based Restart Policies for Clause-Learning Satisfiability Solvers Knot Pipatsrisawat and Adnan Darwiche Computer Science Department UCLA SAT’09
Outline Modern SAT solvers & resolution proofs Existing restart policies (size-based) Width-based restart policies Hybrid restart policies Experimental results
Modern SAT solvers Decisions + unit propagation Conflict analysis Derive conflict clauses by resolving existing clauses together For UNSAT, solver can produce a refutation proof upon termination
Example (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w)
Example a = f (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) a = f
Example a = f b = f c = t, d= t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) a = f b = f c = t, d= t/f (conflict)
Example a = f b = f c = t, d= t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (a+b) a = f b = f c = t, d= t/f (conflict)
Example a = f b = t (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (a+b) a = f b = t
Example a = f b = t c = f d = f (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (a+b) a = f b = t c = f d = f
Example a = f b = t c = f d = f x = f (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (a+b) a = f b = t c = f d = f x = f
Example a = f b = t c = f d = f x = f y = f w = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (a+b) a = f b = t c = f d = f x = f y = f w = t/f (conflict)
Example a = f b = t c = f d = f x = f y = f w = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (x+y) (a+b) a = f b = t c = f d = f x = f y = f w = t/f (conflict)
Example a = f b = t c = f d = f x = f y = t, z = t, u = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (b+c) (x+y) (a+b) a = f b = t c = f d = f x = f y = t, z = t, u = t/f (conflict)
Example a = f b = t c = f d = f x = f y = t, z = t, u = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (x+~y+~z) (b+c) (x+y) (x+~y) (a+b) a = f b = t c = f d = f x = f y = t, z = t, u = t/f (conflict) (x)
Example x = t, z = t, u = t, w = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (x+~y+~z) (b+c) (x+y) (x+~y) (a+b) x = t, z = t, u = t, w = t/f (conflict) (x)
Example x = t, z = t, u = t, w = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (x+~y+~z) (~z+~u) (b+c) (x+y) (x+~y) (~x+~z) (a+b) x = t, z = t, u = t, w = t/f (conflict) (x) (~x)
Example x = t, z = t, u = t, w = t/f (conflict) (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (x+~y+~z) (~z+~u) (b+c) (x+y) (x+~y) (~x+~z) (a+b) x = t, z = t, u = t, w = t/f (conflict) (x) (~x) false
Example Refutation proof (a+b+c) (b+c+d) (c+~d) (y+~w) (x+y+w) (x+~y+z) (~y+~z+~u) (x+~z+u) (~x+z) (~x+u) (~z+w) (~u+~w) (x+~y+~z) (~z+~u) (b+c) (x+y) (x+~y) (~x+~z) (a+b) (x) (~x) false Refutation proof
Properties of Refutation Proofs Resolution Proof: Size = # of clauses in proof Width = length of largest clause in proof
Existing Restart Policies Arithmetic: threshold += C zChaff, Berkmin, Siege, Eureka Geometric: threshold *= C MiniSat 1.14, 2.0 Inner-outer geometric: like Geo. But keep another threshold PicoSat Luby’s: threshold = Li L = x,x,2x,x,x,2x,4x,… where x is Luby’s unit TiniSat, Rsat, MiniSat (SAT-Race’08) (see Huang IJCAI-07)
Considering Proof Width Every UNSAT CNF with a short proof MUST have a narrow proof [Ben-Sasson & Wigderson’01] If a CNF has proof width k, we can find a proof in nO(k) Just derive all resolvents of size <= k
Width-Based Restart Policy Depends on the size of conflict clauses Intuition: Bias the solver to focus on narrow proofs Long clauses = bad solver behavior Restart when a lot of long clauses have been learned A clause is violating if its size > W Restart if there are > N violating clauses
Width-Based Restarts on CNFs with Small Widths Grid-pebbling formula (UNSAT) Running time Conflicts
Width-Based Restarts on CNFs with Small Widths Grid-pebbling formula (SAT) Running time Conflicts
Width-Based Restart in Practice Widths not known up front Cannot assume they will be small Must eventually allow (many) long clauses to be learned Set W to small initial value & gradually increase it using different policies
Incrementing Width Threshold Arithmetic: W += C Geometric: W *= C Inner-outer Geo: keep two thresholds Luby’s: W = x,x,2x,x,x,2x,4x,…
Performance on INDUS 175 problems from SAT’07 (INDUS), 1800-second timeout/problem Policy Solved Total SAT UNSAT Size-based, Luby’s 107 49 58 Width-based, arith. 100 46 54 Width-based, geo. 108 45 63 Width-based, inner-outer 90 36 Width-based, Luby’s 103 47 56
Combining Size & Width for Restarting Bias the solver to construct short and narrow proofs Size-based policy based on Luby’s series was combined with various width-based policies Width & size thresholds are enforced independently
Performance of Hybrid Policies on INDUS Policy Solved Total SAT UNSAT Size-based, Luby’s 107 49 58 Width-based, arith. 100 46 54 Width-based, geo. 108 45 63 Width-based, inner-outer 90 36 Width-based, Luby’s 103 47 56 Size (Luby’s) + Width (arith.) 110 48 62 Size (Luby’s) + Width (geo.) 115 52 Size (Luby’s) + Width (in-out) 106 43 Size (Luby’s) + Width (Luby’s) 114 60 Rsat Rsat-ws-3 Rsat-ws-1 Rsat-ws-2
More Results 427 264 290 279 275 Family Total Rsat Rsat-ws-1 (Geo.) (Luby’s) Rsat-ws-3 (Arith.) SAT-07 INDUS 175 107 115 114 110 SAT-Race’06 100 86 90 88 84 Dlx-iq-unsat-1.0 32 11 18 14 17 Fvp-unsat-1.0,2.0,3.0 26 Liveness-sat-1.0 10 5 7 6 Liveness-unsat-2.0 9 3 Pipe-ooo-1.0,1.1 29 12 13 Pipe-unsat-1.0,1.1 27 16 Vliw-unsat-2.0,4.0 2 427 264 290 279 275
Performance Profiles on INDUS problems SAT UNSAT
Performance Profiles on CRAFTED problems SAT UNSAT
Conclusions Demonstrated benefits of width-based restart policies Could perform as well as, if not better than, size-based ones Initial study on combining width & size for better performance on various problem families
Thank you