50 static bool isInt(
const std::string &str);
51 static bool isReal(
const std::string &str);
52 static bool isBV(
const std::string &str);
53 static bool isFP(
const std::string &str);
54 static bool isString(
const std::string &str);
56 static bool isNumber(
const std::string &str);
90 static std::string
natToBv(
const std::string &i,
const Integer &n);
94 static std::string
bvNot(
const std::string &bv);
95 static std::string
bvAnd(
const std::string &bv1,
const std::string &bv2);
96 static std::string
bvOr(
const std::string &bv1,
const std::string &bv2);
97 static std::string
bvXor(
const std::string &bv1,
const std::string &bv2);
98 static std::string
bvNand(
const std::string &bv1,
const std::string &bv2);
99 static std::string
bvNor(
const std::string &bv1,
const std::string &bv2);
100 static std::string
bvXnor(
const std::string &bv1,
const std::string &bv2);
102 static std::string
bvNeg(
const std::string &bv);
103 static std::string
bvAdd(
const std::string &bv1,
const std::string &bv2);
104 static std::string
bvSub(
const std::string &bv1,
const std::string &bv2);
105 static std::string
bvMul(
const std::string &bv1,
const std::string &bv2);
107 static std::string
bvUdiv(
const std::string &bv1,
const std::string &bv2);
108 static std::string
bvUrem(
const std::string &bv1,
const std::string &bv2);
109 static std::string
bvUmod(
const std::string &bv1,
const std::string &bv2);
110 static std::string
bvSdiv(
const std::string &bv1,
const std::string &bv2);
111 static std::string
bvSrem(
const std::string &bv1,
const std::string &bv2);
112 static std::string
bvSmod(
const std::string &bv1,
const std::string &bv2);
114 static std::string
bvShl(
const std::string &bv,
const std::string &n);
115 static std::string
bvLshr(
const std::string &bv,
const std::string &n);
116 static std::string
bvAshr(
const std::string &bv,
const std::string &n);
118 static std::string
bvConcat(
const std::string &bv1,
const std::string &bv2);
127 static bool bvComp(
const std::string &bv1,
const std::string &bv2,
const NODE_KIND &kind);
131 static bool bvIsNegOne(
const std::string &bv);
142 static std::string
fpToUbv(
const std::string &fp,
const Integer &n);
143 static std::string
fpToSbv(
const std::string &fp,
const Integer &n);
153 static bool strPrefixof(
const std::string &s,
const std::string &t);
154 static bool strSuffixof(
const std::string &s,
const std::string &t);
155 static bool strContains(
const std::string &s,
const std::string &t);
158 static std::string
strUpdate(
const std::string &s,
const Integer &i,
const std::string &t);
159 static std::string
strReplace(
const std::string &s,
const std::string &t,
const std::string &u);
160 static std::string
strReplaceAll(
const std::string &s,
const std::string &t,
const std::string &u);
161 static std::string
strToLower(
const std::string &s);
162 static std::string
strToUpper(
const std::string &s);
163 static std::string
strRev(
const std::string &s);
165 if (s.size() >= 2 && s[0] ==
'"' && s[s.size() - 1] ==
'"')
166 return s.substr(1, s.size() - 2);
180 static std::string
toString(
const int &i);
181 static std::string
toString(
const double &d);
182 static std::string
toString(
const float &f);
183 static std::string
toString(
const long &l);
184 static std::string
toString(
const short &s);
185 static std::string
toString(
const char &c);
186 static std::string
toString(
const bool &b);
Bitvector conversion and arithmetic helpers on SMT bitstring forms.
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)
Conversion and escaping helpers for parser I/O and literals.
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)
Floating-point conversion helpers used by parser evaluation paths.
static std::string fpToSbv(const std::string &fp, const Integer &n)
static std::string fpToUbv(const std::string &fp, const Integer &n)
Numeric helper wrappers shared by parser-side evaluation and rewrite.
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)
String theory helper functions for SMT string operators.
static std::string strToUpper(const std::string &s)
static std::string strUnquate(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)
Lexical classifiers for SMT-LIB literals and token shapes.
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)