BBNodeVec pprod = BBAndBit(ycopy, *xit);
// accumulate in the product.
- BBPlus2(prod, pprod, ASTFalse);
+ BBPlus2(prod, pprod, nf->getFalse());
}
return prod;
}
// Workhorse for comparison routines. This does a signed BVLE if is_signed
// is true, else it's unsigned. All other comparison operators can be reduced
// to this by swapping args or complementing the result bit.
-// FIXME: If this were done MSB first, it would enable a fast exit sometimes
-// when the MSB is constant, deciding the result without looking at the rest
-// of the bits.
ASTNode BitBlasterNew::BBBVLE(const BBNodeVec& left, const BBNodeVec& right,
bool is_signed, bool is_bvlt) {
BBNodeVec::const_reverse_iterator lit = left.rbegin();
if (!is_bvlt) {
bit_comparisons.push_back(prev_eq_bit);
}
+
+ // Either zero or one of the nodes in bit_comparisons can be true.
BBNode output =
#ifdef CRYPTOMINISAT2
- _bm->CreateSimpForm(XOR, bit_comparisons);
+ nf->CreateNode(XOR, bit_comparisons);
#else
- _bm->CreateSimpForm(OR, bit_comparisons);
+ nf->CreateNode(OR, bit_comparisons);
#endif
return output;
}
}
default:
cerr << "BBCompare: Illegal kind" << form << endl;
- FatalError("", ASTUndefined);
+ FatalError("", form);
}
}
// bitblasted equivalent
BBNodeMap BBFormMemo;
- STPMgr * _bm;
- ASTNode ASTTrue, ASTFalse, ASTUndefined;
-
/****************************************************************
* Private Member Functions *
****************************************************************/
* Public Member Functions *
****************************************************************/
- BitBlasterNew(STPMgr * bm) :
- _bm(bm) {
- ASTTrue = _bm->CreateNode(TRUE);
- ASTFalse = _bm->CreateNode(FALSE);
- ASTUndefined = _bm->CreateNode(UNDEFINED);
+ BitBlasterNew(STPMgr * bm)
+ {
nf = new BBNodeManager(bm);
}