added regression test for constant eval
authorlianah <lianahady@gmail.com>
Thu, 21 Mar 2013 16:38:51 +0000 (12:38 -0400)
committerlianah <lianahady@gmail.com>
Thu, 21 Mar 2013 16:38:51 +0000 (12:38 -0400)
src/theory/bv/bv_subtheory_core.cpp
src/theory/bv/theory_bv.cpp
test/regress/regress0/bv/core/constant_core.smt2 [new file with mode: 0644]

index 01378da56e6023ee0ee2b4799e4f0951ff2ad0c5..85ae64d059e5847f1d28681593aadcfe7ebcde3b 100644 (file)
@@ -123,7 +123,7 @@ bool CoreSolver::decomposeFact(TNode fact) {
     Node new_b = getBaseDecomposition(b, explanation);
 
     explanation.push_back(fact);
-    TNode reason = utils::mkAnd(explanation); 
+    Node reason = utils::mkAnd(explanation); 
   
     Assert (utils::getSize(new_a) == utils::getSize(new_b) &&
             utils::getSize(new_a) == utils::getSize(a)); 
@@ -197,11 +197,10 @@ bool CoreSolver::check(Theory::Effort e) {
 }
 
 bool CoreSolver::assertFactToEqualityEngine(TNode fact, TNode reason) {
-  Debug("bv-slicer-eq") << "CoreSolver::assertFactToEqualityEngine fact=" << fact << endl;
-  Debug("bv-slicer-eq") << "                     reason=" << reason << endl;
   // Notify the equality engine 
   if (d_useEqualityEngine && !d_bv->inConflict() && !d_bv->propagatedBy(fact, SUB_CORE) ) {
-    Trace("bitvector::core") << "     (assert " << fact << ")\n";  
+    Debug("bv-slicer-eq") << "CoreSolver::assertFactToEqualityEngine fact=" << fact << endl;
+    // Debug("bv-slicer-eq") << "                     reason=" << reason << endl;
     bool negated = fact.getKind() == kind::NOT;
     TNode predicate = negated ? fact[0] : fact;
     if (predicate.getKind() == kind::EQUAL) {
index 135b944ad6e1fabc75e3e9c6258cfe7ccdb2f7cd..2d390b7b9b454686e4a8f406934e17d7cf58e490 100644 (file)
@@ -122,13 +122,13 @@ void TheoryBV::check(Effort e)
   }
   Assert (!ok == inConflict()); 
 
-  if (!inConflict() && !d_coreSolver.isCoreTheory()) {
-    ok = d_inequalitySolver.check(e); 
-  }
+  // if (!inConflict() && !d_coreSolver.isCoreTheory()) {
+  //   ok = d_inequalitySolver.check(e); 
+  // }
 
   Assert (!ok == inConflict());
-  //   if (!inConflict() && !d_coreSolver.isCoreTheory()) {
-  if (!inConflict() && !d_inequalitySolver.isInequalityTheory()) {
+  if (!inConflict() && !d_coreSolver.isCoreTheory()) {
+    //if (!inConflict() && !d_inequalitySolver.isInequalityTheory()) {
     ok = d_bitblastSolver.check(e); 
   }
   
diff --git a/test/regress/regress0/bv/core/constant_core.smt2 b/test/regress/regress0/bv/core/constant_core.smt2
new file mode 100644 (file)
index 0000000..c7a5a60
--- /dev/null
@@ -0,0 +1,15 @@
+(set-logic QF_BV)
+(set-info :smt-lib-version 2.0)
+(set-info :category "crafted")
+(set-info :status unsat)
+(declare-fun x () (_ BitVec 3))
+(assert (and 
+(= ((_ extract 1 0) x) (concat ((_ extract 1 1) x) ((_ extract 0 0) x)))
+(= ((_ extract 0 0) x) ((_ extract 1 1) x))
+(= ((_ extract 2 2) x) ((_ extract 1 1) x))
+(= (_ bv0 1) ((_ extract 0 0) x))
+(= x (concat ((_ extract 2 2) x) ((_ extract 1 0) x)))
+(not (= (_ bv0 3) x))
+))
+(check-sat)
+(exit)
\ No newline at end of file