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

#include <ThreadCallGraph.h>

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

Public Types

typedef GenericNode< CallGraphNode, ThreadForkEdge >::GEdgeSetTy ForkEdgeSet
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

 ThreadForkEdge (CallGraphNode *s, CallGraphNode *d, CallSiteID csId)
 Constructor.
virtual ~ThreadForkEdge ()
 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 ThreadForkEdge *)
 ClassOf.
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 fork edge from fork site to the entry of a start routine function

Definition at line 43 of file ThreadCallGraph.h.

Member Typedef Documentation

◆ ForkEdgeSet

Constructor & Destructor Documentation

◆ ThreadForkEdge()

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

Constructor.

Definition at line 48 of file ThreadCallGraph.h.

48 :
50 {
51 }
CallSiteID csId
Definition CallGraph.h:65
CallGraphEdge(CallGraphNode *s, CallGraphNode *d, CEDGEK kind, CallSiteID cs)
Constructor.
Definition CallGraph.h:68

◆ ~ThreadForkEdge()

virtual SVF::ThreadForkEdge::~ThreadForkEdge ( )
inlinevirtual

Destructor.

Definition at line 53 of file ThreadCallGraph.h.

54 {
55 }

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 63 of file ThreadCallGraph.h.

64 {
65 return edge->getEdgeKind() == CallGraphEdge::TDForkEdge;
66 }

◆ classof() [2/2]

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

ClassOf.

Definition at line 59 of file ThreadCallGraph.h.

60 {
61 return true;
62 }

◆ toString()

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

Reimplemented from SVF::CallGraphEdge.

Definition at line 56 of file ThreadCallGraph.cpp.

57{
58 std::string str;
59 std::stringstream rawstr(str);
60 rawstr << "ThreadForkEdge ";
61 rawstr << "CallSiteID: " << getCallSiteID();
62 rawstr << " srcNodeID " << getSrcID() << " (fun: " << getSrcNode()->getFunction()->getName() << ")";
63 rawstr << " dstNodeID " << getDstID() << " (fun: " << getDstNode()->getFunction()->getName() << ")";
64 return rawstr.str();
65}
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: