30 #ifndef INCLUDE_UTIL_VFGNODE_H_
31 #define INCLUDE_UTIL_VFGNODE_H_
54 typedef VFGEdge::VFGEdgeSetTy::iterator
iterator;
376 OPVers::const_iterator it =
opVers.find(pos);
377 assert(it!=
opVers.end() &&
"version is nullptr, did not rename?");
451 OPVers::const_iterator it =
opVers.find(pos);
452 assert(it!=
opVers.end() &&
"version is nullptr, did not rename?");
525 OPVers::const_iterator it =
opVers.find(pos);
526 assert(it!=
opVers.end() &&
"version is nullptr, did not rename?");
539 assert(
getOpVerNum()==1 &&
"UnaryNode can only have one operand!");
691 OPVers::const_iterator it =
opVers.find(pos);
692 assert(it!=
opVers.end() &&
"version is nullptr, did not rename?");
764 assert(it!=
opIncomingBBs.end() &&
"version is nullptr, did not rename?");
static bool classof(const ActualParmVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const std::string toString() const override
static bool classof(const SVFBaseNode *node)
ActualParmVFGNode(NodeID id, const PAGNode *n, const CallICFGNode *c)
Constructor.
static bool classof(const GenericVFGNodeTy *node)
const PAGNode * getParam() const
Return parameter.
const CallICFGNode * getCallSite() const
Return callsite.
static bool classof(const ArgumentVFGNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
static bool classof(const VFGNode *node)
const CallICFGNode * getCallSite() const
Return callsite.
static bool classof(const ArgumentVFGNode *node)
ActualRetVFGNode(const ActualRetVFGNode &)
place holder
ActualRetVFGNode(NodeID id, const PAGNode *n, const CallICFGNode *c)
Constructor.
void operator=(const ActualRetVFGNode &)
place holder
const PAGNode * getRev() const
Receive parameter at callsite.
const std::string toString() const override
static bool classof(const GenericVFGNodeTy *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
static bool classof(const ActualRetVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const SVFFunction * getCaller() const
Receive parameter at callsite.
ActualRetVFGNode()
place holder
static bool classof(const SVFBaseNode *node)
static bool classof(const VFGNode *node)
static bool classof(const VFGNode *node)
static bool classof(const StmtVFGNode *node)
static bool classof(const AddrVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const SVFBaseNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const std::string toString() const override
AddrVFGNode(NodeID id, const AddrStmt *edge)
Constructor.
AddrVFGNode(const AddrVFGNode &)
place holder
void operator=(const AddrVFGNode &)
place holder
AddrVFGNode()
place holder
static bool classof(const GenericVFGNodeTy *node)
ArgumentVFGNode(NodeID id, const PAGNode *p, VFGNodeK k)
Constructor.
const std::string toString() const override
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const SVFBaseNode *node)
static bool classof(const ArgumentVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isPTANode() const
Whether this argument node is of pointer type (used for pointer analysis).
const SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
static bool classof(const VFGNode *node)
u32_t getOpVerNum() const
const SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
const PAGNode * getRes() const
BinaryOPVFGNode()
place holder
const PAGNode * getOpVer(u32_t pos) const
Operands at a BinaryNode.
static bool classof(const SVFBaseNode *node)
void operator=(const BinaryOPVFGNode &)
place holder
static bool classof(const BinaryOPVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
void setOpVer(u32_t pos, const PAGNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
Map< u32_t, const PAGNode * > OPVers
static bool classof(const GenericVFGNodeTy *node)
BinaryOPVFGNode(const BinaryOPVFGNode &)
place holder
const std::string toString() const override
OPVers::const_iterator opVerBegin() const
static bool classof(const VFGNode *node)
OPVers::const_iterator opVerEnd() const
BinaryOPVFGNode(NodeID id, const PAGNode *r)
Constructor.
u32_t getNumSuccessors() const
std::vector< std::pair< const ICFGNode *, s32_t > > SuccAndCondPairVec
const ICFGNode * getSuccessor(u32_t i) const
const SuccAndCondPairVec & getSuccessors() const
virtual const std::string toString() const override
BranchVFGNode(NodeID id, const BranchStmt *r)
Constructor.
const BranchStmt::SuccAndCondPairVec & getSuccessors() const
void operator=(const BranchVFGNode &)
place holder
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const SVFBaseNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
static bool classof(const VFGNode *node)
const BranchStmt * brstmt
static bool classof(const BranchVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const BranchStmt * getBranchStmt() const
Return the branch statement.
u32_t getNumSuccessors() const
BranchVFGNode()
place holder
BranchVFGNode(const BranchVFGNode &)
place holder
const ICFGNode * getSuccessor(u32_t i) const
const SVFFunction * getCaller() const
Return callsite.
CmpVFGNode(const CmpVFGNode &)
place holder
Map< u32_t, const PAGNode * > OPVers
static bool classof(const VFGNode *node)
static bool classof(const SVFBaseNode *node)
void setOpVer(u32_t pos, const PAGNode *node)
const PAGNode * getOpVer(u32_t pos) const
Operands at a BinaryNode.
const SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
OPVers::const_iterator opVerBegin() const
const std::string toString() const override
const PAGNode * getRes() const
static bool classof(const CmpVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
u32_t getOpVerNum() const
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
static bool classof(const GenericVFGNodeTy *node)
void operator=(const CmpVFGNode &)
place holder
OPVers::const_iterator opVerEnd() const
CmpVFGNode(NodeID id, const PAGNode *r)
Constructor.
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
CopyVFGNode()
place holder
static bool classof(const GenericVFGNodeTy *node)
void operator=(const CopyVFGNode &)
place holder
CopyVFGNode(const CopyVFGNode &)
place holder
const std::string toString() const override
static bool classof(const CopyVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const VFGNode *node)
CopyVFGNode(NodeID id, const CopyStmt *copy)
Constructor.
static bool classof(const StmtVFGNode *node)
static bool classof(const SVFBaseNode *node)
NodeType * getSrcNode() const
NodeID getSrcID() const
get methods of the components
NodeType * getDstNode() const
GepVFGNode(const GepVFGNode &)
place holder
GepVFGNode(NodeID id, const GepStmt *edge)
Constructor.
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const GepVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const SVFBaseNode *node)
static bool classof(const VFGNode *node)
static bool classof(const StmtVFGNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
void operator=(const GepVFGNode &)
place holder
const std::string toString() const override
virtual const SVFFunction * getFun() const
Return the function of this ICFGNode.
const CallICFGNode * getCallSite() const
static bool classof(const SVFBaseNode *node)
bool isFormalParmPHI() const
const CallICFGNode * callInst
static bool classof(const VFGNode *node)
const SVFFunction * getFun() const override
Get the function of this SVFGNode.
InterPHIVFGNode(NodeID id, const FormalParmVFGNode *fp)
Constructor interPHI for formal parameter.
static bool classof(const PHIVFGNode *node)
bool isActualRetPHI() const
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const InterPHIVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
InterPHIVFGNode(NodeID id, const ActualRetVFGNode *ar)
Constructor interPHI for actual return.
const std::string toString() const override
const std::string toString() const override
static bool classof(const IntraPHIVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const VFGNode *node)
const ICFGNode * getOpIncomingBB(u32_t pos) const
IntraPHIVFGNode(NodeID id, const PAGNode *r)
Constructor.
Map< u32_t, const ICFGNode * > OPIncomingBBs
OPIncomingBBs opIncomingBBs
static bool classof(const GenericVFGNodeTy *node)
void setOpVerAndBB(u32_t pos, const PAGNode *node, const ICFGNode *bb)
static bool classof(const PHIVFGNode *node)
static bool classof(const SVFBaseNode *node)
static bool classof(const SVFBaseNode *node)
static bool classof(const LoadVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const StmtVFGNode *node)
LoadVFGNode(NodeID id, const LoadStmt *edge)
Constructor.
void operator=(const LoadVFGNode &)
place holder
static bool classof(const VFGNode *node)
const std::string toString() const override
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
LoadVFGNode()
place holder
LoadVFGNode(const LoadVFGNode &)
place holder
const PAGNode * getPAGNode() const
Return corresponding PAGNode.
static bool classof(const SVFBaseNode *node)
bool isPTANode() const
Whether this node is of pointer type (used for pointer analysis).
NullPtrVFGNode(NodeID id, const PAGNode *n)
Constructor.
const std::string toString() const override
static bool classof(const VFGNode *node)
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const NullPtrVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
bool isPTANode() const
Whether this phi node is of pointer type (used for pointer analysis).
static bool classof(const GenericVFGNodeTy *node)
OPVers::const_iterator opVerBegin() const
void setOpVer(u32_t pos, const PAGNode *node)
const PAGNode * getOpVer(u32_t pos) const
Operands at a llvm PHINode.
Map< u32_t, const PAGNode * > OPVers
static bool classof(const VFGNode *node)
static bool classof(const PHIVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
static bool classof(const SVFBaseNode *node)
const std::string toString() const override
u32_t getOpVerNum() const
const PAGNode * getRes() const
OPVers::const_iterator opVerEnd() const
PHIVFGNode(NodeID id, const PAGNode *r, VFGNodeK k=TPhi)
Constructor.
const SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
static bool isArgumentVFGNodeKinds(GNodeK n)
static bool isVFGNodeKinds(GNodeK n)
static bool isPHIVFGNodeKinds(GNodeK n)
GNodeK getNodeKind() const
Get node kind.
static bool isStmtVFGNodeKinds(GNodeK n)
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
virtual bool isPointer() const
Whether it is a pointer.
StmtVFGNode(NodeID id, const PAGEdge *e, VFGNodeK k)
Constructor.
NodeID getPAGDstNodeID() const
static bool classof(const VFGNode *node)
const PAGEdge * getPAGEdge() const
static bool classof(const GenericVFGNodeTy *node)
NodeID getPAGSrcNodeID() const
PAGNode * getPAGSrcNode() const
bool isPTANode() const
Whether this node is used for pointer analysis. Both src and dst PAGNodes are of ptr type.
PAGNode * getPAGDstNode() const
const SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
const std::string toString() const override
static bool classof(const StmtVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const SVFBaseNode *node)
static bool classof(const GenericVFGNodeTy *node)
StoreVFGNode(const StoreVFGNode &)
place holder
static bool classof(const VFGNode *node)
static bool classof(const StoreVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
void operator=(const StoreVFGNode &)
place holder
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
StoreVFGNode()
place holder
const std::string toString() const override
static bool classof(const SVFBaseNode *node)
static bool classof(const StmtVFGNode *node)
StoreVFGNode(NodeID id, const StoreStmt *edge)
Constructor.
static bool classof(const UnaryOPVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const VFGNode *node)
const PAGNode * getOpVer(u32_t pos) const
Operands at a UnaryNode.
static bool classof(const GenericVFGNodeTy *node)
void operator=(const UnaryOPVFGNode &)
place holder
void setOpVer(u32_t pos, const PAGNode *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
UnaryOPVFGNode(const UnaryOPVFGNode &)
place holder
OPVers::const_iterator opVerBegin() const
static bool classof(const SVFBaseNode *node)
UnaryOPVFGNode(NodeID id, const PAGNode *r)
Constructor.
virtual const std::string toString() const override
const PAGNode * getOpVar() const
UnaryOPVFGNode()
place holder
const PAGNode * getRes() const
u32_t getOpVerNum() const
OPVers::const_iterator opVerEnd() const
Map< u32_t, const PAGNode * > OPVers
static bool classof(const SVFBaseNode *node)
virtual const std::string toString() const
virtual const ICFGNode * getICFGNode() const
Return corresponding ICFG node.
Set< const RetPE * > RetPESet
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
static bool classof(const GenericVFGNodeTy *node)
Set< const CallPE * > CallPESet
const ICFGNode * icfgNode
VFGNode(NodeID i, VFGNodeK k)
Constructor.
VFGEdge::VFGEdgeSetTy::iterator iterator
virtual void setICFGNode(const ICFGNode *node)
Set corresponding ICFG node.
static bool classof(const VFGNode *)
friend OutStream & operator<<(OutStream &o, const VFGNode &node)
Overloading operator << for dumping ICFG node ID.
virtual const SVFFunction * getFun() const
Get the function of this SVFGNode.
virtual const NodeBS getDefSVFVars() const =0
Return the left hand side SVF Vars.
virtual const SVFValue * getValue() const
Return the corresponding LLVM value, if possible, nullptr otherwise.
GenericNode< VFGNode, VFGEdge > GenericVFGNodeTy
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set