summaryrefslogtreecommitdiff
path: root/src/theory/bv/lazy_bitblaster.cpp
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.stanford.edu>2017-03-28 18:29:48 -0700
committerClark Barrett <barrett@cs.stanford.edu>2017-03-28 18:29:48 -0700
commit3d1ad64367948039f67f653e34f19359e3c9c496 (patch)
tree199a78da87159627dc901468276c7e232829af6e /src/theory/bv/lazy_bitblaster.cpp
parent679011435a1200ed97148d6daae130b48254c0e2 (diff)
Fix for bug 733
Diffstat (limited to 'src/theory/bv/lazy_bitblaster.cpp')
-rw-r--r--src/theory/bv/lazy_bitblaster.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theory/bv/lazy_bitblaster.cpp b/src/theory/bv/lazy_bitblaster.cpp
index 1477f183e..e89cacb40 100644
--- a/src/theory/bv/lazy_bitblaster.cpp
+++ b/src/theory/bv/lazy_bitblaster.cpp
@@ -45,7 +45,7 @@ TLazyBitblaster::TLazyBitblaster(context::Context* c, bv::TheoryBV* bv,
, d_bbAtoms()
, d_abstraction(NULL)
, d_emptyNotify(emptyNotify)
- , d_satSolverFullModel(c, false)
+ , d_fullModelAssertionLevel(c, 0)
, d_name(name)
, d_statistics(name) {
@@ -290,7 +290,7 @@ bool TLazyBitblaster::solve() {
}
}
Debug("bitvector") << "TLazyBitblaster::solve() asserted atoms " << d_assertedAtoms->size() <<"\n";
- d_satSolverFullModel.set(true);
+ d_fullModelAssertionLevel.set(d_bv->numAssertions());
return prop::SAT_VALUE_TRUE == d_satSolver->solve();
}
@@ -393,8 +393,9 @@ void TLazyBitblaster::MinisatNotify::safePoint(unsigned ammount) {
EqualityStatus TLazyBitblaster::getEqualityStatus(TNode a, TNode b) {
+ int numAssertions = d_bv->numAssertions();
Debug("bv-equality-status")<< "TLazyBitblaster::getEqualityStatus " << a <<" = " << b <<"\n";
- Debug("bv-equality-status")<< "BVSatSolver has full model? " << d_satSolverFullModel.get() <<"\n";
+ Debug("bv-equality-status")<< "BVSatSolver has full model? " << (d_fullModelAssertionLevel.get() == numAssertions) <<"\n";
// First check if it trivially rewrites to false/true
Node a_eq_b = Rewriter::rewrite(utils::mkNode(kind::EQUAL, a, b));
@@ -402,8 +403,9 @@ EqualityStatus TLazyBitblaster::getEqualityStatus(TNode a, TNode b) {
if (a_eq_b == utils::mkFalse()) return theory::EQUALITY_FALSE;
if (a_eq_b == utils::mkTrue()) return theory::EQUALITY_TRUE;
- if (!d_satSolverFullModel.get())
+ if (d_fullModelAssertionLevel.get() != numAssertions) {
return theory::EQUALITY_UNKNOWN;
+ }
// Check if cache is valid (invalidated in check and pops)
if (d_bv->d_invalidateModelCache.get()) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback