Static Value-Flow Analysis
Public Types | Public Member Functions | List of all members
SVF::ICFGWTO Class Reference

#include <ICFGWTO.h>

Inheritance diagram for SVF::ICFGWTO:
SVF::WTO< ICFG >

Public Types

typedef WTO< ICFGBase
 
typedef WTOComponentVisitor< ICFG >::WTONodeT ICFGWTONode
 
- Public Types inherited from SVF::WTO< ICFG >
typedef GraphT::NodeType NodeT
 
typedef GraphT::EdgeType EdgeT
 
typedef WTOCycleDepth< ICFGGraphTWTOCycleDepth
 
typedef WTOComponent< ICFGWTOComponentT
 
typedef WTONode< ICFGWTONodeT
 
typedef WTOCycle< ICFGWTOCycleT
 
typedef Set< const NodeT * > NodeRefList
 
typedef WTOComponentRefList::const_iterator Iterator
 Iterator over the components. More...
 

Public Member Functions

 ICFGWTO (ICFG *graph, const ICFGNode *node)
 
virtual ~ICFGWTO ()
 
void forEachSuccessor (const ICFGNode *node, std::function< void(const ICFGNode *)> func) const override
 
- Public Member Functions inherited from SVF::WTO< ICFG >
 WTO (ICFG *graph, const NodeT *entry)
 Compute the weak topological order of the given graph. More...
 
 WTO (const WTO &other)=default
 No copy constructor. More...
 
 WTO (WTO &&other)=default
 Move constructor. More...
 
WTOoperator= (const WTO &other)=default
 No copy assignment operator. More...
 
WTOoperator= (WTO &&other)=default
 Move assignment operator. More...
 
 ~WTO ()
 Destructor. More...
 
const WTOComponentRefListgetWTOComponents () const
 Get all wto components in WTO. More...
 
Iterator begin () const
 Begin iterator over the components. More...
 
Iterator end () const
 End iterator over the components. More...
 
bool isHead (const NodeT *node) const
 
NodeRefToWTOCycleMap::const_iterator headBegin () const
 
NodeRefToWTOCycleMap::const_iterator headEnd () const
 End iterator over the components. More...
 
const GraphTWTOCycleDepthcycleDepth (const NodeT *n) const
 Return the cycleDepth of the given node. More...
 
bool in_cycleDepth_table (const NodeT *n) const
 Return the cycleDepth of the given node. More...
 
void accept (WTOComponentVisitor< ICFG > &v)
 Accept the given visitor. More...
 
std::string toString () const
 Dump the order, for debugging purpose. More...
 
void init ()
 

Additional Inherited Members

- Protected Types inherited from SVF::WTO< ICFG >
typedef const WTOComponentTWTOComponentPtr
 
typedef std::list< WTOComponentPtrWTOComponentRefList
 
typedef Set< WTOComponentPtrWTOComponentRefSet
 
typedef Map< const NodeT *, const WTOCycleT * > NodeRefToWTOCycleMap
 
typedef Map< const NodeT *, NodeRefListNodeRefTONodeRefListMap
 
typedef u32_t CycleDepthNumber
 
typedef Map< const NodeT *, CycleDepthNumberNodeRefToCycleDepthNumber
 
typedef std::vector< const NodeT * > Stack
 
typedef std::shared_ptr< GraphTWTOCycleDepthWTOCycleDepthPtr
 
typedef Map< const NodeT *, WTOCycleDepthPtrNodeRefToWTOCycleDepthPtr
 
- Protected Member Functions inherited from SVF::WTO< ICFG >
virtual void forEachSuccessor (const NodeT *node, std::function< void(const NodeT *)> func) const
 
CycleDepthNumber getCDN (const NodeT *n) const
 Return the depth-first number of the given node. More...
 
void setCDN (const NodeT *n, const CycleDepthNumber &dfn)
 Set the depth-first number of the given node. More...
 
const NodeTpop ()
 Pop a node from the stack. More...
 
void push (const NodeT *n)
 Push a node on the stack. More...
 
const WTONodeTnewNode (const NodeT *node)
 
const WTOCycleTnewCycle (const WTONodeT *node, const WTOComponentRefList &partition)
 
virtual const WTOCycleTcomponent (const NodeT *node)
 Create the cycle component for the given node. More...
 
virtual CycleDepthNumber visit (const NodeT *node, WTOComponentRefList &partition)
 
void buildNodeToDepth ()
 Build the node to WTO cycle depth table. More...
 
- Protected Attributes inherited from SVF::WTO< ICFG >
WTOComponentRefList _components
 
WTOComponentRefSet _allComponents
 
NodeRefToWTOCycleMap headRefToCycle
 
NodeRefToWTOCycleDepthPtr _nodeToDepth
 
NodeRefToCycleDepthNumber _nodeToCDN
 
CycleDepthNumber _num
 
Stack _stack
 
ICFG_graph
 
const NodeT_entry
 

Detailed Description

Definition at line 47 of file ICFGWTO.h.

Member Typedef Documentation

◆ Base

Definition at line 50 of file ICFGWTO.h.

◆ ICFGWTONode

Definition at line 51 of file ICFGWTO.h.

Constructor & Destructor Documentation

◆ ICFGWTO()

SVF::ICFGWTO::ICFGWTO ( ICFG graph,
const ICFGNode node 
)
inlineexplicit

Definition at line 53 of file ICFGWTO.h.

53 : Base(graph, node) {}
WTO< ICFG > Base
Definition: ICFGWTO.h:50

◆ ~ICFGWTO()

virtual SVF::ICFGWTO::~ICFGWTO ( )
inlinevirtual

Definition at line 55 of file ICFGWTO.h.

56  {
57  }

Member Function Documentation

◆ forEachSuccessor()

void SVF::ICFGWTO::forEachSuccessor ( const ICFGNode node,
std::function< void(const ICFGNode *)>  func 
) const
inlineoverride

Definition at line 59 of file ICFGWTO.h.

62  {
63  if (const auto* callNode = SVFUtil::dyn_cast<CallICFGNode>(node))
64  {
65  const ICFGNode* succ = callNode->getRetICFGNode();
66  func(succ);
67  }
68  else
69  {
70  for (const auto& e : node->getOutEdges())
71  {
72  if (!e->isIntraCFGEdge() ||
73  node->getFun() != e->getDstNode()->getFun())
74  continue;
75  func(e->getDstNode());
76  }
77  }
78  }

The documentation for this class was generated from the following file: