return false;
BBNodeManagerAIG mgr;
- Simplifier simp(bm);
- BitBlaster<BBNodeAIG, BBNodeManagerAIG> bb(&mgr,cb,&simp,bm->defaultNodeFactory,&bm->UserFlags);
+ Simplifier *simp = new Simplifier(bm);
+ BitBlaster<BBNodeAIG, BBNodeManagerAIG> *bb = new BitBlaster<BBNodeAIG, BBNodeManagerAIG>(&mgr,cb,simp,bm->defaultNodeFactory,&bm->UserFlags);
+
+ // Even if we cleared the tables we could still have the hash table's buckets sitting around.
+ delete simp;
+ simp = NULL;
bm->GetRunTimes()->start(RunTimes::BitBlasting);
- BBNodeAIG BBFormula = bb.BBForm(input);
+ BBNodeAIG BBFormula = bb->BBForm(input);
bm->GetRunTimes()->stop(RunTimes::BitBlasting);
- bb.ClearAllTables();
+ delete bb;
+ bb = NULL;
+
+ //Clear out all the constant bit stuff before sending the SAT.
+ if (cb != NULL)
+ {
+ delete cb;
+ cb = NULL;
+ }
+
+
assert(satSolver.nVars() ==0);
BBFormula = BBNodeAIG(); // null node
mgr.stop();
- //Clear out all the constant bit stuff before sending the SAT.
- if (cb != NULL)
- cb->clearTables();
-
bm->GetRunTimes()->start(RunTimes::SendingToSAT);
for (int i = 0; i < cnfData->nVars; i++)
pushP(products,i,y,x[i],nf);
}
- else if (xt[i] == MINUS_ONE_MT)
+ // A bit can not be true or false, as well as one of these two.
+ if (xt[i] == MINUS_ONE_MT)
{
pushP(products,i,notY,BBTrue,nf);
products[i].push(BBTrue);
pushP(products,i,y,BBTrue,nf);
}
- else if (products[i].size() == 0)
+ if (products[i].size() == 0)
products[i].push(BBFalse);
}
}