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

#include <ThreadCallGraph.h>

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

Public Types

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

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

Definition at line 44 of file ThreadCallGraph.h.

Member Typedef Documentation

◆ ForkEdgeSet

Definition at line 81 of file ThreadCallGraph.h.

Constructor & Destructor Documentation

◆ ThreadForkEdge()

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

Constructor.

Definition at line 49 of file ThreadCallGraph.h.

49  :
51  {
52  }
PTACallGraphEdge(PTACallGraphNode *s, PTACallGraphNode *d, CEDGEK kind, CallSiteID cs)
Constructor.
Definition: PTACallGraph.h:68

◆ ~ThreadForkEdge()

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

Destructor.

Definition at line 54 of file ThreadCallGraph.h.

55  {
56  }

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 64 of file ThreadCallGraph.h.

65  {
66  return edge->getEdgeKind() == PTACallGraphEdge::TDForkEdge;
67  }

◆ classof() [2/2]

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

ClassOf.

Definition at line 60 of file ThreadCallGraph.h.

61  {
62  return true;
63  }

◆ toString()

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

Reimplemented from SVF::PTACallGraphEdge.

Definition at line 70 of file ThreadCallGraph.h.

71  {
72  std::string str;
73  std::stringstream rawstr(str);
74  rawstr << "ThreadForkEdge ";
75  rawstr << "CallSiteID: " << getCallSiteID();
76  rawstr << " srcNodeID " << getSrcID() << " (fun: " << getSrcNode()->getFunction()->getName() << ")";
77  rawstr << " dstNodeID " << getDstID() << " (fun: " << getDstNode()->getFunction()->getName() << ")";
78  return rawstr.str();
79  }
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: