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

#include <VFGEdge.h>

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

Public Member Functions

 RetDirSVFGEdge (VFGNode *s, VFGNode *d, CallSiteID id)
 Constructor. More...
 
CallSiteID getCallSiteId () const
 Return callsite ID. More...
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::DirectSVFGEdge
 DirectSVFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor. More...
 
- 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 RetDirSVFGEdge *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const DirectSVFGEdge *edge)
 
static bool classof (const VFGEdge *edge)
 
static bool classof (const GenericVFGEdgeTy *edge)
 
- Static Public Member Functions inherited from SVF::DirectSVFGEdge
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...
 

Private Attributes

CallSiteID csId
 

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 return edge connecting direct value-flows from a callee to its caller at a callsite

Definition at line 254 of file VFGEdge.h.

Constructor & Destructor Documentation

◆ RetDirSVFGEdge()

SVF::RetDirSVFGEdge::RetDirSVFGEdge ( VFGNode s,
VFGNode d,
CallSiteID  id 
)
inline

Constructor.

Definition at line 261 of file VFGEdge.h.

261  :
263  {
264  }
DirectSVFGEdge(VFGNode *s, VFGNode *d, GEdgeFlag k)
Constructor.
Definition: VFGEdge.h:146
CallSiteID csId
Definition: VFGEdge.h:258
static GEdgeFlag makeEdgeFlagWithInvokeID(GEdgeKind k, CallSiteID cs)
Compute the unique edgeFlag value from edge kind and CallSiteID.
Definition: VFGEdge.h:120

Member Function Documentation

◆ classof() [1/4]

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

Definition at line 276 of file VFGEdge.h.

277  {
278  return edge->getEdgeKind() == RetDirVF;
279  }

◆ classof() [2/4]

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

Definition at line 284 of file VFGEdge.h.

285  {
286  return edge->getEdgeKind() == RetDirVF;
287  }

◆ classof() [3/4]

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

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

Definition at line 272 of file VFGEdge.h.

273  {
274  return true;
275  }

◆ classof() [4/4]

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

Definition at line 280 of file VFGEdge.h.

281  {
282  return edge->getEdgeKind() == RetDirVF;
283  }

◆ getCallSiteId()

CallSiteID SVF::RetDirSVFGEdge::getCallSiteId ( ) const
inline

Return callsite ID.

Definition at line 266 of file VFGEdge.h.

267  {
268  return csId;
269  }

◆ toString()

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

Reimplemented from SVF::DirectSVFGEdge.

Definition at line 412 of file VFG.cpp.

413 {
414  std::string str;
415  std::stringstream rawstr(str);
416  rawstr << "RetDirSVFGEdge CallSite ID: " << getCallSiteId() << " [";
417  rawstr << getDstID() << "<--" << getSrcID() << "]\t";
418  return rawstr.str();
419 }
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
CallSiteID getCallSiteId() const
Return callsite ID.
Definition: VFGEdge.h:266

Member Data Documentation

◆ csId

CallSiteID SVF::RetDirSVFGEdge::csId
private

Definition at line 258 of file VFGEdge.h.


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