CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT
|| d_slv->getSmtMode() == SmtMode::SAT
|| d_slv->getSmtMode() == SmtMode::SAT_UNKNOWN)
- << "Cannot get difficulty unless after a UNSAT, SAT or unknown response.";
+ << "Cannot get difficulty unless after a UNSAT, SAT or UNKNOWN response.";
//////// all checks before this line
std::map<Term, Term> res;
std::map<Node, Node> dmap;
Term Solver::getValue(const Term& term) const
{
CVC5_API_TRY_CATCH_BEGIN;
+ CVC5_API_RECOVERABLE_CHECK(d_slv->getOptions().smt.produceModels)
+ << "Cannot get value unless model generation is enabled "
+ "(try --produce-models)";
+ CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
+ << "Cannot get value unless after a SAT or UNKNOWN response.";
CVC5_API_SOLVER_CHECK_TERM(term);
+ CVC5_API_RECOVERABLE_CHECK(term.getSort().isFirstClass())
+ << "Cannot get value of a term that is not first class.";
//////// all checks before this line
return getValueHelper(term);
////////
<< "Cannot get value unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Cannot get value unless after a SAT or unknown response.";
+ << "Cannot get value unless after a SAT or UNKNOWN response.";
+ for (const Term& t : terms)
+ {
+ CVC5_API_RECOVERABLE_CHECK(t.getSort().isFirstClass())
+ << "Cannot get value of a term that is not first class.";
+ }
CVC5_API_SOLVER_CHECK_TERMS(terms);
//////// all checks before this line
<< "Cannot get domain elements unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Cannot get domain elements unless after a SAT or unknown response.";
+ << "Cannot get domain elements unless after a SAT or UNKNOWN response.";
CVC5_API_SOLVER_CHECK_SORT(s);
CVC5_API_RECOVERABLE_CHECK(s.isUninterpretedSort())
<< "Expecting an uninterpreted sort as argument to "
<< "Cannot check if model core symbol unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Cannot check if model core symbol unless after a SAT or unknown "
+ << "Cannot check if model core symbol unless after a SAT or UNKNOWN "
"response.";
CVC5_API_SOLVER_CHECK_TERM(v);
CVC5_API_RECOVERABLE_CHECK(v.getKind() == CONSTANT)
<< "Cannot get model unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Cannot get model unless after a SAT or unknown response.";
+ << "Cannot get model unless after a SAT or UNKNOWN response.";
CVC5_API_SOLVER_CHECK_SORTS(sorts);
for (const Sort& s : sorts)
{
<< "Cannot get separation heap term unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Can only get separtion heap term after sat or unknown response.";
+ << "Can only get separtion heap term after SAT or UNKNOWN response.";
//////// all checks before this line
return Term(this, d_slv->getSepHeapExpr());
////////
<< "Cannot get separation nil term unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Can only get separtion nil term after sat or unknown response.";
+ << "Can only get separtion nil term after SAT or UNKNOWN response.";
//////// all checks before this line
return Term(this, d_slv->getSepNilExpr());
////////
<< "Cannot get value unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Can only block model after sat or unknown response.";
+ << "Can only block model after SAT or UNKNOWN response.";
//////// all checks before this line
d_slv->blockModel();
////////
<< "Cannot get value unless model generation is enabled "
"(try --produce-models)";
CVC5_API_RECOVERABLE_CHECK(d_slv->isSmtModeSat())
- << "Can only block model values after sat or unknown response.";
+ << "Can only block model values after SAT or UNKNOWN response.";
CVC5_API_ARG_SIZE_CHECK_EXPECTED(!terms.empty(), terms)
<< "a non-empty set of terms";
CVC5_API_SOLVER_CHECK_TERMS(terms);