26 class AndersenWaveDiff;
65 return "VersionedFlowSensitive";
112 virtual void cluster(
void)
override;
275 const std::vector<const SVFGNode *> &startingNodes,
276 std::vector<int> &partOf,
277 std::vector<const IndirectSVFGEdge *> &footprint);
283 std::vector<int> &partOf,
284 std::vector<const IndirectSVFGEdge *> &footprint,
285 std::vector<NodeData> &nodeData,
286 std::stack<const SVFGNode *> &stack,
SVFG::SVFGEdgeSetTy SVFGEdgeSetTy
void analyze() override
Flow sensitive analysis.
PTATY
Pointer analysis type list.
@ VFS_WPA
Versioned sparse flow-sensitive WPA.
PTATY getAnalysisTy() const
Type of pointer analysis.
struct SVF::VersionedFlowSensitive::SCC::NodeData NodeData
static void visit(VersionedFlowSensitive *vfs, const NodeID object, std::vector< int > &partOf, std::vector< const IndirectSVFGEdge * > &footprint, std::vector< NodeData > &nodeData, std::stack< const SVFGNode * > &stack, int &index, int ¤tSCC, const SVFGNode *v)
Called by detectSCCs then called recursively.
static unsigned detectSCCs(VersionedFlowSensitive *vfs, const SVFG *svfg, const NodeID object, const std::vector< const SVFGNode * > &startingNodes, std::vector< int > &partOf, std::vector< const IndirectSVFGEdge * > &footprint)
Version getYield(const NodeID l, const NodeID o) const
Returns the yielded version of o at l. If no such version exists, returns invalidVersion.
void dumpLocVersionMaps(void) const
Dumps maps consume and yield.
BVDataPTAImpl::VersionedPTDataTy * vPtD
Points-to DS for working with versions.
std::vector< bool > deltaMap
LocVersionMap yield
Actual yield map. Yield analogue to consume.
std::vector< bool > isStoreMap
isStoreMap[l] means SVFG node l is a store node.
virtual void updateConnectedNodes(const SVFGEdgeSetTy &newEdges) override
Update nodes connected during updating call graph.
virtual bool processLoad(const LoadSVFGNode *load) override
static bool meld(MeldVersion &mv1, const MeldVersion &mv2)
Melds v2 into v1 (in place), returns whether a change occurred.
VersionRelianceMap versionReliance
o -> (version -> versions which rely on it).
u32_t numPrelabelVersions
Number of versions created during prelabeling.
void removeAllIndirectSVFGEdges(void)
Removes all indirect edges in the SVFG.
Map< NodeID, NodeID > equivalentObject
void readVersionedAnalysisResultFromFile(std::ifstream &F)
virtual void buildDeltaMaps(void)
Fills in deltaMap and deltaSourceMap for the SVFG.
NodeBS & getStmtReliance(const NodeID o, const Version v)
Returns the statements which rely on o:v.
static const Version invalidVersion
If this version appears, there has been an error.
virtual bool deltaSource(const NodeID l) const
double meldLabelingTime
Time to meld label SVFG.
static VersionedFlowSensitive * vfspta
static VersionedVar atKey(NodeID, Version)
Return key into vPtD for address-taken var of a specific version.
CoreBitVector MeldVersion
Version getVersion(const NodeID l, const NodeID o, const LocVersionMap &lvm) const
Shared code for getConsume and getYield. They wrap this function.
std::vector< bool > isLoadMap
isLoadMap[l] means SVFG node l is a load node.
virtual const std::string PTAName() const override
Get PTA name.
static void releaseVFSWPA()
Release flow-sensitive pointer analysis.
static void dumpMeldVersion(MeldVersion &v)
Dumps a MeldVersion to stdout.
double prelabelingTime
Time to prelabel SVFG.
void propagateVersion(NodeID o, Version v)
void prelabel(void)
Prelabel the SVFG: set y(o) for stores and c(o) for delta nodes to a new version.
virtual void initialize() override
Initialize analysis.
virtual void processNode(NodeID n) override
Handle various constraints.
virtual void buildIsStoreLoadMaps(void)
Fills in isStoreMap and isLoadMap.
virtual bool isLoad(const NodeID l) const
Returns true if l is a load node.
void dumpReliances(void) const
Dumps versionReliance and stmtReliance.
Map< VersionedVar, const DummyVersionPropSVFGNode * > VarToPropNodeMap
virtual bool delta(const NodeID l) const
std::vector< ObjToVersionMap > LocVersionMap
virtual bool processStore(const StoreSVFGNode *store) override
Set< NodeID > prelabeledObjects
void setConsume(const NodeID l, const NodeID o, const Version v)
Sets the consumed version of o at l to v.
virtual bool isStore(const NodeID l) const
Returns true if l is a store node.
void meldLabel(void)
Meld label the prelabeled SVFG.
void writeVersionedAnalysisResultToFile(const std::string &filename)
VersionedFlowSensitive(SVFIR *_pag, PTATY type=VFS_WPA)
Constructor.
static bool classof(const PointerAnalysis *pta)
void setYield(const NodeID l, const NodeID o, const Version v)
Sets the yielded version of o at l to v.
void solveAndwritePtsToFile(const std::string &filename) override
virtual bool propAlongIndirectEdge(const IndirectSVFGEdge *) override
Override to do nothing. Instead, we will use propagateVersion when necessary.
Map< NodeID, Map< Version, std::vector< Version > > > VersionRelianceMap
(o -> (v -> versions with rely on o:v).
virtual void finalize() override
Finalize analysis.
void setVersion(const NodeID l, const NodeID o, const Version v, LocVersionMap &lvm)
Shared code for setConsume and setYield. They wrap this function.
FIFOWorkList< NodeID > vWorklist
static VersionedFlowSensitive * createVFSWPA(SVFIR *_pag)
Create single instance of versioned flow-sensitive points-to analysis.
std::vector< Version > & getReliantVersions(const NodeID o, const Version v)
Returns the versions of o which rely on o:v.
void readPtsFromFile(const std::string &filename) override
virtual void cluster(void) override
Override since we want to assign different weights based on versioning.
std::vector< bool > deltaSourceMap
Map< NodeID, Map< Version, NodeBS > > stmtReliance
o x version -> statement nodes which rely on that o/version.
VarToPropNodeMap versionedVarToPropNode
double versionPropTime
Time to propagate versions to versions which rely on them.
Version getConsume(const NodeID l, const NodeID o) const
Returns the consumed version of o at l. If no such version exists, returns invalidVersion.
Map< NodeID, Version > ObjToVersionMap
static bool classof(const VersionedFlowSensitive *)
Methods to support type inquiry through isa, cast, and dyn_cast.
u32_t numPrelabeledNodes
Additional statistics.
std::pair< NodeID, Version > VersionedVar
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set