}
else if (id == PfRule::BV_BITBLAST)
{
- bv::BBProof bb(nullptr, d_pnm, true);
+ bv::BBProof bb(d_env, nullptr, d_pnm, true);
Node eq = args[0];
Assert(eq.getKind() == EQUAL);
bb.bbAtom(eq[0]);
namespace theory {
namespace bv {
-NodeBitblaster::NodeBitblaster(TheoryState* s) : TBitblaster<Node>(), d_state(s)
+NodeBitblaster::NodeBitblaster(Env& env, TheoryState* s)
+ : TBitblaster<Node>(), EnvObj(env), d_state(s)
{
}
return;
}
- Node normalized = Rewriter::rewrite(node);
+ Node normalized = rewrite(node);
Node atom_bb =
normalized.getKind() != kind::CONST_BOOLEAN
&& normalized.getKind() != kind::BITVECTOR_BITOF
? d_atomBBStrategies[normalized.getKind()](normalized, this)
: normalized;
- storeBBAtom(node, Rewriter::rewrite(atom_bb));
+ storeBBAtom(node, rewrite(atom_bb));
}
void NodeBitblaster::storeBBAtom(TNode atom, Node atom_bb)
void NodeBitblaster::computeRelevantTerms(std::set<Node>& termSet)
{
- Assert(options::bitblastMode() == options::BitblastMode::EAGER);
+ Assert(options().bv.bitblastMode == options::BitblastMode::EAGER);
for (const auto& var : d_variables)
{
termSet.insert(var);
*
* Implements the bare minimum to bit-blast bit-vector atoms/terms.
*/
-class NodeBitblaster : public TBitblaster<Node>
+class NodeBitblaster : public TBitblaster<Node>, protected EnvObj
{
using Bits = std::vector<Node>;
public:
- NodeBitblaster(TheoryState* state);
+ NodeBitblaster(Env& env, TheoryState* state);
~NodeBitblaster() = default;
/** Bit-blast term 'node' and return bit-blasted 'bits'. */
namespace theory {
namespace bv {
-BBProof::BBProof(TheoryState* state, ProofNodeManager* pnm, bool fineGrained)
- : d_bb(new NodeBitblaster(state)),
+BBProof::BBProof(Env& env,
+ TheoryState* state,
+ ProofNodeManager* pnm,
+ bool fineGrained)
+ : EnvObj(env),
+ d_bb(new NodeBitblaster(env, state)),
d_pnm(pnm),
d_tcontext(new TheoryLeafTermContext(theory::THEORY_BV)),
d_tcpg(pnm ? new TConvProofGenerator(
namespace theory {
namespace bv {
-class BBProof
+class BBProof : protected EnvObj
{
using Bits = std::vector<Node>;
public:
- BBProof(TheoryState* state, ProofNodeManager* pnm, bool fineGrained);
+ BBProof(Env& env,
+ TheoryState* state,
+ ProofNodeManager* pnm,
+ bool fineGrained);
~BBProof();
/** Bit-blast atom 'node'. */
TheoryInferenceManager& inferMgr,
ProofNodeManager* pnm)
: BVSolver(env, *s, inferMgr),
- d_bitblaster(new NodeBitblaster(s)),
+ d_bitblaster(new NodeBitblaster(env, s)),
d_bbRegistrar(new BBRegistrar(d_bitblaster.get())),
d_nullContext(new context::Context()),
d_bbFacts(s->getSatContext()),
ProofNodeManager* pnm)
: BVSolver(env, *s, inferMgr),
d_pnm(pnm),
- d_bitblaster(new BBProof(s, pnm, false))
+ d_bitblaster(new BBProof(env, s, pnm, false))
{
}