]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Fix an assertion error.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 28 Jan 2012 13:57:37 +0000 (13:57 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 28 Jan 2012 13:57:37 +0000 (13:57 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1535 e59a4935-1847-0410-ae03-e826735625c1

src/simplifier/PropagateEqualities.cpp

index d3225f0316dd051eb1aaac4ba3e9e35203828ee6..90fd4b131a582287ada7f9e254b900753724914d 100644 (file)
@@ -21,7 +21,11 @@ namespace BEEV
     Kind k = lhs.GetKind();
 
     if (k == SYMBOL)
-        return simp->UpdateSubstitutionMap(lhs, rhs); // checks whether it's been solved for or loops.
+        {
+          if (lhs == rhs)
+            return true;
+          return simp->UpdateSubstitutionMap(lhs, rhs); // checks whether it's been solved for or loops.
+        }
 
     if (k == NOT)
       return searchXOR(lhs[0], nf->CreateNode(NOT, rhs));
@@ -61,7 +65,12 @@ namespace BEEV
     const int width = lhs.GetValueWidth();
 
     if (lhs.GetKind() == SYMBOL)
-          return simp->UpdateSubstitutionMap(lhs, rhs); // checks whether it's been solved for, or if the RHS contains the LHS.
+      {
+        if (lhs == rhs)
+          return true;
+
+        return simp->UpdateSubstitutionMap(lhs, rhs); // checks whether it's been solved for, or if the RHS contains the LHS.
+      }
 
     if (lhs.GetKind() == BVUMINUS)
       return searchTerm(lhs[0], nf->CreateTerm(BVUMINUS, width, rhs));