|
Static Value-Flow Analysis
|
#include <SVFStatements.h>
Public Types | |
| enum | PEDGEK { Addr , Copy , Store , Load , Call , Ret , Gep , Phi , Select , Cmp , BinaryOp , UnaryOp , Branch , ThreadFork , ThreadJoin } |
| typedef GenericNode< SVFVar, SVFStmt >::GEdgeSetTy | SVFStmtSetTy |
| typedef Map< EdgeID, SVFStmtSetTy > | PAGEdgeToSetMapTy |
| typedef PAGEdgeToSetMapTy | KindToSVFStmtMapTy |
| typedef SVFStmtSetTy | PAGEdgeSetTy |
Public Types inherited from SVF::GenericEdge< NodeTy > | |
| typedef NodeTy | NodeType |
| Node type. | |
| typedef u64_t | GEdgeFlag |
| typedef s64_t | GEdgeKind |
| typedef struct SVF::GenericEdge::equalGEdge | equalGEdge |
| Add the hash function for std::set (we also can overload operator< to implement this) | |
Public Member Functions | |
| SVFStmt (SVFVar *s, SVFVar *d, GEdgeFlag k, bool real=true) | |
| Constructor. | |
| ~SVFStmt () | |
| Destructor. | |
| EdgeID | getEdgeID () const |
| Return Edge ID. | |
| virtual bool | isPTAEdge () const |
| Whether src and dst nodes are both of pointer type. | |
| void | setValue (const SVFVar *val) |
| Get/set methods for llvm instruction. | |
| const SVFVar * | getValue () const |
| void | setBB (const SVFBasicBlock *bb) |
| const SVFBasicBlock * | getBB () const |
| void | setICFGNode (ICFGNode *node) |
| ICFGNode * | getICFGNode () const |
| virtual const std::string | toString () const |
Public Member Functions inherited from SVF::GenericEdge< NodeTy > | |
| GenericEdge (NodeTy *s, NodeTy *d, GEdgeFlag k) | |
| Constructor. | |
| virtual | ~GenericEdge () |
| Destructor. | |
| NodeID | getSrcID () const |
| get methods of the components | |
| NodeID | getDstID () const |
| GEdgeKind | getEdgeKind () const |
| GEdgeKind | getEdgeKindWithoutMask () const |
| NodeType * | getSrcNode () const |
| NodeType * | getDstNode () const |
| virtual bool | operator== (const GenericEdge< NodeType > *rhs) const |
Static Public Member Functions | |
| static bool | classof (const SVFStmt *) |
| ClassOf. | |
| static bool | classof (const GenericPAGEdgeTy *edge) |
| static GEdgeFlag | makeEdgeFlagWithAddionalOpnd (GEdgeKind k, const SVFVar *var) |
| static GEdgeFlag | makeEdgeFlagWithCallInst (GEdgeKind k, const ICFGNode *cs) |
| static GEdgeFlag | makeEdgeFlagWithStoreInst (GEdgeKind k, const ICFGNode *store) |
| static const Inst2LabelMap * | getInst2LabelMap () |
| static const Var2LabelMap * | getVar2LabelMap () |
| static const u64_t * | getCallEdgeLabelCounter () |
| static const u64_t * | getStoreEdgeLabelCounter () |
| static const u64_t * | getMultiOpndLabelCounter () |
Protected Member Functions | |
| SVFStmt (GEdgeFlag k) | |
| Private constructor for reading SVFIR from file without side-effect. | |
| SVFStmt (SVFVar *s, SVFVar *d, GEdgeFlag k, EdgeID eid, SVFVar *value, ICFGNode *icfgNode, bool real=true) | |
| void | setBasicBlock (const SVFBasicBlock *bb) |
| void | setCallEdgeLabelCounter (u64_t counter) |
| void | setStoreEdgeLabelCounter (u64_t counter) |
| void | setMultiOpndLabelCounter (u64_t counter) |
Static Protected Member Functions | |
| static void | addInst2Labeled (const ICFGNode *cs, u32_t label) |
| static void | addVar2Labeled (const SVFVar *var, u32_t label) |
Private Types | |
| typedef Map< const ICFGNode *, u32_t > | Inst2LabelMap |
| typedef Map< const SVFVar *, u32_t > | Var2LabelMap |
Private Attributes | |
| const SVFVar * | value |
| LLVM value. | |
| const SVFBasicBlock * | basicBlock |
| LLVM BasicBlock. | |
| ICFGNode * | icfgNode |
| ICFGNode. | |
| EdgeID | edgeId |
| Edge ID. | |
Static Private Attributes | |
| static Inst2LabelMap | inst2LabelMap |
| Call site Instruction to label map. | |
| static Var2LabelMap | var2LabelMap |
| Second operand of MultiOpndStmt to label map. | |
| static u64_t | callEdgeLabelCounter = 0 |
| Call site Instruction counter. | |
| static u64_t | storeEdgeLabelCounter = 0 |
| Store Instruction counter. | |
| static u64_t | multiOpndLabelCounter = 0 |
| MultiOpndStmt counter. | |
Friends | |
| class | GraphDBClient |
| OutStream & | operator<< (OutStream &o, const SVFStmt &edge) |
| Overloading operator << for dumping SVFVar value. | |
Additional Inherited Members | |
Static Protected Attributes inherited from SVF::GenericEdge< NodeTy > | |
| static constexpr unsigned char | EdgeKindMaskBits = 8 |
| We use the lower 8 bits to denote edge kind. | |
| static constexpr u64_t | EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits) |
Definition at line 52 of file SVFStatements.h.
Definition at line 265 of file SVFStatements.h.
Definition at line 261 of file SVFStatements.h.
Definition at line 262 of file SVFStatements.h.
Definition at line 260 of file SVFStatements.h.
| typedef GenericNode<SVFVar,SVFStmt>::GEdgeSetTy SVF::SVFStmt::SVFStmtSetTy |
Definition at line 259 of file SVFStatements.h.
Definition at line 266 of file SVFStatements.h.
Types of SVFIR statements Gep represents (base + offset) for field sensitivity ThreadFork/ThreadJoin is to model parameter passings between thread spawners and spawnees.
| Enumerator | |
|---|---|
| Addr | |
| Copy | |
| Store | |
| Load | |
| Call | |
| Ret | |
| Gep | |
| Phi | |
| Select | |
| Cmp | |
| BinaryOp | |
| UnaryOp | |
| Branch | |
| ThreadFork | |
| ThreadJoin | |
Definition at line 61 of file SVFStatements.h.
|
inlineprotected |
Private constructor for reading SVFIR from file without side-effect.
Definition at line 88 of file SVFStatements.h.
|
protected |
Definition at line 58 of file SVFStatements.cpp.
Constructor.
SVFStmt constructor
Definition at line 48 of file SVFStatements.cpp.
|
inline |
|
inlinestaticprotected |
Add a call site Instruction to label mapping, this is used when loading statements from DB
Definition at line 130 of file SVFStatements.h.
Definition at line 135 of file SVFStatements.h.
|
inlinestatic |
Definition at line 153 of file SVFStatements.h.
|
inline |
Definition at line 197 of file SVFStatements.h.
Definition at line 284 of file SVFStatements.h.
|
inline |
|
inline |
Definition at line 205 of file SVFStatements.h.
|
inlinestatic |
Definition at line 274 of file SVFStatements.h.
Definition at line 294 of file SVFStatements.h.
Definition at line 289 of file SVFStatements.h.
Definition at line 188 of file SVFStatements.h.
|
inlinestatic |
Definition at line 279 of file SVFStatements.h.
|
virtual |
Whether src and dst nodes are both of pointer type.
Whether src and dst nodes are both pointer type
Reimplemented in SVF::AddrStmt.
Definition at line 71 of file SVFStatements.cpp.
|
inlinestatic |
Compute the unique edgeFlag value from edge kind and second variable operand for MultiOpndStmt.
Definition at line 213 of file SVFStatements.h.
|
inlinestatic |
Compute the unique edgeFlag value from edge kind and call site Instruction.
Definition at line 225 of file SVFStatements.h.
|
inlinestatic |
Compute the unique edgeFlag value from edge kind and store Instruction. Two store instructions may share the same StorePAGEdge
Definition at line 237 of file SVFStatements.h.
|
inlineprotected |
Set the SVF BasicBlock for the new statements, this is used when loading statements from DB
Definition at line 98 of file SVFStatements.h.
|
inline |
Definition at line 193 of file SVFStatements.h.
|
inlineprotected |
set the call edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 106 of file SVFStatements.h.
|
inline |
Definition at line 201 of file SVFStatements.h.
|
inlineprotected |
set the multi operand edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 122 of file SVFStatements.h.
|
inlineprotected |
set the store edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 114 of file SVFStatements.h.
Get/set methods for llvm instruction.
Definition at line 184 of file SVFStatements.h.
|
virtual |
Reimplemented in SVF::GepStmt, SVF::TDForkPE, SVF::TDJoinPE, SVF::AssignStmt, SVF::AddrStmt, SVF::CopyStmt, SVF::StoreStmt, SVF::LoadStmt, SVF::CallPE, SVF::RetPE, SVF::PhiStmt, SVF::SelectStmt, SVF::CmpStmt, SVF::BinaryOPStmt, SVF::UnaryOPStmt, and SVF::BranchStmt.
Definition at line 76 of file SVFStatements.cpp.
Definition at line 54 of file SVFStatements.h.
|
private |
LLVM BasicBlock.
Definition at line 82 of file SVFStatements.h.
|
staticprivate |
Call site Instruction counter.
Definition at line 269 of file SVFStatements.h.
|
private |
Edge ID.
Definition at line 84 of file SVFStatements.h.
|
private |
Definition at line 83 of file SVFStatements.h.
|
staticprivate |
Call site Instruction to label map.
Definition at line 267 of file SVFStatements.h.
|
staticprivate |
MultiOpndStmt counter.
Definition at line 271 of file SVFStatements.h.
|
staticprivate |
Store Instruction counter.
Definition at line 270 of file SVFStatements.h.
LLVM value.
Definition at line 81 of file SVFStatements.h.
|
staticprivate |
Second operand of MultiOpndStmt to label map.
Definition at line 268 of file SVFStatements.h.