s_kinds{
KIND_ENUM(INTERNAL_KIND, cvc5::Kind::UNDEFINED_KIND),
KIND_ENUM(UNDEFINED_KIND, cvc5::Kind::UNDEFINED_KIND),
- KIND_ENUM(NULL_EXPR, cvc5::Kind::NULL_EXPR),
+ KIND_ENUM(NULL_TERM, cvc5::Kind::NULL_EXPR),
/* Builtin ---------------------------------------------------------- */
KIND_ENUM(UNINTERPRETED_SORT_VALUE,
cvc5::Kind::UNINTERPRETED_SORT_VALUE),
const static std::unordered_map<cvc5::Kind, Kind, cvc5::kind::KindHashFunction>
s_kinds_internal{
{cvc5::Kind::UNDEFINED_KIND, UNDEFINED_KIND},
- {cvc5::Kind::NULL_EXPR, NULL_EXPR},
+ {cvc5::Kind::NULL_EXPR, NULL_TERM},
/* Builtin --------------------------------------------------------- */
{cvc5::Kind::UNINTERPRETED_SORT_VALUE, UNINTERPRETED_SORT_VALUE},
{cvc5::Kind::EQUAL, EQUAL},
/* Op */
/* -------------------------------------------------------------------------- */
-Op::Op() : d_solver(nullptr), d_kind(NULL_EXPR), d_node(new cvc5::Node()) {}
+Op::Op() : d_solver(nullptr), d_kind(NULL_TERM), d_node(new cvc5::Node()) {}
Op::Op(const Solver* slv, const Kind k)
: d_solver(slv), d_kind(k), d_node(new cvc5::Node())
Kind Op::getKind() const
{
- CVC5_API_CHECK(d_kind != NULL_EXPR) << "Expecting a non-null Kind";
+ CVC5_API_CHECK(d_kind != NULL_TERM) << "Expecting a non-null Kind";
//////// all checks before this line
return d_kind;
}
bool Op::isNullHelper() const
{
- return (d_node->isNull() && (d_kind == NULL_EXPR));
+ return (d_node->isNull() && (d_kind == NULL_TERM));
}
bool Op::isIndexedHelper() const { return !d_node->isNull(); }
* @note May not be explicitly created via API functions other than
* Term::Term().
*/
- NULL_EXPR,
+ NULL_TERM,
/* Builtin --------------------------------------------------------------- */
{
out << " :op " << p.d_op;
}
- if (p.d_kind != api::NULL_EXPR)
+ if (p.d_kind != api::NULL_TERM)
{
out << " :kind " << p.d_kind;
}
*/
struct ParseOp
{
- ParseOp(api::Kind k = api::NULL_EXPR) : d_kind(k) {}
+ ParseOp(api::Kind k = api::NULL_TERM) : d_kind(k) {}
/** The kind associated with the parsed operator, if it exists */
api::Kind d_kind;
/** The name associated with the parsed operator, if it exists */
*/
term[cvc5::api::Term& expr, cvc5::api::Term& expr2]
@init {
- api::Kind kind = api::NULL_EXPR;
+ api::Kind kind = api::NULL_TERM;
cvc5::api::Term f;
std::string name;
cvc5::api::Sort type;
termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2]
@init {
Trace("parser") << "term: " << AntlrInput::tokenText(LT(1)) << std::endl;
- api::Kind kind = api::NULL_EXPR;
+ api::Kind kind = api::NULL_TERM;
std::string name;
std::vector<cvc5::api::Term> args;
std::vector< std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
{
Trace("parser") << "parseOpToExpr: " << p << std::endl;
api::Term expr;
- if (p.d_kind != api::NULL_EXPR || !p.d_type.isNull())
+ if (p.d_kind != api::NULL_TERM || !p.d_type.isNull())
{
parseError(
"Bad syntax for qualified identifier operator in term position.");
{
bool isBuiltinOperator = false;
// the builtin kind of the overall return expression
- api::Kind kind = api::NULL_EXPR;
+ api::Kind kind = api::NULL_TERM;
// First phase: process the operator
if (TraceIsOn("parser"))
{
}
}
api::Op op;
- if (p.d_kind != api::NULL_EXPR)
+ if (p.d_kind != api::NULL_TERM)
{
// It is a special case, e.g. tuple_select or array constant specification.
// We have to wait until the arguments are parsed to resolve it.
Trace("parser") << "applyParseOp: return projection " << ret << std::endl;
return ret;
}
- else if (p.d_kind != api::NULL_EXPR)
+ else if (p.d_kind != api::NULL_TERM)
{
// it should not have an expression or type specified at this point
if (!p.d_expr.isNull() || !p.d_type.isNull())
Trace("parser") << "applyParseOp: return op : " << ret << std::endl;
return ret;
}
- if (kind == api::NULL_EXPR)
+ if (kind == api::NULL_TERM)
{
// should never happen in the new API
parseError("do not know how to process parse op");
}
// if it has a kind, it's a builtin one and this function should not have been
// called
- Assert(p.d_kind == api::NULL_EXPR);
+ Assert(p.d_kind == api::NULL_TERM);
expr = isTptpDeclared(p.d_name);
if (expr.isNull())
{
}
bool isBuiltinKind = false;
// the builtin kind of the overall return expression
- api::Kind kind = api::NULL_EXPR;
+ api::Kind kind = api::NULL_TERM;
// First phase: piece operator together
- if (p.d_kind == api::NULL_EXPR)
+ if (p.d_kind == api::NULL_TERM)
{
// A non-built-in function application, get the expression
api::Term v = isTptpDeclared(p.d_name);
kind = p.d_kind;
isBuiltinKind = true;
}
- Assert(kind != api::NULL_EXPR);
+ Assert(kind != api::NULL_TERM);
// Second phase: apply parse op to the arguments
if (isBuiltinKind)
{