36 #ifndef WPAFSSOLVER_H_
37 #define WPAFSSOLVER_H_
47 template<
class GraphType>
76 while (!topoStack.empty())
78 NodeID nodeId = topoStack.top();
83 revTopoStack.push(*it);
87 assert(
nodeStack.empty() &&
"node stack is not empty, some nodes are not popped properly.");
90 while (!revTopoStack.empty())
92 NodeID nodeId = revTopoStack.top();
106 template<
class GraphType>
128 while (!nodeStack.empty())
149 for (; EI != EE; ++EI)
179 template<
class GraphType>
194 bool solveAll =
true;
206 while (!nodeStack.empty())
214 if (solveAll ==
false)
NodeID repNode(NodeID n) const
get the rep node if not found return itself
GNodeStack & topoNodeStack()
const NodeBS & subNodes(NodeID n) const
get all subnodes in one scc, if size is empty insert itself into the set
bool intersectWithComplement(const SparseBitVector &RHS)
virtual NodeID sccRepNode(NodeID id) const
SCC methods.
NodeStack nodeStack
stack used for processing nodes.
virtual NodeStack & SCCDetect()
SCC detection.
WPAFSSolver()
Constructor.
virtual ~WPAFSSolver()
Destructor.
const NodeBS & getCandidates() const
NodeBS candidates
nodes which need to be analyzed in current iteration.
WPASolver< GraphType >::GTraits GTraits
void addNewCandidate(NodeID node)
void removeCandidates(const NodeBS &nodes)
virtual ~WPAMinimumSolver()
WPASolver< GraphType >::child_iterator child_iterator
WPASolver< GraphType >::GNODE GNODE
virtual void addNodeIntoWorkList(NodeID node)
WPASolver< GraphType >::GTraits GTraits
NodeID curSCCID
index of current SCC.
void setCurrentSCC(NodeID id)
virtual void addNodeIntoWorkList(NodeID node)
WPASolver< GraphType >::GNODE GNODE
WPASolver< GraphType >::child_iterator child_iterator
bool isInCurrentSCC(NodeID node)
virtual void propagate(GNODE *v)
Propagation for the solving, to be implemented in the child class.
NodeID Node_Index(GNODE node)
Get node ID.
NodeID popFromWorklist()
Worklist operations.
SCC * getSCCDetector() const
Get SCC detector.
virtual void pushIntoWorklist(NodeID id)
GTraits::ChildIteratorType child_iterator
virtual bool propFromSrcToDst(GEDGE *)
Propagate information from source to destination node, to be implemented in the child class.
virtual void processNode(NodeID)
Following methods are to be implemented in child class, in order to achieve a fully worked PTA.
std::stack< NodeID > NodeStack
iter_range< typename GenericGraphTraits< GraphType >::nodes_iterator > nodes(const GraphType &G)