46 std::stringstream
buf;
48 std::string tmp =
buf.str();
82 info(
"Invalid TermType was provided for STerm constructor. Expected: FFTerm, FFITerm, ITerm, BVTerm. Got: ",
94 strvalue = slv->
term_manager.mkFiniteFieldElem(t, slv->
ff_sort, base).getFiniteFieldValue();
99 strvalue = slv->
term_manager.mkFiniteFieldElem(t, slv->
ff_sort, base).getFiniteFieldValue();
104 strvalue = slv->
term_manager.mkFiniteFieldElem(t, slv->
ff_sort, base).getFiniteFieldValue();
108 info(
"Invalid TermType was provided for STerm constructor. Expected: FFTerm, FFITerm, ITerm, BVTerm. Got: ",
122 info(
"Taking a remainder is not compatible with ", this->
type);
143 return needs_normalization ? this->
mod() : *
this;
200 info(
"Division is not compatible with ", this->
type);
206 STerm res =
Var(
"df8b586e3fa7a1224ec95a886e17a7da_div_" +
static_cast<std::string
>(*
this) +
"_" +
207 static_cast<std::string
>(other),
220 info(
"Division is not compatible with ", this->
type);
226 STerm res =
Var(
"df8b586e3fa7a1224ec95a886e17a7da_div_" +
static_cast<std::string
>(*
this) +
"_" +
227 static_cast<std::string
>(other),
267 info(
"LT is not compatible with ", this->
type);
281 info(
"LE is not compatible with ", this->
type);
295 info(
"GT is not compatible with ", this->
type);
309 info(
"GE is not compatible with ", this->
type);
323 info(
"MOD is not compatible with ", this->
type);
333 info(
"XOR is not compatible with ", this->
type);
343 info(
"XOR is not compatible with ", this->
type);
352 info(
"AND is not compatible with ", this->
type);
362 info(
"AND is not compatible with ", this->
type);
371 info(
"OR is not compatible with ", this->
type);
381 info(
"OR is not compatible with ", this->
type);
390 info(
"NOT is not compatible with ", this->
type);
400 info(
"SHIFT LEFT is not compatible with ", this->
type);
411 info(
"SHIFT LEFT is not compatible with ", this->
type);
421 info(
"SHIFT RIGHT is not compatible with ", this->
type);
432 info(
"SHIFT RIGHT is not compatible with ", this->
type);
442 info(
"ROTR is not compatible with ", this->
type);
453 info(
"ROTL is not compatible with ", this->
type);
464 info(
"TRUNC is not compatible with ", this->
type);
471 { this->solver->bv_sort.getBitVectorSize() - temp.getSort().getBitVectorSize() });
479 info(
"EXTRACT is not compatible with ", this->
type);
486 { this->solver->bv_sort.getBitVectorSize() - temp.getSort().getBitVectorSize() });
void assertFormula(const cvc5::Term &term) const
cvc5::TermManager term_manager
Symbolic term element class.
void operator<(const STerm &other) const
void operator<<=(const uint32_t &n)
STerm operator*(const STerm &other) const
STerm rotl(const uint32_t &n) const
friend std::ostream & operator<<(std::ostream &out, const STerm &term)
STerm operator%(const STerm &other) const
void operator+=(const STerm &other)
void operator/=(const STerm &other)
void operator==(const STerm &other) const
STerm rotr(const uint32_t &n) const
void operator<=(const STerm &other) const
std::unordered_map< OpType, cvc5::Kind > operations
STerm operator/(const STerm &other) const
Division operation.
void operator>(const STerm &other) const
void operator^=(const STerm &other)
static STerm Var(const std::string &name, Solver *slv, TermType type=TermType::FFTerm)
STerm operator^(const STerm &other) const
void operator*=(const STerm &other)
STerm mod() const
Reduce the term modulo circuit prime.
STerm normalize() const
Reduce the integer symbolic term modulo circuit prime if needed.
void operator&=(const STerm &other)
void operator>>=(const uint32_t &n)
STerm operator&(const STerm &other) const
void operator!=(const STerm &other) const
STerm operator|(const STerm &other) const
void operator>=(const STerm &other) const
void operator|=(const STerm &other)
STerm operator>>(const uint32_t &n) const
static STerm Const(const std::string &val, Solver *slv, uint32_t base=16, TermType type=TermType::FFTerm)
void operator-=(const STerm &other)
STerm extract_bit(const uint32_t &bit_index)
Returns ith bit of variable.
STerm operator+(const STerm &other) const
STerm truncate(const uint32_t &to_size)
Returns last to_size bits of variable.
field< Bn254FrParams > fr
STerm IVar(const std::string &name, Solver *slv)
STerm operator+(const bb::fr &lhs, const STerm &rhs)
STerm FFVar(const std::string &name, Solver *slv)
STerm IConst(const std::string &val, Solver *slv, uint32_t base)
STerm BVVar(const std::string &name, Solver *slv)
STerm operator&(const bb::fr &lhs, const STerm &rhs)
STerm FFConst(const std::string &val, Solver *slv, uint32_t base)
const std::unordered_map< TermType, std::unordered_map< OpType, cvc5::Kind > > typed_operations
precomputed map that contains allowed operations for each of three symbolic types
STerm operator|(const bb::fr &lhs, const STerm &rhs)
void operator!=(const bb::fr &lhs, const STerm &rhs)
STerm operator*(const bb::fr &lhs, const STerm &rhs)
STerm FFIVar(const std::string &name, Solver *slv)
STerm operator^(const bb::fr &lhs, const STerm &rhs)
STerm BVConst(const std::string &val, Solver *slv, uint32_t base)
TermType
Allows to define three types of symbolic terms STerm - Symbolic Variables acting like a Finte Field e...
STerm operator/(const bb::fr &lhs, const STerm &rhs)
STerm operator-(const bb::fr &lhs, const STerm &rhs)
STerm FFIConst(const std::string &val, Solver *slv, uint32_t base)
std::ostream & operator<<(std::ostream &os, const TermType type)
void operator==(const bb::fr &lhs, const STerm &rhs)