This document contains some intuition for the new Explorer classes in
clingoexplaid.
Example Program
$\Pi$ :UNSATAssumptions$A$ :+a,+b,+c,+dMUS:{a,b},{b,d}
Note
Example Search Space
| Subset | Type |
|---|---|
{} |
🟢 SAT |
{a} |
🟢 SAT |
{b} |
🟢 SAT |
{c} |
🟢 SAT |
{d} |
🟢 SAT |
{a,b} |
🔴 MUS |
{a,c} |
🟢 SAT |
{a,d} |
🟢 SAT |
{b,c} |
🟢 SAT |
{b,d} |
🔴 MUS |
{c,d} |
🟢 SAT |
{a,b,c} |
🔴 US |
{a,b,d} |
🔴 US |
{b,c,d} |
🔴 US |
{a,c,d} |
🟢 SAT |
{a,b,c,d} |
🔴 US |
For the explored check and finding the next suitable subset candidates an ASP exploration encoding is used
Note
Example for the Exploration Encoding
1{_unsat; _sat}. % Satisfiability indicators
{a;b;c;d}. % Assumption choicesWhen the iterative deletion algorithm (ID) is called on the full assumption set, the following subsets are checked in the listed order:
🔴 UNSAT:{a,b,c,d}- No constraint added
🔴 UNSAT:{b,c,d}- No constraint added
🟢 SAT:{c,d}- Constraint added:
:- not a, not b, _sat.
- Constraint added:
🟢 SAT:{b}(working set)- Constraint added:
:- not a, not c, not d, _sat.
- Constraint added:
🔴 UNSAT:{d} ∪ {b}- No constraint added
🟢 SAT:{} ∪ {b}- Constraint added:
:- not a, not c, not d, _sat.(duplicate)
- Constraint added:
- MUS found :
{b,d}- Constraint added:
:- b, d, _unsat.
- Constraint added:
Now after finding the first MUS with the ID algorithm, the updated clingo and the first answer set is taken
as the next MUS candidate. For getting only the valid next possible candidates
_unsat and _sat are both assumed True.
The same clingo.Control object with the updated exploration encoding from
[[#Enumerating MUS Candidates]] is used to check whether a provided subset
unexplored, explored(sat), or explored(unsat).
For that, all assumptions of the subset are assumed, while also the assumptions
missing from the subset (
Note
Example Assumptions
For the subset {a,c,d} we would assume (a,True), (b,False), (c,True),
and (d,True).
Then clingo is called and all models are returned. Now one of three cases
holds:
- 1 Model, with
_satincluded- This indicates that the subset is already explored and unsatisfiable
- 1 Model, with
_unsatincluded- This indicates that the subset is already explored and satisfiable
- 3 Models
- This indicates that the subset is not explored yet and a valid next candidate