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

#include <SparseObjGraph.h>

Inheritance diagram for SVF::SparseObjNode:
SVF::GenericNode< SparseObjNode, SparseObjEdge > SVF::SVFValue

Public Member Functions

 SparseObjNode (NodeID id, NodeID base, const ICFGNode *location, const IntraCFGEdge *branch)
const ICFGNode * getICFGNode () const
std::string toString () const
Public Member Functions inherited from SVF::GenericNode< SparseObjNode, SparseObjEdge >
 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

Public Attributes

NodeID base
const ICFGNode * location
const IntraCFGEdge * branch

Additional Inherited Members

Public Types inherited from SVF::GenericNode< SparseObjNode, SparseObjEdge >
typedef SparseObjNode NodeType
typedef SparseObjEdge 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 Public Member Functions inherited from SVF::GenericNode< SparseObjNode, SparseObjEdge >
static bool classof (const GenericNode< SparseObjNode, SparseObjEdge > *)
static bool classof (const SVFValue *)
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

A normal node represents a packed Obj at one ICFG location. A non-null branch marks a synthetic node for an outgoing branch edge; its location remains the branch's ICFG node.

Definition at line 33 of file SparseObjGraph.h.

Constructor & Destructor Documentation

◆ SparseObjNode()

SVF::SparseObjNode::SparseObjNode ( NodeID id,
NodeID base,
const ICFGNode * location,
const IntraCFGEdge * branch )
inline

Definition at line 36 of file SparseObjGraph.h.

39 branch(branch) {}
const IntraCFGEdge * branch
const ICFGNode * location
GenericNode< SparseObjNode, SparseObjEdge > GenericSparseObjNodeTy

Member Function Documentation

◆ getICFGNode()

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

Definition at line 45 of file SparseObjGraph.h.

46 {
47 return location;
48 }

◆ toString()

std::string SparseObjNode::toString ( ) const

Definition at line 18 of file SparseObjGraph.cpp.

19{
20 std::ostringstream out;
21 out << "node " << getId() << " base " << base << " ICFG "
22 << location->getId();
23 if (branch)
24 out << " branch " << branch->getSrcNode()->getId()
25 << " -> " << branch->getDstNode()->getId()
26 << " label " << branch->getSuccessorCondValue();
27 return out.str();
28}
NodeID getId() const
Get ID.
Definition SVFValue.h:158

Member Data Documentation

◆ base

NodeID SVF::SparseObjNode::base

Definition at line 41 of file SparseObjGraph.h.

◆ branch

const IntraCFGEdge* SVF::SparseObjNode::branch

Definition at line 43 of file SparseObjGraph.h.

◆ location

const ICFGNode* SVF::SparseObjNode::location

Definition at line 42 of file SparseObjGraph.h.


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