Fixes #8276.
Theory::getModelValue is used as an optimization for computing the care graph of arrays. This method was wrong for (non-linear) arithmetic when the NL extension repaired values in the model.
}
Node TheoryArith::getModelValue(TNode var) {
+ std::map<Node, Node>::iterator it = d_arithModelCache.find(var);
+ if (it != d_arithModelCache.end())
+ {
+ return it->second;
+ }
return d_internal->getModelValue( var );
}
regress0/arrays/issue6807-idem-rew.smt2
regress0/arrays/issue7596-define-array-uminus.smt2
regress0/arrays/issue8103-1-weak-equiv-models.smt2
+ regress0/arrays/issue8276-arith-getModelValue.smt2
regress0/arrays/swap_t1_np_nf_ai_00005_007.cvc.smtv1.smt2
regress0/arrays/x2.smtv1.smt2
regress0/arrays/x3.smtv1.smt2
--- /dev/null
+(set-logic ANRA)
+(set-info :status sat)
+(declare-fun r4 () Real)
+(declare-fun r9 () Real)
+(declare-fun arr () (Array Bool (Array Real Real)))
+(declare-fun r38 () Real)
+(assert (< r38 r9))
+(assert (= 1.0 (* r4 (select (select arr true) 0.0))))
+(assert (= 0.0 (* r9 (select (select arr true) r9))))
+(check-sat)