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

#include <VFGEdge.h>

Inheritance diagram for SVF::CallDirSVFGEdge:
SVF::DirectSVFGEdge SVF::VFGEdge SVF::GenericEdge< VFGNode >

Public Member Functions

 CallDirSVFGEdge (VFGNode *s, VFGNode *d, CallSiteID id)
 Constructor.
CallSiteID getCallSiteId () const
 Return callsite ID.
virtual const std::string toString () const
Public Member Functions inherited from SVF::DirectSVFGEdge
 DirectSVFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor.
Public Member Functions inherited from SVF::VFGEdge
 VFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor.
 ~VFGEdge ()
 Destructor.
bool isDirectVFGEdge () const
 Get methods of the components.
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< VFGNode >
 GenericEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor.
virtual ~GenericEdge ()
 Destructor.
NodeID getSrcID () const
 get methods of the components
NodeID getDstID () const
GEdgeKind getEdgeKind () const
GEdgeKind getEdgeKindWithoutMask () const
NodeType * getSrcNode () const
NodeType * getDstNode () const
virtual bool operator== (const GenericEdge< NodeType > *rhs) const

Static Public Member Functions

static bool classof (const CallDirSVFGEdge *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
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:
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.

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< VFGNode >
typedef VFGNode NodeType
 Node type.
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).
Static Protected Attributes inherited from SVF::GenericEdge< VFGNode >
static constexpr unsigned char EdgeKindMaskBits
 We use the lower 8 bits to denote edge kind.
static constexpr u64_t EdgeKindMask

Detailed Description

SVFG call edge representing direct value-flows from a caller to its callee at a callsite

Definition at line 211 of file VFGEdge.h.

Constructor & Destructor Documentation

◆ CallDirSVFGEdge()

SVF::CallDirSVFGEdge::CallDirSVFGEdge ( VFGNode * s,
VFGNode * d,
CallSiteID id )
inline

Constructor.

Definition at line 218 of file VFGEdge.h.

218 :
220 {
221 }
CallSiteID csId
Definition VFGEdge.h:215
DirectSVFGEdge(VFGNode *s, VFGNode *d, GEdgeFlag k)
Constructor.
Definition VFGEdge.h:146
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]

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

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

Definition at line 230 of file VFGEdge.h.

231 {
232 return true;
233 }

◆ classof() [2/4]

bool SVF::CallDirSVFGEdge::classof ( const DirectSVFGEdge * edge)
inlinestatic

Definition at line 234 of file VFGEdge.h.

235 {
236 return edge->getEdgeKind() == CallDirVF;
237 }

◆ classof() [3/4]

bool SVF::CallDirSVFGEdge::classof ( const GenericVFGEdgeTy * edge)
inlinestatic

Definition at line 242 of file VFGEdge.h.

243 {
244 return edge->getEdgeKind() == CallDirVF ;
245 }

◆ classof() [4/4]

bool SVF::CallDirSVFGEdge::classof ( const VFGEdge * edge)
inlinestatic

Definition at line 238 of file VFGEdge.h.

239 {
240 return edge->getEdgeKind() == CallDirVF ;
241 }

◆ getCallSiteId()

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

Return callsite ID.

Definition at line 223 of file VFGEdge.h.

224 {
225 return csId;
226 }

◆ toString()

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

Reimplemented from SVF::DirectSVFGEdge.

Definition at line 390 of file VFG.cpp.

391{
392 std::string str;
393 std::stringstream rawstr(str);
394 rawstr << "CallDirSVFGEdge CallSite ID: " << getCallSiteId() << " [";
395 rawstr << getDstID() << "<--" << getSrcID() << "]\t";
396 return rawstr.str();
397}
CallSiteID getCallSiteId() const
Return callsite ID.
Definition VFGEdge.h:223

Member Data Documentation

◆ csId

CallSiteID SVF::CallDirSVFGEdge::csId
private

Definition at line 215 of file VFGEdge.h.


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