On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of...
-
Upload
allen-alexander -
Category
Documents
-
view
218 -
download
0
Transcript of On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of...
![Page 1: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/1.jpg)
On Finding All Minimally Unsatisfiable Subformulas
Mark Liffiton and Karem SakallahUniversity of Michigan
{liffiton, karem}@eecs.umich.edu
June 21, 2005
![Page 2: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/2.jpg)
2
Problem Description
Given: Infeasible set of constraints C Goal: All Minimal Unsatisfiable Subsets of C
AKA “MUSes” Minimal Unsat.: All proper subsets satisfiable Compact explanations of infeasibility
{{CC11,,CC22,,CC33,,CC44,,CC55} } UNSAT UNSAT
{{CC11,,CC33,,CC44} } UNSAT UNSAT
{ { CC33,,CC44} } SATSAT
{{CC11, , CC44} } SATSAT
{{CC11,,CC33 } } SAT SAT
(MUS)(MUS)
![Page 3: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/3.jpg)
3
Running Example
Boolean CNF example:
4 constraints (clauses) 2 MUSes:
MUS1 = {(a),(a)}
MUS2 = {(a),(a b),(b)}
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
![Page 4: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/4.jpg)
4
Outline
Problem Description
Motivation
Maximal Satisfiability / Minimal Unsatisfiability
Algorithms
Experimental Results
Future Work
![Page 5: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/5.jpg)
5
Motivation
Diagnosis of infeasibility User feedback
• User creates constraint system.Infeasible when expect/require feasibility.MUSes point user to minimized causes of infeasibility.
• Aid understanding of large, infeasible systems
Automatic processes• Generally: Any process that needs to reason about
infeasible constraint systems
• Counterexample-guided abstraction refinement (CEGAR) in model checking systems
![Page 6: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/6.jpg)
6
Why All MUSes?
Generally: A set of constraints is infeasible as long as it
contains any MUSes Correcting one MUS may leave others Optimal corrections could require knowledge of
all MUSes Specific example: CEGAR
Abstraction used to reduce state space MUSes used to generalize spurious
counterexamples for refinement of abstraction Many generalizations possible, many of them
induce poor refinement
![Page 7: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/7.jpg)
7
First Step: Max-SAT and MSSes
Max-SATMaximum cardinality satisfiable set of clauses
Maximal Satisfiable Subsets (MSSes)Inaugmentable satisfiable set of clauses
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
(a) (a) (a b) (b)
(a) (a) (a b) (b)
(a) (a) (a b) (b)
![Page 8: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/8.jpg)
8
A Hint of Duality
MSS Satisfiable Cannot be made larger
MUS Unsatisfiable Cannot be made smaller
![Page 9: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/9.jpg)
9
Another Step: CoMSSes
A CoMSS is the complement of an MSS
Each CoMSS provides an irreducible “fix” to the formula: removing its clauses makes the formula satisfiable (turns it into an MSS).
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
(a) (a) (a b) (b)
= elementof MSS
= elementof CoMSS
= elementof MSS
= elementof CoMSS
![Page 10: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/10.jpg)
10
The Link: CoMSSes and MUSes
Known:1. A formula is SAT iff it contains no MUSes
2. Removing the clauses in a CoMSS from a formula makes it SAT
Removing the clauses in a CoMSS removes at least one clause from every MUS in a formula.
Every CoMSS is an irreducible hitting set of the collection of all MUSes.
![Page 11: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/11.jpg)
11
Hitting Sets in the Example
CoMSS1 = {(a)}
CoMSS2 = {(a),(a b)}
CoMSS3 = {(a),(b)}
MUS1 = {(a),(a)}
MUS2 = {(a),(a b),(b)}
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
Given a collection of sets M, a hitting set of M is a set that contains at least one element from each set in M.
![Page 12: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/12.jpg)
12
The Duality: CoMSSes and MUSes
Additionally, each MUS is an irreducible hitting set of the collection of all CoMSSes
Hitting sets provide a transformation from one collection to the other
MUSesCoMSSeshitting sets
hitting sets
![Page 13: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/13.jpg)
13
Exploiting the Relationship
In practice, finding satisfiable subsets of constraints is easier than unsatisfiable i.e., MSSes easier to find than MUSes Because SAT is “easier” than UNSAT
How to Find All MUSes: Find CoMSSes Compute minimal hitting sets of the CoMSSes
![Page 14: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/14.jpg)
14
Outline
Problem Description
Motivation
Maximal Satisfiability / Minimal Unsatisfiability
Algorithms
Experimental Results
Conclusions and Future Work
![Page 15: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/15.jpg)
15
Algorithms for Finding All MUSes
Separate steps CAMUS(Compute All Minimal Unsatisfiable Subsets – Liffiton & Sakallah)
Interleaved steps DAA(Dualize and Advance – Bailey & Stuckey)
![Page 16: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/16.jpg)
16
CAMUS: Finding All CoMSSes
Augment CNF with clause selector variablesCi = xi1 xi2 … xin
becomes
Ci = yi xi1 xi2 … xin
Y-variables permit enabling/disabling constraints within DPLL-style search
A CoMSS can be obtained by solving an optimization problem Find a solution to the augmented formula with
the fewest y-variables assigned FALSE Add blocking clauses to block old solutions
![Page 17: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/17.jpg)
17
CAMUS: Finding All CoMSSes
Optimization: Solve incrementally using a sliding objective Start by finding all CoMSSes w/ 1 clause, then
all w/ 2, etc… until all found Implemented with an AtMost constraint
Within a single bound, the algorithm can utilize a single incremental search, exploiting all common SAT techniques (esp. learned clauses)
1 21
AtMost({ , , , }, ) assign( )n
n ii
l l l k l k=
º £åK
![Page 18: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/18.jpg)
18
1. Add clause-selector variables
2. Add AtMost constraint
3. First solution – y1 is FALSEAdd blocking clause and COMSS
4. No further solutions, increment AtMost
5. Second solution – y2 and y3 are FALSEAdd blocking clause and CoMSS
6. Third solution – y2 and y4 are FALSEAdd blocking clause and CoMSS
7. No further solutions, even without AtMost constraint
AtMost({y1 ,y2,y3,y4} , 1)
Clauses
a
a
a b
b
Clauses
y1 a
y2 a
y3 a b
y4 b
Clauses
y1 a
y2 a
y3 a b
y4 b
y1
Clauses
y1 a
y2 a
y3 a b
y4 b
y1
y2 y3
Clauses
y1 a
y2 a
y3 a b
y4 b
y1
y2 y3
y2 y4
AtMost({y1 ,y2,y3,y4} , 2)
CoMSSes
{a}
CoMSSes
{a}
{a, a b}
CoMSSes
{a}
{a, a b}
{a, b}
CAMUS: Finding All CoMSSes
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
![Page 19: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/19.jpg)
19
CAMUS: Obtaining a Single MUS
Goal: Irreducible Hitting Set Straightforward construction, no search Iteratively choose clauses to add to MUS
• Choice can be arbitrary
For each chosen clause, alter remaining problem to make that clause essential
![Page 20: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/20.jpg)
20
CAMUS: Obtaining a Single MUS
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
CoMSS1 = {(a)}
CoMSS2 = {(a),(a b)}
CoMSS3 = {(a),(b)}
1. Select a clause to add to the MUS (a b)
![Page 21: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/21.jpg)
21
CAMUS: Obtaining a Single MUS
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
CoMSS1 = {(a)}
CoMSS2 = {(a),(a b)}
CoMSS3 = {(a),(b)}
1. Select a clause to add to the MUS (a b)
2. Select a CoMSS in which it appears (CoMSS2)
![Page 22: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/22.jpg)
22
CAMUS: Obtaining a Single MUS
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
CoMSS1 = {(a)}
CoMSS2 = {(a),(a b)}
CoMSS3 = {(a),(b)}
1. Select a clause to add to the MUS (a b)
2. Select a CoMSS in which it appears (CoMSS2)
3. Remove any other clauses in that CoMSS from the problem
• This makes the chosen clause essential for that CoMSS
![Page 23: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/23.jpg)
23
CAMUS: Obtaining a Single MUS
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
CoMSS1 = {(a)}
CoMSS2 = {(a b)}
CoMSS3 = {(b)}
1. Select a clause to add to the MUS (a b)
2. Select a CoMSS in which it appears (CoMSS2)
3. Remove any other clauses in that CoMSS from the problem
• This makes the chosen clause essential for that CoMSS
4. Remove any CoMSSes in which the clause appears
• They are now “hit” by the MUS
![Page 24: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/24.jpg)
24
CAMUS: Obtaining a Single MUS
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
CoMSS1 = {(a)}
CoMSS3 = {(b)}
1. Select a clause to add to the MUS (a b)
2. Select a CoMSS in which it appears (CoMSS2)
3. Remove any other clauses in that CoMSS from the problem
• This makes the chosen clause essential for that CoMSS
4. Remove any CoMSSes in which the clause appears
• They are now “hit” by the MUS
5. Iterate until no CoMSSes remain
![Page 25: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/25.jpg)
25
CAMUS: Obtaining All MUSes
Use general form of single MUS method Branch on choice of clause and CoMSS to
make all possible MUSes Tree is not irredundant, so ordering heuristics
and memoization are used to prune / limit the tree size
Very fast in practice: Millions of MUSes in minutes
![Page 26: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/26.jpg)
26
Bailey & Stuckey’s Algorithm
Dualize And Advance (DAA)
Finds CoMSSes by “growing” MSSes
Interleaves MUS construction w/ MSS search
![Page 27: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/27.jpg)
27
aa
aabb
bb
DAA: Finding CoMSSes
Grow MSS from a satisfiable seed Add corresponding CoMSS to collection
aa
MSS={a , ab}
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
![Page 28: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/28.jpg)
28
DAA: Computing Hitting Sets
Calculate irreducible hitting sets of CoMSSes after each additional CoMSS is found Incremental cross-product Minimize results
HS1={a}
HS2={ab , b}
New CoMSS
{a}{a , a}
{ab , b , a}
New Hitting Sets
Min
imiz
e(r
em
ove s
ubsu
med)
= (a) (= (a) (a) (a) (a a b) ( b) (b)b) = (a) (= (a) (a) (a) (a a b) ( b) (b)b)
![Page 29: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/29.jpg)
29
DAA: Computing Hitting Sets
Check each new hitting set for satisfiability If UNSAT, add to collection of MUSes If SAT, use as seed for growing next MSS
{a , a}
{ab , b , a}
New Hitting Sets
Both are UNSAT, both are MUSesNone are SAT, thus done
![Page 30: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/30.jpg)
30
Comparison for Boolean CNF
Overall: CAMUS is much faster than DAA for Boolean CNF (Usually about 2-3 orders of magnitude faster)
Mostly due to: Integration with SAT solver Calculating hitting sets once, not checking
them for SAT/UNSAT
![Page 31: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/31.jpg)
31
Experimental ResultsRuntime to find all MUSes (in seconds) for 32
benchmarks, sorted by increasing CAMUS runtime
0.01
0.1
1
10
100
1000
DAACAMUS
>600
![Page 32: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/32.jpg)
32
Future Work
Relaxations / approximations Trade off completeness/correctness for speed Find fewer than all MUSes Find non-minimal USes Utilize ideas from Dualize and Advance
Investigating further applications of the algorithm Anywhere that constraints are used, potentially New territory, due to novelty of solution
![Page 33: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/33.jpg)
33
Thank You
![Page 34: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/34.jpg)
34
Related Work
Finding a single US (potentially multiple) Bruni & Sassano, zCore, AMUSE, others
• Boolean CNF
• Modify or use information from a standard SAT search
Chinneck, et al• Linear programs
• “Irreducible Infeasible Subset” (IIS)
None guarantee minimality (irreducibility) Minimizing a US to an MUS
Jinbo Huang: “A Minimal Unsatisfiability Prover”
![Page 35: On Finding All Minimally Unsatisfiable Subformulas Mark Liffiton and Karem Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu June 21, 2005.](https://reader035.fdocuments.in/reader035/viewer/2022062315/5697bf701a28abf838c7d84a/html5/thumbnails/35.jpg)
35
Related Work (cont.)
Theoretical work Complexity of identifying MUSes
• Deciding whether a CNF formula is minimally unsatisfiable is DP-Complete
Complexity bounds on identifying certain classes of MUSes