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

#include <CDG.h>

Inheritance diagram for SVF::CDGNode:
SVF::GenericNode< NodeTy, EdgeTy > SVF::SVFBaseNode

Public Types

typedef CDGEdge::CDGEdgeSetTy::iterator iterator
 
typedef CDGEdge::CDGEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::GenericNode< NodeTy, EdgeTy >
typedef NodeTy NodeType
 
typedef EdgeTy EdgeType
 
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 Edge kind. More...
 
typedef GEdgeSetTy::iterator iterator
 
typedef GEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::SVFBaseNode
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , GepValNode ,
  RetNode , VarargNode , DummyValNode , ObjNode ,
  GepObjNode , FIObjNode , DummyObjNode , Cmp ,
  BinaryOp , UnaryOp , Branch , DummyVProp ,
  NPtr , FRet , ARet , AParm ,
  FParm , Addr , Copy , Gep ,
  Store , Load , TPhi , TIntraPhi ,
  TInterPhi , FPIN , FPOUT , APIN ,
  APOUT , MPhi , MIntraPhi , MInterPhi ,
  CallNodeKd , CDNodeKd , CFLNodeKd , CHNodeKd ,
  ConstraintNodeKd , TCTNodeKd , DCHNodeKd , OtherKd
}
 

Public Member Functions

 CDGNode (const ICFGNode *icfgNode)
 Constructor. More...
 
virtual const std::string toString () const
 
const ICFGNodegetICFGNode () const
 
- Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
 GenericNode (NodeID i, GNodeK k)
 Constructor. More...
 
virtual ~GenericNode ()
 Destructor. More...
 
bool hasIncomingEdge () const
 Has incoming/outgoing edge set. More...
 
bool hasOutgoingEdge () const
 
iterator OutEdgeBegin ()
 iterators More...
 
iterator OutEdgeEnd ()
 
iterator InEdgeBegin ()
 
iterator InEdgeEnd ()
 
const_iterator OutEdgeBegin () const
 
const_iterator OutEdgeEnd () const
 
const_iterator InEdgeBegin () const
 
const_iterator InEdgeEnd () const
 
virtual iterator directOutEdgeBegin ()
 Iterators used for SCC detection, overwrite it in child class if necessary. More...
 
virtual iterator directOutEdgeEnd ()
 
virtual iterator directInEdgeBegin ()
 
virtual iterator directInEdgeEnd ()
 
virtual const_iterator directOutEdgeBegin () const
 
virtual const_iterator directOutEdgeEnd () const
 
virtual const_iterator directInEdgeBegin () const
 
virtual const_iterator directInEdgeEnd () const
 
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges. More...
 
bool addOutgoingEdge (EdgeType *outEdge)
 
EdgeTypehasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges. More...
 
EdgeTypehasOutgoingEdge (EdgeType *edge) const
 
const GEdgeSetTygetOutEdges () const
 
const GEdgeSetTygetInEdges () const
 
u32_t removeIncomingEdge (EdgeType *edge)
 
u32_t removeOutgoingEdge (EdgeType *edge)
 
- Public Member Functions inherited from SVF::SVFBaseNode
 SVFBaseNode (NodeID i, GNodeK k, SVFType *ty=nullptr)
 
NodeID getId () const
 Get ID. More...
 
GNodeK getNodeKind () const
 Get node kind. More...
 
virtual const SVFTypegetType () const
 
virtual void setSourceLoc (const std::string &sourceCodeInfo)
 
virtual const std::string getSourceLoc () const
 
const std::string valueOnlyToString () const
 

Static Public Member Functions

static bool classof (const CDGNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const GenericICFGNodeTy *node)
 
static bool classof (const SVFBaseNode *node)
 
- Static Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
static bool classof (const GenericNode< NodeTy, EdgeTy > *)
 
static bool classof (const SVFBaseNode *)
 

Private Attributes

const ICFGNode_icfgNode
 

Additional Inherited Members

- Static Protected Member Functions inherited from SVF::SVFBaseNode
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds. More...
 
static bool isInterICFGNodeKind (GNodeK n)
 
static bool isSVFVarKind (GNodeK n)
 
static bool isValVarKinds (GNodeK n)
 
static bool isObjVarKinds (GNodeK n)
 
static bool isVFGNodeKinds (GNodeK n)
 
static bool isArgumentVFGNodeKinds (GNodeK n)
 
static bool isStmtVFGNodeKinds (GNodeK n)
 
static bool isPHIVFGNodeKinds (GNodeK n)
 
static bool isMRSVFGNodeKinds (GNodeK n)
 
static bool isMSSAPHISVFGNodeKinds (GNodeK n)
 
- Protected Attributes inherited from SVF::SVFBaseNode
NodeID id
 Node ID. More...
 
GNodeK nodeKind
 Node kind. More...
 
const SVFTypetype
 SVF type. More...
 
std::string sourceLoc
 Source code information of this value. More...
 

Detailed Description

Definition at line 89 of file CDG.h.

Member Typedef Documentation

◆ const_iterator

typedef CDGEdge::CDGEdgeSetTy::const_iterator SVF::CDGNode::const_iterator

Definition at line 95 of file CDG.h.

◆ iterator

typedef CDGEdge::CDGEdgeSetTy::iterator SVF::CDGNode::iterator

Definition at line 94 of file CDG.h.

Constructor & Destructor Documentation

◆ CDGNode()

SVF::CDGNode::CDGNode ( const ICFGNode icfgNode)
inline

Constructor.

Definition at line 99 of file CDG.h.

99  : GenericCDGNodeTy(icfgNode->getId(), CDNodeKd), _icfgNode(icfgNode)
100  {
101 
102  }
const ICFGNode * _icfgNode
Definition: CDG.h:136
GenericNode< CDGNode, CDGEdge > GenericCDGNodeTy
Definition: CDG.h:87

Member Function Documentation

◆ classof() [1/3]

static bool SVF::CDGNode::classof ( const CDGNode )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 119 of file CDG.h.

120  {
121  return true;
122  }

◆ classof() [2/3]

static bool SVF::CDGNode::classof ( const GenericICFGNodeTy node)
inlinestatic

Definition at line 124 of file CDG.h.

125  {
126  return node->getNodeKind() == CDNodeKd;
127  }

◆ classof() [3/3]

static bool SVF::CDGNode::classof ( const SVFBaseNode node)
inlinestatic

Definition at line 129 of file CDG.h.

130  {
131  return node->getNodeKind() == CDNodeKd;
132  }

◆ getICFGNode()

const ICFGNode* SVF::CDGNode::getICFGNode ( ) const
inline

Definition at line 112 of file CDG.h.

113  {
114  return _icfgNode;
115  }

◆ toString()

virtual const std::string SVF::CDGNode::toString ( ) const
inlinevirtual

Definition at line 104 of file CDG.h.

105  {
106  std::string str;
107  std::stringstream rawstr(str);
108  rawstr << getId();
109  return rawstr.str();
110  }
const char *const string
Definition: cJSON.h:172
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260

Member Data Documentation

◆ _icfgNode

const ICFGNode* SVF::CDGNode::_icfgNode
private

Definition at line 136 of file CDG.h.


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