30#ifndef Z3_EXAMPLE_RELEXESTATE_H
31#define Z3_EXAMPLE_RELEXESTATE_H
87 return !(*
this ==
rhs);
120 h ^=
hf(t.first) + 0x9e3779b9 + (
h << 6) + (
h >> 2);
121 h ^=
hf(t.second.id()) + 0x9e3779b9 + (
h << 6) + (
h >> 2);
128 h2 ^=
hf(t.first) + 0x9e3779b9 + (
h2 << 6) + (
h2 >> 2);
129 h2 ^=
hf(t.second.id()) + 0x9e3779b9 + (
h2 << 6) + (
h2 >> 2);
133 return pairH(std::make_pair(
h,
h2));
179 assert(
false &&
"val cannot be 0");
218struct std::hash<
SVF::RelExeState>
222 return exeState.
hash();
static u32_t getInternalID(u32_t idx)
Return the internal index if idx is an address otherwise return the value of idx.
static u32_t getVirtualMemAddress(u32_t idx)
The physical address starts with 0x7f...... + idx.
static bool isVirtualMemAddress(u32_t val)
Check bit value of val start with 0x7F000000, filter by 0xFF000000.
RelExeState(RelExeState &&rhs) noexcept
bool lessThanVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs) const
static u32_t getVirtualMemAddress(u32_t idx)
The physical address starts with 0x7f...... + idx.
friend class SVFIR2AbsState
Z3Expr & load(u32_t objId)
void store(u32_t objId, const Z3Expr &z3Expr)
void extractSubVars(const Z3Expr &expr, Set< u32_t > &res)
Extract sub SVFVar IDs of a Z3Expr.
void printExprValues()
Print values of all expressions.
void store(const Z3Expr &loc, const Z3Expr &value)
Store value to location.
RelExeState(const RelExeState &rhs)
Z3Expr & operator[](u32_t varId)
RelExeState & operator=(const RelExeState &rhs)
RelExeState & operator=(RelExeState &&rhs) noexcept
const AddrToValMap & getLocToVal() const
virtual Z3Expr toZ3Expr(u32_t varId) const
Return Z3 expression lazily based on SVFVar ID.
bool existsVar(u32_t varId) const
Return true if map has varId.
virtual ~RelExeState()=default
RelExeState(VarToValMap &varToVal, AddrToValMap &locToVal)
Z3Expr & load(const Z3Expr &loc)
Load value at location.
bool eqVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs) const
const VarToValMap & getVarToVal() const
static u32_t getInternalID(u32_t idx)
Return the internal index if idx is an address otherwise return the value of idx.
Z3Expr buildRelZ3Expr(u32_t cmp, s32_t succ, Set< u32_t > &vars, Set< u32_t > &initVars)
Build relational Z3Expr.
bool operator==(const RelExeState &rhs) const
Overloading Operator==.
bool operator<(const RelExeState &rhs) const
Overloading Operator==.
static s32_t z3Expr2NumValue(const Z3Expr &e)
Return int value from an expression if it is a numeral, otherwise return an approximate value.
static bool isVirtualMemAddress(u32_t val)
Check bit value of val start with 0x7F000000, filter by 0xFF000000.
virtual Z3Expr & getZ3Expr(u32_t varId)
Return Z3 expression eagerly based on SVFVar ID.
bool operator!=(const RelExeState &rhs) const
Overloading Operator!=.
static z3::context & getContext()
void extractCmpVars(const Z3Expr &expr, Set< u32_t > &res)
Extract all related SVFVar IDs based on compare expr.
Map< u32_t, Z3Expr > VarToValMap
static z3::context & getContext()
Get z3 context, singleton design here to make sure we only have one context.
int64_t get_numeral_int64() const
llvm::IRBuilder IRBuilder
size_t operator()(const SVF::RelExeState &exeState) const