git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@800
e59a4935-1847-0410-ae03-
e826735625c1
if (a0.GetValueWidth() == len)
{
//nothing to signextend
- return a0;
+ output = a0;
+ break;
}
+ // If the msb is known. Then puts 0's or the 1's infront.
+ if (mostSignificantConstants(a0) > 0)
+ {
+ if (getConstantBit(a0,0) == 0)
+ output = _bm->CreateTerm(BVCONCAT, len, _bm->CreateZeroConst(len-a0.GetValueWidth()), a0);
+ else
+ output = _bm->CreateTerm(BVCONCAT, len, _bm->CreateMaxConst(len-a0.GetValueWidth()), a0);
+
+ break;
+ }
+
+
switch (a0.GetKind())
{
case BVCONST:
//Ptr to STP Manager
STPMgr * _bm;
+ NodeFactory * nf;
public:
/****************************************************************
ASTTrue = bm->CreateNode(TRUE);
ASTFalse = bm->CreateNode(FALSE);
ASTUndefined = bm->CreateNode(UNDEFINED);
+ nf = bm->defaultNodeFactory;
}
~Simplifier()