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

#include <SVFGEdge.h>

Inheritance diagram for SVF::IndirectSVFGEdge:
SVF::VFGEdge SVF::GenericEdge< VFGNode > SVF::CallIndSVFGEdge SVF::IntraIndSVFGEdge SVF::RetIndSVFGEdge SVF::ThreadMHPIndSVFGEdge

Public Types

typedef Set< const MRVer * > MRVerSet
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).

Public Member Functions

 IndirectSVFGEdge (VFGNode *s, VFGNode *d, GEdgeFlag k)
 Constructor.
bool addPointsTo (const NodeBS &c)
 Handle memory region.
const NodeBS & getPointsTo () const
virtual const std::string toString () const
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 IndirectSVFGEdge *)
 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

NodeBS cpts

Additional Inherited Members

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 edge representing indirect value-flows from a caller to its callee at a callsite

Definition at line 42 of file SVFGEdge.h.

Member Typedef Documentation

◆ MRVerSet

Definition at line 46 of file SVFGEdge.h.

Constructor & Destructor Documentation

◆ IndirectSVFGEdge()

SVF::IndirectSVFGEdge::IndirectSVFGEdge ( VFGNode * s,
VFGNode * d,
GEdgeFlag k )
inline

Constructor.

Definition at line 51 of file SVFGEdge.h.

51 : VFGEdge(s,d,k)
52 {
53 }
VFGEdge(VFGNode *s, VFGNode *d, GEdgeFlag k)
Constructor.
Definition VFGEdge.h:66

Member Function Documentation

◆ addPointsTo()

bool SVF::IndirectSVFGEdge::addPointsTo ( const NodeBS & c)
inline

Handle memory region.

Definition at line 56 of file SVFGEdge.h.

57 {
58 return (cpts |= c);
59 }

◆ classof() [1/3]

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

Definition at line 79 of file SVFGEdge.h.

80 {
81 return edge->getEdgeKind() == IntraIndirectVF ||
82 edge->getEdgeKind() == CallIndVF ||
83 edge->getEdgeKind() == RetIndVF ||
84 edge->getEdgeKind() == TheadMHPIndirectVF;
85 }
@ IntraIndirectVF
Definition VFGEdge.h:54
@ TheadMHPIndirectVF
Definition VFGEdge.h:59

◆ classof() [2/3]

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

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

Definition at line 68 of file SVFGEdge.h.

69 {
70 return true;
71 }

◆ classof() [3/3]

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

Definition at line 72 of file SVFGEdge.h.

73 {
74 return edge->getEdgeKind() == IntraIndirectVF ||
75 edge->getEdgeKind() == CallIndVF ||
76 edge->getEdgeKind() == RetIndVF ||
77 edge->getEdgeKind() == TheadMHPIndirectVF;
78 }

◆ getPointsTo()

const NodeBS & SVF::IndirectSVFGEdge::getPointsTo ( ) const
inline

Definition at line 60 of file SVFGEdge.h.

61 {
62 return cpts;
63 }

◆ toString()

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

Reimplemented from SVF::VFGEdge.

Reimplemented in SVF::CallIndSVFGEdge, SVF::IntraIndSVFGEdge, SVF::RetIndSVFGEdge, and SVF::ThreadMHPIndSVFGEdge.

Definition at line 150 of file SVFG.cpp.

151{
152 std::string str;
153 std::stringstream rawstr(str);
154 rawstr << "IndirectSVFGEdge: " << getDstID() << "<--" << getSrcID() << "\n";
155 return rawstr.str();
156}

Member Data Documentation

◆ cpts

NodeBS SVF::IndirectSVFGEdge::cpts
private

Definition at line 48 of file SVFGEdge.h.


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