from satisfaction to optimization and beyond
play

From satisfaction to optimization, and beyond SAT-based guided - PowerPoint PPT Presentation

From satisfaction to optimization, and beyond SAT-based guided problem solving Daniel Le Berre joint work with Mutsunori Banbara, Tiago de Lima, Jean-Marie Lagniez, Valentin Montmirail, Stphanie Roussel, Naoyuki Tamura, Takehide Soh CNRS,


  1. From satisfaction to optimization, and beyond SAT-based guided problem solving Daniel Le Berre joint work with Mutsunori Banbara, Tiago de Lima, Jean-Marie Lagniez, Valentin Montmirail, Stéphanie Roussel, Naoyuki Tamura, Takehide Soh CNRS, Université d’Artois, FRANCE {leberre}@cril.univ-artois.fr SAT+SMT school, IIT Bombay, India, 10 December 2019

  2. 2 Purpose of this talk ◮ Using SAT solvers are black boxes ◮ Importance of the interaction with the solver ◮ When encodings are too large

  3. 3 The SAT problem: textbook definition Definition Input : A set of clauses C built from a propositional language with n variables. Output : Is there an assignment of the n variables that satisfies all those clauses?

  4. 3 The SAT problem: textbook definition Definition Input : A set of clauses C built from a propositional language with n variables. Output : Is there an assignment of the n variables that satisfies all those clauses? Example C 1 = {¬ a ∨ b , ¬ b ∨ c } = ( ¬ a ∨ b ) ∧ ( ¬ b ∨ c ) = ( a ′ + b ) . ( b ′ + c ) C 2 = C 1 ∪ { a , ¬ c } = C 1 ∧ a ∧ ¬ c For C 1 , the answer is yes, for C 2 the answer is no C 1 | = ¬ ( a ∧ ¬ c ) = ¬ a ∨ c

  5. 4 The SAT problem solver: practical point of view 1/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else answer UNSAT.

  6. 4 The SAT problem solver: practical point of view 1/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else answer UNSAT. Example C 1 = {¬ a ∨ b , ¬ b ∨ c } = ( ¬ a ∨ b ) ∧ ( ¬ b ∨ c ) = ( a ′ + b ) . ( b ′ + c ) C 2 = C 1 ∪ { a , ¬ c } = C 1 ∧ a ∧ ¬ c For C 1 , one answer is { a , b , c } , for C 2 the answer is UNSAT.

  7. 4 The SAT problem solver: practical point of view 1/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else answer UNSAT. Example C 1 = {¬ a ∨ b , ¬ b ∨ c } = ( ¬ a ∨ b ) ∧ ( ¬ b ∨ c ) = ( a ′ + b ) . ( b ′ + c ) C 2 = C 1 ∪ { a , ¬ c } = C 1 ∧ a ∧ ¬ c For C 1 , one answer is { a , b , c } , for C 2 the answer is UNSAT. SAT answers can be checked: trusted model oracle

  8. 5 The SAT problem solver: practical point of view 2/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else provide a subset of C which cannot be satisfied.

  9. 5 The SAT problem solver: practical point of view 2/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else provide a subset of C which cannot be satisfied. Example C 1 = {¬ a ∨ b , ¬ b ∨ c } = ( ¬ a ∨ b ) ∧ ( ¬ b ∨ c ) = ( a ′ + b ) . ( b ′ + c ) C 2 = C 1 ∪ { a , ¬ c } = C 1 ∧ a ∧ ¬ c For C 1 , one answer is { a , b , c } , for C 2 the answer is C 2

  10. 5 The SAT problem solver: practical point of view 2/3 Definition Input : A set of clauses C built from a propositional language with n variables. Output : If there is an assignment of the n variables that satisfies all those clauses, provide such assignment, else provide a subset of C which cannot be satisfied. Example C 1 = {¬ a ∨ b , ¬ b ∨ c } = ( ¬ a ∨ b ) ∧ ( ¬ b ∨ c ) = ( a ′ + b ) . ( b ′ + c ) C 2 = C 1 ∪ { a , ¬ c } = C 1 ∧ a ∧ ¬ c For C 1 , one answer is { a , b , c } , for C 2 the answer is C 2 UNSAT core may explain inconsistency if much smaller than C : informative UNSAT oracle

  11. 6 The SAT problem solver: practical point of view 3/3 Definition Allow the solver to decide the satisfiability of a formula with: ◮ increasing number of constraints ◮ provided some “assumptions" are satisfied

  12. 6 The SAT problem solver: practical point of view 3/3 Definition Allow the solver to decide the satisfiability of a formula with: ◮ increasing number of constraints ◮ provided some “assumptions" are satisfied Example C = { s 1 ∨ ¬ a ∨ b , s 1 ∨ ¬ b ∨ c , s 2 ∨ a , s 2 ∨ ¬ c } C 1 ≡ C ∧ ¬ s 1 ∧ s 2 C 2 ≡ C ∧ ¬ s 1 ∧ ¬ s 2

  13. 6 The SAT problem solver: practical point of view 3/3 Definition Allow the solver to decide the satisfiability of a formula with: ◮ increasing number of constraints ◮ provided some “assumptions" are satisfied Example C = { s 1 ∨ ¬ a ∨ b , s 1 ∨ ¬ b ∨ c , s 2 ∨ a , s 2 ∨ ¬ c } C 1 ≡ C ∧ ¬ s 1 ∧ s 2 C 2 ≡ C ∧ ¬ s 1 ∧ ¬ s 2 The solver is considered as a stateful system: as long as the constraints are satisfiable, learn clauses can be kept: incremental SAT oracle

  14. 7 How to solve MaxSat MinUnsat with SAT? ◮ Associate to each clause a weight (penalty) w i taken into account if the clause is violated: Soft clauses S . ◮ Special weight ( ∞ ) for clauses that cannot be violated: hard clauses H Definition (Partial Weighted MaxSat) Find a model M of H that minimizes weight ( M , S ) such that: ◮ weight ( M , ( c i , w i )) = 0 if M satisfies c i , else w i . ◮ weight ( M , S ) = � wc ∈ S weight ( M , wc ) Simply called MaxSAT if k = 1 and H = ∅

  15. 7 How to solve MaxSat MinUnsat with SAT? ◮ Associate to each clause a weight (penalty) w i taken into account if the clause is violated: Soft clauses S . ( ¬ a ∨ b , 6 ) ∧ ( ¬ b ∨ c , 8 ) ◮ Special weight ( ∞ ) for clauses that cannot be violated: hard clauses H Definition (Partial Weighted MaxSat) Find a model M of H that minimizes weight ( M , S ) such that: ◮ weight ( M , ( c i , w i )) = 0 if M satisfies c i , else w i . ◮ weight ( M , S ) = � wc ∈ S weight ( M , wc ) Simply called MaxSAT if k = 1 and H = ∅

  16. 7 How to solve MaxSat MinUnsat with SAT? ◮ Associate to each clause a weight (penalty) w i taken into account if the clause is violated: Soft clauses S . ( ¬ a ∨ b , 6 ) ∧ ( ¬ b ∨ c , 8 ) ◮ Special weight ( ∞ ) for clauses that cannot be violated: hard clauses H ( a , ∞ ) ∧ ( ¬ c , ∞ ) Definition (Partial Weighted MaxSat) Find a model M of H that minimizes weight ( M , S ) such that: ◮ weight ( M , ( c i , w i )) = 0 if M satisfies c i , else w i . ◮ weight ( M , S ) = � wc ∈ S weight ( M , wc ) Simply called MaxSAT if k = 1 and H = ∅

  17. 7 How to solve MaxSat MinUnsat with SAT? ◮ Associate to each clause a weight (penalty) w i taken into account if the clause is violated: Soft clauses S . ( ¬ a ∨ b , 6 ) ∧ ( ¬ b ∨ c , 8 ) ◮ Special weight ( ∞ ) for clauses that cannot be violated: hard ( a , ∞ ) ∧ ( ¬ c , ∞ ) clauses H Definition (Partial Weighted MaxSat) Find a model M of H that minimizes weight ( M , S ) such that: ◮ weight ( M , ( c i , w i )) = 0 if M satisfies c i , else w i . ◮ weight ( M , S ) = � wc ∈ S weight ( M , wc ) weight of { a , ¬ b , ¬ c } is 6 Simply called MaxSAT if k = 1 and H = ∅

  18. 8 Linear Search for solving MaxSAT x 6 , x 2 ¬ x 6 , x 2 ¬ x 2 , x 1 ¬ x 1 ¬ x 6 , x 8 x 6 , ¬ x 8 ¬ x 4 , x 5 x 2 , x 4 x 7 , x 5 ¬ x 7 , x 5 ¬ x 5 , x 3 ¬ x 3 Example CNF formula ( k = 1 for each clause, not displayed)

  19. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 Add selector or blocking variables b i

  20. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 Formula is SAT; eg model M contains b 1 , ¬ b 2 , b 3 , ¬ b 4 , b 5 , ¬ b 7 , ¬ b 8 , ¬ b 9 , b 10 , ¬ b 11 , b 12

  21. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 � 12 i = 1 b i < 5 Bound the number of constraints to be relaxed: | M ∩ B | = 5

  22. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 � 12 i = 1 b i < 5 Formula is (again) SAT; eg model contains b 1 , ¬ b 2 , ¬ b 3 , ¬ b 4 , ¬ b 5 , ¬ b 7 , ¬ b 8 , ¬ b 9 , ¬ b 10 , ¬ b 11 , b 12

  23. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 � 12 i = 1 b i < 2 Bound the number of constraints to be relaxed | M ∩ B | = 2

  24. 8 Linear Search for solving MaxSAT x 6 , x 2 , b 7 ¬ x 6 , x 2 , b 8 ¬ x 2 , x 1 , b 1 ¬ x 1 , b 2 ¬ x 6 , x 8 , b 9 x 6 , ¬ x 8 , b 10 x 2 , x 4 , b 3 ¬ x 4 , x 5 , b 4 x 7 , x 5 , b 11 ¬ x 7 , x 5 , b 12 ¬ x 5 , x 3 , b 5 ¬ x 3 , b 6 � 12 i = 1 b i < 2 Instance is now UNSAT

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