42using namespace SVFUtil;
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();
206 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
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();
231 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
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();
261 if(
edge->isCallVFGEdge() ||
edge->isRetVFGEdge())
271 insensitveEdges.insert(
edge);
273 insensitveEdges.insert(
edge);
300 for (OrderedNodeSet::const_iterator
it = candidates.begin(),
eit = candidates.end();
it !=
eit; ++
it)
const ICFGNode * getICFGNode() const
Get the ICFGNode related to the creation of this object.
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
virtual void answerQueries(PointerAnalysis *pta)
void setQuery(NodeID ptr)
Set pointer to be queried by DDA analysis.
const OrderedNodeSet & getCandidateQueries() const
Get candidate queries.
virtual void collectWPANum()
virtual void performStat(PointerAnalysis *)
virtual void initialise()
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...
virtual void selectClient()
Select a client.
std::unique_ptr< PointerAnalysis > _pta
pointer analysis to be executed.
DDAClient * _client
DDA client used.
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
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 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.
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 > MaxContextLen
static const Option< u32_t > MaxPathLen
static const Option< bool > WPANum
static const Option< bool > PrintCPts
static OptionMultiple< PTATY > DDASelected
register this into alias analysis group
static const Option< bool > PrintQueryPts
static const Option< bool > InsenRecur
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...
bool isValidTopLevelPtr(const SVFVar *node)
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.
NodeID getId() const
Get ID.
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
llvm::IRBuilder IRBuilder