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

#include <CDG.h>

Inheritance diagram for SVF::CDGEdge:
SVF::GenericEdge< CDGNode >

Public Types

typedef std::pair< const SVFVar *, s32_t > BranchCondition
typedef GenericNode< CDGNode, CDGEdge >::GEdgeSetTy CDGEdgeSetTy
typedef CDGEdgeSetTy SVFGEdgeSetTy
Public Types inherited from SVF::GenericEdge< CDGNode >
typedef CDGNode 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

 CDGEdge (CDGNode *s, CDGNode *d)
 Constructor.
 ~CDGEdge ()
 Destructor.
virtual const std::string toString () const
const Set< BranchCondition > & getBranchConditions () const
 get/set branch condition
void insertBranchCondition (const SVFVar *pNode, s32_t branchID)
Public Member Functions inherited from SVF::GenericEdge< CDGNode >
 GenericEdge (CDGNode *s, CDGNode *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

Private Attributes

Set< BranchCondition > brConditions

Additional Inherited Members

Static Protected Attributes inherited from SVF::GenericEdge< CDGNode >
static constexpr unsigned char EdgeKindMaskBits
 We use the lower 8 bits to denote edge kind.
static constexpr u64_t EdgeKindMask

Detailed Description

Definition at line 48 of file CDG.h.

Member Typedef Documentation

◆ BranchCondition

typedef std::pair<const SVFVar *, s32_t> SVF::CDGEdge::BranchCondition

Definition at line 51 of file CDG.h.

◆ CDGEdgeSetTy

◆ SVFGEdgeSetTy

Definition at line 64 of file CDG.h.

Constructor & Destructor Documentation

◆ CDGEdge()

SVF::CDGEdge::CDGEdge ( CDGNode * s,
CDGNode * d )
inline

Constructor.

Definition at line 54 of file CDG.h.

54 : GenericCDGEdgeTy(s, d, 0)
55 {
56 }
GenericEdge< CDGNode > GenericCDGEdgeTy
Definition CDG.h:46

◆ ~CDGEdge()

SVF::CDGEdge::~CDGEdge ( )
inline

Destructor.

Definition at line 59 of file CDG.h.

60 {
61 }

Member Function Documentation

◆ getBranchConditions()

const Set< BranchCondition > & SVF::CDGEdge::getBranchConditions ( ) const
inline

get/set branch condition

Definition at line 77 of file CDG.h.

78 {
79 return brConditions;
80 }
Set< BranchCondition > brConditions
Definition CDG.h:90

◆ insertBranchCondition()

void SVF::CDGEdge::insertBranchCondition ( const SVFVar * pNode,
s32_t branchID )
inline

Definition at line 82 of file CDG.h.

83 {
84 brConditions.insert(std::make_pair(pNode, branchID));
85 }

◆ toString()

virtual const std::string SVF::CDGEdge::toString ( ) const
inlinevirtual

Definition at line 66 of file CDG.h.

67 {
68 std::string str;
69 std::stringstream rawstr(str);
70 rawstr << "CDGEdge " << " [";
71 rawstr << getDstID() << "<--" << getSrcID() << "\t";
72 return rawstr.str();
73 }

Member Data Documentation

◆ brConditions

Set<BranchCondition> SVF::CDGEdge::brConditions
private

Definition at line 90 of file CDG.h.


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