46 objRoutes = std::make_unique<SparseObjGraph>(
70 dst.
store(addr, value->second);
78 const auto& graphEdges =
objRoutes->getInputs(node);
80 bool hasPrevious =
false;
83 if (edge->getSrcNode()->getICFGNode() == node &&
hasAbsState(node))
101 ? (hasPrevious ? &previous :
nullptr)
111 refined = *sourceState;
118 svfir->getBaseObject(sourceNode->
base)));
141 for (
const ValVar* v : valVars)
143 const ICFGNode* defSite = v->getICFGNode();
164 for (
const auto& [
id, val] :
next.getVarToVal())
183 for (
const auto& [
id, val] :
next.getVarToVal())
215 dst.
store(addr, val);
227 return svfir->getICFG()->getGlobalICFGNode();
AbstractState & getAbsState(const ICFGNode *node)
virtual bool narrowCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle)
virtual bool hasAbsValue(const ValVar *var, const ICFGNode *node) const
Side-effect-free existence check.
virtual AbstractState getFullCycleHeadState(const ICFGCycleWTO *cycle)
bool isBranchEdgeFeasible(const IntraCFGEdge *edge, AbstractState &as)
virtual bool widenCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle)
bool applyBranchRefinement(const IntraCFGEdge *edge, AbstractState &as)
virtual bool mergeStatesFromPredecessors(const ICFGNode *node)
SVFIR * svfir
Data and helpers reachable from SparseAbstractInterpretation.
virtual const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node)
bool hasAbsState(const ICFGNode *node)
Map< const ICFGNode *, AbstractState > abstractTrace
per-node trace; owned here
const AddrToAbsValMap & getLocToVal() const
get loc2val map
u32_t getIDFromAddr(u32_t addr) const
Return the internal index if addr is an address otherwise return the value of idx.
void store(u32_t addr, const AbstractValue &val)
const Set< NodeID > & getFreedAddrs() const
virtual AbstractValue & load(u32_t addr)
static u32_t getVirtualMemAddress(u32_t idx)
The physical address starts with 0x7f...... + idx.
void addToFreedAddrs(NodeID addr)
void join_with(const AbstractValue &other)
void joinStates(AbstractState &dst, const AbstractState &src, const NodeBS &objs)
std::unique_ptr< SparseObjGraph > objRoutes
bool mergeStatesFromPredecessors(const ICFGNode *node) override
std::unique_ptr< SVFGBuilder > svfgBuilder
~FullSparseAbstractInterpretation() override
void mergeFreedAddrs(AbstractState &dst, const AbstractState &src)
NodeID getId() const
Get ID.
bool narrowCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle) override
const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node) override
AbstractState getFullCycleHeadState(const ICFGCycleWTO *cycle) override
void joinStates(AbstractState &dst, const AbstractState &src) override
bool widenCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle) override
void updateAbsValue(const ValVar *var, const AbstractValue &val, const ICFGNode *node) override
bool hasAbsValue(const ValVar *var, const ICFGNode *node) const override
Side-effect-free existence check.
void updateAbsState(const ICFGNode *node, const AbstractState &state) override
const ICFGNode * getICFGNode(const ValVar *var) const
const IntraCFGEdge * branch
const ICFGNode * getICFGNode() const
const ICFGNode * getICFGNode() const
const WTONode< GraphT > * head() const
Return the head of the cycle.
const NodeT * getICFGNode() const
Return the graph node.
LLVM_NODISCARD bool isa(const Y &Val)
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
WTOCycle< ICFG > ICFGCycleWTO
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set