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

#include <CDG.h>

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

Public Types

typedef std::pair< const SVFVar *, s32_tBranchCondition
 
typedef GenericNode< CDGNode, CDGEdge >::GEdgeSetTy CDGEdgeSetTy
 
typedef CDGEdgeSetTy 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...
 

Public Member Functions

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

Private Attributes

Set< BranchConditionbrConditions
 

Additional Inherited Members

- 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

Definition at line 42 of file CDG.h.

Member Typedef Documentation

◆ BranchCondition

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

Definition at line 45 of file CDG.h.

◆ CDGEdgeSetTy

Definition at line 57 of file CDG.h.

◆ SVFGEdgeSetTy

Definition at line 58 of file CDG.h.

Constructor & Destructor Documentation

◆ CDGEdge()

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

Constructor.

Definition at line 48 of file CDG.h.

48  : GenericCDGEdgeTy(s, d, 0)
49  {
50  }
GenericEdge< CDGNode > GenericCDGEdgeTy
Definition: CDG.h:38

◆ ~CDGEdge()

SVF::CDGEdge::~CDGEdge ( )
inline

Destructor.

Definition at line 53 of file CDG.h.

54  {
55  }

Member Function Documentation

◆ getBranchConditions()

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

get/set branch condition

Definition at line 71 of file CDG.h.

72  {
73  return brConditions;
74  }
Set< BranchCondition > brConditions
Definition: CDG.h:84

◆ insertBranchCondition()

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

Definition at line 76 of file CDG.h.

77  {
78  brConditions.insert(std::make_pair(pNode, branchID));
79  }

◆ toString()

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

Definition at line 60 of file CDG.h.

61  {
62  std::string str;
63  std::stringstream rawstr(str);
64  rawstr << "CDGEdge " << " [";
65  rawstr << getDstID() << "<--" << getSrcID() << "\t";
66  return rawstr.str();
67  }
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

Member Data Documentation

◆ brConditions

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

Definition at line 84 of file CDG.h.


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