48 assert(
false &&
"No preAbsTrace for this node");
84 if (
as.getVarToVal().count(
id))
103 assert(
false &&
"Unknown SVFVar kind");
116 return it->second.getVarToVal().count(
var->getId()) != 0;
124 return it->second.getLocToVal().count(
var->getId()) != 0;
155 assert(
false &&
"Unknown SVFVar kind");
199 if (
gep->isConstantOffset())
203 for (
int i =
gep->getOffsetVarAndGepTypePairVec().size() - 1;
i >= 0;
i--)
205 const ValVar*
var =
gep->getOffsetVarAndGepTypePairVec()[
i].first;
223 if (SVFUtil::isa<SVFPointerType>(
type))
225 u32_t elemNum =
gep->getAccessPath().getElementNum(
gep->getAccessPath().gepSrcPointeeType());
256 if (
gep->isConstantOffset())
260 for (
int i =
gep->getOffsetVarAndGepTypePairVec().size() - 1;
i >= 0;
i--)
271 elemByteSize =
gep->getAccessPath().gepSrcPointeeType()->getByteSize();
273 assert(
false &&
"idxOperandType must be ArrType or PtrType");
307 assert(
false &&
"gep type pair only support arr/ptr/struct");
381 const std::vector<SVFVar*>&
sizes =
addr->getArrSize();
396 assert(
false &&
"Addr rhs value is not ObjVar");
431 if (!
var->getICFGNode())
436 else if (SVFUtil::isa<CallICFGNode>(
var->getICFGNode()) && SVFUtil::isa<RetValPN>(
var))
438 return SVFUtil::dyn_cast<CallICFGNode>(
var->getICFGNode())->getRetICFGNode();
443 return var->getICFGNode();
AbstractState & getAbsState(const ICFGNode *node)
u32_t getAllocaInstByteSize(const AddrStmt *addr)
virtual bool hasAbsValue(const ValVar *var, const ICFGNode *node) const
Side-effect-free existence check.
IntervalValue getGepByteOffset(const GepStmt *gep)
AbstractValue loadValue(const ValVar *pointer, const ICFGNode *node)
AddressValue getGepObjAddrs(const ValVar *pointer, IntervalValue offset)
IntervalValue getGepElementIndex(const GepStmt *gep)
virtual void joinStates(AbstractState &dst, const AbstractState &src)
SVFIR * svfir
Data and helpers reachable from SparseAbstractInterpretation.
virtual const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node)
bool hasAbsState(const ICFGNode *node)
const SVFType * getPointeeElement(const ObjVar *var, const ICFGNode *node)
Map< const ICFGNode *, AbstractState > abstractTrace
per-node trace; owned here
virtual void updateAbsValue(const ValVar *var, const AbstractValue &val, const ICFGNode *node)
void storeValue(const ValVar *pointer, const AbstractValue &val, const ICFGNode *node)
virtual void updateAbsState(const ICFGNode *node, const AbstractState &state)
const VarToAbsValMap & getVarToVal() const
get var2val map
u32_t getIDFromAddr(u32_t addr) const
Return the internal index if addr is an address otherwise return the value of idx.
void joinWith(const AbstractState &other)
domain join with other, important! other widen this.
static u32_t getVirtualMemAddress(u32_t idx)
The physical address starts with 0x7f...... + idx.
void join_with(const AbstractValue &other)
IntervalValue & getInterval()
AddressValue & getAddrs()
bool isConstantByteSize() const
Check if byte size is a const value.
u32_t getByteSizeOfObj() const
Get the byte size of this object.
const SVFType * getType() const
Get obj type.
s64_t getIntNumeral() const
GlobalICFGNode * getGlobalICFGNode() const
u32_t getFlattenedElemIdx(const SVFType *T, u32_t origId)
Flattened element idx of an array or struct by considering stride.
const StInfo * getTypeInfo(const SVFType *T) const
Get struct info.
void meet_with(const IntervalValue &other)
Return a intersected IntervalValue.
static IntervalValue top()
Create the IntervalValue [-inf, +inf].
const BoundedInt & lb() const
Return the lower bound.
static Option< bool > ModelArrays
static const Option< u32_t > MaxFieldLimit
Maximum number of field derivations for an object.
const BaseObjVar * getBaseObject(NodeID id) const
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
const GepObjVar * getGepObjVar(NodeID id) const
u32_t getByteSize() const
const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node) override
void joinStates(AbstractState &dst, const AbstractState &src) 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
std::vector< u32_t > & getFlattenedElemIdxVec()
const ICFGNode * getICFGNode() const
llvm::IRBuilder IRBuilder