30 #ifndef FLOWSENSITIVEANALYSIS_H_
31 #define FLOWSENSITIVEANALYSIS_H_
42 class AndersenWaveDiff;
119 return "FlowSensitive";
243 virtual void countAliases(
Set<std::pair<NodeID, NodeID>> cmp,
unsigned *mayAliases,
unsigned *noAliases);
277 static std::unique_ptr<FlowSensitive>
fspta;
DFPTDataTy * getDFPTDataTy() const
MutDFPTDataTy * getMutDFPTDataTy() const
virtual bool updateATVPts(const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.
virtual const DataSet & getDFInPtsSet(LocID loc, const Key &var)=0
virtual bool updateDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
virtual bool updateAllDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.
virtual bool updateAllDFOutFromIn(LocID loc, const Key &singleton, bool strongUpdates)=0
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).
virtual bool updateDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
virtual bool updateAllDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.
virtual bool updateTLVPts(LocID srcLoc, const Key &srcVar, const Key &dstVar)=0
Update points-to set of top-level pointers with IN[srcLoc:srcVar].
virtual void clearAllDFOutUpdatedVar(LocID)=0
virtual bool updateDFOutFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
virtual const DataSet & getDFOutPtsSet(LocID loc, const Key &var)=0
BVDataPTAImpl::MutDFPTDataTy MutDFPTDataTy
bool updateOutFromIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
Update data-flow points-to data.
~FlowSensitive() override=default
Destructor.
void processNode(NodeID nodeId) override
Handle various constraints.
u32_t numOfProcessedLoad
Number of processed Phi node.
static bool classof(const PointerAnalysis *pta)
virtual void solveConstraints()
virtual bool unionPtsFromIn(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar)
virtual void updateConnectedNodes(const SVFGEdgeSetTy &edges)
Update nodes connected during updating call graph.
u32_t numOfProcessedCopy
Number of processed Addr node.
double gepTime
time of handling gep edges
static std::unique_ptr< FlowSensitive > fspta
double indirectPropaTime
time of points-to propagation of top-level pointers
virtual bool propagateFromAPToFP(const ActualParmSVFGNode *ap, const SVFGNode *dst)
double addrTime
time of handling address edges
virtual bool propagateFromFRToAR(const FormalRetSVFGNode *fr, const SVFGNode *dst)
virtual bool propDFInToIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
NodeStack & SCCDetect() override
SCC detection.
double solveTime
time of solve.
bool isStrongUpdate(const SVFGNode *node, NodeID &singleton)
Return TRUE if this is a strong update STORE statement.
virtual void readPtsFromFile(const std::string &filename)
virtual bool unionPtsFromTop(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar)
virtual void plainMap(void) const
Sets the global best mapping as a plain mapping, i.e. n -> n.
virtual bool propDFOutToIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
virtual bool runOnModule(SVFModule *)
We start from here.
const DFInOutMap & getDFOutputMap() const
u32_t numOfProcessedStore
Number of processed Load node.
SVFG::SVFGEdgeSetTy SVFGEdgeSetTy
SVFG * getSVFG() const
Return SVFG.
void analyze() override
Flow sensitive analysis.
BVDataPTAImpl::MutDFPTDataTy::PtsMap PtsMap
const PointsTo & getDFOutPtsSet(const SVFGNode *stmt, const NodeID node)
double storeTime
time of store edges
virtual bool updateInFromIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
double copyTime
time of handling copy edges
bool propFromSrcToDst(SVFGEdge *edge) override
Propagation.
u32_t numOfProcessedGep
Number of processed Copy node.
virtual void cluster(void)
virtual bool strongUpdateOutFromIn(const SVFGNode *node, NodeID singleton)
Handle strong updates.
void finalize() override
Finalize analysis.
const PointsTo & getDFInPtsSet(const SVFGNode *stmt, const NodeID node)
Get points-to set for a node from data flow IN/OUT set at a statement.
virtual void countAliases(Set< std::pair< NodeID, NodeID >> cmp, unsigned *mayAliases, unsigned *noAliases)
Fills may/noAliases for the location/pointer pairs in cmp.
void clearAllDFOutVarFlag(const SVFGNode *stmt)
const DFInOutMap & getDFInputMap() const
bool processSVFGNode(SVFGNode *node)
virtual bool processLoad(const LoadSVFGNode *load)
bool propVarPtsAfterCGUpdated(NodeID var, const SVFGNode *src, const SVFGNode *dst)
virtual bool processPhi(const PHISVFGNode *phi)
virtual bool processStore(const StoreSVFGNode *store)
u32_t maxSCCSize
Number of processed mssa node.
virtual bool processCopy(const CopySVFGNode *copy)
double loadTime
time of load edges
FlowSensitive(SVFIR *_pag, PTATY type=FSSPARSE_WPA)
Constructor.
bool updateCallGraph(const CallSiteToFunPtrMap &callsites) override
Update call graph.
virtual bool weakUpdateOutFromIn(const SVFGNode *node)
Handle weak updates.
virtual bool processAddr(const AddrSVFGNode *addr)
u32_t numOfProcessedActualParam
Number of processed Store node.
u32_t numOfProcessedPhi
Number of processed Gep node.
double propagationTime
time of points-to propagation.
const std::string PTAName() const override
Get PTA name.
static bool classof(const FlowSensitive *)
Methods for support type inquiry through isa, cast, and dyn_cast.
virtual bool propAlongDirectEdge(const DirectSVFGEdge *edge)
Propagate points-to information along a DIRECT SVFG edge.
void initialize() override
Initialize analysis.
void connectCallerAndCallee(const CallEdgeMap &newEdges, SVFGEdgeSetTy &edges)
Connect nodes in SVFG.
std::vector< std::pair< hclust_fast_methods, std::vector< NodeID > > > candidateMappings
Save candidate mappings for evaluation's sake.
virtual bool processGep(const GepSVFGNode *edge)
u32_t numOfProcessedFormalRet
Number of processed actual param node.
double directPropaTime
time of points-to propagation of address-taken objects
double processTime
time of processNode.
u32_t numOfProcessedAddr
Statistics.
virtual bool propVarPtsFromSrcToDst(NodeID var, const SVFGNode *src, const SVFGNode *dst)
Propagate points-to information of a certain variable from src to dst.
static void releaseFSWPA()
Release flow-sensitive pointer analysis.
virtual bool propAlongIndirectEdge(const IndirectSVFGEdge *edge)
Propagate points-to information along an INDIRECT SVFG edge.
double phiTime
time of phi nodes.
static FlowSensitive * createFSWPA(SVFIR *_pag)
Create single instance of flow-sensitive pointer analysis.
double sccTime
time of SCC detection.
double updateTime
time of strong/weak updates.
virtual bool updateInFromOut(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
u32_t numOfProcessedMSSANode
Number of processed formal ret node.
BVDataPTAImpl::MutDFPTDataTy::DFPtsMap DFInOutMap
virtual void solveAndwritePtsToFile(const std::string &filename)
double updateCallGraphTime
time of updating call graph
Map< LocID, PtsMap > DFPtsMap
Data-flow point-to map.
const DFPtsMap & getDFOut()
BaseMutPTData::PtsMap PtsMap
const DFPtsMap & getDFIn()
PTATY
Pointer analysis type list.
@ FSSPARSE_WPA
Sparse flow sensitive WPA.
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
PTATY getAnalysisTy() const
Type of pointer analysis.
SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
u32_t OnTheFlyIterBudgetForStat
Flag for iteration budget for on-the-fly statistics.
NodeID getId() const
Get ID.
VFGEdge::SVFGEdgeSetTy SVFGEdgeSetTy
u32_t iterationForPrintStat
print out statistics for i-th iteration
std::stack< NodeID > NodeStack
WPAFSSolver< SVFG * > WPASVFGFSSolver
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set