return nb.constructNode();
}
-static Node getScBvUlt(bool pol, Kind k, unsigned idx, Node x, Node t)
+static Node getScBvUltUgt(bool pol, Kind k, Node x, Node t)
{
- Assert(k == BITVECTOR_ULT);
+ Assert(k == BITVECTOR_ULT || k == BITVECTOR_UGT);
NodeManager* nm = NodeManager::currentNM();
unsigned w = bv::utils::getSize(t);
Node sc;
- if (idx == 0)
+ if (k == BITVECTOR_ULT)
{
if (pol == true)
{
else
{
/* x >= t
- * no side condition */
+ * true (no side condition) */
sc = nm->mkNode(NOT, nm->mkNode(k, x, t));
}
}
- else if (idx == 1)
+ else
{
+ Assert(k == BITVECTOR_UGT);
if (pol == true)
{
- /* t < x
+ /* x > t
* with side condition:
* t != ~0 */
Node scl = nm->mkNode(DISTINCT, t, bv::utils::mkOnes(w));
- Node scr = nm->mkNode(k, t, x);
+ Node scr = nm->mkNode(k, x, t);
sc = nm->mkNode(IMPLIES, scl, scr);
}
else
{
- /* t >= x
- * no side condition */
- sc = nm->mkNode(NOT, nm->mkNode(k, t, x));
+ /* x <= t
+ * true (no side condition) */
+ sc = nm->mkNode(NOT, nm->mkNode(k, x, t));
}
}
Trace("bv-invert") << "Add SC_" << k << "(" << x << "): " << sc << std::endl;
return sc;
}
-static Node getScBvSlt(bool pol, Kind k, unsigned idx, Node x, Node t)
+static Node getScBvSltSgt(bool pol, Kind k, Node x, Node t)
{
- Assert(k == BITVECTOR_SLT);
+ Assert(k == BITVECTOR_SLT || k == BITVECTOR_SGT);
NodeManager* nm = NodeManager::currentNM();
unsigned w = bv::utils::getSize(t);
Node sc;
- if (idx == 0)
+ if (k == BITVECTOR_SLT)
{
if (pol == true)
{
else
{
/* x >= t
- * no side condition */
+ * true (no side condition) */
sc = nm->mkNode(NOT, nm->mkNode(k, x, t));
}
}
- else if (idx == 1)
+ else
{
+ Assert(k == BITVECTOR_SGT);
if (pol == true)
{
- /* t < x
+ /* x > t
* with side condition:
* t != 01...1 */
BitVector bv = BitVector(w).setBit(w - 1);
Node max = bv::utils::mkConst(~bv);
Node scl = nm->mkNode(DISTINCT, t, max);
- Node scr = nm->mkNode(k, t, x);
+ Node scr = nm->mkNode(k, x, t);
sc = nm->mkNode(IMPLIES, scl, scr);
}
else
{
- /* t >= x
- * no side condition */
- sc = nm->mkNode(NOT, nm->mkNode(k, t, x));
+ /* x <= t
+ * true (no side condition) */
+ sc = nm->mkNode(NOT, nm->mkNode(k, x, t));
}
}
Trace("bv-invert") << "Add SC_" << k << "(" << x << "): " << sc << std::endl;
Node t)
{
Assert(k == BITVECTOR_UREM_TOTAL);
- Assert (litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT);
+ Assert (litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
+ || litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
NodeManager* nm = NodeManager::currentNM();
Node scl;
}
}
}
- else /* litk == BITVECTOR_SLT */
+ else if (litk == BITVECTOR_SLT)
{
if (idx == 0)
{
}
}
}
+ else
+ {
+ return Node::null();
+ }
Node scr =
nm->mkNode(litk, idx == 0 ? nm->mkNode(k, x, s) : nm->mkNode(k, s, x), t);
Node t)
{
Assert (k == BITVECTOR_AND || k == BITVECTOR_OR);
- Assert (litk == EQUAL || litk == BITVECTOR_SLT || litk == BITVECTOR_ULT);
+ Assert (litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
+ || litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
NodeManager* nm = NodeManager::currentNM();
Node scl, scr;
Node t)
{
Assert(k == BITVECTOR_LSHR);
- Assert(litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT);
+ Assert(litk == EQUAL || litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
+ || litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
NodeManager* nm = NodeManager::currentNM();
Node scl;
}
}
}
- else /* litk == BITVECTOR_SLT */
+ else if (litk == BITVECTOR_SLT)
{
if (idx == 0)
{
}
}
}
+ else
+ {
+ return Node::null();
+ }
Node scr =
nm->mkNode(litk, idx == 0 ? nm->mkNode(k, x, s) : nm->mkNode(k, s, x), t);
Node sc = nm->mkNode(IMPLIES, scl, pol ? scr : scr.notNode());
Node sv_t = lit[index];
Node t = lit[1-index];
+ if (litk == BITVECTOR_ULT && index == 1)
+ {
+ litk = BITVECTOR_UGT;
+ }
+ else if (litk == BITVECTOR_SLT && index == 1)
+ {
+ litk = BITVECTOR_SGT;
+ }
/* Bit-vector layer -------------------------------------------- */
{
t = nm->mkNode(k, t);
}
- else if (k == BITVECTOR_CONCAT)
+ else if (k == BITVECTOR_CONCAT && litk == EQUAL)
{
/* x = t[upper:lower]
* where
}
t = bv::utils::mkExtract(t, upper, lower);
}
- else if (k == BITVECTOR_SIGN_EXTEND)
+ else if (k == BITVECTOR_SIGN_EXTEND && litk == EQUAL)
{
t = bv::utils::mkExtract(t, bv::utils::getSize(sv_t[index]) - 1, 0);
}
Node s = nchildren == 2 ? sv_t[1 - index] : dropChild(sv_t, index);
/* Note: All n-ary kinds except for CONCAT (i.e., AND, OR, MULT, PLUS)
* are commutative (no case split based on index). */
- if (k == BITVECTOR_PLUS)
+ if (k == BITVECTOR_PLUS && litk == EQUAL)
{
t = nm->mkNode(BITVECTOR_SUB, t, s);
}
- else if (k == BITVECTOR_SUB)
- {
- t = nm->mkNode(BITVECTOR_PLUS, t, s);
- }
- else if (k == BITVECTOR_XOR)
+ else if (k == BITVECTOR_XOR && litk == EQUAL)
{
t = nm->mkNode(BITVECTOR_XOR, t, s);
}
if (sc.isNull())
{
solve_tn = sv_t.getType();
- if (litk == BITVECTOR_ULT)
+ if (litk == BITVECTOR_ULT || litk == BITVECTOR_UGT)
{
- sc = getScBvUlt(
- pol, litk, index, getSolveVariable(solve_tn), t);
+ sc = getScBvUltUgt(pol, litk, getSolveVariable(solve_tn), t);
}
else
{
- Assert (litk == BITVECTOR_SLT);
- sc = getScBvSlt(
- pol, litk, index, getSolveVariable(solve_tn), t);
+ Assert (litk == BITVECTOR_SLT || litk == BITVECTOR_SGT);
+ sc = getScBvSltSgt(pol, litk, getSolveVariable(solve_tn), t);
}
}
/* We generate a choice term (choice x0. SC => x0 <k> s <litk> t) for
sv_t = sv_t[index];
}
Assert(sv_t == sv);
- if (litk == BITVECTOR_ULT)
+ if (litk == BITVECTOR_ULT || litk == BITVECTOR_UGT)
{
TypeNode solve_tn = sv_t.getType();
- Node sc = getScBvUlt(pol, litk, index, getSolveVariable(solve_tn), t);
+ Node sc = getScBvUltUgt(pol, litk, getSolveVariable(solve_tn), t);
t = getInversionNode(sc, solve_tn, m);
}
- else if (litk == BITVECTOR_SLT)
+ else if (litk == BITVECTOR_SLT || litk == BITVECTOR_SGT)
{
TypeNode solve_tn = sv_t.getType();
- Node sc = getScBvSlt(pol, litk, index, getSolveVariable(solve_tn), t);
+ Node sc = getScBvSltSgt(pol, litk, getSolveVariable(solve_tn), t);
t = getInversionNode(sc, solve_tn, m);
}
else if (pol == false)
void runTestPred(bool pol,
Kind k,
- unsigned idx,
- Node (*getsc)(bool, Kind, unsigned, Node, Node))
+ Node (*getsc)(bool, Kind, Node, Node))
{
- Assert(k == BITVECTOR_ULT || k == BITVECTOR_SLT || k == EQUAL);
+ Assert(k == BITVECTOR_ULT || k == BITVECTOR_SLT || k == EQUAL
+ || k == BITVECTOR_UGT || k == BITVECTOR_SGT);
Assert(k != EQUAL || pol == false);
- Node sc = getsc(pol, k, idx, d_sk, d_t);
+ Node sc = getsc(pol, k, d_sk, d_t);
Kind ksc = sc.getKind();
TS_ASSERT((k == BITVECTOR_ULT && pol == false)
|| (k == BITVECTOR_SLT && pol == false)
+ || (k == BITVECTOR_UGT && pol == false)
+ || (k == BITVECTOR_SGT && pol == false)
|| ksc == IMPLIES);
Node scl = ksc == IMPLIES ? sc[0] : bv::utils::mkTrue();
if (!pol)
{
- k = k == BITVECTOR_ULT
- ? BITVECTOR_UGE
- : (k == BITVECTOR_SLT ? BITVECTOR_SGE : DISTINCT);
+ if (k == BITVECTOR_ULT)
+ {
+ k = BITVECTOR_UGE;
+ }
+ else if (k == BITVECTOR_UGT)
+ {
+ k = BITVECTOR_ULE;
+ }
+ else if (k == BITVECTOR_SLT)
+ {
+ k = BITVECTOR_SGE;
+ }
+ else if (k == BITVECTOR_SGT)
+ {
+ k = BITVECTOR_ULE;
+ }
+ else
+ {
+ Assert(k == EQUAL);
+ k = DISTINCT;
+ }
}
- Node body = idx == 0
- ? d_nm->mkNode(k, d_x, d_t)
- : d_nm->mkNode(k, d_t, d_x);
+ Node body = d_nm->mkNode(k, d_x, d_t);
Node scr = d_nm->mkNode(EXISTS, d_bvarlist, body);
Expr a = d_nm->mkNode(DISTINCT, scl, scr).toExpr();
Result res = d_smt->checkSat(a);
TS_ASSERT (litk != EQUAL || sc != Node::null());
if (sc.isNull())
{
- TS_ASSERT (litk == BITVECTOR_ULT || litk == BITVECTOR_SLT);
+ TS_ASSERT (litk == BITVECTOR_ULT || litk == BITVECTOR_SLT
+ || litk == BITVECTOR_UGT || litk == BITVECTOR_SGT);
return;
}
Kind ksc = sc.getKind();
delete d_em;
}
- /* Generic sidec conditions for LT --------------------------------------- */
+ /* Generic side conditions for LT --------------------------------------- */
- void testGetScBvUltTrue0()
+ void testGetScBvUltTrue()
{
- runTestPred(true, BITVECTOR_ULT, 0, getScBvUlt);
+ runTestPred(true, BITVECTOR_ULT, getScBvUltUgt);
}
- void testGetScBvUltTrue1()
+ void testGetScBvUltFalse()
{
- runTestPred(true, BITVECTOR_ULT, 1, getScBvUlt);
+ runTestPred(false, BITVECTOR_ULT, getScBvUltUgt);
}
- void testGetScBvUltFalse0()
+ void testGetScBvUgtTrue()
{
- runTestPred(false, BITVECTOR_ULT, 0, getScBvUlt);
+ runTestPred(true, BITVECTOR_UGT, getScBvUltUgt);
}
- void testGetScBvUltFalse1()
+ void testGetScBvUgtFalse()
{
- runTestPred(false, BITVECTOR_ULT, 1, getScBvUlt);
+ runTestPred(false, BITVECTOR_UGT, getScBvUltUgt);
}
- void testGetScBvSltTrue0()
+ void testGetScBvSltTrue()
{
- runTestPred(true, BITVECTOR_SLT, 0, getScBvSlt);
+ runTestPred(true, BITVECTOR_SLT, getScBvSltSgt);
}
- void testGetScBvSltTrue1()
+ void testGetScBvSltFalse()
{
- runTestPred(true, BITVECTOR_SLT, 1, getScBvSlt);
+ runTestPred(false, BITVECTOR_SLT, getScBvSltSgt);
}
- void testGetScBvSltFalse0()
+ void testGetScBvSgtTrue()
{
- runTestPred(false, BITVECTOR_SLT, 0, getScBvSlt);
+ runTestPred(true, BITVECTOR_SGT, getScBvSltSgt);
}
- void testGetScBvSltFalse1()
+ void testGetScBvSgtFalse()
{
- runTestPred(false, BITVECTOR_SLT, 1, getScBvSlt);
+ runTestPred(false, BITVECTOR_SGT, getScBvSltSgt);
}
/* Equality and Disequality ---------------------------------------------- */
runTest(false, BITVECTOR_ULT, BITVECTOR_MULT, 1, getScBvMult);
}
+ void testGetScBvMultUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_MULT, 0, getScBvMult);
+ }
+
+ void testGetScBvMultUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_MULT, 1, getScBvMult);
+ }
+
+ void testGetScBvMultUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_MULT, 0, getScBvMult);
+ }
+
+ void testGetScBvMultUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_MULT, 1, getScBvMult);
+ }
+
void testGetScBvMultSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_MULT, 0, getScBvMult);
runTest(false, BITVECTOR_SLT, BITVECTOR_MULT, 1, getScBvMult);
}
+ void testGetScBvMultSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_MULT, 0, getScBvMult);
+ }
+
+ void testGetScBvMultSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_MULT, 1, getScBvMult);
+ }
+
+ void testGetScBvMultSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_MULT, 0, getScBvMult);
+ }
+
+ void testGetScBvMultSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_MULT, 1, getScBvMult);
+ }
+
/* Urem */
void testGetScBvUremUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
}
+ void testGetScBvUremUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 0, getScBvUrem);
+ }
+
+ void testGetScBvUremUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
+ }
+
+ void testGetScBvUremUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 0, getScBvUrem);
+ }
+
+ void testGetScBvUremUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
+ }
+
void testGetScBvUremSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 0, getScBvUrem);
runTest(false, BITVECTOR_SLT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
}
+ void testGetScBvUremSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 0, getScBvUrem);
+ }
+
+ void testGetScBvUremSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
+ }
+
+ void testGetScBvUremSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 0, getScBvUrem);
+ }
+
+ void testGetScBvUremSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UREM_TOTAL, 1, getScBvUrem);
+ }
+
/* Udiv */
void testGetScBvUdivUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
}
+ void testGetScBvUdivUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 0, getScBvUdiv);
+ }
+
+ void testGetScBvUdivUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
+ }
+
+ void testGetScBvUdivUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 0, getScBvUdiv);
+ }
+
+ void testGetScBvUdivUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
+ }
+
void testGetScBvUdivSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 0, getScBvUdiv);
runTest(false, BITVECTOR_SLT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
}
+ void testGetScBvUdivSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 0, getScBvUdiv);
+ }
+
+ void testGetScBvUdivSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
+ }
+
+ void testGetScBvUdivSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 0, getScBvUdiv);
+ }
+
+ void testGetScBvUdivSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_UDIV_TOTAL, 1, getScBvUdiv);
+ }
+
/* And */
void testGetScBvAndUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_AND, 1, getScBvAndOr);
}
+ void testGetScBvAndUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_AND, 0, getScBvAndOr);
+ }
+
+ void testGetScBvAndUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_AND, 1, getScBvAndOr);
+ }
+
+ void testGetScBvAndUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_AND, 0, getScBvAndOr);
+ }
+
+ void testGetScBvAndUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_AND, 1, getScBvAndOr);
+ }
+
void testGetScBvAndSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_AND, 0, getScBvAndOr);
runTest(false, BITVECTOR_SLT, BITVECTOR_AND, 1, getScBvAndOr);
}
+ void testGetScBvAndSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_AND, 0, getScBvAndOr);
+ }
+
+ void testGetScBvAndSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_AND, 1, getScBvAndOr);
+ }
+
+ void testGetScBvAndSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_AND, 0, getScBvAndOr);
+ }
+
+ void testGetScBvAndSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_AND, 1, getScBvAndOr);
+ }
+
/* Or */
void testGetScBvOrUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_OR, 1, getScBvAndOr);
}
+ void testGetScBvOrUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_OR, 0, getScBvAndOr);
+ }
+
+ void testGetScBvOrUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_OR, 1, getScBvAndOr);
+ }
+
+ void testGetScBvOrUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_OR, 0, getScBvAndOr);
+ }
+
+ void testGetScBvOrUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_OR, 1, getScBvAndOr);
+ }
+
void testGetScBvOrSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_OR, 0, getScBvAndOr);
runTest(false, BITVECTOR_SLT, BITVECTOR_OR, 1, getScBvAndOr);
}
+ void testGetScBvOrSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_OR, 0, getScBvAndOr);
+ }
+
+ void testGetScBvOrSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_OR, 1, getScBvAndOr);
+ }
+
+ void testGetScBvOrSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_OR, 0, getScBvAndOr);
+ }
+
+ void testGetScBvOrSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_OR, 1, getScBvAndOr);
+ }
+
/* Lshr */
void testGetScBvLshrUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_LSHR, 1, getScBvLshr);
}
+ void testGetScBvLshrUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_LSHR, 0, getScBvLshr);
+ }
+
+ void testGetScBvLshrUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_LSHR, 1, getScBvLshr);
+ }
+
+ void testGetScBvLshrUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_LSHR, 0, getScBvLshr);
+ }
+
+ void testGetScBvLshrUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_LSHR, 1, getScBvLshr);
+ }
+
void testGetScBvLshrSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_LSHR, 0, getScBvLshr);
runTest(false, BITVECTOR_SLT, BITVECTOR_LSHR, 1, getScBvLshr);
}
+ void testGetScBvLshrSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_LSHR, 0, getScBvLshr);
+ }
+
+ void testGetScBvLshrSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_LSHR, 1, getScBvLshr);
+ }
+
+ void testGetScBvLshrSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_LSHR, 0, getScBvLshr);
+ }
+
+ void testGetScBvLshrSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_LSHR, 1, getScBvLshr);
+ }
+
/* Ashr */
void testGetScBvAshrUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_ASHR, 1, getScBvAshr);
}
+ void testGetScBvAshrUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_ASHR, 0, getScBvAshr);
+ }
+
+ void testGetScBvAshrUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_ASHR, 1, getScBvAshr);
+ }
+
+ void testGetScBvAshrUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_ASHR, 0, getScBvAshr);
+ }
+
+ void testGetScBvAshrUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_ASHR, 1, getScBvAshr);
+ }
+
void testGetScBvAshrSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_ASHR, 0, getScBvAshr);
runTest(false, BITVECTOR_SLT, BITVECTOR_ASHR, 1, getScBvAshr);
}
+ void testGetScBvAshrSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_ASHR, 0, getScBvAshr);
+ }
+
+ void testGetScBvAshrSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_ASHR, 1, getScBvAshr);
+ }
+
+ void testGetScBvAshrSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_ASHR, 0, getScBvAshr);
+ }
+
+ void testGetScBvAshrSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_ASHR, 1, getScBvAshr);
+ }
+
/* Shl */
void testGetScBvShlUltTrue0()
runTest(false, BITVECTOR_ULT, BITVECTOR_SHL, 1, getScBvShl);
}
+ void testGetScBvShlUgtTrue0()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_SHL, 0, getScBvShl);
+ }
+
+ void testGetScBvShlUgtTrue1()
+ {
+ runTest(true, BITVECTOR_UGT, BITVECTOR_SHL, 1, getScBvShl);
+ }
+
+ void testGetScBvShlUgtFalse0()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_SHL, 0, getScBvShl);
+ }
+
+ void testGetScBvShlUgtFalse1()
+ {
+ runTest(false, BITVECTOR_UGT, BITVECTOR_SHL, 1, getScBvShl);
+ }
+
void testGetScBvShlSltTrue0()
{
runTest(true, BITVECTOR_SLT, BITVECTOR_SHL, 0, getScBvShl);
{
runTest(false, BITVECTOR_SLT, BITVECTOR_SHL, 1, getScBvShl);
}
+
+ void testGetScBvShlSgtTrue0()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_SHL, 0, getScBvShl);
+ }
+
+ void testGetScBvShlSgtTrue1()
+ {
+ runTest(true, BITVECTOR_SGT, BITVECTOR_SHL, 1, getScBvShl);
+ }
+
+ void testGetScBvShlSgtFalse0()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_SHL, 0, getScBvShl);
+ }
+
+ void testGetScBvShlSgtFalse1()
+ {
+ runTest(false, BITVECTOR_SGT, BITVECTOR_SHL, 1, getScBvShl);
+ }
};