50 for (
size_t i = 0; i < str.size(); i++) {
51 if (i == 0 && (str[i] ==
'-' || str[i] ==
'+'))
62 for (
size_t i = 0; i < str.size(); i++) {
63 if (i == 0 && (str[i] ==
'-' || str[i] ==
'+'))
65 if (str[i] ==
'.' && !has_dot) {
80 size_t e_pos = str.find_first_of(
"Ee");
81 if (e_pos == std::string::npos || e_pos == 0)
85 std::string mantissa = str.substr(0, e_pos);
90 std::string exponent = str.substr(e_pos + 1);
97 std::string exponent_no_spaces = exponent;
98 exponent_no_spaces.erase(
99 std::remove_if(exponent_no_spaces.begin(), exponent_no_spaces.end(), [](
unsigned char c) { return std::isspace(c); }),
100 exponent_no_spaces.end());
104 if (exponent_no_spaces.empty())
108 if (exponent_no_spaces[0] ==
'(') {
110 size_t close_pos = exponent_no_spaces.find(
')');
111 if (close_pos != std::string::npos) {
113 exponent_no_spaces = exponent_no_spaces.substr(1, close_pos - 1);
117 exponent_no_spaces = exponent_no_spaces.substr(1);
123 if (exponent_no_spaces.empty())
127 if (exponent_no_spaces[0] ==
'+' || exponent_no_spaces[0] ==
'-') {
129 if (exponent_no_spaces.size() == 1)
132 for (
size_t i = 1; i < exponent_no_spaces.size(); i++) {
133 if (!isdigit(exponent_no_spaces[i]))
139 for (
char c : exponent_no_spaces) {
150 size_t e_pos = str.find_first_of(
"Ee");
151 if (e_pos == std::string::npos)
156 std::string mantissa = str.substr(0, e_pos);
163 std::string exponent = str.substr(e_pos + 1);
166 if (exponent.empty())
170 std::string exponent_no_spaces = exponent;
171 exponent_no_spaces.erase(
172 std::remove_if(exponent_no_spaces.begin(), exponent_no_spaces.end(), [](
unsigned char c) { return std::isspace(c); }),
173 exponent_no_spaces.end());
177 if (exponent_no_spaces.empty())
181 if (exponent_no_spaces[0] ==
'(') {
183 size_t close_pos = exponent_no_spaces.find(
')');
184 if (close_pos != std::string::npos) {
186 exponent_no_spaces = exponent_no_spaces.substr(1, close_pos - 1);
190 exponent_no_spaces = exponent_no_spaces.substr(1);
196 if (exponent_no_spaces.empty())
202 Real exponent_val =
Real(exponent_no_spaces);
205 Real result = mantissa_val *
209 std::ostringstream oss;
210 oss << std::setprecision(16) <<
toString(result);
213 catch (
const std::exception &e) {
226 if (str[1] !=
'b' && str[1] !=
'x' && str[1] !=
'd' && str[1] !=
'B' &&
227 str[1] !=
'X' && str[1] !=
'D')
229 for (
size_t i = 2; i < str.size(); i++) {
230 if ((str[1] ==
'b' || str[1] ==
'B') && (str[i] !=
'0' && str[i] !=
'1'))
232 if ((str[1] ==
'x' || str[1] ==
'X') &&
233 (str[i] !=
'0' && str[i] !=
'1' && str[i] !=
'2' && str[i] !=
'3' &&
234 str[i] !=
'4' && str[i] !=
'5' && str[i] !=
'6' && str[i] !=
'7' &&
235 str[i] !=
'8' && str[i] !=
'9' && str[i] !=
'a' && str[i] !=
'A' &&
236 str[i] !=
'b' && str[i] !=
'B' && str[i] !=
'c' && str[i] !=
'C' &&
237 str[i] !=
'd' && str[i] !=
'D' && str[i] !=
'e' && str[i] !=
'E' &&
238 str[i] !=
'f' && str[i] !=
'F'))
240 if ((str[1] ==
'd' || str[1] ==
'D') &&
241 (str[i] !=
'0' && str[i] !=
'1' && str[i] !=
'2' && str[i] !=
'3' &&
242 str[i] !=
'4' && str[i] !=
'5' && str[i] !=
'6' && str[i] !=
'7' &&
243 str[i] !=
'8' && str[i] !=
'9'))
253 if (str.substr(0, 3) !=
"(fp")
255 if (str[str.size() - 1] !=
')')
262 if (str[0] !=
'"' || str[str.size() - 1] !=
'"')
271 for (
Integer i = 1; i < exp; i++) {
290 throw std::runtime_error(
"Error: MathUtils::sqrt of negative number");
296 throw std::runtime_error(
"Error: MathUtils::sqrt of negative number");
326 for (
Integer i = 3; i * i <= n; i += 2) {
339 for (
Integer i = 1; i <= n; i++) {
347 "BitVectorUtils::bvNot: invalid bitvector");
348 std::string res =
"#b";
349 for (
size_t i = 2; i < bv.size(); i++) {
350 res += bv[i] ==
'1' ?
'0' :
'1';
355 const std::string &bv2) {
357 "BitVectorUtils::bvAnd: invalid bitvector");
359 "BitVectorUtils::bvAnd: invalid bitvector");
360 std::string res =
"#b";
361 for (
size_t i = 2; i < bv1.size(); i++) {
362 res += bv1[i] ==
'1' && bv2[i] ==
'1' ?
'1' :
'0';
367 const std::string &bv2) {
369 "BitVectorUtils::bvOr: invalid bitvector");
371 "BitVectorUtils::bvOr: invalid bitvector");
372 std::string res =
"#b";
373 for (
size_t i = 2; i < bv1.size(); i++) {
374 res += bv1[i] ==
'1' || bv2[i] ==
'1' ?
'1' :
'0';
379 const std::string &bv2) {
381 "BitVectorUtils::bvXor: invalid bitvector");
383 "BitVectorUtils::bvXor: invalid bitvector");
384 std::string res =
"#b";
385 for (
size_t i = 2; i < bv1.size(); i++) {
386 res += bv1[i] != bv2[i] ?
'1' :
'0';
391 const std::string &bv2) {
393 "BitVectorUtils::bvNand: invalid bitvector");
395 "BitVectorUtils::bvNand: invalid bitvector");
396 std::string res =
"#b";
397 for (
size_t i = 2; i < bv1.size(); i++) {
398 res += bv1[i] ==
'1' && bv2[i] ==
'1' ?
'0' :
'1';
403 const std::string &bv2) {
405 "BitVectorUtils::bvNor: invalid bitvector");
407 "BitVectorUtils::bvNor: invalid bitvector");
408 std::string res =
"#b";
409 for (
size_t i = 2; i < bv1.size(); i++) {
410 res += bv1[i] ==
'0' && bv2[i] ==
'0' ?
'1' :
'0';
415 const std::string &bv2) {
417 "BitVectorUtils::bvXnor: invalid bitvector");
419 "BitVectorUtils::bvXnor: invalid bitvector");
420 std::string res =
"#b";
421 for (
size_t i = 2; i < bv1.size(); i++) {
422 res += bv1[i] == bv2[i] ?
'1' :
'0';
429 "BitVectorUtils::bvNeg: invalid bitvector");
432 return "#b" + cbv.
str();
436 const std::string &bv2) {
438 "BitVectorUtils::bvAdd: invalid bitvector");
440 "BitVectorUtils::bvAdd: invalid bitvector");
445 return "#b" + cbv1.
str();
448 const std::string &bv2) {
450 "BitVectorUtils::bvSub: invalid bitvector");
452 "BitVectorUtils::bvSub: invalid bitvector");
457 return "#b" + cbv1.
str();
460 const std::string &bv2) {
462 "BitVectorUtils::bvMul: invalid bitvector");
464 "BitVectorUtils::bvMul: invalid bitvector");
469 return "#b" + cbv1.
str();
473 const std::string &bv2) {
475 "BitVectorUtils::bvUdiv: invalid bitvector");
477 "BitVectorUtils::bvUdiv: invalid bitvector");
482 return "#b" + cbv1.
str();
485 const std::string &bv2) {
487 "BitVectorUtils::bvUrem: invalid bitvector");
489 "BitVectorUtils::bvUrem: invalid bitvector");
493 return "#b" + cbv1.
str();
496 const std::string &bv2) {
498 "BitVectorUtils::bvUmod: invalid bitvector");
500 "BitVectorUtils::bvUmod: invalid bitvector");
505 const std::string &bv2) {
507 "BitVectorUtils::bvSdiv: invalid bitvector");
509 "BitVectorUtils::bvSdiv: invalid bitvector");
514 return "#b" + cbv1.
str();
517 const std::string &bv2) {
519 "BitVectorUtils::bvSrem: invalid bitvector");
521 "BitVectorUtils::bvSrem: invalid bitvector");
526 return "#b" + cbv1.
str();
529 const std::string &bv2) {
531 "BitVectorUtils::bvSmod: invalid bitvector");
533 "BitVectorUtils::bvSmod: invalid bitvector");
538 return "#b" + cbv1.
str();
544 "BitVectorUtils::bvShl: invalid bitvector");
546 "BitVectorUtils::bvShl: invalid bitvector");
550 return "#b" + cbv.
str();
553 const std::string &n) {
556 "BitVectorUtils::bvLshr: invalid bitvector");
558 "BitVectorUtils::bvLshr: invalid bitvector");
562 return "#b" + cbv.
str();
565 const std::string &n) {
568 "BitVectorUtils::bvAshr: invalid bitvector");
570 "BitVectorUtils::bvAshr: invalid bitvector");
574 return "#b" + cbv.
str();
578 const std::string &bv2) {
580 "BitVectorUtils::bvConcat: invalid bitvector");
582 "BitVectorUtils::bvConcat: invalid bitvector");
583 return "#b" + bv1.substr(2, bv1.size() - 2) + bv2.substr(2, bv2.size() - 2);
587 "BitVectorUtils::bvExtract: invalid bitvector");
589 "BitVectorUtils::bvExtract: i must be greater than or equal to j");
592 size_t bit_width = bv.size() - 2;
594 2 + (bit_width - 1 - i.
toULong());
597 return "#b" + bv.substr(start_pos, length);
601 "BitVectorUtils::bvRepeat: invalid bitvector");
602 std::string res =
"";
603 for (
size_t i = 0; i < n.
toULong(); i++) {
611 "BitVectorUtils::bvZeroExtend: invalid bitvector");
612 return "#b" + std::string(n.
toULong(),
'0') + bv.substr(2);
617 "BitVectorUtils::bvSignExtend: invalid bitvector");
618 return "#b" + std::string(n.
toULong(), bv[2]) + bv.substr(2);
624 "BitVectorUtils::bvRotateLeft: invalid bitvector");
625 Integer real_n = n % (bv.size() - 2);
626 return "#b" + bv.substr(2 + n.
toULong()) + bv.substr(2, n.
toULong());
631 "BitVectorUtils::bvRotateRight: invalid bitvector");
632 Integer real_n = n % (bv.size() - 2);
633 return "#b" + bv.substr(2 + bv.size() - 2 - n.
toULong()) +
634 bv.substr(2, bv.size() - 2 - n.
toULong());
639 "BitVectorUtils::bvComp: invalid bitvector");
641 "BitVectorUtils::bvComp: invalid bitvector");
678 "BitVectorUtils::bvIsMaxSigned: invalid bitvector");
681 return std::all_of(bv.begin() + 3, bv.end(), [](
char c) { return c ==
'1'; });
686 "BitVectorUtils::bvIsMinSigned: invalid bitvector");
689 return std::all_of(bv.begin() + 3, bv.end(), [](
char c) { return c ==
'0'; });
694 "BitVectorUtils::bvIsMaxUnsigned: invalid bitvector");
695 return std::all_of(bv.begin() + 2, bv.end(), [](
char c) { return c ==
'1'; });
700 "BitVectorUtils::bvIsNegOne: invalid bitvector");
701 return std::all_of(bv.begin() + 2, bv.end(), [](
char c) { return c ==
'1'; });
706 "BitVectorUtils::bvCompareToUint: invalid bitvector");
707 if (bv.size() > 64 + 2 && std::any_of(bv.begin() + 2, bv.end() - 64, [](
char c) { return c ==
'1'; }))
713 else if (bv_value > u)
721 return "#b" + std::string(n.
toULong(),
'1');
726 "BitVectorUtils::bvToNat: invalid bitvector");
728 for (
size_t i = 2; i < bv.size(); i++) {
729 res = res * 2 + (bv[i] ==
'1' ? 1 : 0);
734 std::string res =
"#b";
736 if (bin.size() < n.
toULong()) {
737 res += std::string(n.
toULong() - bin.size(),
'0') + bin;
745 std::string res =
"#b";
746 for (
size_t i = 0; i < hex.size(); i++) {
815 condAssert(
false,
"hexToBv: invalid hex character");
821 std::string res =
"#b";
828 if (i.size() > 2 && i[0] ==
'#' && i[1] ==
'b') {
830 std::string res =
"#b";
831 std::string bin = i.substr(2, i.size() - 2);
832 if (bin.size() < n.
toULong()) {
833 res += std::string(n.
toULong() - bin.size(),
'0') + bin;
840 else if (i.size() > 2 && i[0] ==
'#' && i[1] ==
'x') {
842 return hexToBv(i.substr(2, i.size() - 2));
844 else if (i.size() > 2 && i[0] ==
'#' && i[1] ==
'd') {
846 return decToBv(i.substr(2, i.size() - 2));
854 "BitVectorUtils::bvToInt: invalid bitvector");
857 for (
size_t i = 3; i < bv.size(); i++) {
858 res = res * 2 + (bv[i] ==
'1' ? 1 : 0);
864 for (
size_t i = 3; i < bv.size(); i++) {
865 res = res * 2 + (bv[i] ==
'0' ? 1 : 0);
872 std::string res =
"#b0";
874 if (bin.size() < n.
toULong()) {
875 res += std::string(n.
toULong() - bin.size(),
'0') + bin;
883 std::string res =
"#b1";
886 if (bin.size() < n.
toULong()) {
887 res += std::string(n.
toULong() - bin.size(),
'0') + bin;
900 "FloatingPointUtils::fpToUbv: invalid floating point");
901 std::string res =
"";
902 bool isNeg = fp[2] ==
'1';
904 res = fp.substr(3, fp.size() - 3);
907 res = fp.substr(3, fp.size() - 3);
909 if (res.size() < n.
toULong() - 1) {
910 res = std::string(n.
toULong() - res.size() - 1,
'0') + res;
926 "FloatingPointUtils::fpToSbv: invalid floating point");
927 std::string res =
"";
928 bool isNeg = fp[2] ==
'1';
930 res = fp.substr(3, fp.size() - 3);
933 res =
"b1" + fp.substr(3, fp.size() - 3);
935 if (res.size() < n.
toULong() - 1) {
936 res = std::string(n.
toULong() - res.size() - 1,
'0') + res;
952 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
953 ? s.substr(1, s.length() - 2)
961 if (start >= s_clean.length()) {
964 if (start + length > s_clean.length()) {
965 length = s_clean.length() - start;
968 std::string result = s_clean.substr(start, length);
969 return "\"" + result +
"\"";
972 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
973 ? s.substr(1, s.length() - 2)
975 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
976 ? t.substr(1, t.length() - 2)
980 if (s_clean.size() > t_clean.size())
982 return t_clean.substr(0, s_clean.size()) == s_clean;
985 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
986 ? s.substr(1, s.length() - 2)
988 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
989 ? t.substr(1, t.length() - 2)
993 if (s_clean.size() > t_clean.size())
995 return t_clean.substr(t_clean.size() - s_clean.size(), s_clean.size()) ==
999 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1000 ? s.substr(1, s.length() - 2)
1002 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
1003 ? t.substr(1, t.length() - 2)
1005 return s_clean.find(t_clean) != std::string::npos;
1009 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1010 ? s.substr(1, s.length() - 2)
1012 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
1013 ? t.substr(1, t.length() - 2)
1017 if (i.
toULong() > s_clean.length()) {
1021 size_t pos = s_clean.find(t_clean, i.
toULong());
1025 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1026 ? s.substr(1, s.length() - 2)
1028 return "\"" + s_clean.substr(i.
toULong(), 1) +
"\"";
1031 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1032 ? s.substr(1, s.length() - 2)
1034 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
1035 ? t.substr(1, t.length() - 2)
1037 return "\"" + s_clean.substr(0, i.
toULong()) + t_clean +
1038 s_clean.substr(i.
toULong() + t_clean.size(),
1039 s_clean.size() - i.
toULong() - t_clean.size()) +
1044 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1045 ? s.substr(1, s.length() - 2)
1047 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
1048 ? t.substr(1, t.length() - 2)
1050 std::string u_clean = (u[0] ==
'"' && u[u.length() - 1] ==
'"')
1051 ? u.substr(1, u.length() - 2)
1054 size_t pos = s_clean.find(t_clean);
1055 if (pos == std::string::npos)
1057 std::string result =
1058 s_clean.substr(0, pos) + u_clean + s_clean.substr(pos + t_clean.length());
1060 return "\"" + result +
"\"";
1063 const std::string &t,
1064 const std::string &u) {
1066 std::string s_clean = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1067 ? s.substr(1, s.length() - 2)
1069 std::string t_clean = (t[0] ==
'"' && t[t.length() - 1] ==
'"')
1070 ? t.substr(1, t.length() - 2)
1072 std::string u_clean = (u[0] ==
'"' && u[u.length() - 1] ==
'"')
1073 ? u.substr(1, u.length() - 2)
1076 std::string res = s_clean;
1077 size_t pos = res.find(t_clean);
1078 while (pos != std::string::npos) {
1079 res = res.substr(0, pos) + u_clean + res.substr(pos + t_clean.length());
1080 pos = res.find(t_clean, pos + u_clean.size());
1083 return "\"" + res +
"\"";
1086 std::string res = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1087 ? s.substr(1, s.length() - 2)
1089 for (
char &c : res) {
1092 return "\"" + res +
"\"";
1095 std::string res = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1096 ? s.substr(1, s.length() - 2)
1098 for (
char &c : res) {
1101 return "\"" + res +
"\"";
1104 std::string res = (s[0] ==
'"' && s[s.length() - 1] ==
'"')
1105 ? s.substr(1, s.length() - 2)
1107 return "\"" + std::string(res.rbegin(), res.rend()) +
"\"";
1114 return std::to_string(i);
1117 return std::to_string(d);
1120 return std::to_string(f);
1123 return std::to_string(l);
1126 return std::to_string(s);
1129 return std::string(1, c);
1132 return b ?
"true" :
"false";
1136 std::string result =
"";
1174 if (c < 32 || c > 126) {
1175 std::ostringstream oss;
1176 oss <<
"\\x" << std::hex << std::setfill(
'0') << std::setw(2)
1177 << (
unsigned char)c;
1178 result += oss.str();
1190 std::string result =
"";
1192 while (i < s.length()) {
1193 if (s[i] ==
'\\' && i + 1 < s.length()) {
1229 if (i + 3 < s.length()) {
1230 std::string hexStr = s.substr(i + 2, 2);
1232 unsigned char value =
1233 static_cast<unsigned char>(std::stoi(hexStr,
nullptr, 16));
#define condAssert(cond, msg)
static std::string bvNand(const std::string &bv1, const std::string &bv2)
static bool bvComp(const std::string &bv1, const std::string &bv2, const NODE_KIND &kind)
static std::string bvUdiv(const std::string &bv1, const std::string &bv2)
static std::string bvExtract(const std::string &bv, const Integer &i, const Integer &j)
static std::string bvSub(const std::string &bv1, const std::string &bv2)
static std::string bvUmod(const std::string &bv1, const std::string &bv2)
static std::string bvZeroExtend(const std::string &bv, const Integer &n)
static std::string bvSdiv(const std::string &bv1, const std::string &bv2)
static int bvCompareToUint(const std::string &bv, const uint64_t &u)
static std::string bvShl(const std::string &bv, const std::string &n)
static std::string bvLshr(const std::string &bv, const std::string &n)
static bool bvIsMaxUnsigned(const std::string &bv)
static std::string bvConcat(const std::string &bv1, const std::string &bv2)
static std::string bvXor(const std::string &bv1, const std::string &bv2)
static std::string bvRotateLeft(const std::string &bv, const Integer &n)
static std::string bvNot(const std::string &bv)
static bool bvIsMaxSigned(const std::string &bv)
static Integer bvToNat(const std::string &bv)
static std::string natToBv(const Integer &i, const Integer &n)
static std::string bvSignExtend(const std::string &bv, const Integer &n)
static std::string bvSrem(const std::string &bv1, const std::string &bv2)
static Integer bvToInt(const std::string &bv)
static std::string bvRotateRight(const std::string &bv, const Integer &n)
static bool bvIsNegOne(const std::string &bv)
static std::string bvXnor(const std::string &bv1, const std::string &bv2)
static std::string bvOr(const std::string &bv1, const std::string &bv2)
static std::string bvUrem(const std::string &bv1, const std::string &bv2)
static std::string mkOnes(const Integer &n)
static std::string bvNeg(const std::string &bv)
static std::string bvSmod(const std::string &bv1, const std::string &bv2)
static std::string bvAshr(const std::string &bv, const std::string &n)
static std::string bvNor(const std::string &bv1, const std::string &bv2)
static bool bvIsMinSigned(const std::string &bv)
static std::string bvAnd(const std::string &bv1, const std::string &bv2)
static std::string bvRepeat(const std::string &bv, const Integer &n)
static std::string intToBv(const Integer &i, const Integer &n)
static std::string bvAdd(const std::string &bv1, const std::string &bv2)
static std::string bvMul(const std::string &bv1, const std::string &bv2)
static std::string toString(const Integer &i)
static std::string parseScientificNotation(const std::string &str)
static std::string unescapeString(const std::string &s)
static std::string escapeString(const std::string &s)
static std::string fpToSbv(const std::string &fp, const Integer &n)
static std::string fpToUbv(const std::string &fp, const Integer &n)
unsigned long toULong() const
std::string toString(int base=10) const
std::string toString() const
HighPrecisionReal sqrt() const
HighPrecisionReal ceil() const
HighPrecisionReal floor() const
Integer toInteger() const
HighPrecisionReal pow(const HighPrecisionReal &exp) const
HighPrecisionReal round() const
static Real safeSqrt(const Integer &i)
static Real sqrt(const Integer &i)
static bool isEven(const Integer &n)
static Integer lcm(const Integer &a, const Integer &b)
static Integer pow(const Integer &base, const Integer &exp)
static Integer factorial(const Integer &n)
static Integer round(const Real &r)
static bool isPrime(const Integer &n)
static Integer gcd(const Integer &a, const Integer &b)
static bool isOdd(const Integer &n)
static Integer floor(const Real &r)
static Integer ceil(const Real &r)
static std::string strToUpper(const std::string &s)
static std::string strCharAt(const std::string &s, const Integer &i)
static bool strSuffixof(const std::string &s, const std::string &t)
static std::string strReplaceAll(const std::string &s, const std::string &t, const std::string &u)
static Integer strIndexof(const std::string &s, const std::string &t, const Integer &i)
static std::string strSubstr(const std::string &s, const Integer &i, const Integer &j)
static std::string strReplace(const std::string &s, const std::string &t, const std::string &u)
static bool strContains(const std::string &s, const std::string &t)
static std::string strToLower(const std::string &s)
static std::string strUpdate(const std::string &s, const Integer &i, const std::string &t)
static bool strPrefixof(const std::string &s, const std::string &t)
static std::string strRev(const std::string &s)
static bool isReal(const std::string &str)
static bool isScientificNotation(const std::string &str)
static bool isFP(const std::string &str)
static bool isString(const std::string &str)
static bool isInt(const std::string &str)
static bool isBV(const std::string &str)
static bool isNumber(const std::string &str)
BitVector & ibvsrem(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvsub(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvsmod(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvudiv(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvashr(const BitVector &bv, uint64_t shift)
std::string str(uint32_t base=2) const
BitVector & ibvadd(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvneg(const BitVector &bv)
BitVector & ibvsdiv(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvshr(const BitVector &bv, uint64_t shift)
BitVector & ibvurem(const BitVector &bv0, const BitVector &bv1)
BitVector & ibvshl(const BitVector &bv, uint64_t shift)
BitVector & ibvmul(const BitVector &bv0, const BitVector &bv1)
HighPrecisionInteger Integer
std::string decToBv(const std::string &dec)
std::string hexToBv(const std::string &hex)