35 using namespace SVFUtil;
49 GenericPAGEdgeTy(s,d,k),value(nullptr),basicBlock(nullptr),icfgNode(nullptr),edgeId(UINT_MAX)
69 std::stringstream rawstr(str);
70 rawstr <<
"SVFStmt: [Var" <<
getDstID() <<
" <-- Var" <<
getSrcID() <<
"]\t";
77 std::stringstream rawstr(str);
90 std::stringstream rawstr(str);
103 std::stringstream rawstr(str);
104 rawstr <<
"PhiStmt: [Var" <<
getResID() <<
" <-- (";
119 std::stringstream rawstr(str);
122 rawstr << op->getId() <<
",";
135 std::stringstream rawstr(str);
148 std::stringstream rawstr(str);
161 std::stringstream rawstr(str);
174 std::stringstream rawstr(str);
178 rawstr <<
"BranchStmt: [" <<
" Unconditional branch" <<
"]\n";
195 std::stringstream rawstr(str);
208 std::stringstream rawstr(str);
221 std::stringstream rawstr(str);
234 std::stringstream rawstr(str);
247 std::stringstream rawstr(str);
260 std::stringstream rawstr(str);
273 std::stringstream rawstr(str);
307 return SVFUtil::isa<RetPN>(
getRes());
335 :
AssignStmt(s, d, makeEdgeFlagWithCallInst(k, i)), call(i), entry(e)
341 :
AssignStmt(s, d, makeEdgeFlagWithCallInst(k, i)), call(i), exit(e)
346 :
SVFStmt(opnds.at(0), r, k), opVars(opnds)
352 makeEdgeFlagWithAddionalOpnd(
SVFStmt::Cmp, opnds.at(1))),
355 assert(opnds.size() == 2 &&
"CmpStmt can only have two operands!");
360 makeEdgeFlagWithAddionalOpnd(
SVFStmt::Select, opnds.at(1))),
363 assert(opnds.size() == 2 &&
"SelectStmt can only have two operands!");
369 makeEdgeFlagWithAddionalOpnd(
SVFStmt::BinaryOp, opnds.at(1))),
372 assert(opnds.size() == 2 &&
"BinaryOPStmt can only have two operands!");
virtual const std::string toString() const override
NodeID getRHSVarID() const
NodeID getLHSVarID() const
virtual const std::string toString() const override
BinaryOPStmt()
Constructs empty BinaryOPStmt (for SVFIRReader/serialization)
u32_t getNumSuccessors() const
bool isUnconditional() const
The branch is unconditional if cond is a null value.
bool isConditional() const
The branch is conditional if cond is not a null value.
const ICFGNode * getSuccessor(u32_t i) const
const SVFVar * getCondition() const
Return the condition.
virtual const std::string toString() const override
CallPE(const CallPE &)
place holder
virtual const std::string toString() const override
virtual const std::string toString() const override
CmpStmt()
Constructs empty CmpStmt (for SVFIRReader/serialization)
u32_t getPredicate() const
virtual const std::string toString() const override
NodeType * getSrcNode() const
NodeID getSrcID() const
get methods of the components
NodeType * getDstNode() const
u32_t getTotalEdgeNum() const
virtual const std::string toString() const
virtual const std::string toString() const override
const SVFVar * getRes() const
Result SVFVar.
const OPVars & getOpndVars() const
const SVFVar * getOpVar(u32_t pos) const
Operand SVFVars.
NodeID getOpVarID(u32_t pos) const
MultiOpndStmt()
place holder
std::vector< SVFVar * > OPVars
u32_t getOpVarNum() const
static const Option< bool > ShowSVFIRValue
virtual const std::string toString() const override
const ICFGNode * getOpICFGNode(u32_t op_idx) const
Return the corresponding ICFGNode of this operand.
bool isFunctionRetPhi() const
RetPE(const RetPE &)
place holder
virtual const std::string toString() const override
NodeID getId() const
Get ID.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
static u64_t callEdgeLabelCounter
Call site Instruction counter.
static Var2LabelMap var2LabelMap
Second operand of MultiOpndStmt to label map.
SVFStmt(GEdgeFlag k)
Private constructor for reading SVFIR from file without side-effect.
static u64_t storeEdgeLabelCounter
Store Instruction counter.
Map< const ICFGNode *, u32_t > Inst2LabelMap
static u64_t multiOpndLabelCounter
MultiOpndStmt counter.
const SVFValue * getValue() const
static Inst2LabelMap inst2LabelMap
Call site Instruction to label map.
virtual const std::string toString() const
Map< const SVFVar *, u32_t > Var2LabelMap
std::string toString() const
Needs to be implemented by a SVF front end.
virtual const std::string toString() const override
SelectStmt()
Constructs empty SelectStmt (for SVFIRReader/serialization)
const SVFVar * getCondition() const
virtual const std::string toString() const override
StoreStmt()
Constructs empty StoreStmt (for SVFIRReader/serialization)
static SymbolTableInfo * SymbolInfo()
Singleton design here to make sure we only have one instance during any analysis.
SymID nullPtrSymID() const
virtual const std::string toString() const
virtual const std::string toString() const
virtual const std::string toString() const override
NodeID getOpVarID() const
const SVFVar * getRes() const
const SVFVar * getOpVar() const