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

#include <ThreadCallGraph.h>

Inheritance diagram for SVF::ThreadJoinEdge:
SVF::CallGraphEdge SVF::GenericEdge< CallGraphNode >

Public Types

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

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

Additional Inherited Members

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

Detailed Description

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

Definition at line 77 of file ThreadCallGraph.h.

Member Typedef Documentation

◆ JoinEdgeSet

Constructor & Destructor Documentation

◆ ThreadJoinEdge()

SVF::ThreadJoinEdge::ThreadJoinEdge ( CallGraphNode * s,
CallGraphNode * d,
CallSiteID csId )
inline

Constructor.

Definition at line 82 of file ThreadCallGraph.h.

82 :
84 {
85 }
CallSiteID csId
Definition CallGraph.h:65
CallGraphEdge(CallGraphNode *s, CallGraphNode *d, CEDGEK kind, CallSiteID cs)
Constructor.
Definition CallGraph.h:68

◆ ~ThreadJoinEdge()

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

Destructor.

Definition at line 87 of file ThreadCallGraph.h.

88 {
89 }

Member Function Documentation

◆ classof() [1/2]

bool SVF::ThreadJoinEdge::classof ( const CallGraphEdge * edge)
inlinestatic

Definition at line 95 of file ThreadCallGraph.h.

96 {
97 return edge->getEdgeKind() == CallGraphEdge::TDJoinEdge;
98 }

◆ classof() [2/2]

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

Definition at line 91 of file ThreadCallGraph.h.

92 {
93 return true;
94 }

◆ toString()

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

Reimplemented from SVF::CallGraphEdge.

Definition at line 67 of file ThreadCallGraph.cpp.

68{
69 std::string str;
70 std::stringstream rawstr(str);
71 rawstr << "ThreadJoinEdge ";
72 rawstr << "CallSiteID: " << getCallSiteID();
73 rawstr << " srcNodeID " << getSrcID() << " (fun: " << getSrcNode()->getFunction()->getName() << ")";
74 rawstr << " dstNodeID " << getDstID() << " (fun: " << getDstNode()->getFunction()->getName() << ")";
75 return rawstr.str();
76}
CallSiteID getCallSiteID() const
Get direct and indirect calls.
Definition CallGraph.h:83
const FunObjVar * getFunction() const
Get function of this call node.
Definition CallGraph.h:191
virtual const std::string & getName() const
Definition SVFValue.h:184

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