147 for (CallEdgeMap::const_iterator iter = newEdges.begin(),eiter = newEdges.end(); iter != eiter; iter++)
151 for (FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
169 assert(edge->
isRetVFGEdge() ==
false &&
"should not be an inter-procedural return edge" );
218 virtual const std::string
PTAName()
const override
220 return "Context Sensitive DDA";
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
virtual const PointsTo & getPts(NodeID id)
Operation of points-to set.
const FunObjVar * getCallerOfCallSite(CallSiteID id) const
const FunObjVar * getCalleeOfCallSite(CallSiteID id) const
CondPTAImpl(SVFIR *pag, PTATY type)
bool isSameVar(const CVar &var1, const CVar &var2) const
virtual PointsTo getBVPointsTo(const CPtSet &cpts) const
virtual void finalize()
Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.
void set(const Element &var)
Add the element into set.
const CallStrCxt & getContexts() const
Get context.
std::string toString() const
Dump context condition.
void setNonConcreteCxt()
Whether it is an concrete context.
virtual bool isHeapCondMemObj(const CxtVar &var, const StoreSVFGNode *store) override
void handleOutOfBudgetDpm(const CxtLocDPItem &dpm)
Handle out-of-budget dpm.
virtual void handleAddr(CxtPtSet &pts, const CxtLocDPItem &dpm, const AddrSVFGNode *addr) override
Handle Address SVFGNode to add proper conditional points-to.
virtual void popRecursiveCallSites(CxtLocDPItem &dpm)
Pop recursive callsites.
FlowDDA * flowDDA
downgrade to flowDDA if out-of-budget
CallSiteID getCSIDAtCall(CxtLocDPItem &dpm, const SVFGEdge *edge)
get callsite id from call, return 0 if it is a spurious call edge
virtual CxtPtSet getConservativeCPts(const CxtLocDPItem &dpm) override
Override parent method.
virtual void computeDDAPts(NodeID id) override
Compute points-to set for an unconditional pointer.
virtual bool propagateViaObj(const CxtVar &storeObj, const CxtVar &loadObj) override
Propagate along indirect value-flow if two objects of load and store are same.
virtual bool isEdgeInRecursion(CallSiteID csId)
Whether call/return inside recursion.
virtual bool isCondCompatible(const ContextCond &cxt1, const ContextCond &cxt2, bool singleton) const override
ConstSVFGEdgeSet & getInsensitiveEdgeSet()
Return insensitive edge set.
virtual ~ContextDDA()
Destructor.
virtual NodeID getPtrNodeID(const CxtVar &var) const override
Override parent method.
virtual void updateCallGraphAndSVFG(const CxtLocDPItem &dpm, const CallICFGNode *cs, SVFGEdgeSet &svfgEdges) override
Update call graph.
bool isInsensitiveCallRet(const SVFGEdge *edge)
Whether this edge is treated context-insensitively.
CallSiteID getCSIDAtRet(CxtLocDPItem &dpm, const SVFGEdge *edge)
get callsite id from return, return 0 if it is a spurious return edge
bool testIndCallReachability(CxtLocDPItem &dpm, const FunObjVar *callee, const CallICFGNode *cs)
refine indirect call edge
ConstSVFGEdgeSet insensitveEdges
insensitive call-return edges
virtual bool handleBKCondition(CxtLocDPItem &dpm, const SVFGEdge *edge) override
Handle condition for context or path analysis (backward analysis).
virtual void dumpContexts(const ContextCond &cxts)
dump context call strings
ContextDDA(SVFIR *_pag, DDAClient *client)
Constructor.
virtual void analyze() override
dummy analyze method
bool edgeInCallGraphSCC(const SVFGEdge *edge)
Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the...
virtual void initialize() override
Initialization of the analysis.
virtual void finalize() override
Finalize analysis.
DDAClient * _client
DDA client.
virtual CxtPtSet processGepPts(const GepSVFGNode *gep, const CxtPtSet &srcPts) override
processGep node
virtual const std::string PTAName() const override
Return PTA name.
const ContextCond & getCond() const
Get context.
AndersenWaveDiff * getAndersenAnalysis() const
virtual void addDDAPts(CxtPtSet &pts, const CxtVar &var)
SVFGEdge::SVFGEdgeSetTy SVFGEdgeSet
virtual const CxtPtSet & getCachedPointsTo(const CxtLocDPItem &dpm)
OrderedSet< const SVFGEdge * > ConstSVFGEdgeSet
NodeID getCurNodeID() const
NodeType * getSrcNode() const
NodeType * getDstNode() const
bool isFieldInsensitive(NodeID id) const
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
NodeID getFIObjVar(NodeID id)
CallGraph * getCallGraph() const
Return call graph.
Set< const FunObjVar * > FunctionSet
virtual void resolveIndCalls(const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
Resolve indirect call edges.
bool inSameCallGraphSCC(const FunObjVar *fun1, const FunObjVar *fun2)
Return TRUE if this edge is inside a PTACallGraph SCC, i.e., src node and dst node are in the same SC...
const_iterator end() const
const_iterator begin() const
virtual void connectCallerAndCallee(const CallICFGNode *cs, const FunObjVar *callee, SVFGEdgeSetTy &edges)
Connect SVFG nodes between caller and callee for indirect call site.
NodeID getSrcNodeID() const
bool isRetVFGEdge() const
virtual const FunObjVar * getFun() const
Get the function of this SVFGNode.
std::ostream & outs()
Overwrite llvm::outs().
StoreVFGNode StoreSVFGNode
CxtStmtDPItem< SVFGNode > CxtLocDPItem
CondVar< ContextCond > CxtVar
std::vector< u32_t > CallStrCxt
CondStdSet< CxtVar > CxtPtSet