Is it possible to check, which of the soft-assertions of a problem have been given up by NuZ?
Let's see this example:
(declare-fun x () Int)
(declare-fun y () Int)
(assert-soft (=> (= x 2) (= y 1)) :weight 1)
(assert-soft (=> (= x 3) (= y 2)) :weight 1)
(assert-soft (=> (= x 4) (= y 2)) :weight 1)
(assert-soft (=> (= x 4) (= y 3)) :weight 1)
;(assert (= x 1))
;(assert (= x 2))
;(assert (= x 3))
(assert (= x 4))
;(assert (not (= y 3)))
(check-sat)
(get-model)
The result is shown as:
|-> 1
sat
(model
(define-fun y () Int
3)
(define-fun x () Int
4)
)
The cost is 1. But which of the rules have been given up?
Of course, in this simple example it is easily possible to deduct this. In a more complex scenario, it can be a bit difficult or even impossible.
A layer of indirections does the trick:
This code yields:
And with A1, A2 and B1 you know exactly which rules are used and which are given up.