// no non-linear constraints, we are done
return;
}
+ Trace("nl-ext") << "NonlinearExtension::interceptModel begin" << std::endl;
d_model.reset(d_containing.getValuation().getModel(), arithModel);
// run a last call effort check
d_cmiLemmas.clear();
d_cmiLemmasPp.clear();
if (!d_builtModel.get())
{
+ Trace("nl-ext") << "interceptModel: do model-based refinement" << std::endl;
modelBasedRefinement(d_cmiLemmas, d_cmiLemmasPp);
}
if (d_builtModel.get())
{
+ Trace("nl-ext") << "interceptModel: do model repair" << std::endl;
d_approximations.clear();
// modify the model values
d_model.getModelValueRepair(arithModel, d_approximations);
{
if (!m->assertEquality(p.first, p.second, true))
{
+ // If we failed to assert an equality, it is likely due to theory
+ // combination, namely the repaired model for non-linear changed
+ // an equality status that was agreed upon by both (linear) arithmetic
+ // and another theory. In this case, we must add a lemma, or otherwise
+ // we would terminate with an invalid model. Thus, we add a splitting
+ // lemma of the form ( x = v V x != v ) where v is the model value
+ // assigned by the non-linear solver to x.
+ Node eq = p.first.eqNode(p.second);
+ Node lem = NodeManager::currentNM()->mkNode(kind::OR, eq, eq.negate());
+ d_containing.d_out->lemma(lem);
return false;
}
}
regress1/nl/exp_monotone.smt2
regress1/nl/factor_agg_s.smt2
regress1/nl/issue3441.smt2
+ regress1/nl/issue3617.smt2
regress1/nl/issue3656.smt2
regress1/nl/metitarski-1025.smt2
regress1/nl/metitarski-3-4.smt2
--- /dev/null
+(set-logic ALL)
+(set-info :status sat)
+(declare-fun a () Real)
+(declare-fun b () Real)
+(declare-fun dbz (Real) Real)
+(assert
+(let ((_let_0 (dbz 0.0))) (let ((_let_1 (= b 0.0))) (let ((_let_2 (/ 1.0 a))) (let ((_let_3 (dbz 1.0))) (let ((_let_4 (= a 0.0))) (let ((_let_5 (ite _let_4 _let_3 _let_2))) (let ((_let_6 (/ _let_5 b))) (let ((_let_7 (dbz _let_5))) (let ((_let_8 (dbz (dbz (ite _let_1 _let_7 _let_6))))) (or (>= (* (- 1.0) (ite (= _let_8 0.0) _let_0 (/ 0.0 _let_8))) 0.0) (>= _let_0 0.0)))))))))))
+)
+(assert (> a 0))
+(check-sat)
+(get-model)