Definition at line 251 of file VersionedFlowSensitive.h.
◆ NodeData
◆ detectSCCs()
Determines the strongly connected components of svfg following only edges labelled with object. partOf[n] = scc means nodes n is part of SCC scc. startingNodes contains the nodes to begin the search from. After completion, footprint will contain all edges which object appears on (as reached through the algorithm described above) sorted.
This is not a general SCC detection but specifically for versioning, so edges to delta nodes are skipped as they are prelabelled. Edges to stores are also skipped to as they yield a new version (they cannot be part of an SCC containing more than themselves). Skipped edges still form part of the footprint.
Definition at line 1109 of file VersionedFlowSensitive.cpp.
1116 std::fill(partOf.begin(), partOf.end(), -1);
1120 std::stack<const SVFGNode *> stack;
1125 for (
const SVFGNode *v : startingNodes)
1127 if (nodeData[v->getId()].index == -1)
1129 visit(vfs,
object, partOf, footprint, nodeData, stack,
index, currentSCC, v);
1134 std::sort(footprint.begin(), footprint.end());
u32_t getTotalNodeNum() const
Get total number of node/edge.
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.
◆ visit()
Called by detectSCCs then called recursively.
Definition at line 1139 of file VersionedFlowSensitive.cpp.
1151 nodeData[vId].index =
index;
1152 nodeData[vId].lowlink =
index;
1156 nodeData[vId].onStack =
true;
1171 footprint.push_back(ie);
1178 if (nodeData[wId].
index == -1)
1180 visit(vfs,
object, partOf, footprint, nodeData, stack,
index, currentSCC, w);
1181 nodeData[vId].lowlink = std::min(nodeData[vId].lowlink, nodeData[wId].lowlink);
1183 else if (nodeData[wId].onStack)
1185 nodeData[vId].lowlink = std::min(nodeData[vId].lowlink, nodeData[wId].
index);
1189 if (nodeData[vId].lowlink == nodeData[vId].
index)
1197 nodeData[wId].onStack =
false;
1198 partOf[wId] = currentSCC;
NodeType * getDstNode() const
const GEdgeSetTy & getOutEdges() const
const NodeBS & getPointsTo() const
NodeID getId() const
Get ID.
bool test(unsigned Idx) const
virtual bool delta(const NodeID l) const
virtual bool isStore(const NodeID l) const
Returns true if l is a store node.
The documentation for this class was generated from the following files: