lookahead techniques
play

Lookahead Techniques Marijn J.H. Heule - PowerPoint PPT Presentation

Lookahead Techniques Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019 1 / 29 DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based


  1. Lookahead Techniques Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 26, 2019 1 / 29

  2. DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based Look-ahead 2 / 29

  3. DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based Look-ahead 3 / 29

  4. SAT Solving: DPLL Davis Putnam Logemann Loveland [DP60,DLL62] Recursive procedure that in each recursive call: Simplifies the formula (using unit propagation) Splits the formula into two subformulas • Variable selection heuristics (which variable to split on) • Direction heuristics (which subformula to explore first) 4 / 29

  5. 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 ) 5 / 29

  6. 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 0 1 5 / 29

  7. 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 2 x 3 0 1 0 1 x 1 x 3 0 1 1 0 5 / 29

  8. DPLL: Slightly Harder Example Slightly Harder Example Construct a DPLL tree for: ( a ∨ b ∨ c ) ∧ ( a ∨ b ∨ c ) ∧ ( b ∨ c ∨ d ) ∧ ( b ∨ c ∨ d ) ∧ ( a ∨ c ∨ d ) ∧ ( a ∨ c ∨ d ) ∧ ( a ∨ b ∨ d ) 6 / 29

  9. Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables 7 / 29

  10. Look-ahead: Definition DPLL with selection of (effective) decision variables by look-aheads on variables Look-ahead: Assign a variable to a truth value 7 / 29

  11. 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 7 / 29

  12. 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 7 / 29

  13. 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 7 / 29

  14. 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 7 / 29

  15. DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based Look-ahead 8 / 29

  16. 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 ) 9 / 29

  17. 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 } 9 / 29

  18. 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 } 9 / 29

  19. 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 } 9 / 29

  20. 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 } 9 / 29

  21. Look-ahead: Properties Very expensive 10 / 29

  22. Look-ahead: Properties Very expensive Effective compared to cheap heuristics 10 / 29

  23. Look-ahead: Properties Very expensive Effective compared to cheap heuristics Detection of failed literals (and more) 10 / 29

  24. Look-ahead: Properties Very expensive Effective compared to cheap heuristics Detection of failed literals (and more) Strong on random k -SAT formulae 10 / 29

  25. 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 10 / 29

  26. DEMO 11 / 29

  27. Look-ahead: Reduction heuristics Number of satisfied clauses 12 / 29

  28. Look-ahead: Reduction heuristics Number of satisfied clauses Number of implied variables 12 / 29

  29. 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 12 / 29

  30. 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 13 / 29

  31. 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: return DPLL ( F ( l decision ← 0)) 14 / 29

  32. DPLL Procedure Look-ahead Architecture Look-ahead Learning Autarky Reasoning Tree-based Look-ahead 15 / 29

  33. Local Learning Look-ahead solvers do not perform global learning, in contrast to contrast to conflict-driven clause learning (CDCL) solvers Instead, look-ahead solvers learn locally: Learn small (typically unit or binary) clauses that are valid for the current node and lower in the DPLL tree Locally learnt clauses have to be removed during backtracking 16 / 29

  34. Failed Literals and Double Look-aheads A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. 17 / 29

  35. Failed Literals and Double Look-aheads A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. 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 ) 17 / 29

  36. Failed Literals and Double Look-aheads A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. 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 4 =0 , x 6 =1 } 17 / 29

  37. Failed Literals and Double Look-aheads A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. 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 4 =0 , x 6 =1 , x 1 =1 } 17 / 29

  38. Failed Literals and Double Look-aheads A literal l is called a failed literal if the look-ahead on l = 1 results in a conflict: failed literal l is forced to false followed by unit propagation if both x and x are failed literals, then backtrack Failed literals can be generalized by double lookahead: assign two literals and learn a binary clause in case of a conflict. 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 4 =0 , x 6 =1 , x 1 =1 , x 2 =1 } 17 / 29

Recommend


More recommend