30#ifndef INCLUDE_UTIL_VFGNODE_H_
31#define INCLUDE_UTIL_VFGNODE_H_
54 typedef VFGEdge::VFGEdgeSetTy::iterator
iterator;
102 virtual const std::string
toString()
const;
194 const std::string
toString()
const override;
239 const std::string
toString()
const override;
284 const std::string
toString()
const override;
329 const std::string
toString()
const override;
377 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
405 const std::string
toString()
const override;
452 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
480 const std::string
toString()
const override;
526 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
558 virtual const std::string
toString()
const override;
617 virtual const std::string
toString()
const override;
662 const std::string
toString()
const override;
692 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
740 const std::string
toString()
const override;
797 const std::string
toString()
const override;
840 const std::string
toString()
const override;
883 const std::string
toString()
const override;
938 const std::string
toString()
const override;
1012 const std::string
toString()
const override;
1074 const std::string
toString()
const override;
1144 const std::string
toString()
const override;
1205 const std::string
toString()
const override;
1259 const std::string
toString()
const override;
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.
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)
const CallICFGNode * getCallSite() const
Return callsite.
ActualRetVFGNode(const ActualRetVFGNode &)
place holder
ActualRetVFGNode(NodeID id, const PAGNode *n, const CallICFGNode *c)
Constructor.
void operator=(const ActualRetVFGNode &)
place holder
const std::string toString() const override
const SVFFunction * getCaller() const
Receive parameter at callsite.
static bool classof(const GenericVFGNodeTy *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const PAGNode * getRev() const
Receive parameter at callsite.
static bool classof(const ActualRetVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
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.
BinaryOPVFGNode()
place holder
const PAGNode * getOpVer(u32_t pos) const
Operands at a BinaryNode.
static bool classof(const SVFBaseNode *node)
const PAGNode * getRes() const
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
const ICFGNode * getSuccessor(u32_t i) const
std::vector< std::pair< const ICFGNode *, s32_t > > SuccAndCondPairVec
const SuccAndCondPairVec & getSuccessors() const
virtual const std::string toString() const override
const BranchStmt::SuccAndCondPairVec & getSuccessors() const
const BranchStmt * getBranchStmt() const
Return the branch statement.
BranchVFGNode(NodeID id, const BranchStmt *r)
Constructor.
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 ICFGNode * getSuccessor(u32_t i) const
const BranchStmt * brstmt
static bool classof(const BranchVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
u32_t getNumSuccessors() const
BranchVFGNode()
place holder
BranchVFGNode(const BranchVFGNode &)
place holder
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 SVFValue * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
OPVers::const_iterator opVerBegin() const
const PAGNode * getOpVer(u32_t pos) const
Operands at a BinaryNode.
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
NodeType * getDstNode() const
NodeID getSrcID() const
get methods of the components
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.
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 CallICFGNode * getCallSite() const
const std::string toString() const override
const std::string toString() const override
const ICFGNode * getOpIncomingBB(u32_t pos) const
static bool classof(const IntraPHIVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const VFGNode *node)
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
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.
const PAGNode * getPAGNode() const
Return corresponding PAGNode.
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)
Map< u32_t, const PAGNode * > OPVers
static bool classof(const VFGNode *node)
const PAGNode * getRes() const
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
const PAGNode * getOpVer(u32_t pos) const
Operands at a llvm PHINode.
u32_t getOpVerNum() const
OPVers::const_iterator opVerEnd() const
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)
PAGNode * getPAGSrcNode() const
PAGNode * getPAGDstNode() const
static bool classof(const GenericVFGNodeTy *node)
const PAGEdge * getPAGEdge() const
NodeID getPAGSrcNodeID() const
bool isPTANode() const
Whether this node is used for pointer analysis. Both src and dst PAGNodes are of ptr type.
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)
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
const PAGNode * getOpVer(u32_t pos) const
Operands at a UnaryNode.
static bool classof(const SVFBaseNode *node)
UnaryOPVFGNode(NodeID id, const PAGNode *r)
Constructor.
virtual const std::string toString() const override
const PAGNode * getRes() const
const PAGNode * getOpVar() const
UnaryOPVFGNode()
place holder
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 SVFValue * getValue() const
Return the corresponding LLVM value, if possible, nullptr otherwise.
Set< const RetPE * > RetPESet
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
static bool classof(const GenericVFGNodeTy *node)
Set< const CallPE * > CallPESet
const ICFGNode * icfgNode
friend OutStream & operator<<(OutStream &o, const VFGNode &node)
Overloading operator << for dumping ICFG node ID.
VFGNode(NodeID i, VFGNodeK k)
Constructor.
virtual const SVFFunction * getFun() const
Get the function of this SVFGNode.
VFGEdge::VFGEdgeSetTy::iterator iterator
virtual void setICFGNode(const ICFGNode *node)
Set corresponding ICFG node.
static bool classof(const VFGNode *)
virtual const NodeBS getDefSVFVars() const =0
Return the left hand side SVF Vars.
virtual const ICFGNode * getICFGNode() const
Return corresponding ICFG node.
GenericNode< VFGNode, VFGEdge > GenericVFGNodeTy
llvm::IRBuilder IRBuilder