}
Expr ValidityChecker::listExpr(const std::vector<Expr>& kids) {
- // list exprs aren't supported by CVC4; make a tuple if two or more
- CheckArgument(kids.size() > 0, kids);
- return (kids.size() == 1) ? kids[0] : Expr(d_em->mkExpr(CVC4::kind::TUPLE, vector<CVC4::Expr>(kids.begin(), kids.end())));
+ return d_em->mkExpr(CVC4::kind::SEXPR, vector<CVC4::Expr>(kids.begin(), kids.end()));
}
Expr ValidityChecker::listExpr(const Expr& e1) {
- // list exprs aren't supported by CVC4; just return e1
- return e1;
+ return d_em->mkExpr(CVC4::kind::SEXPR, e1);
}
Expr ValidityChecker::listExpr(const Expr& e1, const Expr& e2) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, e1, e2);
+ return d_em->mkExpr(CVC4::kind::SEXPR, e1, e2);
}
Expr ValidityChecker::listExpr(const Expr& e1, const Expr& e2, const Expr& e3) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, e1, e2, e3);
+ return d_em->mkExpr(CVC4::kind::SEXPR, e1, e2, e3);
}
Expr ValidityChecker::listExpr(const std::string& op,
const std::vector<Expr>& kids) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, d_em->mkConst(op), vector<CVC4::Expr>(kids.begin(), kids.end()));
+ return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(op), vector<CVC4::Expr>(kids.begin(), kids.end()));
}
Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, d_em->mkConst(op), e1);
+ return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(op), e1);
}
Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1,
const Expr& e2) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, d_em->mkConst(op), e1, e2);
+ return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(op), e1, e2);
}
Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1,
const Expr& e2, const Expr& e3) {
- // list exprs aren't supported by CVC4; just return a tuple
- return d_em->mkExpr(CVC4::kind::TUPLE, d_em->mkConst(op), e1, e2, e3);
+ return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(op), e1, e2, e3);
}
void ValidityChecker::printExpr(const Expr& e) {
smt::SmtScope scope(smtEngine);
Node request = Node::fromExpr(options::expandDefinitions() ? smtEngine->expandDefinitions(*i) : *i);
Node value = Node::fromExpr(smtEngine->getValue(*i));
- result.push_back(nm->mkNode(kind::TUPLE, request, value));
+ result.push_back(nm->mkNode(kind::SEXPR, request, value));
}
- Node n = nm->mkNode(kind::TUPLE, result);
+ Node n = nm->mkNode(kind::SEXPR, result);
d_result = nm->toExpr(n);
d_commandStatus = CommandSuccess::instance();
} catch(exception& e) {