mini tutorial on conflict driven clause learning solvers
play

Mini-tutorial on conflict-driven clause learning solvers Marijn J. - PowerPoint PPT Presentation

Mini-tutorial on conflict-driven clause learning solvers Marijn J. H. Heule The University of Texas at Austin 20/01/2014 @ BIRS Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 1 / 24 The Satisfiability (SAT) problem


  1. Mini-tutorial on conflict-driven clause learning solvers Marijn J. H. Heule The University of Texas at Austin 20/01/2014 @ BIRS Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 1 / 24

  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 ∨ 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¯ 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 ) Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 3 / 24

  4. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  5. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  6. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  7. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  8. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  9. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  10. 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  11. 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 x 3 = 1 1 7 x 5 = 1 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  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 x 2 = 1 2 x 3 = 1 1 7 x 5 = 1 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 ) Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  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 x 3 = 1 1 7 x 5 = 1 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 ) Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  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 2 x 4 = 0 x 3 = 1 1 x 1 = 1 7 x 5 = 1 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 ) Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  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 2 x 4 = 0 x 3 = 1 1 x 1 = 1 7 x 5 = 1 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 ) Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 4 / 24

  16. Conflict-driven SAT solvers: Pseudo-code 1: while TRUE do l decision := GetDecisionLiteral ( ) 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 := AnalyzeConflict ( 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 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 5 / 24

  17. 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 7 x 18 =0 x 5 =0 6 x 13 =0 2 x 19 =1 Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 6 / 24

  18. 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 7 x 18 =0 x 5 =0 6 x 13 =0 2 ( ¬ x 1 ∨ ¬ x 3 ∨ x 5 ∨ x 17 ∨ ¬ x 19 ) x 19 =1 tri-asserting clause Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 6 / 24

  19. 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 7 x 18 =0 x 5 =0 6 x 13 =0 2 ( x 10 ∨ ¬ x 8 ∨ x 17 ∨ ¬ x 19 ) x 19 =1 first unique implication point Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 6 / 24

  20. 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 7 x 18 =0 x 5 =0 6 x 13 =0 2 ( x 2 ∨ ¬ x 4 ∨ ¬ x 8 ∨ x 17 ∨ ¬ x 19 ) x 19 =1 second unique implication point Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 6 / 24

  21. Average Learned Clause Length Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 7 / 24

  22. Data-structures Data-structures Watch pointers Marijn J. H. Heule (UT) Mini-tutorial on CDCL solvers BIRS, January 2014 8 / 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend