From 390477967f6179b03754c27be027b22ea77052bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dejan=20Jovanovi=C4=87?= Date: Sat, 26 Mar 2011 22:26:06 +0000 Subject: [PATCH] fix for bug 253, was propagating an asserted literal also fixing some compile warnings in attributes --- src/expr/attribute_internals.h | 8 ++++---- src/theory/bv/theory_bv.cpp | 11 +++++++++-- test/regress/regress0/bv/core/Makefile.am | 4 +--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/expr/attribute_internals.h b/src/expr/attribute_internals.h index 3bbab17a4..cdb5735c3 100644 --- a/src/expr/attribute_internals.h +++ b/src/expr/attribute_internals.h @@ -411,7 +411,7 @@ class CDAttrHash : d_key(key), d_word(word), d_bit(bit) { - Debug.printf("cdboolattr", "CDAttrHash::BitAccessor(%p, %p, %lx, %u)\n", &map, key, word, bit); + Debug.printf("cdboolattr", "CDAttrHash::BitAccessor(%p, %p, %llx, %u)\n", &map, key, word, bit); } BitAccessor& operator=(bool b) { @@ -419,19 +419,19 @@ class CDAttrHash : // set the bit d_word |= (1 << d_bit); d_map.insert(d_key, d_word); - Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::set(%p, %p, %lx, %u)\n", &d_map, d_key, d_word, d_bit); + Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::set(%p, %p, %llx, %u)\n", &d_map, d_key, d_word, d_bit); } else { // clear the bit d_word &= ~(1 << d_bit); d_map.insert(d_key, d_word); - Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::clr(%p, %p, %lx, %u)\n", &d_map, d_key, d_word, d_bit); + Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::clr(%p, %p, %llx, %u)\n", &d_map, d_key, d_word, d_bit); } return *this; } operator bool() const { - Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::toBool(%p, %p, %lx, %u)\n", &d_map, d_key, d_word, d_bit); + Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::toBool(%p, %p, %llx, %u)\n", &d_map, d_key, d_word, d_bit); return (d_word & (1 << d_bit)) ? true : false; } };/* class CDAttrHash::BitAccessor */ diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp index e106f3b84..bcf6339ac 100644 --- a/src/theory/bv/theory_bv.cpp +++ b/src/theory/bv/theory_bv.cpp @@ -56,11 +56,18 @@ void TheoryBV::check(Effort e) { BVDebug("bitvector") << "TheoryBV::check(" << e << ")" << std::endl; - while(!done()) { - + // Get all the assertions + std::vector assertionsList; + while (!done()) { // Get the assertion TNode assertion = get(); d_assertions.insert(assertion); + assertionsList.push_back(assertion); + } + + for (unsigned i = 0; i < assertionsList.size(); ++ i) { + + TNode assertion = assertionsList[i]; BVDebug("bitvector") << "TheoryBV::check(" << e << "): asserting: " << assertion << std::endl; diff --git a/test/regress/regress0/bv/core/Makefile.am b/test/regress/regress0/bv/core/Makefile.am index 15c2f699f..f1a12e165 100644 --- a/test/regress/regress0/bv/core/Makefile.am +++ b/test/regress/regress0/bv/core/Makefile.am @@ -67,9 +67,7 @@ TESTS = \ a78test0002.smt \ a95test0002.smt \ bitvec0.smt \ - bitvec2.smt - -EXTRA_DIST = $(TESTS) \ + bitvec2.smt \ bitvec3.smt \ bitvec5.smt -- 2.30.2