std::map<Node, Node>& arithModel,
std::map<Node, std::pair<Node, Node>>& approximations)
{
+ Trace("nl-model") << "NlModel::getModelValueRepair:" << std::endl;
+
// Record the approximations we used. This code calls the
// recordApproximation method of the model, which overrides the model
// values for variables that we solved for, using techniques specific to
// this class.
- Trace("nl-model") << "NlModel::getModelValueRepair:" << std::endl;
NodeManager* nm = NodeManager::currentNM();
for (const std::pair<const Node, std::pair<Node, Node> >& cb :
d_check_model_bounds)
arithModel[v] = s;
Trace("nl-model") << v << " solved is " << s << std::endl;
}
+
+ // multiplication terms should not be given values; their values are
+ // implied by the monomials that they consist of
+ std::vector<Node> amErase;
+ for (const std::pair<const Node, Node>& am : arithModel)
+ {
+ if (am.first.getKind() == NONLINEAR_MULT)
+ {
+ amErase.push_back(am.first);
+ }
+ }
+ for (const Node& ae : amErase)
+ {
+ arithModel.erase(ae);
+ }
}
} // namespace arith
regress1/nl/issue3617.smt2
regress1/nl/issue3647.smt2
regress1/nl/issue3656.smt2
+ regress1/nl/issue3803-nl-check-model.smt2
regress1/nl/metitarski-1025.smt2
regress1/nl/metitarski-3-4.smt2
regress1/nl/metitarski_3_4_2e.smt2
--- /dev/null
+; COMMAND-LINE: --ext-rew-prep
+; EXPECT: sat
+(set-logic ALL)
+(set-info :status sat)
+(declare-fun a () Real)
+(declare-fun b () Real)
+(declare-fun c () Real)
+(declare-fun d () Real)
+(declare-fun e () Real)
+(assert (exists ((f Real)) (and (or (> (+ d (* (/ (* c e) (- (* c e) e)) f)) 0 (/ 0 a))) (> e 6))))
+(assert (distinct a (/ b e)))
+(check-sat)