1 / 160

SAT Genealogy

SAT Genealogy. Alexander Nadel, Intel, Haifa, Israel The Technion, Haifa, Israel July , 3 2012. Agenda. Introduction Early Days of SAT Solving Core SAT Solving Conflict Analysis and Learning Boolean Constraint Propagation Decision Heuristics Restart Strategies Inprocessing

lok
Download Presentation

SAT Genealogy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAT Genealogy Alexander Nadel, Intel, Haifa, Israel The Technion, Haifa, Israel July, 3 2012

  2. Agenda • Introduction • Early Days of SAT Solving • Core SAT Solving • Conflict Analysis and Learning • Boolean Constraint Propagation • Decision Heuristics • Restart Strategies • Inprocessing • Extensions to SAT • Incremental SAT Solving under Assumptions • Simultaneous Satisfiability (SSAT) • Diverse Solutions Generation • High-level (group-oriented) MUC Extraction

  3. Agenda • Introduction • Early Days of SAT Solving • Core SAT Solving • Conflict Analysis and Learning • Boolean Constraint Propagation • Decision Heuristics • Restart Strategies • Inprocessing • Extensions to SAT • Incremental SAT Solving under Assumptions • Simultaneous Satisfiability (SSAT) • Diverse Solutions Generation • High-level (group-oriented) MUC Extraction We won’t use implication graphs for explanation, but: Duality between search and resolution

  4. What is SAT? • Find a variable assignment (AKA solution or model) that satisfies a propositional formula or prove that there are no solutions • SAT solvers operate on CNF formulas: • Any formula can be reduced to a CNF CNF Formula: F = ( a + c ) ( b + c ) (a’ + b’+ c’ ) negative literal clause positive literal

  5. SAT: Theory and Practice • Theory: • SAT is the first known NP-complete problem • Stephen Cook, 1971 • One can check a solution in polynomial time • Can one find a solution in polynomial time? • The P=NP question… • Practice: • Amazingly, nowadays SAT solvers can solve industrial problems having millions of clauses and variables • SAT has numerous applications in formal verification, planning, bioinformatics, combinatorics, …

  6. Approaches to SAT Solving • Backtrack search: DFS search for a solution • The baseline approach for industrial-strength solvers. In focus today. • Look-ahead: BFS search for a solution • Helpful for certain classes of formulas • Recently, there were attempts of combining it with backtrack search • Local search • Helpful mostly for randomly generated formulas

  7. Early Days of SAT Solving Agenda • Resolution • Backtrack Search

  8. a + b + c’ + f g + h’ + c + f a + b + g + h’ a + b + g + h’ + f Resolution: a Way to Derive New Valid Clauses • Resolution over a pair of clauses with exactly one pivot variable: a variable appearing in different polarities: • Known to be invented by Davis&Putnam, 1960 • Had been invented independently by Lowenheim in early 1900’s (as well as the DP algorithm, presented next) • According to Chvatal&Szemeredy, 1988 (JACM) - The resolvent clause is a logical consequence of the two source clauses

  9. (a + b + c) (b + c’ + f’) (b’ + e) (a + b) (a + b’) (a’ + c) (a’ + c’) (a + c + e) (c’ + e + f) (a) (a’ + c) (a’ + c’) (c) (c’) (a + e + f) ( ) DP Algorithm: Davis&Putnam, 1960 Remove the variables one-by-one by resolution over all the clauses containing that variable DP is sound and complete SAT UNSAT

  10. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b b’ + c b’ + c’ a’ + b

  11. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c b’ + c’ a’ + b

  12. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ Decision level1 b’ + c b’ + c’ a’ + b a is the decision variable; a’ is the decision literal

  13. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c b’ + c’ b’ a’ + b Decision level 2

  14. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c b’ + c’ b’ a’ + b a + b A conflict.A blocking clause – a clause, falsified by the current assignment – is encountered.

  15. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c b’ + c’ b’ b Backtrack and flip a’ + b a + b

  16. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c Decision level 1 b’ + c’ b’ b a’ + b a + b c’ Decision level 2 b’ + c

  17. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ b’ + c b’ + c’ b’ b Decision level 1 a’ + b a + b c’ c b’ + c b’ + c’

  18. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ a b’ + c b’ + c’ b’ b a’ + b a + b c’ c b’ + c b’ + c’

  19. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ a b’ + c b’ + c’ b’ b a’ + b a + b b c’ c b’ + c b’ + c’

  20. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ a b’ + c b’ + c’ b’ b a’ + b a + b b c’ c b’ + c b’ + c’ c’ b’ + c

  21. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ a b’ + c b’ + c’ b’ b a’ + b a + b b c’ c b’ + c b’ + c’ c’ c b’ + c b’ + c’

  22. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 a + b a’ a b’ + c b’ + c’ b’ b a’ + b b’ a + b b c’ c a’ + b b’ + c b’ + c’ c’ c b’ + c b’ + c’

  23. Backtrack Search or DLL: Davis-Logemann-Loveland, 1962 UNSAT! a + b a’ a b’ + c b’ + c’ b’ b a’ + b b’ a + b b c’ c a’ + b b’ + c b’ + c’ c’ c b’ + c b’ + c’

  24. Core SAT Solving: the Principles • DLL could solve problems with <2000 clauses • How can modern SAT solvers solve problems with millions of clauses and variables? • The major principles: • Learning and pruning • Block already explored paths • Locality and dynamicity • Focus the search on the relevant data • Well-engineered data structures • Extremely fast propagation

  25. Agenda • Introduction • Early Days of SAT Solving • Core SAT Solving • Conflict Analysis and Learning • Boolean Constraint Propagation • Decision Heuristics • Restart Strategies • Inprocessing • Extensions to SAT • Incremental SAT Solving under Assumptions • Simultaneous Satisfiability (SSAT) • Diverse Solutions Generation • High-level (group-oriented) MUC Extraction

  26. Duality between Basic Backtrack Search and Resolution One can associate a resolution derivation with every invocation of DLL over an unsatisfiable formula

  27. Duality between Basic Backtrack Search and Resolution a + b b’ + c b’ + c’ a’ + b

  28. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ a’ + b

  29. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ b’ a’ + b a + b

  30. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ b’ b a’ + b a + b • A parent clause P(x) is associated with every flip operation for variable x. It contains: • The flipped literal • A subset of previously assigned falsified literals • The parent clause justifies the flip: its existence proves that the explored subspace has no solutions

  31. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ b’ b a’ + b a + b c’ b’ + c

  32. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ b’ b a’ + b a + b c’ c b’ + c

  33. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c b’ + c’ b’ b a’ + b a + b c’ c b’ + c b’ + c’

  34. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c • Backtracking over a flipped variable x can be associated with a resolution operation: • P = P(x)  P • P is to become the parent clause for the upcoming flip • P is initialized with the last blocking clause b’ + c’ b’ b Pnew a’ + b a + b b’ c’ c P(c) Pold b’ + c b’ + c’

  35. Duality between Basic Backtrack Search and Resolution a + b a’ b’ + c Pnew a • Backtracking over a flipped variable x can be associated with a resolution operation: • P = P(x)  P • P is to become the parent clause for the upcoming flip • P is initialized with the last blocking clause b’ + c’ b’ b P(b) Pold a’ + b a + b b’ c’ c b’ + c b’ + c’

  36. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c (a) a b’ + c’ b’ b a’ + b a + b b’ c’ c b’ + c b’ + c’ • The parent clause P(a) is derived by resolution. • The resolution proof (a) of the parent clause is called parent resolution

  37. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b a + b b’ b c’ c b’ + c b’ + c’

  38. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b a + b b’ b c’ c b’ + c b’ + c’ c’ b’ + c

  39. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b a + b b’ b c’ c b’ + c b’ + c’ c’ c P(c) b’ + c

  40. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b a + b b’ b c’ c b’ + c b’ + c’ c’ c b’ + c b’ + c’

  41. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b a + b b’ b c’ c Pnew b’ b’ + c b’ + c’ c’ c P(c) Pold b’ + c b’ + c’

  42. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b b’ a + b b’ b c’ c (b) b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  43. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c a b’ + c’ b’ b a’ + b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  44. Duality between Basic Backtrack Search and Resolution a + b a’ a b’ + c Pnew a a’ b’ + c’ b’ b a’ + b b’ a + b b’ b c’ c P(b) Pold a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  45. Duality between Basic Backtrack Search and Resolution Pnew a + b  a’ a P(a) b’ + c Pold a a’ b’ + c’ b’ b a’ + b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  46. Duality between Basic Backtrack Search and Resolution a + b  a’ a b’ + c a a’ b’ + c’ b’ b a’ + b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  47. Duality between Basic Backtrack Search and Resolution • The final trace of DLL is both a decision tree(top-down view) and a resolution refutation (bottom-up view) • Variables associated with the edges are both decision variables in the tree and pivot variables for the resolution • A forest of parent resolutions is maintained • The forest converges to one resolution refutation in the end (for an UNSAT formula)  a’ a a a’ b’ b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  48. Conflict Clause Recording • The idea: update the instance with conflict clauses, that is some of the clauses generated by resolution • Introduced in SAT by Bayardo&Schrag, 1997 (rel_sat)  a’ a a a’ b’ b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  49. Conflict Clause Recording • Assume the brown clause below was recorded  a’ a a a’ b’ b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

  50. Conflict Clause Recording • Assume the brown clause below was recorded • The violet part would not have been explored • It is redundant  a’ a a a’ b’ b b’ a + b b’ b c’ c a’ + b b’ b’ + c b’ + c’ c’ c b’ + c b’ + c’

More Related