From: trevor_hansen Date: Tue, 3 Apr 2012 15:08:25 +0000 (+0000) Subject: Improvement to cbipt. Run unsigned division propagagtor instead of the signed divisio... X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=3abd02a6234690f1214a9c34e61cc0dc39312c3a;p=francis%2Fstp.git Improvement to cbipt. Run unsigned division propagagtor instead of the signed division propagator if both values are positive. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1621 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/simplifier/constantBitP/ConstantBitP_Division.cpp b/src/simplifier/constantBitP/ConstantBitP_Division.cpp index 34da917..bb485a8 100644 --- a/src/simplifier/constantBitP/ConstantBitP_Division.cpp +++ b/src/simplifier/constantBitP/ConstantBitP_Division.cpp @@ -1119,8 +1119,12 @@ Result bvSignedDivisionBothWays(vector& children, return NO_CHANGE; } - - return bvSignedDivisionRemainderBothWays(children, output, bm, + // unsigned division propagates much better than signed division does! + const int top = children[0]->getWidth(); + if ((*children[0])[top-1] == '0' && (*children[1])[top-1] == '0') + return bvUnsignedDivisionBothWays(children, output, bm); + else + return bvSignedDivisionRemainderBothWays(children, output, bm, bvUnsignedDivisionBothWays, SIGNED_DIVISION); } }