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

#include <ICFGNode.h>

Inheritance diagram for SVF::GlobalICFGNode:
SVF::ICFGNode SVF::GenericNode< ICFGNode, ICFGEdge > SVF::SVFValue

Public Member Functions

 GlobalICFGNode (NodeID id)
const std::string toString () const override
const std::string getSourceLoc () const override
Public Member Functions inherited from SVF::ICFGNode
 ICFGNode (NodeID i, GNodeK k)
 Constructor.
virtual const FunObjVar * getFun () const
 Return the function of this ICFGNode.
virtual const SVFBasicBlock * getBB () const
 Return the basic block of this ICFGNode.
void dump () const
void addVFGNode (const VFGNode *vfgNode)
const VFGNodeList & getVFGNodes () const
void addSVFStmt (const SVFStmt *edge)
const SVFStmtList & getSVFStmts () const
Public Member Functions inherited from SVF::GenericNode< ICFGNode, ICFGEdge >
 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)
const std::string valueOnlyToString () const
const bool hasLLVMValue () const

Static Public Member Functions

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

Additional Inherited Members

Public Types inherited from SVF::ICFGNode
typedef ICFGEdge::ICFGEdgeSetTy::iterator iterator
typedef ICFGEdge::ICFGEdgeSetTy::const_iterator const_iterator
typedef Set< const CallPE * > CallPESet
typedef Set< const RetPE * > RetPESet
typedef std::list< const VFGNode * > VFGNodeList
typedef std::list< const SVFStmt * > SVFStmtList
typedef GNodeK ICFGNodeK
Public Types inherited from SVF::GenericNode< ICFGNode, ICFGEdge >
typedef ICFGNode NodeType
typedef ICFGEdge 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
}
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::ICFGNode
const FunObjVar * fun
const SVFBasicBlock * bb
VFGNodeList VFGNodes
SVFStmtList pagEdges
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

Unique ICFG node stands for all global initializations

Definition at line 155 of file ICFGNode.h.

Constructor & Destructor Documentation

◆ GlobalICFGNode()

SVF::GlobalICFGNode::GlobalICFGNode ( NodeID id)
inline

Definition at line 159 of file ICFGNode.h.

159 : ICFGNode(id, GlobalBlock)
160 {
161 }
ICFGNode(NodeID i, GNodeK k)
Constructor.
Definition ICFGNode.h:70

Member Function Documentation

◆ classof() [1/3]

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

Definition at line 175 of file ICFGNode.h.

176 {
177 return node->getNodeKind() == GlobalBlock;
178 }

◆ classof() [2/3]

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

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

Definition at line 165 of file ICFGNode.h.

166 {
167 return true;
168 }

◆ classof() [3/3]

bool SVF::GlobalICFGNode::classof ( const ICFGNode * node)
inlinestatic

Definition at line 170 of file ICFGNode.h.

171 {
172 return node->getNodeKind() == GlobalBlock;
173 }

◆ getSourceLoc()

const std::string SVF::GlobalICFGNode::getSourceLoc ( ) const
inlineoverridevirtual

Reimplemented from SVF::SVFValue.

Definition at line 183 of file ICFGNode.h.

184 {
185 return "Global ICFGNode";
186 }

◆ toString()

const std::string GlobalICFGNode::toString ( ) const
overridevirtual

Reimplemented from SVF::ICFGNode.

Definition at line 63 of file ICFG.cpp.

64{
65 std::string str;
66 std::stringstream rawstr(str);
67 rawstr << "GlobalICFGNode" << getId();
68 for (const SVFStmt *stmt : getSVFStmts())
69 rawstr << "\n" << stmt->toString();
70 return rawstr.str();
71}
const SVFStmtList & getSVFStmts() const
Definition ICFGNode.h:116
NodeID getId() const
Get ID.
Definition SVFValue.h:158

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