From: trevor_hansen Date: Mon, 5 Apr 2010 13:38:25 +0000 (+0000) Subject: Fix for failure reported by Alvin Cheung (r666) X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b8c4cb515cf33acb98b2f7bb76d20fb249ecd5c7;p=francis%2Fstp.git Fix for failure reported by Alvin Cheung (r666) git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@667 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/STPManager/STPManager.cpp b/src/STPManager/STPManager.cpp index a1b92a8..4e89eb3 100644 --- a/src/STPManager/STPManager.cpp +++ b/src/STPManager/STPManager.cpp @@ -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; diff --git a/src/simplifier/bvsolver.cpp b/src/simplifier/bvsolver.cpp index 5154236..2779502 100644 --- a/src/simplifier/bvsolver.cpp +++ b/src/simplifier/bvsolver.cpp @@ -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; }