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

#include <VFGNode.h>

Inheritance diagram for SVF::FormalParmVFGNode:
SVF::ArgumentVFGNode SVF::VFGNode SVF::GenericNode< NodeTy, EdgeTy > SVF::SVFBaseNode

Public Member Functions

 FormalParmVFGNode (NodeID id, const PAGNode *n, const SVFFunction *f)
 Constructor. More...
 
const PAGNodegetParam () const
 Return parameter. More...
 
const SVFFunctiongetFun () const override
 Return function. More...
 
void addCallPE (const CallPE *call)
 Return call edge. More...
 
- Public Member Functions inherited from SVF::ArgumentVFGNode
 ArgumentVFGNode (NodeID id, const PAGNode *p, VFGNodeK k)
 Constructor. More...
 
bool isPTANode () const
 Whether this argument node is of pointer type (used for pointer analysis). More...
 
const SVFValuegetValue () const override
 Return the corresponding LLVM value, if possible, nullptr otherwise. More...
 
- Public Member Functions inherited from SVF::VFGNode
 VFGNode (NodeID i, VFGNodeK k)
 Constructor. More...
 
virtual const ICFGNodegetICFGNode () const
 Return corresponding ICFG node. More...
 
virtual void setICFGNode (const ICFGNode *node)
 Set corresponding ICFG node. More...
 
- Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
 GenericNode (NodeID i, GNodeK k)
 Constructor. More...
 
virtual ~GenericNode ()
 Destructor. More...
 
bool hasIncomingEdge () const
 Has incoming/outgoing edge set. More...
 
bool hasOutgoingEdge () const
 
iterator OutEdgeBegin ()
 iterators More...
 
iterator OutEdgeEnd ()
 
iterator InEdgeBegin ()
 
iterator InEdgeEnd ()
 
const_iterator OutEdgeBegin () const
 
const_iterator OutEdgeEnd () const
 
const_iterator InEdgeBegin () const
 
const_iterator InEdgeEnd () const
 
virtual iterator directOutEdgeBegin ()
 Iterators used for SCC detection, overwrite it in child class if necessary. More...
 
virtual iterator directOutEdgeEnd ()
 
virtual iterator directInEdgeBegin ()
 
virtual iterator directInEdgeEnd ()
 
virtual const_iterator directOutEdgeBegin () const
 
virtual const_iterator directOutEdgeEnd () const
 
virtual const_iterator directInEdgeBegin () const
 
virtual const_iterator directInEdgeEnd () const
 
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges. More...
 
bool addOutgoingEdge (EdgeType *outEdge)
 
EdgeTypehasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges. More...
 
EdgeTypehasOutgoingEdge (EdgeType *edge) const
 
const GEdgeSetTygetOutEdges () const
 
const GEdgeSetTygetInEdges () const
 
u32_t removeIncomingEdge (EdgeType *edge)
 
u32_t removeOutgoingEdge (EdgeType *edge)
 
- Public Member Functions inherited from SVF::SVFBaseNode
 SVFBaseNode (NodeID i, GNodeK k, SVFType *ty=nullptr)
 
NodeID getId () const
 Get ID. More...
 
GNodeK getNodeKind () const
 Get node kind. More...
 
virtual const SVFTypegetType () const
 
virtual void setSourceLoc (const std::string &sourceCodeInfo)
 
virtual const std::string getSourceLoc () const
 
const std::string valueOnlyToString () const
 

Private Attributes

const SVFFunctionfun
 
CallPESet callPEs
 
CallPESet::const_iterator callPEBegin () const
 
CallPESet::const_iterator callPEEnd () const
 
const NodeBS getDefSVFVars () const override
 Return the left hand side SVF Vars. More...
 
const std::string toString () const override
 
static bool classof (const FormalParmVFGNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const VFGNode *node)
 
static bool classof (const ArgumentVFGNode *node)
 
static bool classof (const GenericVFGNodeTy *node)
 
static bool classof (const SVFBaseNode *node)
 

Additional Inherited Members

- Public Types inherited from SVF::VFGNode
typedef GNodeK VFGNodeK
 
typedef VFGEdge::VFGEdgeSetTy::iterator iterator
 
typedef VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
 
typedef Set< const CallPE * > CallPESet
 
typedef Set< const RetPE * > RetPESet
 
- Public Types inherited from SVF::GenericNode< NodeTy, EdgeTy >
typedef NodeTy NodeType
 
typedef EdgeTy EdgeType
 
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 Edge kind. More...
 
typedef GEdgeSetTy::iterator iterator
 
typedef GEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::SVFBaseNode
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , GepValNode ,
  RetNode , VarargNode , DummyValNode , ObjNode ,
  GepObjNode , FIObjNode , DummyObjNode , Cmp ,
  BinaryOp , UnaryOp , Branch , DummyVProp ,
  NPtr , FRet , ARet , AParm ,
  FParm , Addr , Copy , Gep ,
  Store , Load , TPhi , TIntraPhi ,
  TInterPhi , FPIN , FPOUT , APIN ,
  APOUT , MPhi , MIntraPhi , MInterPhi ,
  CallNodeKd , CDNodeKd , CFLNodeKd , CHNodeKd ,
  ConstraintNodeKd , TCTNodeKd , DCHNodeKd , OtherKd
}
 
- Static Public Member Functions inherited from SVF::ArgumentVFGNode
static bool classof (const ArgumentVFGNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const VFGNode *node)
 
static bool classof (const GenericVFGNodeTy *node)
 
static bool classof (const SVFBaseNode *node)
 
- Static Public Member Functions inherited from SVF::VFGNode
static bool classof (const VFGNode *)
 
static bool classof (const GenericVFGNodeTy *node)
 
static bool classof (const SVFBaseNode *node)
 
- Static Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
static bool classof (const GenericNode< NodeTy, EdgeTy > *)
 
static bool classof (const SVFBaseNode *)
 
- Static Protected Member Functions inherited from SVF::SVFBaseNode
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds. More...
 
static bool isInterICFGNodeKind (GNodeK n)
 
static bool isSVFVarKind (GNodeK n)
 
static bool isValVarKinds (GNodeK n)
 
static bool isObjVarKinds (GNodeK n)
 
static bool isVFGNodeKinds (GNodeK n)
 
static bool isArgumentVFGNodeKinds (GNodeK n)
 
static bool isStmtVFGNodeKinds (GNodeK n)
 
static bool isPHIVFGNodeKinds (GNodeK n)
 
static bool isMRSVFGNodeKinds (GNodeK n)
 
static bool isMSSAPHISVFGNodeKinds (GNodeK n)
 
- Protected Attributes inherited from SVF::ArgumentVFGNode
const PAGNodeparam
 
- Protected Attributes inherited from SVF::VFGNode
const ICFGNodeicfgNode
 
- Protected Attributes inherited from SVF::SVFBaseNode
NodeID id
 Node ID. More...
 
GNodeK nodeKind
 Node kind. More...
 
const SVFTypetype
 SVF type. More...
 
std::string sourceLoc
 Source code information of this value. More...
 

Detailed Description

Definition at line 945 of file VFGNode.h.

Constructor & Destructor Documentation

◆ FormalParmVFGNode()

SVF::FormalParmVFGNode::FormalParmVFGNode ( NodeID  id,
const PAGNode n,
const SVFFunction f 
)
inline

Constructor.

Definition at line 953 of file VFGNode.h.

953  :
954  ArgumentVFGNode(id, n, FParm), fun(f)
955  {
956  }
cJSON * n
Definition: cJSON.cpp:2558
ArgumentVFGNode(NodeID id, const PAGNode *p, VFGNodeK k)
Constructor.
Definition: VFGNode.h:852
const SVFFunction * fun
Definition: VFGNode.h:948

Member Function Documentation

◆ addCallPE()

void SVF::FormalParmVFGNode::addCallPE ( const CallPE call)
inline

Return call edge.

Definition at line 970 of file VFGNode.h.

971  {
972  callPEs.insert(call);
973  }

◆ callPEBegin()

CallPESet::const_iterator SVF::FormalParmVFGNode::callPEBegin ( ) const
inline

Call edge iterator

Definition at line 976 of file VFGNode.h.

977  {
978  return callPEs.begin();
979  }

◆ callPEEnd()

CallPESet::const_iterator SVF::FormalParmVFGNode::callPEEnd ( ) const
inline

Definition at line 980 of file VFGNode.h.

981  {
982  return callPEs.end();
983  }

◆ classof() [1/5]

static bool SVF::FormalParmVFGNode::classof ( const ArgumentVFGNode node)
inlinestatic

Definition at line 996 of file VFGNode.h.

997  {
998  return node->getNodeKind() == FParm;
999  }

◆ classof() [2/5]

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

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

Definition at line 988 of file VFGNode.h.

989  {
990  return true;
991  }

◆ classof() [3/5]

static bool SVF::FormalParmVFGNode::classof ( const GenericVFGNodeTy node)
inlinestatic

Definition at line 1000 of file VFGNode.h.

1001  {
1002  return node->getNodeKind() == FParm;
1003  }

◆ classof() [4/5]

static bool SVF::FormalParmVFGNode::classof ( const SVFBaseNode node)
inlinestatic

Definition at line 1004 of file VFGNode.h.

1005  {
1006  return node->getNodeKind() == FParm;
1007  }

◆ classof() [5/5]

static bool SVF::FormalParmVFGNode::classof ( const VFGNode node)
inlinestatic

Definition at line 992 of file VFGNode.h.

993  {
994  return node->getNodeKind() == FParm;
995  }

◆ getDefSVFVars()

const NodeBS FormalParmVFGNode::getDefSVFVars ( ) const
overridevirtual

Return the left hand side SVF Vars.

Implements SVF::VFGNode.

Definition at line 298 of file VFG.cpp.

299 {
300  NodeBS nb;
301  nb.set(getParam()->getId());
302  return nb;
303 }
const PAGNode * getParam() const
Return parameter.
Definition: VFGNode.h:959
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260
void set(unsigned Idx)

◆ getFun()

const SVFFunction* SVF::FormalParmVFGNode::getFun ( ) const
inlineoverridevirtual

Return function.

Reimplemented from SVF::VFGNode.

Definition at line 965 of file VFGNode.h.

966  {
967  return fun;
968  }

◆ getParam()

const PAGNode* SVF::FormalParmVFGNode::getParam ( ) const
inline

Return parameter.

Definition at line 959 of file VFGNode.h.

960  {
961  return param;
962  }
const PAGNode * param
Definition: VFGNode.h:848

◆ toString()

const std::string FormalParmVFGNode::toString ( ) const
overridevirtual

Reimplemented from SVF::ArgumentVFGNode.

Definition at line 305 of file VFG.cpp.

306 {
307  std::string str;
308  std::stringstream rawstr(str);
309  rawstr << "FormalParmVFGNode ID: " << getId() << " ";
310  rawstr << "Fun[" << getFun()->getName() << "]";
311  rawstr << param->toString();
312  return rawstr.str();
313 }
const char *const string
Definition: cJSON.h:172
const SVFFunction * getFun() const override
Return function.
Definition: VFGNode.h:965
const std::string & getName() const
Definition: SVFValue.h:243
virtual const std::string toString() const

Member Data Documentation

◆ callPEs

CallPESet SVF::FormalParmVFGNode::callPEs
private

Definition at line 949 of file VFGNode.h.

◆ fun

const SVFFunction* SVF::FormalParmVFGNode::fun
private

Definition at line 948 of file VFGNode.h.


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