40using namespace SVFUtil;
52 p.set(
":timeout",
static_cast<unsigned>(600));
70 solver.add(
phi.getExpr() &&
rhs.getExpr());
72 z3::check_result
checkRes = solver.check();
76 z3::model
m = solver.get_model();
79 z3::func_decl
v =
m[
i];
83 solution.emplace(std::stoi(
v.name().str()),
84 m.get_const_interp(
v).get_numeral_int());
107 if (solver.reason_unknown() ==
"timeout")
126 p.set(
":timeout",
static_cast<unsigned>(600));
132 solver.add(
phi.getExpr() &&
rhs.getExpr());
134 z3::check_result
checkRes = solver.check();
138 z3::model
m = solver.get_model();
141 z3::func_decl
v =
m[
i];
145 solution.emplace(std::stoi(
v.name().str()),
146 m.get_const_interp(
v).get_numeral_int());
167 if (solver.reason_unknown() ==
"timeout")
189 for (
auto it =
domain.getVarToVal().begin();
213 if (interval.
isTop())
231 if (interval.
isTop())
246 Z3Expr res = (
v >= (
int)
it->second.getInterval().lb().getNumeral() &&
247 v <= (
int)
it->second.getInterval().ub().getNumeral());
325 for (
const auto&
item: ret)
359 for (
const auto&
item : ret)
396 z3::check_result
checkRes = solver.check();
400 z3::model
m = solver.get_model();
411 solver.add(
expr.getExpr());
413 if (solver.check() == z3::sat)
AbstractState bottom() const
Set all value bottom.
void joinWith(const AbstractState &other)
domain join with other, important! other widen this.
AbstractState top() const
Set all value top.
void meetWith(const AbstractState &other)
domain meet with other, important! other widen this.
static BoundedInt plus_infinity()
bool is_minus_infinity() const
s64_t getNumeral() const
Retrieves the numeral value of the BoundedInt object.
bool is_plus_infinity() const
s64_t getIntNumeral() const
static BoundedInt minus_infinity()
const BoundedInt & ub() const
Return the upper bound.
static IntervalValue top()
Create the IntervalValue [-inf, +inf].
const BoundedInt & lb() const
Return the lower bound.
Z3Expr gamma_hat(const AbstractState &exeState) const
Return Z3Expr according to valToValMap.
AbstractState RSY(const AbstractState &domain, const Z3Expr &phi)
AbstractState bilateral(const AbstractState &domain, const Z3Expr &phi, u32_t descend_check=0)
Map< u32_t, s32_t > BoxedOptSolver(const Z3Expr &phi, Map< u32_t, s32_t > &ret, Map< u32_t, s32_t > &low_values, Map< u32_t, s32_t > &high_values)
AbstractState beta(const Map< u32_t, s32_t > &sigma, const AbstractState &exeState) const
virtual Z3Expr toIntZ3Expr(u32_t varId) const
Return Z3 expression lazily based on SVFVar ID.
void updateMap(Map< u32_t, s32_t > &map, u32_t key, const s32_t &value)
AbstractState abstract_consequence(const AbstractState &lower, const AbstractState &upper, const AbstractState &domain) const
void decide_cpa_ext(const Z3Expr &phi, Map< u32_t, Z3Expr > &, Map< u32_t, s32_t > &, Map< u32_t, s32_t > &, Map< u32_t, s32_t > &, Map< u32_t, s32_t > &)
AbstractState BS(const AbstractState &domain, const Z3Expr &phi)
Z3Expr toIntVal(s32_t f) const
const z3::expr & getExpr() const
static z3::solver & getSolver()
Get z3 solver, singleton design here to make sure we only have one context.
static z3::context & getContext()
Get z3 context, singleton design here to make sure we only have one context.
llvm::IRBuilder IRBuilder