42using namespace SVFUtil;
101 assert(
false &&
"Please specify query options!");
128 outs() <<
"This pointer analysis has not been implemented yet.\n";
147 if (
_pta->printStat())
188 assert(
edge->isRetVFGEdge() ==
false &&
"should not be an inter-procedural return edge" );
199 for (SVFG::SVFGNodeIDToNodeMapTy::const_iterator
it = svfg->
begin(),
eit = svfg->
end();
it !=
eit; ++
it)
202 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeIt =
it->second->InEdgeBegin();
203 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeEit =
it->second->InEdgeEnd();
207 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
210 insensitveEdges.insert(
edge);
224 for (SVFG::SVFGNodeIDToNodeMapTy::const_iterator
it = svfg->
begin(),
eit = svfg->
end();
it !=
eit; ++
it)
227 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeIt =
it->second->InEdgeBegin();
228 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeEit =
it->second->InEdgeEnd();
232 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
248 assert(
edge->isRetVFGEdge() ==
false &&
"should not be an inter-procedural return edge" );
254 for(SVFG::SVFGNodeIDToNodeMapTy::const_iterator
it = svfg->
begin(),
eit = svfg->
end();
it !=
eit; ++
it)
256 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeIt =
it->second->InEdgeBegin();
257 SVFGEdge::SVFGEdgeSetTy::const_iterator
edgeEit =
it->second->InEdgeEnd();
262 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
272 insensitveEdges.insert(
edge);
274 insensitveEdges.insert(
edge);
328 for (OrderedNodeSet::const_iterator
it = candidates.begin(),
eit = candidates.end();
it !=
eit; ++
it)
static void setMaxPathLen(u32_t max)
set max path limit
static void setMaxCxtLen(u32_t max)
set max context limit
virtual void answerQueries(PointerAnalysis *pta)
void setQuery(NodeID ptr)
Set pointer to be queried by DDA analysis.
virtual void initialise(SVFModule *)
const OrderedNodeSet & getCandidateQueries() const
Get candidate queries.
virtual void collectWPANum(SVFModule *)
virtual void performStat(PointerAnalysis *)
virtual AliasResult alias(const SVFValue *V1, const SVFValue *V2)
Interface expose to users of our pointer analysis, given Value infos.
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...
std::unique_ptr< PointerAnalysis > _pta
pointer analysis to be executed.
DDAClient * _client
DDA client used.
virtual void selectClient(SVFModule *module)
Select a client.
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...
void runPointerAnalysis(SVFIR *module, u32_t kind)
Create pointer analysis according to specified kind and analyze the module.
virtual void runOnModule(SVFIR *module)
We start from here.
OrderedSet< const SVFGEdge * > SVFGEdgeSet
void initCxtInsensitiveEdges(PointerAnalysis *pta, const SVFG *svfg, const SVFGSCC *svfgSCC, SVFGEdgeSet &insensitveEdges)
Context insensitive Edge for DDA.
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.
iterator begin()
Iterators.
NodeType * getGNode(NodeID id) const
Get a node.
bool hasValueNode(const SVFValue *V)
NodeID getValueNode(const SVFValue *V)
static const Option< bool > InsenCycle
static const Option< std::string > UserInputQuery
static const Option< u32_t > MaxContextLen
static const Option< u32_t > MaxPathLen
static const Option< bool > WPANum
static const Option< bool > PrintCPts
static const Option< bool > PrintQueryPts
static const Option< bool > InsenRecur
static OptionMultiple< PointerAnalysis::PTATY > DDASelected
register this into alias analysis group
PTACallGraphNode * getCallGraphNode(NodeID id) const
Get call graph node.
PTATY
Pointer analysis type list.
@ Cxt_DDA
context sensitive DDA
@ FlowS_DDA
Flow sensitive DDA.
@ Default_PTA
default pta without any analysis
PTACallGraph * getCallGraph() const
Return call graph.
bool inSameCallGraphSCC(const SVFFunction *fun1, const SVFFunction *fun2)
Return TRUE if this edge is inside a PTACallGraph SCC, i.e., src node and dst node are in the same SC...
NodeID getId() const
Get ID.
bool isValidTopLevelPtr(const SVFVar *node)
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
std::ostream & outs()
Overwrite llvm::outs()
OrderedSet< NodeID > OrderedNodeSet
llvm::IRBuilder IRBuilder