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

#include <VFGEdge.h>

Inheritance diagram for SVF::DirectSVFGEdge:
SVF::VFGEdge SVF::GenericEdge< NodeTy > SVF::CallDirSVFGEdge SVF::IntraDirSVFGEdge SVF::RetDirSVFGEdge

Public Member Functions

 DirectSVFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor. More...
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::VFGEdge
 VFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor. More...
 
 ~VFGEdge ()
 Destructor. More...
 
bool isDirectVFGEdge () const
 Get methods of the components. More...
 
bool isIndirectVFGEdge () const
 
bool isCallVFGEdge () const
 
bool isRetVFGEdge () const
 
bool isCallDirectVFGEdge () const
 
bool isRetDirectVFGEdge () const
 
bool isCallIndirectVFGEdge () const
 
bool isRetIndirectVFGEdge () const
 
bool isIntraVFGEdge () const
 
bool isThreadMHPIndirectVFGEdge () const
 
- Public Member Functions inherited from SVF::GenericEdge< NodeTy >
 GenericEdge (NodeTy *s, NodeTy *d, GEdgeFlag k)
 Constructor. More...
 
virtual ~GenericEdge ()
 Destructor. More...
 
NodeID getSrcID () const
 get methods of the components More...
 
NodeID getDstID () const
 
GEdgeKind getEdgeKind () const
 
GEdgeKind getEdgeKindWithoutMask () const
 
NodeTypegetSrcNode () const
 
NodeTypegetDstNode () const
 
virtual bool operator== (const GenericEdge< NodeType > *rhs) const
 

Static Public Member Functions

static bool classof (const DirectSVFGEdge *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const VFGEdge *edge)
 
static bool classof (const GenericVFGEdgeTy *edge)
 
- Static Public Member Functions inherited from SVF::VFGEdge
static GEdgeFlag makeEdgeFlagWithInvokeID (GEdgeKind k, CallSiteID cs)
 Compute the unique edgeFlag value from edge kind and CallSiteID. More...
 

Additional Inherited Members

- Public Types inherited from SVF::VFGEdge
enum  VFGEdgeK {
  IntraDirectVF , IntraIndirectVF , CallDirVF , RetDirVF ,
  CallIndVF , RetIndVF , TheadMHPIndirectVF
}
 
typedef VFGEdgeK SVFGEdgeK
 
typedef GenericNode< VFGNode, VFGEdge >::GEdgeSetTy VFGEdgeSetTy
 
typedef VFGEdgeSetTy SVFGEdgeSetTy
 
- Public Types inherited from SVF::GenericEdge< NodeTy >
typedef NodeTy NodeType
 Node type. More...
 
typedef u64_t GEdgeFlag
 
typedef s64_t GEdgeKind
 
typedef struct SVF::GenericEdge::equalGEdge equalGEdge
 Add the hash function for std::set (we also can overload operator< to implement this) More...
 
- Static Protected Attributes inherited from SVF::GenericEdge< NodeTy >
static constexpr unsigned char EdgeKindMaskBits = 8
 We use the lower 8 bits to denote edge kind. More...
 
static constexpr u64_t EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits)
 

Detailed Description

SVFG edge representing direct value-flows

Definition at line 141 of file VFGEdge.h.

Constructor & Destructor Documentation

◆ DirectSVFGEdge()

SVF::DirectSVFGEdge::DirectSVFGEdge ( VFGNode s,
VFGNode d,
GEdgeFlag  k 
)
inline

Constructor.

Definition at line 146 of file VFGEdge.h.

146  : VFGEdge(s,d,k)
147  {
148  }
VFGEdge(VFGNode *s, VFGNode *d, GEdgeFlag k)
Constructor.
Definition: VFGEdge.h:66

Member Function Documentation

◆ classof() [1/3]

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

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

Definition at line 151 of file VFGEdge.h.

152  {
153  return true;
154  }

◆ classof() [2/3]

static bool SVF::DirectSVFGEdge::classof ( const GenericVFGEdgeTy edge)
inlinestatic

Definition at line 161 of file VFGEdge.h.

162  {
163  return edge->getEdgeKind() == IntraDirectVF ||
164  edge->getEdgeKind() == CallDirVF ||
165  edge->getEdgeKind() == RetDirVF;
166  }
@ IntraDirectVF
Definition: VFGEdge.h:53

◆ classof() [3/3]

static bool SVF::DirectSVFGEdge::classof ( const VFGEdge edge)
inlinestatic

Definition at line 155 of file VFGEdge.h.

156  {
157  return edge->getEdgeKind() == IntraDirectVF ||
158  edge->getEdgeKind() == CallDirVF ||
159  edge->getEdgeKind() == RetDirVF;
160  }

◆ toString()

const std::string DirectSVFGEdge::toString ( ) const
virtual

Reimplemented from SVF::VFGEdge.

Reimplemented in SVF::RetDirSVFGEdge, SVF::CallDirSVFGEdge, and SVF::IntraDirSVFGEdge.

Definition at line 387 of file VFG.cpp.

388 {
389  std::string str;
390  std::stringstream rawstr(str);
391  rawstr << "DirectVFGEdge: [" << getDstID() << "<--" << getSrcID() << "]\t";
392  return rawstr.str();
393 }
const char *const string
Definition: cJSON.h:172
NodeID getDstID() const
Definition: GenericGraph.h:85
NodeID getSrcID() const
get methods of the components
Definition: GenericGraph.h:81

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