We previously required model values to be "values", i.e., constants or constant-like stuff like real algebraic numbers or lambdas. This is an inherent problem for, e.g, transcendental models: the simplest model for a transcendental problem may legitimately be 3 * PI or PI + exp(3). This PR removes this restriction, only requiring that values are rewritten.
Node rc = m->getRepresentative(un[j]);
Trace("model-builder-debug2") << " get rep : " << un[j] << " returned "
<< rc << std::endl;
- Assert(TheoryModel::isValue(rc));
+ Assert(rewrite(rc) == rc);
children.push_back(rc);
}
Node simp = NodeManager::currentNM()->mkNode(un.getKind(), children);
regress0/arith/div.04.smt2
regress0/arith/div.05.smt2
regress0/arith/div.07.smt2
+ regress0/arith/exp-in-model.smt2
regress0/arith/fuzz_3-eq.smtv1.smt2
regress0/arith/incorrect1.smtv1.smt2
regress0/arith/integers/ackermann1.smt2
--- /dev/null
+; COMMAND-LINE: --check-model
+; EXPECT: (error "Cannot run check-model on a model with approximate values.")
+; EXIT: 1
+(set-logic QF_UFNRAT)
+(set-option :produce-models true)
+(declare-fun b (Real) Real)
+(declare-fun v () Real)
+(assert (distinct 0 (* v v)))
+(assert (= 0.0 (b (exp 1.0))))
+(check-sat)