Presentation is loading. Please wait.

Presentation is loading. Please wait.

C OMPUTING U NSAT C ORES O F B OOLEAN A ND SMT F ORMULAS Computing Small Unsatisfiable Cores in Satisfiability Modulo Theories Alessandro Cimatti, Alberto.

Similar presentations


Presentation on theme: "C OMPUTING U NSAT C ORES O F B OOLEAN A ND SMT F ORMULAS Computing Small Unsatisfiable Cores in Satisfiability Modulo Theories Alessandro Cimatti, Alberto."— Presentation transcript:

1 C OMPUTING U NSAT C ORES O F B OOLEAN A ND SMT F ORMULAS Computing Small Unsatisfiable Cores in Satisfiability Modulo Theories Alessandro Cimatti, Alberto Griggio and Roberto Sebastiani Algorithms for Computing Minimal Unsatisfiable Subsets of Constraints Mark H. Liffiton and Karem A. Sakallah Lecturer: Bat-Chen Golden

2 E XAMPLE SAT/UNSAT? Why?

3 U NSAT CORES

4 M INIMAL UNSAT CORES

5 O UR PLAN

6 E XAMPLE

7 C ORRECTING SUBSETS

8 C ONNECTION BETWEEN MUS ES AND MCS ES

9

10 H ITTING SETS We are interested in finding minimal hitting sets, where minimal means removing any element from the set makes it no longer a hitting set. Notice that we are not interested in finding a minimum hitting set (a minimal hitting set with the smallest possible number of elements), which is the famous NP-Hard problem.

11 C ONNECTION BETWEEN MUS ES AND MCS ES

12 O UR APPROACH

13 P HASE 1: FIND ALL MCS ES What is the naïve way to find all correcting sets (leaving minimality a side)? Remove all possible subsets one by one and see if the remaining set is satisfiable. Now, how do we enforce minimality? By removing subsets in increasing size and making sure we don’t add a superset of a previous found MCS. And how do we implement this?

14 P HASE 1: FIND ALL MCS ES

15

16 We

17 P HASE 2: F IND ALL MINIMAL HITTING SETS OF THE MCS ES What is the naïve way to find a (not all) hitting set of all MCSes (leaving minimality a side)? Randomly pick a clause from an MCS which haven’t been covered yet. Now, how do we enforce minimality? After picking a random clause we make sure it will not be redundant by picking an MCS it appears in and removing the other clauses in it from all the other MCSes. For this process to always produce a valid hitting set we need to make sure no MCS includes another. And how do we implement this?

18 P HASE 2: F IND ALL MINIMAL HITTING SETS OF THE MCS ES

19

20 What should change if we want to find all hitting set of the MCSes? Instead of making a random choice of clause and MCS containing it we will use backtracking to go over all the possible choices. Note: this algorithm can produce duplicate outputs, for example: for the input MCSes {{C1,C2}, {C1,C3}}, The output {C1} will be produced twice. An optimization can be made to prevent this.

21 P HASE 2: F IND ALL MINIMAL HITTING SETS OF THE MCS ES

22 C ONCLUSION OF FIRST ARTICLE

23 S ECOND ARTICLE From now on we will discuss the article “A Simple and Flexible Way of Computing Small Unsatisfiable Cores in SAT Modulo Theories” by Alessandro Cimatti, Alberto Griggio, and Roberto Sebastiani. As its name implies, the article presents an algorithm for computing an unsat core for an SMT formula, based on a given algorithm for computing unsat cores for boolean formulas (such as the one we just saw).

24 E XAMPLE OVER EQUALITY LOGIC Reminder- the process of an SMT solver is more or less the following:

25 E XAMPLE OVER EQUALITY LOGIC Reminder- the process of an SMT solver is more or less the following: Generally there could be more iterations where the sat solver returns “sat” and the T-solver returns “unsat”, and each such iteration adds a “learning clause”

26 T HE BASIC CONCEPTS BEHIND THE ALGORITHM The algorithm will be based on the following two observations: The final Boolean formula created by this process is always unsatisfiable Otherwise we could have continued (we are assuming the formula is T-unsat, otherwise there is no unsat core to find). The “learning clauses” returned by the T-solver are always T-tautologies (satisfied by all possible assignments) The T-solver returns “false” only when a contradiction is found. The opposite of a contradiction is a tautology.

27 T HE ALGORITHM “Unabstract” Remove “learning clauses”, they are tautologies (by observation 2)

28 The end


Download ppt "C OMPUTING U NSAT C ORES O F B OOLEAN A ND SMT F ORMULAS Computing Small Unsatisfiable Cores in Satisfiability Modulo Theories Alessandro Cimatti, Alberto."

Similar presentations


Ads by Google