]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Bugfix. STP may produce the wrong answer. Introduced revision 947.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 28 Jul 2010 07:01:58 +0000 (07:01 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 28 Jul 2010 07:01:58 +0000 (07:01 +0000)
I enabled creation of multiplication nodes with >2 children. But the DistributeMultOverPlus function ignores the third (and later) children.

git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@958 e59a4935-1847-0410-ae03-e826735625c1

src/simplifier/simplifier.cpp

index 26bb1ee693d64cd4820e41476c743662295cf629..21bc36e895fbbd6faab0d7d73a99734d566bfb24 100644 (file)
@@ -1845,6 +1845,7 @@ namespace BEEV
                       output = 
                         nf->CreateTerm(k, inputValueWidth, nonconstkids);
                       output = Flatten(output);
+                      output = makeTower(k,output.GetChildren());
                       output = DistributeMultOverPlus(output, true);
                       output = CombineLikeTerms(output);
                     }
@@ -3074,6 +3075,8 @@ namespace BEEV
     if (BVMULT != k)
       return a;
 
+    assert(a.Degree() == 2);
+
     ASTNode left = a[0];
     ASTNode right = a[1];
     Kind left_kind = left.GetKind();