// - the instantiator uses model values at this effort or
// if we are solving for a subfield of a datatype (is_sv), and
// - the instantiator allows model values.
+ // Furthermore, we only permit the value if it is constant, since the model
+ // may contain internal-only expressions, e.g. RANs.
if ((options().quantifiers.cegqiMultiInst || !hasTriedInstantiation(pv))
&& (vinst->useModelValue(this, sf, pv, d_effort) || is_sv)
&& vinst->allowModelValue(this, sf, pv, d_effort))
{
Node mv = getModelValue( pv );
- TermProperties pv_prop_m;
- Trace("cegqi-inst-debug") << "[4] " << i << "...try model value " << mv << std::endl;
- d_curr_iphase[pv] = CEG_INST_PHASE_MVALUE;
- CegInstEffort prev = d_effort;
- if (d_effort < CEG_INST_EFFORT_STANDARD_MV)
+ if (mv.isConst())
{
- // update the effort level to indicate we have used a model value
- d_effort = CEG_INST_EFFORT_STANDARD_MV;
- }
- if (constructInstantiationInc(pv, mv, pv_prop_m, sf))
- {
- return true;
+ TermProperties pv_prop_m;
+ Trace("cegqi-inst-debug")
+ << "[4] " << i << "...try model value " << mv << std::endl;
+ d_curr_iphase[pv] = CEG_INST_PHASE_MVALUE;
+ CegInstEffort prev = d_effort;
+ if (d_effort < CEG_INST_EFFORT_STANDARD_MV)
+ {
+ // update the effort level to indicate we have used a model value
+ d_effort = CEG_INST_EFFORT_STANDARD_MV;
+ }
+ if (constructInstantiationInc(pv, mv, pv_prop_m, sf))
+ {
+ return true;
+ }
+ d_effort = prev;
}
- d_effort = prev;
}
Trace("cegqi-inst-debug") << "[No instantiation found for " << pv << "]" << std::endl;
regress1/quantifiers/issue8456-2-syqi-ic.smt2
regress1/quantifiers/issue8456-syqi-ic.smt2
regress1/quantifiers/issue8497-syqi-str-fmf.smt2
+ regress1/quantifiers/issue8520-cegqi-nl-cov.smt2
regress1/quantifiers/issue993.smt2
regress1/quantifiers/javafe.ast.StmtVec.009.smt2
regress1/quantifiers/lia-witness-div-pp.smt2