conflict driven clause learning
play

Conflict-Driven Clause Learning Marijn J.H. Heule - PowerPoint PPT Presentation

Conflict-Driven Clause Learning Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 16, 2019 1/33 The Satisfiability (SAT) problem ( x 5 x 8 x 2 ) ( x 2 x 1 x


  1. Conflict-Driven Clause Learning Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 16, 2019 1/33

  2. The Satisfiability (SAT) problem ( x 5 ∨ x 8 ∨ ¯ x 2 ) ∧ ( x 2 ∨ ¯ x 1 ∨ ¯ x 3 ) ∧ (¯ x 8 ∨ ¯ x 3 ∨ ¯ x 7 ) ∧ (¯ x 5 ∨ x 3 ∨ x 8 ) ∧ (¯ x 6 ∨ ¯ x 1 ∨ ¯ x 5 ) ∧ ( x 8 ∨ ¯ x 9 ∨ x 3 ) ∧ ( x 2 ∨ x 1 ∨ x 3 ) ∧ (¯ x 1 ∨ x 8 ∨ x 4 ) ∧ (¯ x 9 ∨ ¯ x 6 ∨ x 8 ) ∧ ( x 8 ∨ x 3 ∨ ¯ x 9 ) ∧ ( x 9 ∨ ¯ x 3 ∨ x 8 ) ∧ ( x 6 ∨ ¯ x 9 ∨ x 5 ) ∧ ( x 2 ∨ ¯ x 3 ∨ ¯ x 8 ) ∧ ( x 8 ∨ ¯ x 6 ∨ ¯ x 3 ) ∧ ( x 8 ∨ ¯ x 3 ∨ ¯ x 1 ) ∧ (¯ x 8 ∨ x 6 ∨ ¯ x 2 ) ∧ ( x 7 ∨ x 9 ∨ ¯ x 2 ) ∧ ( x 8 ∨ ¯ x 9 ∨ x 2 ) ∧ (¯ x 1 ∨ ¯ x 9 ∨ x 4 ) ∧ ( x 8 ∨ x 1 ∨ ¯ x 2 ) ∧ ( x 3 ∨ ¯ x 4 ∨ ¯ x 6 ) ∧ (¯ x 1 ∨ ¯ x 7 ∨ x 5 ) ∧ (¯ x 7 ∨ x 1 ∨ x 6 ) ∧ (¯ x 5 ∨ x 4 ∨ ¯ x 6 ) ∧ (¯ x 4 ∨ x 9 ∨ ¯ x 8 ) ∧ ( x 2 ∨ x 9 ∨ x 1 ) ∧ ( x 5 ∨ ¯ x 7 ∨ x 1 ) ∧ (¯ x 7 ∨ ¯ x 9 ∨ ¯ x 6 ) ∧ ( x 2 ∨ x 5 ∨ x 4 ) ∧ ( x 8 ∨ ¯ x 4 ∨ x 5 ) ∧ ( x 5 ∨ x 9 ∨ x 3 ) ∧ (¯ x 5 ∨ ¯ x 7 ∨ x 9 ) ∧ ( x 2 ∨ ¯ x 8 ∨ x 1 ) ∧ (¯ x 7 ∨ x 1 ∨ x 5 ) ∧ ( x 1 ∨ x 4 ∨ x 3 ) ∧ ( x 1 ∨ ¯ x 9 ∨ ¯ x 4 ) ∧ ( x 3 ∨ x 5 ∨ x 6 ) ∧ (¯ x 6 ∨ x 3 ∨ ¯ x 9 ) ∧ (¯ x 7 ∨ x 5 ∨ x 9 ) ∧ ( x 7 ∨ ¯ x 5 ∨ ¯ x 2 ) ∧ ( x 4 ∨ x 7 ∨ x 3 ) ∧ ( x 4 ∨ ¯ x 9 ∨ ¯ x 7 ) ∧ ( x 5 ∨ ¯ x 1 ∨ x 7 ) ∧ ( x 5 ∨ ¯ x 1 ∨ x 7 ) ∧ ( x 6 ∨ x 7 ∨ ¯ x 3 ) ∧ (¯ x 8 ∨ ¯ x 6 ∨ ¯ x 7 ) ∧ ( x 6 ∨ x 2 ∨ x 3 ) ∧ (¯ x 8 ∨ x 2 ∨ x 5 ) Does there exist an assignment satisfying all clauses? 2/33

  3. Search for a satisfying assignment (or proof none exists) ( x 5 ∨ x 8 ∨ ¯ x 2 ) ∧ ( x 2 ∨ ¯ x 1 ∨ ¯ x 3 ) ∧ (¯ x 8 ∨ ¯ x 3 ∨ ¯ x 7 ) ∧ (¯ x 5 ∨ x 3 ∨ x 8 ) ∧ (¯ x 6 ∨ ¯ x 1 ∨ ¯ x 5 ) ∧ ( x 8 ∨ ¯ x 9 ∨ x 3 ) ∧ ( x 2 ∨ x 1 ∨ x 3 ) ∧ (¯ x 1 ∨ x 8 ∨ x 4 ) ∧ (¯ x 9 ∨ ¯ x 6 ∨ x 8 ) ∧ ( x 8 ∨ x 3 ∨ ¯ x 9 ) ∧ ( x 9 ∨ ¯ x 3 ∨ x 8 ) ∧ ( x 6 ∨ ¯ x 9 ∨ x 5 ) ∧ ( x 2 ∨ ¯ x 3 ∨ ¯ x 8 ) ∧ ( x 8 ∨ ¯ x 6 ∨ ¯ x 3 ) ∧ ( x 8 ∨ ¯ x 3 ∨ ¯ x 1 ) ∧ (¯ x 8 ∨ x 6 ∨ ¯ x 2 ) ∧ ( x 7 ∨ x 9 ∨ ¯ x 2 ) ∧ ( x 8 ∨ ¯ x 9 ∨ x 2 ) ∧ (¯ x 1 ∨ ¯ x 9 ∨ x 4 ) ∧ ( x 8 ∨ x 1 ∨ ¯ x 2 ) ∧ ( x 3 ∨ ¯ x 4 ∨ ¯ x 6 ) ∧ (¯ x 1 ∨ ¯ x 7 ∨ x 5 ) ∧ (¯ x 7 ∨ x 1 ∨ x 6 ) ∧ (¯ x 5 ∨ x 4 ∨ ¯ x 6 ) ∧ (¯ x 4 ∨ x 9 ∨ ¯ x 8 ) ∧ ( x 2 ∨ x 9 ∨ x 1 ) ∧ ( x 5 ∨ ¯ x 7 ∨ x 1 ) ∧ (¯ x 7 ∨ ¯ x 9 ∨ ¯ x 6 ) ∧ ( x 2 ∨ x 5 ∨ x 4 ) ∧ ( x 8 ∨ ¯ x 4 ∨ x 5 ) ∧ ( x 5 ∨ x 9 ∨ x 3 ) ∧ (¯ x 5 ∨ ¯ x 7 ∨ x 9 ) ∧ ( x 2 ∨ ¯ x 8 ∨ x 1 ) ∧ (¯ x 7 ∨ x 1 ∨ x 5 ) ∧ ( x 1 ∨ x 4 ∨ x 3 ) ∧ ( x 1 ∨ ¯ x 9 ∨ ¯ x 4 ) ∧ ( x 3 ∨ x 5 ∨ x 6 ) ∧ (¯ x 6 ∨ x 3 ∨ ¯ x 9 ) ∧ (¯ x 7 ∨ x 5 ∨ x 9 ) ∧ ( x 7 ∨ ¯ x 5 ∨ ¯ x 2 ) ∧ ( x 4 ∨ x 7 ∨ x 3 ) ∧ ( x 4 ∨ ¯ x 9 ∨ ¯ x 7 ) ∧ ( x 5 ∨ ¯ x 1 ∨ x 7 ) ∧ ( x 5 ∨ ¯ x 1 ∨ x 7 ) ∧ ( x 6 ∨ x 7 ∨ ¯ x 3 ) ∧ (¯ x 8 ∨ ¯ x 6 ∨ ¯ x 7 ) ∧ ( x 6 ∨ x 2 ∨ x 3 ) ∧ (¯ x 8 ∨ x 2 ∨ x 5 ) 3/33

  4. Conflict-driven Clause Learning: Overview ◮ Most successful architecture 4/33

  5. Conflict-driven Clause Learning: Overview ◮ Most successful architecture ◮ Superior on industrial benchmarks 4/33

  6. Conflict-driven Clause Learning: Overview ◮ Most successful architecture ◮ Superior on industrial benchmarks ◮ Brute-force? ◮ Addition conflict clauses ◮ Fast unit propagation 4/33

  7. Conflict-driven Clause Learning: Overview ◮ Most successful architecture ◮ Superior on industrial benchmarks ◮ Brute-force? ◮ Addition conflict clauses ◮ Fast unit propagation ◮ Complete local search (for a refutation)? 4/33

  8. Conflict-driven Clause Learning: Overview ◮ Most successful architecture ◮ Superior on industrial benchmarks ◮ Brute-force? ◮ Addition conflict clauses ◮ Fast unit propagation ◮ Complete local search (for a refutation)? ◮ State-of-the-art (sequential) CDCL solvers: CaDiCaL, Glucose, CryptoMiniSAT 4/33

  9. Clause Learning Data-structures Heuristics Clause Management Conflict-Clause Minimization Recent Advances and Conclusions 5/33

  10. Clause Learning Data-structures Heuristics Clause Management Conflict-Clause Minimization Recent Advances and Conclusions 6/33

  11. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ F extra 7/33

  12. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra 7/33

  13. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 7/33

  14. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 6 7/33

  15. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 6 x 1 = 0 7 7/33

  16. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 6 x 1 = 0 x 4 = 1 7 7/33

  17. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 6 x 1 = 0 x 4 = 1 x 3 = 1 x 3 = 0 7 7/33

  18. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ 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4 ∨ ¯ x 5 ) 7/33

  22. Conflict-driven SAT solvers: Search and Analysis ( x 1 ∨ x 4 ) ∧ 0 ( x 3 ∨ ¯ x 4 ∨ ¯ x 5 ) ∧ x 5 = 1 (¯ x 3 ∨ ¯ x 2 ∨ ¯ x 4 ) ∧ 1 F extra x 2 = 1 2 2 x 4 = 0 x 3 = 1 1 x 1 = 1 x 5 = 1 7 6 x 1 = 0 7 7 x 4 = 1 x 1 = 0 x 4 = 1 x 3 = 1 7 x 3 = 0 2 x 3 = 0 7 x 2 = 1 (¯ x 2 ∨ ¯ x 4 ∨ ¯ x 5 ) 7/33

  23. Implication graph [Marques-SilvaSakallah ’96] CDCL in a nutshell: 1. Main loop combines efficient problem simplification with cheap, but effective decision heuristics; ( > 90% of time) 2. Reasoning kicks in if the current state is conflicting; 3. The current state is analyzed and turned into a constraint; 4. The constraint is added to the problem, the heuristics are updated, and the algorithm (partially) restarts. 8/33

  24. Implication graph [Marques-SilvaSakallah ’96] CDCL in a nutshell: 1. Main loop combines efficient problem simplification with cheap, but effective decision heuristics; ( > 90% of time) 2. Reasoning kicks in if the current state is conflicting; 3. The current state is analyzed and turned into a constraint; 4. The constraint is added to the problem, the heuristics are updated, and the algorithm (partially) restarts. However, it has three weaknesses: ◮ CDCL is notoriously hard to parallelize; ◮ the representation impacts CDCL performance; and ◮ CDCL has exponential runtime on some “simple” problems. 8/33

  25. Conflict-driven Clause Learning: Pseudo-code 1: while TRUE do l decision := Decide () 2: If no l decision then return satisfiable 3: F := Simplify ( F ( l decision ← 1)) 4: while F contains C falsified do 5: C conflict := Analyze ( C falsified ) 6: If C conflict = ∅ then return unsatisfiable 7: BackTrack ( C conflict ) 8: F := Simplify ( F ∪ { C conflict } ) 9: end while 10: 11: end while 9/33

  26. Learning conflict clauses [Marques-SilvaSakallah’96] 1 5 x 4 =1 x 8 =1 x 17 =0 4 3 x 12 =0 7 x 6 =0 x 1 =1 7 7 x 18 =1 7 7 7 7 x 11 =1 x 2 =0 x 10 =0 x 3 =1 7 7 x 7 =1 x 18 =0 7 x 5 =0 6 x 13 =0 2 x 19 =1 10/33

  27. Learning conflict clauses [Marques-SilvaSakallah’96] 1 5 x 4 =1 x 8 =1 x 17 =0 4 3 x 12 =0 7 x 6 =0 x 1 =1 7 7 x 18 =1 7 7 7 7 x 11 =1 x 2 =0 x 10 =0 x 3 =1 7 7 x 7 =1 x 18 =0 7 x 5 =0 6 x 13 =0 2 ( x 1 ∨ x 3 ∨ x 5 ∨ x 17 ∨ x 19 ) x 19 =1 tri-asserting clause 10/33

Recommend


More recommend