]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Fix for failure reported by Alvin Cheung (r666)
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 5 Apr 2010 13:38:25 +0000 (13:38 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 5 Apr 2010 13:38:25 +0000 (13:38 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@667 e59a4935-1847-0410-ae03-e826735625c1

src/STPManager/STPManager.cpp
src/simplifier/bvsolver.cpp

index a1b92a8cdf276c1dd92847908334844c3fa7727f..4e89eb3285f96ea8cef698a47d540abd4e4117c5 100644 (file)
@@ -629,6 +629,7 @@ namespace BEEV
     c += "_solver_" + ccc;
 
     ASTNode CurrentSymbol = CreateSymbol(c.c_str());
+    assert(0 !=n);
     CurrentSymbol.SetValueWidth(n);
     CurrentSymbol.SetIndexWidth(0);
     return CurrentSymbol;
index 5154236ca214666692de26d03fb357a22832b681..2779502eae85a74fbf6f0158d68acb564239a7fb 100644 (file)
@@ -469,6 +469,8 @@ namespace BEEV
               return eq;
             }
 
+          if (lhs[0].GetValueWidth() != lhs.GetValueWidth())
+          {
           //if the extract of x[i:0] = t is entered into the solvermap,
           //then also add another entry for x = x1@t
           ASTNode var = lhs[0];
@@ -476,7 +478,9 @@ namespace BEEV
             _bm->NewVar(var.GetValueWidth() - lhs.GetValueWidth());
           newvar = 
             _bm->CreateTerm(BVCONCAT, var.GetValueWidth(), newvar, rhs);
+                         assert(BVTypeCheck(newvar));
           _simp->UpdateSolverMap(var, newvar);
+          }
           output = ASTTrue;
           break;
         }