Practical SAT Solving: Look-ahead Techniques Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin Heule & Hunt (UT Austin) Look-ahead Techniques 1 / 1
Sat solving: DPLL Davis Putnam Logemann Loveland [DP60,DLL62] Simplify (Unit Propagation) Split the formula Variable Selection Heuristics Direction heuristics Heule & Hunt (UT Austin) Look-ahead Techniques 2 / 1
DPLL: Example F DPLL := ( x 1 ∨ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ) Heule & Hunt (UT Austin) Look-ahead Techniques 3 / 1
DPLL: Example F DPLL := ( x 1 ∨ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ) x 3 1 0 Heule & Hunt (UT Austin) Look-ahead Techniques 3 / 1
DPLL: Example F DPLL := ( x 1 ∨ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( x 1 ∨ x 3 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ) x 3 x 2 0 1 1 0 x 1 x 3 0 1 1 0 Heule & Hunt (UT Austin) Look-ahead Techniques 3 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value Simplify the formula Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value Simplify the formula Measure the reduction Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value Simplify the formula Measure the reduction Learn if possible Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value Simplify the formula Measure the reduction Learn if possible Backtrack Heule & Hunt (UT Austin) Look-ahead Techniques 4 / 1
Look-ahead: Example F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) Heule & Hunt (UT Austin) Look-ahead Techniques 5 / 1
Look-ahead: Example F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 5 / 1
Look-ahead: Example F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 5 / 1
Look-ahead: Example F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 , x 6 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 5 / 1
Look-ahead: Example F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 , x 6 =0 , x 3 =1 } Heule & Hunt (UT Austin) Look-ahead Techniques 5 / 1
Look-ahead: Properties Very expensive Heule & Hunt (UT Austin) Look-ahead Techniques 6 / 1
Look-ahead: Properties Very expensive Effective compared to cheap heuristics Heule & Hunt (UT Austin) Look-ahead Techniques 6 / 1
Look-ahead: Properties Very expensive Effective compared to cheap heuristics Detection of failed literals (and more) Heule & Hunt (UT Austin) Look-ahead Techniques 6 / 1
Look-ahead: Properties Very expensive Effective compared to cheap heuristics Detection of failed literals (and more) Strong on random k - Sat formulae Heule & Hunt (UT Austin) Look-ahead Techniques 6 / 1
Look-ahead: Properties Very expensive Effective compared to cheap heuristics Detection of failed literals (and more) Strong on random k - Sat formulae Examples: march, OKsolver, kcnfs Heule & Hunt (UT Austin) Look-ahead Techniques 6 / 1
Look-ahead: Reduction heuristics Number of satisfied clauses Heule & Hunt (UT Austin) Look-ahead Techniques 7 / 1
Look-ahead: Reduction heuristics Number of satisfied clauses Number of implied variables Heule & Hunt (UT Austin) Look-ahead Techniques 7 / 1
Look-ahead: Reduction heuristics Number of satisfied clauses Number of implied variables New (reduced, not satisfied) clauses Smaller clauses more important Weights based on occurring Heule & Hunt (UT Austin) Look-ahead Techniques 7 / 1
Look-ahead: Architecture DPLL x a 0 1 x b x c 1 0 0 ? LookAhead F LA x 1 x 2 x 3 x 4 0 1 0 1 0 1 0 1 H ( x i ) 9 9 13 6 7 10 8 Heule & Hunt (UT Austin) Look-ahead Techniques 8 / 1
Look-ahead: Pseudo-code 1: F := Simplify ( F ) 2: If F is empty then return satisfiable 3: If ∅ ∈ F then return unsatisfiable 4: �F ; l decision � := LookAhead ( F ) 5: if DPLL( F ( l decision ← 1)) = satisfiable then return satisfiable 6: 7: end if 8: return DPLL( F ( l decision ← 0)) Heule & Hunt (UT Austin) Look-ahead Techniques 9 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 , x 6 =0 } Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 , x 6 =0 , x 3 =1 } Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Local learning F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 2 =0 , x 1 =0 , x 6 =0 , x 3 =1 } (local) constraint resolvents a.k.a. hyper binary resolvents: ( x 2 ∨ x 3 ) and ( x 2 ∨ ¬ x 6 ) Heule & Hunt (UT Austin) Look-ahead Techniques 10 / 1
Look-ahead: Necessary assignments F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) Heule & Hunt (UT Austin) Look-ahead Techniques 11 / 1
Look-ahead: Necessary assignments F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 } Heule & Hunt (UT Austin) Look-ahead Techniques 11 / 1
Look-ahead: Necessary assignments F learning := ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 2 ∨ x 3 ) ∧ ( ¬ x 1 ∨ x 2 ) ∧ ( x 1 ∨ x 3 ∨ x 6 ) ∧ ( ¬ x 1 ∨ x 4 ∨ ¬ x 5 ) ∧ ( x 1 ∨ ¬ x 6 ) ∧ ( x 4 ∨ x 5 ∨ x 6 ) ∧ ( x 5 ∨ ¬ x 6 ) ϕ = { x 1 =1 , x 2 =1 } Heule & Hunt (UT Austin) Look-ahead Techniques 11 / 1
Recommend
More recommend