Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::CDGNode Class Reference

#include <CDG.h>

Inheritance diagram for SVF::CDGNode:
SVF::GenericNode< CDGNode, CDGEdge > SVF::SVFValue

Public Types

typedef CDGEdge::CDGEdgeSetTy::iterator iterator
typedef CDGEdge::CDGEdgeSetTy::const_iterator const_iterator
Public Types inherited from SVF::GenericNode< CDGNode, CDGEdge >
typedef CDGNode NodeType
typedef CDGEdge EdgeType
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 Edge kind.
typedef GEdgeSetTy::iterator iterator
typedef GEdgeSetTy::const_iterator const_iterator
Public Types inherited from SVF::SVFValue
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , ArgValNode ,
  FunValNode , GepValNode , RetValNode , VarargValNode ,
  GlobalValNode , ConstDataValNode , BlackHoleValNode , ConstFPValNode ,
  ConstIntValNode , ConstNullptrValNode , DummyValNode , IntrinsicValNode ,
  AsmPCValNode , ObjNode , GepObjNode , BaseObjNode ,
  FunObjNode , HeapObjNode , StackObjNode , GlobalObjNode ,
  ConstDataObjNode , ConstFPObjNode , ConstIntObjNode , ConstNullptrObjNode ,
  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 ,
  BasicBlockKd , OtherKd
}

Public Member Functions

 CDGNode (const ICFGNode *icfgNode)
 Constructor.
virtual const std::string toString () const
const ICFGNode * getICFGNode () const
Public Member Functions inherited from SVF::GenericNode< CDGNode, CDGEdge >
 GenericNode (NodeID i, GNodeK k, const SVFType *svfType=nullptr)
 Constructor.
virtual ~GenericNode ()
 Destructor.
bool hasIncomingEdge () const
 Has incoming/outgoing edge set.
bool hasOutgoingEdge () const
iterator OutEdgeBegin ()
 iterators
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.
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.
bool addOutgoingEdge (EdgeType *outEdge)
EdgeType * hasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges.
EdgeType * hasOutgoingEdge (EdgeType *edge) const
const GEdgeSetTy & getOutEdges () const
const GEdgeSetTy & getInEdges () const
u32_t removeIncomingEdge (EdgeType *edge)
u32_t removeOutgoingEdge (EdgeType *edge)
Public Member Functions inherited from SVF::SVFValue
 SVFValue (NodeID i, GNodeK k, const SVFType *ty=nullptr)
NodeID getId () const
 Get ID.
GNodeK getNodeKind () const
 Get node kind.
virtual const SVFType * getType () const
virtual void setName (const std::string &nameInfo)
virtual void setName (std::string &&nameInfo)
virtual const std::string & getName () const
virtual void setSourceLoc (const std::string &sourceCodeInfo)
virtual const std::string getSourceLoc () const
const std::string valueOnlyToString () const
const bool hasLLVMValue () const

Static Public Member Functions

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

Private Attributes

const ICFGNode * _icfgNode

Additional Inherited Members

Static Protected Member Functions inherited from SVF::SVFValue
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds.
static bool isInterICFGNodeKind (GNodeK n)
static bool isSVFVarKind (GNodeK n)
static bool isValVarKinds (GNodeK n)
static bool isConstantDataValVar (GNodeK n)
static bool isObjVarKinds (GNodeK n)
static bool isBaseObjVarKinds (GNodeK n)
static bool isConstantDataObjVarKinds (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::SVFValue
NodeID id
 Node ID.
GNodeK nodeKind
 Node kind.
const SVFType * type
 SVF type.
std::string name
std::string sourceLoc
 Source code information of this value.

Detailed Description

Definition at line 95 of file CDG.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 101 of file CDG.h.

◆ iterator

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

Definition at line 100 of file CDG.h.

Constructor & Destructor Documentation

◆ CDGNode()

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

Constructor.

Definition at line 105 of file CDG.h.

105 : GenericCDGNodeTy(icfgNode->getId(), CDNodeKd), _icfgNode(icfgNode)
106 {
107
108 }
const ICFGNode * _icfgNode
Definition CDG.h:142
GenericNode< CDGNode, CDGEdge > GenericCDGNodeTy
Definition CDG.h:93

Member Function Documentation

◆ classof() [1/3]

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

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

Definition at line 125 of file CDG.h.

126 {
127 return true;
128 }

◆ classof() [2/3]

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

Definition at line 130 of file CDG.h.

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

◆ classof() [3/3]

bool SVF::CDGNode::classof ( const SVFValue * node)
inlinestatic

Definition at line 135 of file CDG.h.

136 {
137 return node->getNodeKind() == CDNodeKd;
138 }

◆ getICFGNode()

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

Definition at line 118 of file CDG.h.

119 {
120 return _icfgNode;
121 }

◆ toString()

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

Definition at line 110 of file CDG.h.

111 {
112 std::string str;
113 std::stringstream rawstr(str);
114 rawstr << getId();
115 return rawstr.str();
116 }
NodeID getId() const
Get ID.
Definition SVFValue.h:158

Member Data Documentation

◆ _icfgNode

const ICFGNode* SVF::CDGNode::_icfgNode
private

Definition at line 142 of file CDG.h.


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