This commit removes the partial UDIV/UREM operator handling. BITVECTOR_UDIV and BITVECTOR_UREM are now total.
{CVC4::Kind::BITVECTOR_SDIV, BITVECTOR_SDIV},
{CVC4::Kind::BITVECTOR_SREM, BITVECTOR_SREM},
{CVC4::Kind::BITVECTOR_SMOD, BITVECTOR_SMOD},
- {CVC4::Kind::BITVECTOR_UDIV_TOTAL, INTERNAL_KIND},
- {CVC4::Kind::BITVECTOR_UREM_TOTAL, INTERNAL_KIND},
{CVC4::Kind::BITVECTOR_SHL, BITVECTOR_SHL},
{CVC4::Kind::BITVECTOR_LSHR, BITVECTOR_LSHR},
{CVC4::Kind::BITVECTOR_ASHR, BITVECTOR_ASHR},
break;
}
- case kind::BITVECTOR_UREM_TOTAL:
+ case kind::BITVECTOR_UREM:
case kind::BITVECTOR_LSHR:
case kind::BITVECTOR_ASHR:
{
default:
{
- /* BITVECTOR_UDIV_TOTAL (since x / 0 = -1)
+ /* BITVECTOR_UDIV (since x / 0 = -1)
* BITVECTOR_NOT
* BITVECTOR_NEG
* BITVECTOR_SHL */
RewriteRule<SgtEliminate>,
RewriteRule<SgeEliminate>>::apply(current);
- // expanding definitions of udiv and urem
- if (k == kind::BITVECTOR_UDIV)
- {
- currentEliminated = d_nm->mkNode(kind::BITVECTOR_UDIV_TOTAL,
- currentEliminated[0],
- currentEliminated[1]);
- }
- else if (k == kind::BITVECTOR_UREM)
- {
- currentEliminated = d_nm->mkNode(kind::BITVECTOR_UREM_TOTAL,
- currentEliminated[0],
- currentEliminated[1]);
- }
-
// save in the cache
d_eliminationCache[current] = currentEliminated;
// also assign the eliminated now to itself to avoid revisiting.
// The following variable will only be used in assertions.
CVC4_UNUSED uint64_t originalNumChildren = original.getNumChildren();
Node returnNode;
- // Assert that BITVECTOR_UDIV/UREM were replaced by their
- // *_TOTAL versions
- Assert(oldKind != kind::BITVECTOR_UDIV);
- Assert(oldKind != kind::BITVECTOR_UREM);
switch (oldKind)
{
case kind::BITVECTOR_PLUS:
returnNode = d_nm->mkNode(kind::INTS_MODULUS_TOTAL, mult, p2);
break;
}
- case kind::BITVECTOR_UDIV_TOTAL:
+ case kind::BITVECTOR_UDIV:
{
uint64_t bvsize = original[0].getType().getBitVectorSize();
// we use an ITE for the case where the second operand is 0.
divNode);
break;
}
- case kind::BITVECTOR_UREM_TOTAL:
+ case kind::BITVECTOR_UREM:
{
// we use an ITE for the case where the second operand is 0.
Node modNode =
case kind::BITVECTOR_ASHR:
case kind::BITVECTOR_UDIV:
case kind::BITVECTOR_UREM:
- case kind::BITVECTOR_UDIV_TOTAL:
- case kind::BITVECTOR_UREM_TOTAL:
case kind::BITVECTOR_SDIV:
case kind::BITVECTOR_SREM:
case kind::BITVECTOR_SMOD:
case kind::BITVECTOR_UDIV:
op << "BVUDIV";
break;
- case kind::BITVECTOR_UDIV_TOTAL:
- op << "BVUDIV_TOTAL";
- break;
case kind::BITVECTOR_UREM:
op << "BVUREM";
break;
- case kind::BITVECTOR_UREM_TOTAL:
- op << "BVUREM_TOTAL";
- break;
case kind::BITVECTOR_SDIV:
op << "BVSDIV";
break;
case kind::BITVECTOR_PLUS: out << "bvadd "; forceBinary = true; break;
case kind::BITVECTOR_SUB: out << "bvsub "; break;
case kind::BITVECTOR_NEG: out << "bvneg "; break;
- case kind::BITVECTOR_UDIV:
- case kind::BITVECTOR_UDIV_TOTAL: out << "bvudiv "; break;
- case kind::BITVECTOR_UREM:
- case kind::BITVECTOR_UREM_TOTAL: out << "bvurem "; break;
+ case kind::BITVECTOR_UDIV: out << "bvudiv "; break;
+ case kind::BITVECTOR_UREM: out << "bvurem "; break;
case kind::BITVECTOR_SDIV: out << "bvsdiv "; break;
case kind::BITVECTOR_SREM: out << "bvsrem "; break;
case kind::BITVECTOR_SMOD: out << "bvsmod "; break;
case kind::BITVECTOR_PLUS: return "bvadd";
case kind::BITVECTOR_SUB: return "bvsub";
case kind::BITVECTOR_NEG: return "bvneg";
- case kind::BITVECTOR_UDIV_TOTAL:
case kind::BITVECTOR_UDIV: return "bvudiv";
- case kind::BITVECTOR_UREM_TOTAL:
case kind::BITVECTOR_UREM: return "bvurem";
case kind::BITVECTOR_SDIV: return "bvsdiv";
case kind::BITVECTOR_SREM: return "bvsrem";
{
Debug("bitvector-bb") << "theory::bv::DefaultUdivBB bitblasting " << node
<< "\n";
- Assert(node.getKind() == kind::BITVECTOR_UDIV_TOTAL && q.size() == 0);
+ Assert(node.getKind() == kind::BITVECTOR_UDIV && q.size() == 0);
std::vector<T> a, b;
bb->bbTerm(node[0], a);
}
// cache the remainder in case we need it later
- Node remainder = Rewriter::rewrite(NodeManager::currentNM()->mkNode(
- kind::BITVECTOR_UREM_TOTAL, node[0], node[1]));
+ Node remainder = Rewriter::rewrite(
+ NodeManager::currentNM()->mkNode(kind::BITVECTOR_UREM, node[0], node[1]));
bb->storeBBTerm(remainder, r);
}
{
Debug("bitvector-bb") << "theory::bv::DefaultUremBB bitblasting " << node
<< "\n";
- Assert(node.getKind() == kind::BITVECTOR_UREM_TOTAL && rem.size() == 0);
+ Assert(node.getKind() == kind::BITVECTOR_UREM && rem.size() == 0);
std::vector<T> a, b;
bb->bbTerm(node[0], a);
}
// cache the quotient in case we need it later
- Node quotient = Rewriter::rewrite(NodeManager::currentNM()->mkNode(
- kind::BITVECTOR_UDIV_TOTAL, node[0], node[1]));
+ Node quotient = Rewriter::rewrite(
+ NodeManager::currentNM()->mkNode(kind::BITVECTOR_UDIV, node[0], node[1]));
bb->storeBBTerm(quotient, q);
}
d_termBBStrategies[kind::BITVECTOR_PLUS] = DefaultPlusBB<T>;
d_termBBStrategies[kind::BITVECTOR_SUB] = DefaultSubBB<T>;
d_termBBStrategies[kind::BITVECTOR_NEG] = DefaultNegBB<T>;
- d_termBBStrategies[kind::BITVECTOR_UDIV] = UndefinedTermBBStrategy<T>;
- d_termBBStrategies[kind::BITVECTOR_UREM] = UndefinedTermBBStrategy<T>;
- d_termBBStrategies[kind::BITVECTOR_UDIV_TOTAL] = DefaultUdivBB<T>;
- d_termBBStrategies[kind::BITVECTOR_UREM_TOTAL] = DefaultUremBB<T>;
+ d_termBBStrategies[kind::BITVECTOR_UDIV] = DefaultUdivBB<T>;
+ d_termBBStrategies[kind::BITVECTOR_UREM] = DefaultUremBB<T>;
d_termBBStrategies[kind::BITVECTOR_SDIV] = UndefinedTermBBStrategy<T>;
d_termBBStrategies[kind::BITVECTOR_SREM] = UndefinedTermBBStrategy<T>;
d_termBBStrategies[kind::BITVECTOR_SMOD] = UndefinedTermBBStrategy<T>;
if (fact.getKind() == kind::EQUAL)
{
NodeManager* nm = NodeManager::currentNM();
- if (fact[0].getKind() == kind::BITVECTOR_UREM_TOTAL)
+ if (fact[0].getKind() == kind::BITVECTOR_UREM)
{
TNode urem = fact[0];
TNode result = fact[1];
kind::OR, divisor_eq_0, nm->mkNode(kind::NOT, fact), result_ult_div);
lemma(split);
}
- if (fact[1].getKind() == kind::BITVECTOR_UREM_TOTAL)
+ if (fact[1].getKind() == kind::BITVECTOR_UREM)
{
TNode urem = fact[1];
TNode result = fact[0];
}
bool hasExpensiveBVOperatorsRec(TNode fact, TNodeSet& seen) {
- if (fact.getKind() == kind::BITVECTOR_MULT ||
- fact.getKind() == kind::BITVECTOR_UDIV_TOTAL ||
- fact.getKind() == kind::BITVECTOR_UREM_TOTAL) {
+ if (fact.getKind() == kind::BITVECTOR_MULT
+ || fact.getKind() == kind::BITVECTOR_UDIV
+ || fact.getKind() == kind::BITVECTOR_UREM)
+ {
return true;
}
operator BITVECTOR_NEG 1 "unary negation of a bit-vector"
operator BITVECTOR_PLUS 2: "addition of two or more bit-vectors"
operator BITVECTOR_SUB 2 "subtraction of two bit-vectors"
-operator BITVECTOR_UDIV 2 "unsigned division of two bit-vectors, truncating towards 0 (undefined if divisor is 0)"
-operator BITVECTOR_UREM 2 "unsigned remainder from truncating division of two bit-vectors (undefined if divisor is 0)"
+operator BITVECTOR_UDIV 2 "unsigned division of two bit-vectors, truncating towards 0 (defined to be the all-ones bit pattern, if divisor is 0)"
+operator BITVECTOR_UREM 2 "unsigned remainder from truncating division of two bit-vectors (defined to be equal to the dividend, if divisor is 0)"
operator BITVECTOR_SDIV 2 "2's complement signed division"
operator BITVECTOR_SMOD 2 "2's complement signed remainder (sign follows divisor)"
operator BITVECTOR_SREM 2 "2's complement signed remainder (sign follows dividend)"
# total division kinds
-operator BITVECTOR_UDIV_TOTAL 2 "unsigned division of two bit-vectors, truncating towards 0 (defined to be the all-ones bit pattern, if divisor is 0)"
-operator BITVECTOR_UREM_TOTAL 2 "unsigned remainder from truncating division of two bit-vectors (defined to be equal to the dividend, if divisor is 0)"
## shift kinds
operator BITVECTOR_ASHR 2 "bit-vector arithmetic shift right (the two bit-vector parameters must have same width)"
typerule BITVECTOR_SDIV ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
typerule BITVECTOR_SMOD ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
typerule BITVECTOR_SREM ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
-# total division kinds
-typerule BITVECTOR_UDIV_TOTAL ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
-typerule BITVECTOR_UREM_TOTAL ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
## shift kinds
typerule BITVECTOR_ASHR ::CVC4::theory::bv::BitVectorFixedWidthTypeRule
std::string name)
: Theory(THEORY_BV, c, u, out, valuation, logicInfo, pnm, name),
d_internal(nullptr),
- d_ufDivByZero(),
- d_ufRemByZero(),
d_rewriter(),
d_state(c, u, valuation),
d_im(*this, d_state, nullptr, "theory::bv"),
}
}
-Node TheoryBV::getUFDivByZero(Kind k, unsigned width)
-{
- NodeManager* nm = NodeManager::currentNM();
- if (k == kind::BITVECTOR_UDIV)
- {
- if (d_ufDivByZero.find(width) == d_ufDivByZero.end())
- {
- // lazily create the function symbols
- std::ostringstream os;
- os << "BVUDivByZero_" << width;
- Node divByZero =
- nm->mkSkolem(os.str(),
- nm->mkFunctionType(nm->mkBitVectorType(width),
- nm->mkBitVectorType(width)),
- "partial bvudiv",
- NodeManager::SKOLEM_EXACT_NAME);
- d_ufDivByZero[width] = divByZero;
- }
- return d_ufDivByZero[width];
- }
- else if (k == kind::BITVECTOR_UREM)
- {
- if (d_ufRemByZero.find(width) == d_ufRemByZero.end())
- {
- std::ostringstream os;
- os << "BVURemByZero_" << width;
- Node divByZero =
- nm->mkSkolem(os.str(),
- nm->mkFunctionType(nm->mkBitVectorType(width),
- nm->mkBitVectorType(width)),
- "partial bvurem",
- NodeManager::SKOLEM_EXACT_NAME);
- d_ufRemByZero[width] = divByZero;
- }
- return d_ufRemByZero[width];
- }
-
- Unreachable();
-}
-
TrustNode TheoryBV::expandDefinition(Node node)
{
Debug("bitvector-expandDefinition")
ret = TheoryBVRewriter::eliminateBVSDiv(node);
break;
- case kind::BITVECTOR_UDIV:
- case kind::BITVECTOR_UREM:
- {
- NodeManager* nm = NodeManager::currentNM();
-
- Kind kind = node.getKind() == kind::BITVECTOR_UDIV
- ? kind::BITVECTOR_UDIV_TOTAL
- : kind::BITVECTOR_UREM_TOTAL;
- ret = nm->mkNode(kind, node[0], node[1]);
- break;
- }
- break;
-
default: break;
}
if (!ret.isNull() && node != ret)
private:
void notifySharedTerm(TNode t) override;
- /**
- * Return the UF symbol corresponding to division-by-zero for this particular
- * bit-width.
- * @param k should be UREM or UDIV
- * @param width bit-width
- */
- Node getUFDivByZero(Kind k, unsigned width);
-
/** Internal BV solver. */
std::unique_ptr<BVSolver> d_internal;
- /**
- * Maps from bit-vector width to division-by-zero uninterpreted
- * function symbols.
- */
- std::unordered_map<unsigned, Node> d_ufDivByZero;
- std::unordered_map<unsigned, Node> d_ufRemByZero;
-
/** The theory rewriter for this theory. */
TheoryBVRewriter d_rewriter;
}
template<> inline
bool RewriteRule<EvalUdiv>::applies(TNode node) {
- return (utils::isBvConstTerm(node) &&
- (node.getKind() == kind::BITVECTOR_UDIV_TOTAL ||
- (node.getKind() == kind::BITVECTOR_UDIV && node[1].isConst())));
+ return utils::isBvConstTerm(node) && node.getKind() == kind::BITVECTOR_UDIV;
}
template<> inline
}
template<> inline
bool RewriteRule<EvalUrem>::applies(TNode node) {
- return (utils::isBvConstTerm(node) &&
- (node.getKind() == kind::BITVECTOR_UREM_TOTAL ||
- (node.getKind() == kind::BITVECTOR_UREM && node[1].isConst())));
+ return utils::isBvConstTerm(node) && node.getKind() == kind::BITVECTOR_UREM;
}
template<> inline
Node abs_b =
nm->mkNode(kind::ITE, b_lt_0, nm->mkNode(kind::BITVECTOR_NEG, b), b);
- Node a_udiv_b = nm->mkNode(kind::BITVECTOR_UDIV_TOTAL, abs_a, abs_b);
+ Node a_udiv_b = nm->mkNode(kind::BITVECTOR_UDIV, abs_a, abs_b);
Node neg_result = nm->mkNode(kind::BITVECTOR_NEG, a_udiv_b);
Node condition = nm->mkNode(kind::XOR, a_lt_0, b_lt_0);
Node abs_b =
nm->mkNode(kind::ITE, b_lt_0, nm->mkNode(kind::BITVECTOR_NEG, b), b);
- Node a_udiv_b = nm->mkNode(kind::BITVECTOR_UDIV_TOTAL, abs_a, abs_b);
+ Node a_udiv_b = nm->mkNode(kind::BITVECTOR_UDIV, abs_a, abs_b);
Node neg_result = nm->mkNode(kind::BITVECTOR_NEG, a_udiv_b);
Node result = nm->mkNode(kind::ITE, a_lt_0.xorNode(b_lt_0), neg_result, a_udiv_b);
Node abs_b =
nm->mkNode(kind::ITE, b_lt_0, nm->mkNode(kind::BITVECTOR_NEG, b), b);
- Node a_urem_b = nm->mkNode(kind::BITVECTOR_UREM_TOTAL, abs_a, abs_b);
+ Node a_urem_b = nm->mkNode(kind::BITVECTOR_UREM, abs_a, abs_b);
Node neg_result = nm->mkNode(kind::BITVECTOR_NEG, a_urem_b);
Node result = nm->mkNode(kind::ITE, a_lt_0, neg_result, a_urem_b);
nm->mkNode(kind::ITE, a_lt_0, nm->mkNode(kind::BITVECTOR_NEG, a), a);
Node abs_b =
nm->mkNode(kind::ITE, b_lt_0, nm->mkNode(kind::BITVECTOR_NEG, b), b);
- Node a_urem_b = nm->mkNode(kind::BITVECTOR_UREM_TOTAL, abs_a, abs_b);
+ Node a_urem_b = nm->mkNode(kind::BITVECTOR_UREM, abs_a, abs_b);
Node neg_result = nm->mkNode(kind::BITVECTOR_NEG, a_urem_b);
Node result = nm->mkNode(kind::ITE, a_lt_0, neg_result, a_urem_b);
inline bool RewriteRule<UdivPow2>::applies(TNode node)
{
bool isNeg = false;
- if (node.getKind() == kind::BITVECTOR_UDIV_TOTAL
+ if (node.getKind() == kind::BITVECTOR_UDIV
&& utils::isPow2Const(node[1], isNeg))
{
return !isNeg;
template <>
inline bool RewriteRule<UdivZero>::applies(TNode node) {
- return (node.getKind() == kind::BITVECTOR_UDIV_TOTAL &&
- node[1] == utils::mkConst(utils::getSize(node), 0));
+ return (node.getKind() == kind::BITVECTOR_UDIV
+ && node[1] == utils::mkConst(utils::getSize(node), 0));
}
template <>
template <>
inline bool RewriteRule<UdivOne>::applies(TNode node) {
- return (node.getKind() == kind::BITVECTOR_UDIV_TOTAL &&
- node[1] == utils::mkConst(utils::getSize(node), 1));
+ return (node.getKind() == kind::BITVECTOR_UDIV
+ && node[1] == utils::mkConst(utils::getSize(node), 1));
}
template <>
inline bool RewriteRule<UremPow2>::applies(TNode node)
{
bool isNeg;
- if (node.getKind() == kind::BITVECTOR_UREM_TOTAL
+ if (node.getKind() == kind::BITVECTOR_UREM
&& utils::isPow2Const(node[1], isNeg))
{
return !isNeg;
template<> inline
bool RewriteRule<UremOne>::applies(TNode node) {
- return (node.getKind() == kind::BITVECTOR_UREM_TOTAL &&
- node[1] == utils::mkConst(utils::getSize(node), 1));
+ return (node.getKind() == kind::BITVECTOR_UREM
+ && node[1] == utils::mkConst(utils::getSize(node), 1));
}
template<> inline
template<> inline
bool RewriteRule<UremSelf>::applies(TNode node) {
- return (node.getKind() == kind::BITVECTOR_UREM_TOTAL &&
- node[0] == node[1]);
+ return (node.getKind() == kind::BITVECTOR_UREM && node[0] == node[1]);
}
template<> inline
inline bool RewriteRule<UgtUrem>::applies(TNode node)
{
return (node.getKind() == kind::BITVECTOR_UGT
- && node[0].getKind() == kind::BITVECTOR_UREM_TOTAL
+ && node[0].getKind() == kind::BITVECTOR_UREM
&& node[0][1] == node[1]);
}
RewriteResponse TheoryBVRewriter::RewriteUdiv(TNode node, bool prerewrite){
Node resultNode = node;
- return RewriteUdivTotal(node, prerewrite);
-}
-
-RewriteResponse TheoryBVRewriter::RewriteUrem(TNode node, bool prerewrite){
- Node resultNode = node;
-
- return RewriteUremTotal(node, prerewrite);
-}
-
-RewriteResponse TheoryBVRewriter::RewriteUdivTotal(TNode node, bool prerewrite){
- Node resultNode = node;
-
if(RewriteRule<UdivPow2>::applies(node)) {
resultNode = RewriteRule<UdivPow2>::run <false> (node);
return RewriteResponse(REWRITE_AGAIN_FULL, resultNode);
return RewriteResponse(REWRITE_DONE, resultNode);
}
-RewriteResponse TheoryBVRewriter::RewriteUremTotal(TNode node, bool prerewrite) {
+RewriteResponse TheoryBVRewriter::RewriteUrem(TNode node, bool prerewrite)
+{
Node resultNode = node;
if(RewriteRule<UremPow2>::applies(node)) {
RewriteRule<UremOne>,
RewriteRule<UremSelf>
>::apply(node);
- return RewriteResponse(REWRITE_DONE, resultNode);
+ return RewriteResponse(REWRITE_DONE, resultNode);
}
RewriteResponse TheoryBVRewriter::RewriteSmod(TNode node, bool prerewrite) {
d_rewriteTable [ kind::BITVECTOR_NEG ] = RewriteNeg;
d_rewriteTable [ kind::BITVECTOR_UDIV ] = RewriteUdiv;
d_rewriteTable [ kind::BITVECTOR_UREM ] = RewriteUrem;
- d_rewriteTable [ kind::BITVECTOR_UDIV_TOTAL ] = RewriteUdivTotal;
- d_rewriteTable [ kind::BITVECTOR_UREM_TOTAL ] = RewriteUremTotal;
d_rewriteTable [ kind::BITVECTOR_SMOD ] = RewriteSmod;
d_rewriteTable [ kind::BITVECTOR_SDIV ] = RewriteSdiv;
d_rewriteTable [ kind::BITVECTOR_SREM ] = RewriteSrem;
Kind nk = ok;
// We also must ensure that builtin operators which are eliminated
// during expand definitions are replaced by the proper operator.
- if (ok == BITVECTOR_UDIV)
- {
- nk = BITVECTOR_UDIV_TOTAL;
- }
- else if (ok == BITVECTOR_UREM)
- {
- nk = BITVECTOR_UREM_TOTAL;
- }
- else if (ok == DIVISION)
+ if (ok == DIVISION)
{
nk = DIVISION_TOTAL;
}
Node req_const;
if (nk == GT || nk == LT || nk == XOR || nk == MINUS
|| nk == BITVECTOR_SUB || nk == BITVECTOR_XOR
- || nk == BITVECTOR_UREM_TOTAL)
+ || nk == BITVECTOR_UREM)
{
// must have the zero element
req_const = quantifiers::TermUtil::mkTypeValue(tnb, 0);
break;
}
case kind::BITVECTOR_UDIV:
- case kind::BITVECTOR_UDIV_TOTAL:
{
- if (currNodeVal.getKind() == kind::BITVECTOR_UDIV_TOTAL
- || results[currNode[1]].d_bv.getValue() != 0)
- {
- BitVector res = results[currNode[0]].d_bv;
- res = res.unsignedDivTotal(results[currNode[1]].d_bv);
- results[currNode] = EvalResult(res);
- }
- else
- {
- results[currNode] = EvalResult();
- evalAsNode[currNode] =
- needsReconstruct ? reconstruct(currNode, results, evalAsNode)
- : currNodeVal;
- }
+ BitVector res = results[currNode[0]].d_bv;
+ res = res.unsignedDivTotal(results[currNode[1]].d_bv);
+ results[currNode] = EvalResult(res);
break;
}
case kind::BITVECTOR_UREM:
- case kind::BITVECTOR_UREM_TOTAL:
{
- if (currNodeVal.getKind() == kind::BITVECTOR_UREM_TOTAL
- || results[currNode[1]].d_bv.getValue() != 0)
- {
- BitVector res = results[currNode[0]].d_bv;
- res = res.unsignedRemTotal(results[currNode[1]].d_bv);
- results[currNode] = EvalResult(res);
- }
- else
- {
- results[currNode] = EvalResult();
- evalAsNode[currNode] =
- needsReconstruct ? reconstruct(currNode, results, evalAsNode)
- : currNodeVal;
- }
+ BitVector res = results[currNode[0]].d_bv;
+ res = res.unsignedRemTotal(results[currNode[1]].d_bv);
+ results[currNode] = EvalResult(res);
break;
}
const symbolicBitVector<isSigned> &op) const
{
return symbolicBitVector<isSigned>(NodeManager::currentNM()->mkNode(
- (isSigned) ? kind::BITVECTOR_SDIV : kind::BITVECTOR_UDIV_TOTAL,
- *this,
- op));
+ (isSigned) ? kind::BITVECTOR_SDIV : kind::BITVECTOR_UDIV, *this, op));
}
template <bool isSigned>
const symbolicBitVector<isSigned> &op) const
{
return symbolicBitVector<isSigned>(NodeManager::currentNM()->mkNode(
- (isSigned) ? kind::BITVECTOR_SREM : kind::BITVECTOR_UREM_TOTAL,
- *this,
- op));
+ (isSigned) ? kind::BITVECTOR_SREM : kind::BITVECTOR_UREM, *this, op));
}
template <bool isSigned>
return k == NOT || k == EQUAL || k == BITVECTOR_ULT || k == BITVECTOR_SLT
|| k == BITVECTOR_COMP || k == BITVECTOR_NOT || k == BITVECTOR_NEG
|| k == BITVECTOR_CONCAT || k == BITVECTOR_SIGN_EXTEND
- || k == BITVECTOR_PLUS || k == BITVECTOR_MULT
- || k == BITVECTOR_UREM_TOTAL || k == BITVECTOR_UDIV_TOTAL
- || k == BITVECTOR_AND || k == BITVECTOR_OR || k == BITVECTOR_XOR
- || k == BITVECTOR_LSHR || k == BITVECTOR_ASHR || k == BITVECTOR_SHL;
+ || k == BITVECTOR_PLUS || k == BITVECTOR_MULT || k == BITVECTOR_UREM
+ || k == BITVECTOR_UDIV || k == BITVECTOR_AND || k == BITVECTOR_OR
+ || k == BITVECTOR_XOR || k == BITVECTOR_LSHR || k == BITVECTOR_ASHR
+ || k == BITVECTOR_SHL;
}
Node BvInverter::getPathToPv(
{
ic = utils::getICBvShl(pol, litk, k, index, x, s, t);
}
- else if (k == BITVECTOR_UREM_TOTAL)
+ else if (k == BITVECTOR_UREM)
{
ic = utils::getICBvUrem(pol, litk, k, index, x, s, t);
}
- else if (k == BITVECTOR_UDIV_TOTAL)
+ else if (k == BITVECTOR_UDIV)
{
ic = utils::getICBvUdiv(pol, litk, k, index, x, s, t);
}
Node getICBvUrem(
bool pol, Kind litk, Kind k, unsigned idx, Node x, Node s, Node t)
{
- Assert(k == BITVECTOR_UREM_TOTAL);
+ Assert(k == BITVECTOR_UREM);
Assert(litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
|| litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
Node getICBvUdiv(
bool pol, Kind litk, Kind k, unsigned idx, Node x, Node s, Node t)
{
- Assert(k == BITVECTOR_UDIV_TOTAL);
+ Assert(k == BITVECTOR_UDIV);
Assert(litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
|| litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
* umulo(s, t) is true if s * t produces and overflow
* and z = 0 with getSize(z) = w */
Node mul = nm->mkNode(BITVECTOR_MULT, s, t);
- Node div = nm->mkNode(BITVECTOR_UDIV_TOTAL, mul, s);
+ Node div = nm->mkNode(BITVECTOR_UDIV, mul, s);
scl = nm->mkNode(EQUAL, div, t);
}
else
*
* where
* z = 0 with getSize(z) = w */
- Node div = nm->mkNode(BITVECTOR_UDIV_TOTAL, s, t);
- scl = nm->mkNode(EQUAL, nm->mkNode(BITVECTOR_UDIV_TOTAL, s, div), t);
+ Node div = nm->mkNode(BITVECTOR_UDIV, s, t);
+ scl = nm->mkNode(EQUAL, nm->mkNode(BITVECTOR_UDIV, s, div), t);
}
else
{
* with invertibility condition (synthesized):
* (= (bvand (bvudiv (bvmul s t) t) s) s) */
Node mul = nm->mkNode(BITVECTOR_MULT, s, t);
- Node div = nm->mkNode(BITVECTOR_UDIV_TOTAL, mul, t);
+ Node div = nm->mkNode(BITVECTOR_UDIV, mul, t);
scl = nm->mkNode(EQUAL, nm->mkNode(BITVECTOR_AND, div, s), s);
}
}
* where
* ones = ~0 with getSize(ones) = w */
Node ones = bv::utils::mkOnes(w);
- Node div = nm->mkNode(BITVECTOR_UDIV_TOTAL, ones, s);
+ Node div = nm->mkNode(BITVECTOR_UDIV, ones, s);
scl = nm->mkNode(BITVECTOR_UGT, div, t);
}
else
* and min is the minimum signed value with getSize(min) = w */
Node min = bv::utils::mkMinSigned(w);
Node sle = nm->mkNode(BITVECTOR_SLE, t, z);
- Node div = nm->mkNode(BITVECTOR_UDIV_TOTAL, min, s);
+ Node div = nm->mkNode(BITVECTOR_UDIV, min, s);
Node slt = nm->mkNode(BITVECTOR_SLT, div, t);
scl = nm->mkNode(IMPLIES, sle, slt);
}
* and max is the maximum signed value with getSize(max) = w */
Node max = bv::utils::mkMaxSigned(w);
Node ones = bv::utils::mkOnes(w);
- Node udiv1 = nm->mkNode(BITVECTOR_UDIV_TOTAL, ones, s);
- Node udiv2 = nm->mkNode(BITVECTOR_UDIV_TOTAL, max, s);
+ Node udiv1 = nm->mkNode(BITVECTOR_UDIV, ones, s);
+ Node udiv2 = nm->mkNode(BITVECTOR_UDIV, max, s);
Node sge1 = nm->mkNode(BITVECTOR_SGE, udiv1, t);
Node sge2 = nm->mkNode(BITVECTOR_SGE, udiv2, t);
scl = nm->mkNode(OR, sge1, sge2);
* and max is the maximum signed value with getSize(max) = w */
Node max = bv::utils::mkMaxSigned(w);
Node ones = bv::utils::mkOnes(w);
- Node div1 = nm->mkNode(BITVECTOR_UDIV_TOTAL, ones, s);
+ Node div1 = nm->mkNode(BITVECTOR_UDIV, ones, s);
Node sgt1 = nm->mkNode(BITVECTOR_SGT, div1, t);
- Node div2 = nm->mkNode(BITVECTOR_UDIV_TOTAL, max, s);
+ Node div2 = nm->mkNode(BITVECTOR_UDIV, max, s);
Node sgt2 = nm->mkNode(BITVECTOR_SGT, div2, t);
scl = nm->mkNode(OR, sgt1, sgt2);
}
* z = 0 with getSize(z) = w
* and min is the minimum signed value with getSize(min) = w */
Node mul = nm->mkNode(BITVECTOR_MULT, s, t);
- Node div1 = nm->mkNode(BITVECTOR_UDIV_TOTAL, mul, s);
+ Node div1 = nm->mkNode(BITVECTOR_UDIV, mul, s);
Node o1 = nm->mkNode(EQUAL, div1, t);
Node min = bv::utils::mkMinSigned(w);
Node sle = nm->mkNode(BITVECTOR_SLE, t, z);
- Node div2 = nm->mkNode(BITVECTOR_UDIV_TOTAL, min, s);
+ Node div2 = nm->mkNode(BITVECTOR_UDIV, min, s);
Node slt = nm->mkNode(BITVECTOR_SLT, div2, t);
Node o2 = nm->mkNode(IMPLIES, sle, slt);
scl = nm->mkNode(OR, o1, o2);
BITVECTOR_PLUS,
BITVECTOR_SUB,
BITVECTOR_MULT,
- BITVECTOR_UDIV_TOTAL,
- BITVECTOR_UREM_TOTAL,
+ BITVECTOR_UDIV,
+ BITVECTOR_UREM,
BITVECTOR_SDIV,
BITVECTOR_SREM,
BITVECTOR_SHL,
return true;
}
else if (ik == MINUS || ik == BITVECTOR_SHL || ik == BITVECTOR_LSHR
- || ik == BITVECTOR_ASHR
- || ik == BITVECTOR_SUB
- || ik == BITVECTOR_UREM
- || ik == BITVECTOR_UREM_TOTAL)
+ || ik == BITVECTOR_ASHR || ik == BITVECTOR_SUB
+ || ik == BITVECTOR_UREM)
{
return arg == 1;
}
|| ik == INTS_DIVISION_TOTAL
|| ik == INTS_MODULUS
|| ik == INTS_MODULUS_TOTAL
- || ik == BITVECTOR_UDIV_TOTAL
|| ik == BITVECTOR_UDIV
|| ik == BITVECTOR_SDIV)
{
return n;
}
else if (ik == BITVECTOR_SHL || ik == BITVECTOR_LSHR || ik == BITVECTOR_ASHR
- || ik == BITVECTOR_UREM
- || ik == BITVECTOR_UREM_TOTAL)
+ || ik == BITVECTOR_UREM)
{
if (arg == 0)
{
return n;
}
}
- else if (ik == BITVECTOR_UDIV_TOTAL || ik == BITVECTOR_UDIV
+ else if (ik == BITVECTOR_UDIV || ik == BITVECTOR_UDIV
|| ik == BITVECTOR_SDIV)
{
if (arg == 0)
}
else if (n == mkTypeValue(tn, 1))
{
- if (ik == BITVECTOR_UREM_TOTAL)
+ if (ik == BITVECTOR_UREM)
{
return mkTypeValue(tn, 0);
}
return true;
}
}
- if (k == BITVECTOR_AND || k == BITVECTOR_MULT || k == BITVECTOR_UDIV_TOTAL
- || k == BITVECTOR_UREM_TOTAL
+ if (k == BITVECTOR_AND || k == BITVECTOR_MULT || k == BITVECTOR_UDIV
+ || k == BITVECTOR_UREM
|| (arg == 0
&& (k == BITVECTOR_SHL || k == BITVECTOR_LSHR
|| k == BITVECTOR_ASHR)))
d_x);
Node y_mul_one = d_nodeManager->mkNode(
kind::BITVECTOR_MULT,
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, d_one, d_five),
+ d_nodeManager->mkNode(kind::BITVECTOR_UREM, d_one, d_five),
d_y);
Node z_mul_one =
d_nodeManager->mkNode(kind::BITVECTOR_MULT, bv::utils::mkOne(32), d_z);
Node x_mul_four = d_nodeManager->mkNode(
kind::BITVECTOR_MULT,
d_nodeManager->mkNode(
- kind::BITVECTOR_UDIV_TOTAL,
+ kind::BITVECTOR_UDIV,
d_nodeManager->mkNode(
kind::BITVECTOR_PLUS,
d_nodeManager->mkNode(kind::BITVECTOR_MULT,
* ------------------------------------------------------------------- */
Node n1 = d_nodeManager->mkNode(
- kind::BITVECTOR_UDIV_TOTAL,
+ kind::BITVECTOR_UDIV,
d_nodeManager->mkNode(kind::BITVECTOR_MULT, d_three, d_x),
d_nodeManager->mkNode(kind::BITVECTOR_MULT, d_two, d_y));
Node n2 = d_nodeManager->mkNode(
- kind::BITVECTOR_UREM_TOTAL,
+ kind::BITVECTOR_UREM,
d_nodeManager->mkNode(kind::BITVECTOR_MULT, d_two, d_x),
d_nodeManager->mkNode(kind::BITVECTOR_MULT, d_five, d_y));
Node concat2x = bv::utils::mkConcat(bv::utils::mkZero(16), zext48x);
ASSERT_EQ(BVGauss::getMinBwExpr(concat2x), 16);
- Node udiv1p =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, zext48p, zext48p);
+ Node udiv1p = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, zext48p, zext48p);
ASSERT_EQ(BVGauss::getMinBwExpr(udiv1p), 1);
- Node udiv1x =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, zext48x, zext48x);
+ Node udiv1x = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, zext48x, zext48x);
ASSERT_EQ(BVGauss::getMinBwExpr(udiv1x), 48);
- Node udiv2p =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, zext48p, zext48p8);
+ Node udiv2p = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, zext48p, zext48p8);
ASSERT_EQ(BVGauss::getMinBwExpr(udiv2p), 1);
- Node udiv2x =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, zext48x, zext48x8);
+ Node udiv2x = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, zext48x, zext48x8);
ASSERT_EQ(BVGauss::getMinBwExpr(udiv2x), 48);
- Node urem1p =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48p, zext48p);
+ Node urem1p = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48p, zext48p);
ASSERT_EQ(BVGauss::getMinBwExpr(urem1p), 1);
- Node urem1x =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48x, zext48x);
+ Node urem1x = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48x, zext48x);
ASSERT_EQ(BVGauss::getMinBwExpr(urem1x), 1);
- Node urem2p =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48p, zext48p8);
+ Node urem2p = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48p, zext48p8);
ASSERT_EQ(BVGauss::getMinBwExpr(urem2p), 1);
- Node urem2x =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48x, zext48x8);
+ Node urem2x = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48x, zext48x8);
ASSERT_EQ(BVGauss::getMinBwExpr(urem2x), 16);
- Node urem3p =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48p8, zext48p);
+ Node urem3p = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48p8, zext48p);
ASSERT_EQ(BVGauss::getMinBwExpr(urem3p), 1);
- Node urem3x =
- d_nodeManager->mkNode(kind::BITVECTOR_UREM_TOTAL, zext48x8, zext48x);
+ Node urem3x = d_nodeManager->mkNode(kind::BITVECTOR_UREM, zext48x8, zext48x);
ASSERT_EQ(BVGauss::getMinBwExpr(urem3x), 8);
Node add1p = d_nodeManager->mkNode(kind::BITVECTOR_PLUS, extp, extp);
Node z = d_nodeManager->mkVar("z", d_nodeManager->mkBitVectorType(16));
Node zextop5 =
d_nodeManager->mkConst<BitVectorZeroExtend>(BitVectorZeroExtend(5));
- Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, x, y);
+ Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, x, y);
Node zext1 = d_nodeManager->mkNode(zextop5, udiv1);
Node ext1 = bv::utils::mkExtract(zext1, 4, 0);
Node ext2 = bv::utils::mkExtract(z, 4, 0);
- Node udiv2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1, ext2);
+ Node udiv2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1, ext2);
Node zext2 = bv::utils::mkConcat(bv::utils::mkZero(5), udiv2);
ASSERT_EQ(BVGauss::getMinBwExpr(zext2), 5);
}
* ((_ extract 4 0) z))) */
Node zextop5 =
d_nodeManager->mkConst<BitVectorZeroExtend>(BitVectorZeroExtend(5));
- Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, d_x, d_y);
+ Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, d_x, d_y);
Node zext1 = d_nodeManager->mkNode(zextop5, udiv1);
Node ext1 = bv::utils::mkExtract(zext1, 4, 0);
Node ext2 = bv::utils::mkExtract(d_z, 4, 0);
- Node udiv2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1, ext2);
+ Node udiv2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1, ext2);
Node zext2 = bv::utils::mkConcat(bv::utils::mkZero(5), udiv2);
ASSERT_EQ(BVGauss::getMinBwExpr(zext2), 5);
}
Node zextop7 =
d_nodeManager->mkConst<BitVectorZeroExtend>(BitVectorZeroExtend(7));
- Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, x, y);
+ Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, x, y);
Node zext1 = d_nodeManager->mkNode(zextop5, udiv1);
Node ext1_1 = bv::utils::mkExtract(zext1, 4, 0);
Node ext2_1 = bv::utils::mkExtract(z, 4, 0);
- Node udiv2_1 =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1_1, ext2_1);
+ Node udiv2_1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1_1, ext2_1);
Node zext2_1 = bv::utils::mkConcat(bv::utils::mkZero(5), udiv2_1);
Node ext1_2 = bv::utils::mkExtract(zext1, 2, 0);
Node ext2_2 = bv::utils::mkExtract(z, 2, 0);
- Node udiv2_2 =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1_2, ext2_2);
+ Node udiv2_2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1_2, ext2_2);
Node zext2_2 = d_nodeManager->mkNode(zextop7, udiv2_2);
Node plus = d_nodeManager->mkNode(kind::BITVECTOR_PLUS, zext2_1, zext2_2);
Node zextop7 =
d_nodeManager->mkConst<BitVectorZeroExtend>(BitVectorZeroExtend(7));
- Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, d_x, d_y);
+ Node udiv1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, d_x, d_y);
Node zext1 = d_nodeManager->mkNode(zextop5, udiv1);
Node ext1_1 = bv::utils::mkExtract(zext1, 4, 0);
Node ext2_1 = bv::utils::mkExtract(d_z, 4, 0);
- Node udiv2_1 =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1_1, ext2_1);
+ Node udiv2_1 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1_1, ext2_1);
Node zext2_1 = bv::utils::mkConcat(bv::utils::mkZero(5), udiv2_1);
Node ext1_2 = bv::utils::mkExtract(zext1, 2, 0);
Node ext2_2 = bv::utils::mkExtract(d_z, 2, 0);
- Node udiv2_2 =
- d_nodeManager->mkNode(kind::BITVECTOR_UDIV_TOTAL, ext1_2, ext2_2);
+ Node udiv2_2 = d_nodeManager->mkNode(kind::BITVECTOR_UDIV, ext1_2, ext2_2);
Node zext2_2 = d_nodeManager->mkNode(zextop7, udiv2_2);
Node plus = d_nodeManager->mkNode(kind::BITVECTOR_PLUS, zext2_1, zext2_2);
unsigned idx,
Node (*getsc)(bool, Kind, Kind, unsigned, Node, Node, Node))
{
- ASSERT_TRUE(k == BITVECTOR_MULT || k == BITVECTOR_UREM_TOTAL
- || k == BITVECTOR_UDIV_TOTAL || k == BITVECTOR_AND
+ ASSERT_TRUE(k == BITVECTOR_MULT || k == BITVECTOR_UREM
+ || k == BITVECTOR_UDIV || k == BITVECTOR_AND
|| k == BITVECTOR_OR || k == BITVECTOR_LSHR
|| k == BITVECTOR_ASHR || k == BITVECTOR_SHL);
Node sc = getsc(pol, litk, k, idx, d_sk, d_s, d_t);
ASSERT_FALSE(sc.isNull());
Kind ksc = sc.getKind();
- ASSERT_TRUE((k == BITVECTOR_UDIV_TOTAL && idx == 1 && pol == false)
+ ASSERT_TRUE((k == BITVECTOR_UDIV && idx == 1 && pol == false)
|| (k == BITVECTOR_ASHR && idx == 0 && pol == false)
|| ksc == IMPLIES);
Node scl = ksc == IMPLIES ? sc[0] : bv::utils::mkTrue();
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_eq_true0)
{
- runTest(true, EQUAL, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(true, EQUAL, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_eq_true1)
{
- runTest(true, EQUAL, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(true, EQUAL, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_eq_false0)
{
- runTest(false, EQUAL, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(false, EQUAL, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_eq_false1)
{
- runTest(false, EQUAL, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(false, EQUAL, BITVECTOR_UREM, 1, getICBvUrem);
}
/* Udiv */
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_eq_true0)
{
- runTest(true, EQUAL, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(true, EQUAL, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_eq_true1)
{
- runTest(true, EQUAL, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(true, EQUAL, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_eq_false0)
{
- runTest(false, EQUAL, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(false, EQUAL, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_eq_false1)
{
- runTest(false, EQUAL, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(false, EQUAL, BITVECTOR_UDIV, 1, getICBvUdiv);
}
/* And */
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ult_true0)
{
- runTest(true, BITVECTOR_ULT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(true, BITVECTOR_ULT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ult_true1)
{
- runTest(true, BITVECTOR_ULT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(true, BITVECTOR_ULT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ult_false0)
{
- runTest(false, BITVECTOR_ULT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(false, BITVECTOR_ULT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ult_false1)
{
- runTest(false, BITVECTOR_ULT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(false, BITVECTOR_ULT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ugt_true0)
{
- runTest(true, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ugt_true1)
{
- runTest(true, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ugt_false0)
{
- runTest(false, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_ugt_false1)
{
- runTest(false, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_slt_true0)
{
- runTest(true, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(true, BITVECTOR_SLT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_slt_true1)
{
- runTest(true, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(true, BITVECTOR_SLT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_slt_false0)
{
- runTest(false, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(false, BITVECTOR_SLT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_slt_false1)
{
- runTest(false, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(false, BITVECTOR_SLT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_sgt_true0)
{
- runTest(true, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_sgt_true1)
{
- runTest(true, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UREM, 1, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_sgt_false0)
{
- runTest(false, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 0, getICBvUrem);
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UREM, 0, getICBvUrem);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_urem_sgt_false1)
{
- runTest(false, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 1, getICBvUrem);
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UREM, 1, getICBvUrem);
}
/* Udiv */
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ult_true0)
{
- runTest(true, BITVECTOR_ULT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(true, BITVECTOR_ULT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ult_true1)
{
- runTest(true, BITVECTOR_ULT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(true, BITVECTOR_ULT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ult_false0)
{
- runTest(false, BITVECTOR_ULT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(false, BITVECTOR_ULT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ult_false1)
{
- runTest(false, BITVECTOR_ULT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(false, BITVECTOR_ULT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ugt_true0)
{
- runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ugt_true1)
{
- runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ugt_false0)
{
- runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_ugt_false1)
{
- runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_slt_true0)
{
- runTest(true, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(true, BITVECTOR_SLT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_slt_true1)
{
- runTest(true, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(true, BITVECTOR_SLT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_slt_false0)
{
- runTest(false, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(false, BITVECTOR_SLT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_slt_false1)
{
- runTest(false, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(false, BITVECTOR_SLT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_sgt_true0)
{
- runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_sgt_true1)
{
- runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_sgt_false0)
{
- runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 0, getICBvUdiv);
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV, 0, getICBvUdiv);
}
TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_udiv_sgt_false1)
{
- runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 1, getICBvUdiv);
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV, 1, getICBvUdiv);
}
/* And */