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;
255 const std::string
toString()
const override;
316 const std::string
toString()
const override;
377 const std::string
toString()
const override;
425 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
455 const std::string
toString()
const override;
502 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
530 const std::string
toString()
const override;
576 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
608 virtual const std::string
toString()
const override;
667 virtual const std::string
toString()
const override;
728 const std::string
toString()
const override;
758 assert(
it!=
opVers.end() &&
"version is nullptr, did not rename?");
806 const std::string
toString()
const override;
863 const std::string
toString()
const override;
922 const std::string
toString()
const override;
965 const std::string
toString()
const override;
1020 const std::string
toString()
const override;
1094 const std::string
toString()
const override;
1156 const std::string
toString()
const override;
1226 const std::string
toString()
const override;
1287 const std::string
toString()
const override;
1341 const std::string
toString()
const override;
ActualParmVFGNode(NodeID id, const ValVar *n, const CallICFGNode *c)
Constructor.
static bool classof(const SVFValue *node)
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 GenericVFGNodeTy *node)
const ValVar * 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.
const FunObjVar * getCaller() const
Receive parameter at callsite.
ActualRetVFGNode(const ActualRetVFGNode &)
place holder
void operator=(const ActualRetVFGNode &)
place holder
const std::string toString() const override
ActualRetVFGNode(NodeID id, const ValVar *n, const CallICFGNode *c)
Constructor.
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:
static bool classof(const SVFValue *node)
ActualRetVFGNode()
place holder
const ValVar * getRev() const
Receive parameter at callsite.
static bool classof(const VFGNode *node)
const ValVar * getLHSVar() const
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 SVFValue *node)
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const ValVar * getDstNode() const
const std::string toString() const override
AddrVFGNode(NodeID id, const AddrStmt *edge)
Constructor.
AddrVFGNode(const AddrVFGNode &)
place holder
const ObjVar * getSrcNode() const
void operator=(const AddrVFGNode &)
place holder
AddrVFGNode()
place holder
static bool classof(const GenericVFGNodeTy *node)
const ObjVar * getRHSVar() const
const std::string toString() const override
static bool classof(const SVFValue *node)
static bool classof(const GenericVFGNodeTy *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).
ArgumentVFGNode(NodeID id, const ValVar *p, VFGNodeK k)
Constructor.
static bool classof(const VFGNode *node)
const SVFVar * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
u32_t getOpVerNum() const
BinaryOPVFGNode()
place holder
BinaryOPVFGNode(NodeID id, const ValVar *r)
Constructor.
const ValVar * getOpVer(u32_t pos) const
Operands at a BinaryNode.
void operator=(const BinaryOPVFGNode &)
place holder
static bool classof(const BinaryOPVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const SVFValue *node)
Map< u32_t, const ValVar * > OPVers
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const ValVar * getRes() const
const SVFVar * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
static bool classof(const GenericVFGNodeTy *node)
BinaryOPVFGNode(const BinaryOPVFGNode &)
place holder
void setOpVer(u32_t pos, const ValVar *node)
const std::string toString() const override
OPVers::const_iterator opVerBegin() const
static bool classof(const VFGNode *node)
OPVers::const_iterator opVerEnd() const
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 SVFValue *node)
static bool classof(const GenericVFGNodeTy *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 FunObjVar * getCaller() const
Return callsite.
CmpVFGNode(const CmpVFGNode &)
place holder
static bool classof(const VFGNode *node)
static bool classof(const SVFValue *node)
void setOpVer(u32_t pos, const ValVar *node)
Map< u32_t, const ValVar * > OPVers
OPVers::const_iterator opVerBegin() const
const std::string toString() const override
const ValVar * getOpVer(u32_t pos) const
Operands at a BinaryNode.
static bool classof(const CmpVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
u32_t getOpVerNum() const
const ValVar * getRes() 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
const SVFVar * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
CmpVFGNode(NodeID id, const ValVar *r)
Constructor.
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
CopyVFGNode()
place holder
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const SVFValue *node)
void operator=(const CopyVFGNode &)
place holder
const ValVar * getRHSVar() const
CopyVFGNode(const CopyVFGNode &)
place holder
const ValVar * getDstNode() const
const ValVar * getSrcNode() const
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)
const ValVar * getLHSVar() const
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 SVFValue *node)
const ValVar * getRHSVar() const
static bool classof(const GenericVFGNodeTy *node)
static bool classof(const GepVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const ValVar * getDstNode() const
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 ValVar * getSrcNode() const
const std::string toString() const override
const ValVar * getLHSVar() const
virtual const FunObjVar * getFun() const
Return the function of this ICFGNode.
bool isFormalParmPHI() const
const CallICFGNode * callInst
static bool classof(const VFGNode *node)
static bool classof(const SVFValue *node)
InterPHIVFGNode(NodeID id, const FormalParmVFGNode *fp)
Constructor interPHI for formal parameter.
static bool classof(const PHIVFGNode *node)
const FunObjVar * getFun() const override
Get the function of this SVFGNode.
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)
Map< u32_t, const ICFGNode * > OPIncomingBBs
static bool classof(const SVFValue *node)
OPIncomingBBs opIncomingBBs
static bool classof(const GenericVFGNodeTy *node)
void setOpVerAndBB(u32_t pos, const ValVar *node, const ICFGNode *bb)
static bool classof(const PHIVFGNode *node)
IntraPHIVFGNode(NodeID id, const ValVar *r)
Constructor.
const ValVar * getSrcNode() const
const ValVar * getLHSVar() const
static bool classof(const LoadVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
const ValVar * getRHSVar() const
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 SVFValue *node)
static bool classof(const VFGNode *node)
const std::string toString() const override
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const ValVar * getDstNode() const
LoadVFGNode()
place holder
LoadVFGNode(const LoadVFGNode &)
place holder
static bool classof(const SVFValue *node)
const SVFVar * getSVFVar() const
Return corresponding SVFVar.
bool isPTANode() const
Whether this node is of pointer type (used for pointer analysis).
NullPtrVFGNode(NodeID id, const SVFVar *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
static bool classof(const VFGNode *node)
Map< u32_t, const ValVar * > OPVers
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.
const std::string toString() const override
u32_t getOpVerNum() const
static bool classof(const SVFValue *node)
OPVers::const_iterator opVerEnd() const
const ValVar * getRes() const
const SVFVar * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
const ValVar * getOpVer(u32_t pos) const
Operands at a llvm PHINode.
void setOpVer(u32_t pos, const ValVar *node)
virtual bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
static bool isArgumentVFGNodeKinds(GNodeK n)
GNodeK getNodeKind() const
Get node kind.
static bool isPHIVFGNodeKinds(GNodeK n)
static bool isVFGNodeKinds(GNodeK n)
static bool isStmtVFGNodeKinds(GNodeK n)
virtual bool isPointer() const
Check if this variable represents a pointer.
NodeID getSrcNodeID() const
static bool classof(const VFGNode *node)
SVFVar * getDstNode() const
SVFVar * getSrcNode() const
StmtVFGNode(NodeID id, const SVFStmt *e, VFGNodeK k)
Constructor.
static bool classof(const GenericVFGNodeTy *node)
const SVFVar * getValue() const override
Return the corresponding LLVM value, if possible, nullptr otherwise.
const SVFStmt * getSVFStmt() const
bool isPTANode() const
Whether this node is used for pointer analysis. Both src and dst SVFVars are of ptr type.
const std::string toString() const override
NodeID getDstNodeID() const
static bool classof(const SVFValue *node)
static bool classof(const StmtVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const GenericVFGNodeTy *node)
StoreVFGNode(const StoreVFGNode &)
place holder
static bool classof(const VFGNode *node)
const ValVar * getLHSVar() const
static bool classof(const StoreVFGNode *)
Methods for support type inquiry through isa, cast, and dyn_cast:
void operator=(const StoreVFGNode &)
place holder
const ValVar * getRHSVar() const
const ValVar * getDstNode() const
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 StmtVFGNode *node)
StoreVFGNode(NodeID id, const StoreStmt *edge)
Constructor.
static bool classof(const SVFValue *node)
const ValVar * getSrcNode() const
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
static bool classof(const SVFValue *node)
Map< u32_t, const ValVar * > OPVers
const NodeBS getDefSVFVars() const override
Return the left hand side SVF Vars.
const ValVar * getOpVar() const
const ValVar * getOpVer(u32_t pos) const
Operands at a UnaryNode.
UnaryOPVFGNode(const UnaryOPVFGNode &)
place holder
const ValVar * getRes() const
OPVers::const_iterator opVerBegin() const
virtual const std::string toString() const override
UnaryOPVFGNode(NodeID id, const ValVar *r)
Constructor.
UnaryOPVFGNode()
place holder
u32_t getOpVerNum() const
OPVers::const_iterator opVerEnd() const
void setOpVer(u32_t pos, const ValVar *node)
virtual const std::string toString() const
Set< const RetPE * > RetPESet
virtual const SVFVar * getValue() const
Return the corresponding LLVM value, if possible, nullptr otherwise.
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
static bool classof(const GenericVFGNodeTy *node)
Set< const CallPE * > CallPESet
const ICFGNode * icfgNode
virtual const FunObjVar * getFun() const
Get the function of this SVFGNode.
friend OutStream & operator<<(OutStream &o, const VFGNode &node)
Overloading operator << for dumping ICFG node ID.
VFGNode(NodeID i, VFGNodeK k)
Constructor.
VFGEdge::VFGEdgeSetTy::iterator iterator
static bool classof(const SVFValue *node)
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