summaryrefslogtreecommitdiff
path: root/src/theory/bv/bv_quick_check.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2014-11-07 17:24:35 -0500
committerMorgan Deters <mdeters@cs.nyu.edu>2014-11-07 17:37:09 -0500
commit89ed50fd35e6425ed7f1fa4ca5ec560acee1358e (patch)
tree5919417452041cc4ee1904e0cf77ba59e7dc9b10 /src/theory/bv/bv_quick_check.cpp
parent0b1e8fb1f4676a950f017319d76019876a39cffc (diff)
Fix memory issues in bitvector theory, which is now valgrind-clean (mostly resolves bug #594).
Diffstat (limited to 'src/theory/bv/bv_quick_check.cpp')
-rw-r--r--src/theory/bv/bv_quick_check.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/theory/bv/bv_quick_check.cpp b/src/theory/bv/bv_quick_check.cpp
index cc294306a..5c67bb3cb 100644
--- a/src/theory/bv/bv_quick_check.cpp
+++ b/src/theory/bv/bv_quick_check.cpp
@@ -25,10 +25,10 @@ using namespace CVC4::theory::bv;
using namespace CVC4::prop;
BVQuickCheck::BVQuickCheck(const std::string& name, theory::bv::TheoryBV* bv)
- : d_ctx(new context::Context())
- , d_bitblaster(new TLazyBitblaster(d_ctx, bv, name, true))
+ : d_ctx()
+ , d_bitblaster(new TLazyBitblaster(&d_ctx, bv, name, true))
, d_conflict()
- , d_inConflict(d_ctx, false)
+ , d_inConflict(&d_ctx, false)
{}
@@ -100,11 +100,11 @@ bool BVQuickCheck::addAssertion(TNode assertion) {
void BVQuickCheck::push() {
- d_ctx->push();
+ d_ctx.push();
}
void BVQuickCheck::pop() {
- d_ctx->pop();
+ d_ctx.pop();
}
BVQuickCheck::vars_iterator BVQuickCheck::beginVars() {
@@ -130,8 +130,8 @@ void BVQuickCheck::clearSolver() {
}
void BVQuickCheck::popToZero() {
- while (d_ctx->getLevel() > 0) {
- d_ctx->pop();
+ while (d_ctx.getLevel() > 0) {
+ d_ctx.pop();
}
}
@@ -140,8 +140,8 @@ void BVQuickCheck::collectModelInfo(theory::TheoryModel* model, bool fullModel)
}
BVQuickCheck::~BVQuickCheck() {
+ clearSolver();
delete d_bitblaster;
- delete d_ctx;
}
QuickXPlain::QuickXPlain(const std::string& name, BVQuickCheck* solver, unsigned long budget)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback