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

#include <ThreadCallGraph.h>

Inheritance diagram for SVF::ThreadJoinEdge:
SVF::PTACallGraphEdge SVF::GenericEdge< NodeTy >

Public Types

typedef GenericNode< PTACallGraphNode, ThreadJoinEdge >::GEdgeSetTy JoinEdgeSet
 
- Public Types inherited from SVF::PTACallGraphEdge
enum  CEDGEK { CallRetEdge , TDForkEdge , TDJoinEdge , HareParForEdge }
 
typedef Set< const CallICFGNode * > CallInstSet
 
typedef GenericNode< PTACallGraphNode, PTACallGraphEdge >::GEdgeSetTy CallGraphEdgeSet
 
- 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

 ThreadJoinEdge (PTACallGraphNode *s, PTACallGraphNode *d, CallSiteID csId)
 Constructor. More...
 
virtual ~ThreadJoinEdge ()
 Destructor. More...
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::PTACallGraphEdge
 PTACallGraphEdge (PTACallGraphNode *s, PTACallGraphNode *d, CEDGEK kind, CallSiteID cs)
 Constructor. More...
 
virtual ~PTACallGraphEdge ()
 Destructor. More...
 
CallSiteID getCallSiteID () const
 Get direct and indirect calls. More...
 
bool isDirectCallEdge () const
 
bool isIndirectCallEdge () const
 
CallInstSetgetDirectCalls ()
 
CallInstSetgetIndirectCalls ()
 
const CallInstSetgetDirectCalls () const
 
const CallInstSetgetIndirectCalls () const
 
void addDirectCallSite (const CallICFGNode *call)
 Add direct and indirect callsite. More...
 
void addInDirectCallSite (const CallICFGNode *call)
 
CallInstSet::const_iterator directCallsBegin () const
 Iterators for direct and indirect callsites. More...
 
CallInstSet::const_iterator directCallsEnd () const
 
CallInstSet::const_iterator indirectCallsBegin () const
 
CallInstSet::const_iterator indirectCallsEnd () 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 ThreadJoinEdge *)
 
static bool classof (const PTACallGraphEdge *edge)
 
- Static Public Member Functions inherited from SVF::PTACallGraphEdge
static GEdgeFlag makeEdgeFlagWithInvokeID (GEdgeKind k, CallSiteID cs)
 Compute the unique edgeFlag value from edge kind and CallSiteID. More...
 
static bool classof (const PTACallGraphEdge *)
 ClassOf. More...
 
static bool classof (const GenericCallGraphEdgeTy *edge)
 

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

PTA thread join edge from the exit of a start routine function to a join point of the thread

Definition at line 87 of file ThreadCallGraph.h.

Member Typedef Documentation

◆ JoinEdgeSet

Definition at line 121 of file ThreadCallGraph.h.

Constructor & Destructor Documentation

◆ ThreadJoinEdge()

SVF::ThreadJoinEdge::ThreadJoinEdge ( PTACallGraphNode s,
PTACallGraphNode d,
CallSiteID  csId 
)
inline

Constructor.

Definition at line 92 of file ThreadCallGraph.h.

92  :
94  {
95  }
PTACallGraphEdge(PTACallGraphNode *s, PTACallGraphNode *d, CEDGEK kind, CallSiteID cs)
Constructor.
Definition: PTACallGraph.h:68

◆ ~ThreadJoinEdge()

virtual SVF::ThreadJoinEdge::~ThreadJoinEdge ( )
inlinevirtual

Destructor.

Definition at line 97 of file ThreadCallGraph.h.

98  {
99  }

Member Function Documentation

◆ classof() [1/2]

static bool SVF::ThreadJoinEdge::classof ( const PTACallGraphEdge edge)
inlinestatic

Definition at line 105 of file ThreadCallGraph.h.

106  {
107  return edge->getEdgeKind() == PTACallGraphEdge::TDJoinEdge;
108  }

◆ classof() [2/2]

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

Definition at line 101 of file ThreadCallGraph.h.

102  {
103  return true;
104  }

◆ toString()

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

Reimplemented from SVF::PTACallGraphEdge.

Definition at line 110 of file ThreadCallGraph.h.

111  {
112  std::string str;
113  std::stringstream rawstr(str);
114  rawstr << "ThreadJoinEdge ";
115  rawstr << "CallSiteID: " << getCallSiteID();
116  rawstr << " srcNodeID " << getSrcID() << " (fun: " << getSrcNode()->getFunction()->getName() << ")";
117  rawstr << " dstNodeID " << getDstID() << " (fun: " << getDstNode()->getFunction()->getName() << ")";
118  return rawstr.str();
119  }
const char *const string
Definition: cJSON.h:172
NodeType * getSrcNode() const
Definition: GenericGraph.h:97
NodeID getDstID() const
Definition: GenericGraph.h:85
NodeID getSrcID() const
get methods of the components
Definition: GenericGraph.h:81
NodeType * getDstNode() const
Definition: GenericGraph.h:101
CallSiteID getCallSiteID() const
Get direct and indirect calls.
Definition: PTACallGraph.h:83

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