else if (width == 1 && n0 == n1)
result = bm.CreateZeroConst(1);
else if (n0 == n1)
- result = NodeFactory::CreateTerm(BEEV::BVMULT, width, bm.CreateBVConst(width,2), n0);
+ result = NodeFactory::CreateTerm(BEEV::BVMULT, width, bm.CreateBVConst(string("2"), 10, width), n0);
else if (n0.GetKind() == BEEV::BVUMINUS && n1 == n0[0])
result = bm.CreateZeroConst(width);
else if (n1.GetKind() == BEEV::BVPLUS && n1[1].GetKind() == BEEV::BVUMINUS && n0 == n1[1][0] && n1.Degree() ==2 )
return n;
}
- ASTNode STPMgr::CreateBVConst(string& strval, int base, int bit_width)
+ ASTNode STPMgr::CreateBVConst(string strval, int base, int bit_width)
{
assert (bit_width > 0);
ASTNode CreateZeroConst(unsigned int width);
ASTNode CreateBVConst(CBV bv, unsigned width);
ASTNode CreateBVConst(const char *strval, int base);
- ASTNode CreateBVConst(string& strval, int base, int bit_width);
+ ASTNode CreateBVConst(string strval, int base, int bit_width);
ASTNode CreateBVConst(unsigned int width, unsigned long long int bvconst);
ASTNode charToASTNode(unsigned char* strval, int base , int bit_width);