return true;
}
+bool isBooleanConnective(TNode cur)
+{
+ Kind k = cur.getKind();
+ return k == kind::NOT || k == kind::IMPLIES || k == kind::AND || k == kind::OR
+ || (k == kind::ITE && cur.getType().isBoolean()) || k == kind::XOR
+ || (k == kind::EQUAL && cur[0].getType().isBoolean());
+}
+
} // namespace expr
} // namespace cvc5
*/
bool match(Node n1, Node n2, std::unordered_map<Node, Node>& subs);
+/** Is the top symbol of cur a Boolean connective? */
+bool isBooleanConnective(TNode cur);
+
} // namespace expr
} // namespace cvc5
#include <sstream>
+#include "expr/node_algorithm.h"
#include "expr/term_context_stack.h"
#include "options/smt_options.h"
#include "smt/env.h"
d_success = true;
}
-bool RelevanceManager::isBooleanConnective(TNode cur)
-{
- Kind k = cur.getKind();
- return k == NOT || k == IMPLIES || k == AND || k == OR || k == ITE || k == XOR
- || (k == EQUAL && cur[0].getType().isBoolean());
-}
-
bool RelevanceManager::updateJustifyLastChild(const RlvPair& cur,
std::vector<int32_t>& childrenJustify)
{
// compute the next child, in this case we push the status of the current
// child to childrenJustify.
size_t nchildren = cur.first.getNumChildren();
- Assert(isBooleanConnective(cur.first));
+ Assert(expr::isBooleanConnective(cur.first));
size_t index = childrenJustify.size();
Assert(index < nchildren);
Kind k = cur.first.getKind();
if (itc == childJustify.end())
{
// are we not a Boolean connective (including NOT)?
- if (isBooleanConnective(cur.first))
+ if (expr::isBooleanConnective(cur.first))
{
// initialize its children justify vector as empty
childJustify[cur].clear();
* justified n to be false, 0 means n could not be justified.
*/
int32_t justify(TNode n);
- /** Is the top symbol of cur a Boolean connective? */
- static bool isBooleanConnective(TNode cur);
/**
* Update justify last child. This method is a helper function for justify,
* which is called at the moment that Boolean connective formula cur