* If optimisations were disabled, sign_extend[0], would segfault in the bitblaster.
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@243
e59a4935-1847-0410-ae03-
e826735625c1
ASTNode BeevMgr::CreateBVConst(string*& strval, int base, int bit_width)
{
+ if (bit_width <= 0)
+ FatalError("CreateBVConst: trying to create a bvconst of width: ", ASTUndefined, bit_width);
+
+
if (!(2 == base || 10 == base || 16 == base))
{
FatalError("CreateBVConst: unsupported base: ", ASTUndefined, base);
#include "../AST/AST.h"
#include <cmath>
+#include <cassert>
namespace BEEV
{
if (result_width == arg_width)
{
//nothing to sign extend
+ result = arg;
break;
}
else
// lpvec(result);
// cout << endl;
+ assert(!result.IsNull());
return (BBTermMemo[term] = result);
}