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

#include <ICFGEdge.h>

Inheritance diagram for SVF::CallCFGEdge:
SVF::ICFGEdge SVF::GenericEdge< NodeTy >

Public Member Functions

 CallCFGEdge (ICFGNode *s, ICFGNode *d)
 Constructor. More...
 
void addCallPE (const CallPE *callPE)
 Add call parameter edge to this CallCFGEdge. More...
 
const CallICFGNodegetCallSite () const
 Return call ICFGNode at the callsite. More...
 
const std::vector< const CallPE * > & getCallPEs () const
 Add get parameter edge to this CallCFGEdge. More...
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::ICFGEdge
 ICFGEdge (ICFGNode *s, ICFGNode *d, GEdgeFlag k)
 Constructor. More...
 
 ~ICFGEdge ()
 Destructor. More...
 
bool isCFGEdge () const
 Get methods of the components. More...
 
bool isCallCFGEdge () const
 
bool isRetCFGEdge () const
 
bool isIntraCFGEdge () 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 CallCFGEdge *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const ICFGEdge *edge)
 
static bool classof (const GenericICFGEdgeTy *edge)
 
- Static Public Member Functions inherited from SVF::ICFGEdge
static GEdgeFlag makeEdgeFlagWithInvokeID (GEdgeKind k, CallSiteID cs)
 Compute the unique edgeFlag value from edge kind and CallSiteID. More...
 

Private Attributes

std::vector< const CallPE * > callPEs
 

Friends

class SVFIRWriter
 
class SVFIRReader
 

Additional Inherited Members

- Public Types inherited from SVF::ICFGEdge
enum  ICFGEdgeK { IntraCF , CallCF , RetCF }
 
typedef ICFGEdgeK SVFGEdgeK
 
typedef GenericNode< ICFGNode, ICFGEdge >::GEdgeSetTy ICFGEdgeSetTy
 
typedef ICFGEdgeSetTy 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...
 
- 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

Call ICFG edge representing parameter passing/return from a caller to a callee

Definition at line 182 of file ICFGEdge.h.

Constructor & Destructor Documentation

◆ CallCFGEdge()

SVF::CallCFGEdge::CallCFGEdge ( ICFGNode s,
ICFGNode d 
)
inline

Constructor.

Definition at line 192 of file ICFGEdge.h.

193  : ICFGEdge(s, d, CallCF)
194  {
195  }
ICFGEdge(ICFGNode *s, ICFGNode *d, GEdgeFlag k)
Constructor.
Definition: ICFGEdge.h:64

Member Function Documentation

◆ addCallPE()

void SVF::CallCFGEdge::addCallPE ( const CallPE callPE)
inline

Add call parameter edge to this CallCFGEdge.

Definition at line 197 of file ICFGEdge.h.

198  {
199  callPEs.push_back(callPE);
200  }
std::vector< const CallPE * > callPEs
Definition: ICFGEdge.h:188

◆ classof() [1/3]

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

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 214 of file ICFGEdge.h.

215  {
216  return true;
217  }

◆ classof() [2/3]

static bool SVF::CallCFGEdge::classof ( const GenericICFGEdgeTy edge)
inlinestatic

Definition at line 222 of file ICFGEdge.h.

223  {
224  return edge->getEdgeKind() == CallCF;
225  }

◆ classof() [3/3]

static bool SVF::CallCFGEdge::classof ( const ICFGEdge edge)
inlinestatic

Definition at line 218 of file ICFGEdge.h.

219  {
220  return edge->getEdgeKind() == CallCF;
221  }

◆ getCallPEs()

const std::vector<const CallPE*>& SVF::CallCFGEdge::getCallPEs ( ) const
inline

Add get parameter edge to this CallCFGEdge.

Definition at line 208 of file ICFGEdge.h.

209  {
210  return callPEs;
211  }

◆ getCallSite()

const CallICFGNode* SVF::CallCFGEdge::getCallSite ( ) const
inline

Return call ICFGNode at the callsite.

Definition at line 202 of file ICFGEdge.h.

203  {
204  assert(SVFUtil::isa<CallICFGNode>(getSrcNode()) && "not a CallICFGNode?");
205  return SVFUtil::cast<CallICFGNode>(getSrcNode());
206  }
NodeType * getSrcNode() const
Definition: GenericGraph.h:97

◆ toString()

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

Reimplemented from SVF::ICFGEdge.

Definition at line 177 of file ICFG.cpp.

178 {
179  std::string str;
180  std::stringstream rawstr(str);
181  rawstr << "CallCFGEdge " << " [ICFGNode";
182  rawstr << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t CallSite: " << getSrcNode()->toString() << "\t";
183  return rawstr.str();
184 }
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

Friends And Related Function Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 185 of file ICFGEdge.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 184 of file ICFGEdge.h.

Member Data Documentation

◆ callPEs

std::vector<const CallPE*> SVF::CallCFGEdge::callPEs
private

Definition at line 188 of file ICFGEdge.h.


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