Closed oralmer closed 1 year ago
Thanks for setting it up to run!
After staring at both SMT files for a bit I found the bug: the issue is actually with get_minimal_model
, which does not remember the indicator variables used for the previous call to check_sat
. I think we'll just have to remember the indicator variables in Solver
; the API is fundamentally stateful, if only due to the solver state.
I double-checked that in your example both models evaluate to 1 if you use get_model
.
@tchajed thanks!
Seen in the branch
unsat_core_bug
by runningcargo run -- updr-verify ./examples/lockserver.fly
- Sorry for the messy execution, I had to set up a lot of context to get this to run... The added body of code is at the bottom ofsrc/command.rs
When checking sat on a group of terms by
assert
ing them, and then callingcheck_sat
on an empty hashmap, we get the correct result. However, when checking sat using indicator variables, we get a different, incorrect result - this incorrectness is seen in the calls toeval
in the results.In the branch, I took a term of the form
exists n1, n2. f(n1) & g(n1) & h(n2) & ...
- to add indicators I converted it to the termexists n1, n2. (ind1 = f(n1)) & (ind2 = g(n1)) & (ind3 = h(n2)) & ...
and then calledcheck_sat
on a hashmap containing{ind: true}
for all indicators. I also triedind1 <-> f(n1)
and got the same results.