100 assert(
false &&
"Please specify query options!");
127 outs() <<
"This pointer analysis has not been implemented yet.\n";
146 if (
_pta->printStat())
187 assert(edge->
isRetVFGEdge() ==
false &&
"should not be an inter-procedural return edge" );
198 for (SVFG::SVFGNodeIDToNodeMapTy::const_iterator it = svfg->
begin(),eit = svfg->
end(); it != eit; ++it)
201 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeIt = it->second->InEdgeBegin();
202 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeEit = it->second->InEdgeEnd();
203 for (; edgeIt != edgeEit; ++edgeIt)
209 insensitveEdges.insert(edge);
223 for (SVFG::SVFGNodeIDToNodeMapTy::const_iterator it = svfg->
begin(),eit = svfg->
end(); it != eit; ++it)
226 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeIt = it->second->InEdgeBegin();
227 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeEit = it->second->InEdgeEnd();
228 for (; edgeIt != edgeEit; ++edgeIt)
243 insensitvefunPairs.insert(std::make_pair(src,dst));
244 insensitvefunPairs.insert(std::make_pair(dst,src));
247 assert(edge->
isRetVFGEdge() ==
false &&
"should not be an inter-procedural return edge" );
253 for(SVFG::SVFGNodeIDToNodeMapTy::const_iterator it = svfg->
begin(),eit = svfg->
end(); it != eit; ++it)
255 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeIt = it->second->InEdgeBegin();
256 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeEit = it->second->InEdgeEnd();
257 for (; edgeIt != edgeEit; ++edgeIt)
270 if(insensitvefunPairs.find(std::make_pair(src,dst))!=insensitvefunPairs.end())
271 insensitveEdges.insert(edge);
272 else if(insensitvefunPairs.find(std::make_pair(dst,src))!=insensitvefunPairs.end())
273 insensitveEdges.insert(edge);
285 _pta->computeDDAPts(node1);
288 _pta->computeDDAPts(node2);
290 return _pta->alias(node1,node2);
300 for (OrderedNodeSet::const_iterator it = candidates.begin(), eit = candidates.end(); it != eit; ++it)
303 _pta->dumpPts(*it,pts);
const CallGraphNode * getCallGraphNode(const std::string &name) const
Get call graph node.
static void setMaxPathLen(u32_t max)
set max path limit
static void setMaxCxtLen(u32_t max)
set max context limit
bool edgeInSVFGSCC(const SVFGSCC *svfgSCC, 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...
SCCDetection< SVFG * > SVFGSCC
virtual void selectClient()
Select a client.
std::unique_ptr< PointerAnalysis > _pta
pointer analysis to be executed.
DDAClient * _client
DDA client used.
virtual void runOnModule(PAG *module)
We start from here.
bool edgeInCallGraphSCC(PointerAnalysis *pta, 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...
OrderedSet< const SVFGEdge * > SVFGEdgeSet
virtual AliasResult alias(const SVFVar *V1, const SVFVar *V2)
Interface expose to users of our pointer analysis, given Value infos.
void initCxtInsensitiveEdges(PointerAnalysis *pta, const SVFG *svfg, const SVFGSCC *svfgSCC, SVFGEdgeSet &insensitveEdges)
Context insensitive Edge for DDA.
void runPointerAnalysis(PAG *module, u32_t kind)
Create pointer analysis according to specified kind and analyze the module.
void collectCxtInsenEdgeForVFCycle(PointerAnalysis *pta, const SVFG *svfg, const SVFGSCC *svfgSCC, SVFGEdgeSet &insensitveEdges)
void collectCxtInsenEdgeForRecur(PointerAnalysis *pta, const SVFG *svfg, SVFGEdgeSet &insensitveEdges)
void printQueryPTS()
Print queries' pts.
NodeType * getSrcNode() const
NodeType * getDstNode() const
NodeID getSrcID() const
get methods of the components
iterator begin()
Iterators.
virtual const FunObjVar * getFun() const
Return the function of this ICFGNode.
static const Option< bool > InsenCycle
static const Option< std::string > UserInputQuery
static const Option< u32_t > MaxPathLen
static const Option< bool > WPANum
static const Option< bool > PrintCPts
static Option< u32_t > MaxContextLen
static OptionMultiple< PTATY > DDASelected
register this into alias analysis group
static const Option< bool > PrintQueryPts
static const Option< bool > InsenRecur
bool isValidTopLevelPtr(const SVFVar *node)
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
CallGraph * getCallGraph() const
Return call graph.
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...
NodeID repNode(NodeID n) const
get the rep node if not found return itself
NodeID getId() const
Get ID.
bool isRetVFGEdge() const
bool isCallVFGEdge() const
virtual const ICFGNode * getICFGNode() const
Return corresponding ICFG node.
std::ostream & outs()
Overwrite llvm::outs().
PTATY
Pointer analysis type list.
@ Cxt_DDA
context sensitive DDA
@ Default_PTA
default pta without any analysis
@ FlowS_DDA
Flow sensitive DDA.
OrderedSet< NodeID > OrderedNodeSet
std::set< Key, Compare, Allocator > OrderedSet