svf-lib 1.0.1369 → 1.0.1371
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/Graphs/GenericGraph.h +4 -4
- package/SVF-osx/include/MTA/MTA.h +2 -2
- package/SVF-osx/include/MTA/MTAResultValidator.h +0 -1
- package/SVF-osx/include/MTA/MTAStat.h +1 -1
- package/SVF-osx/include/SVFIR/SVFStatements.h +23 -34
- package/SVF-osx/include/Util/ExtAPI.h +5 -5
- package/package.json +1 -1
|
Binary file
|
|
@@ -60,9 +60,8 @@ private:
|
|
|
60
60
|
|
|
61
61
|
public:
|
|
62
62
|
/// Constructor
|
|
63
|
-
GenericEdge(NodeTy* s, NodeTy* d, GEdgeFlag k): src(s),dst(d), edgeFlag(k)
|
|
63
|
+
GenericEdge(NodeTy* s, NodeTy* d, GEdgeFlag k) : src(s), dst(d), edgeFlag(k)
|
|
64
64
|
{
|
|
65
|
-
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
/// Destructor
|
|
@@ -116,8 +115,9 @@ public:
|
|
|
116
115
|
|
|
117
116
|
virtual inline bool operator==(const GenericEdge<NodeType>* rhs) const
|
|
118
117
|
{
|
|
119
|
-
return (rhs->edgeFlag == this->edgeFlag &&
|
|
120
|
-
|
|
118
|
+
return (rhs->edgeFlag == this->edgeFlag &&
|
|
119
|
+
rhs->getSrcID() == this->getSrcID() &&
|
|
120
|
+
rhs->getDstID() == this->getDstID());
|
|
121
121
|
}
|
|
122
122
|
//@}
|
|
123
123
|
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
|
|
37
37
|
#include <set>
|
|
38
38
|
#include <vector>
|
|
39
|
-
#include "SVF-LLVM/BasicTypes.h"
|
|
40
39
|
#include "SVFIR/SVFValue.h"
|
|
41
40
|
|
|
42
41
|
namespace SVF
|
|
@@ -77,7 +76,8 @@ public:
|
|
|
77
76
|
/// Perform detection
|
|
78
77
|
virtual void detect(SVFModule* module);
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
// Not implemented for now
|
|
80
|
+
// void dump(Module &module, MHP *mhp, LockAnalysis *lsa);
|
|
81
81
|
|
|
82
82
|
MHP* getMHP()
|
|
83
83
|
{
|
|
@@ -33,12 +33,16 @@
|
|
|
33
33
|
|
|
34
34
|
#include "Graphs/GenericGraph.h"
|
|
35
35
|
#include "MemoryModel/LocationSet.h"
|
|
36
|
-
#include "Graphs/ICFGNode.h"
|
|
37
36
|
|
|
38
37
|
namespace SVF
|
|
39
38
|
{
|
|
40
39
|
|
|
41
40
|
class SVFVar;
|
|
41
|
+
class ICFGNode;
|
|
42
|
+
class IntraICFGNode;
|
|
43
|
+
class CallICFGNode;
|
|
44
|
+
class FunEntryICFGNode;
|
|
45
|
+
class FunExitICFGNode;
|
|
42
46
|
|
|
43
47
|
/*
|
|
44
48
|
* SVFIR program statements (PAGEdges)
|
|
@@ -106,12 +110,9 @@ public:
|
|
|
106
110
|
//@{
|
|
107
111
|
inline const SVFInstruction* getInst() const
|
|
108
112
|
{
|
|
109
|
-
if(const SVFInstruction* i = SVFUtil::dyn_cast<SVFInstruction>(value))
|
|
110
|
-
{
|
|
113
|
+
if (const SVFInstruction* i = SVFUtil::dyn_cast<SVFInstruction>(value))
|
|
111
114
|
return i;
|
|
112
|
-
|
|
113
|
-
else
|
|
114
|
-
return nullptr;
|
|
115
|
+
return nullptr;
|
|
115
116
|
}
|
|
116
117
|
inline void setValue(const SVFValue* val)
|
|
117
118
|
{
|
|
@@ -172,7 +173,7 @@ public:
|
|
|
172
173
|
//@}
|
|
173
174
|
/// Overloading operator << for dumping SVFVar value
|
|
174
175
|
//@{
|
|
175
|
-
friend OutStream& operator<<
|
|
176
|
+
friend OutStream& operator<<(OutStream& o, const SVFStmt& edge)
|
|
176
177
|
{
|
|
177
178
|
o << edge.toString();
|
|
178
179
|
return o;
|
|
@@ -368,10 +369,7 @@ public:
|
|
|
368
369
|
//@}
|
|
369
370
|
|
|
370
371
|
/// constructor
|
|
371
|
-
StoreStmt(SVFVar* s, SVFVar* d, const IntraICFGNode* st)
|
|
372
|
-
AssignStmt(s, d, makeEdgeFlagWithStoreInst(SVFStmt::Store, st))
|
|
373
|
-
{
|
|
374
|
-
}
|
|
372
|
+
StoreStmt(SVFVar* s, SVFVar* d, const IntraICFGNode* st);
|
|
375
373
|
|
|
376
374
|
virtual const std::string toString() const override;
|
|
377
375
|
};
|
|
@@ -514,10 +512,8 @@ public:
|
|
|
514
512
|
//@}
|
|
515
513
|
|
|
516
514
|
/// constructor
|
|
517
|
-
CallPE(SVFVar* s, SVFVar* d, const CallICFGNode* i,
|
|
518
|
-
|
|
519
|
-
{
|
|
520
|
-
}
|
|
515
|
+
CallPE(SVFVar* s, SVFVar* d, const CallICFGNode* i,
|
|
516
|
+
const FunEntryICFGNode* e, GEdgeKind k = SVFStmt::Call);
|
|
521
517
|
|
|
522
518
|
/// Get method for the call instruction
|
|
523
519
|
//@{
|
|
@@ -571,10 +567,8 @@ public:
|
|
|
571
567
|
//@}
|
|
572
568
|
|
|
573
569
|
/// constructor
|
|
574
|
-
RetPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunExitICFGNode* e,
|
|
575
|
-
|
|
576
|
-
{
|
|
577
|
-
}
|
|
570
|
+
RetPE(SVFVar* s, SVFVar* d, const CallICFGNode* i, const FunExitICFGNode* e,
|
|
571
|
+
GEdgeKind k = SVFStmt::Ret);
|
|
578
572
|
|
|
579
573
|
/// Get method for call instruction at caller
|
|
580
574
|
//@{
|
|
@@ -614,9 +608,7 @@ private:
|
|
|
614
608
|
protected:
|
|
615
609
|
OPVars opVars;
|
|
616
610
|
/// Constructor, only used by subclassess but not external users
|
|
617
|
-
MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k)
|
|
618
|
-
{
|
|
619
|
-
}
|
|
611
|
+
MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k);
|
|
620
612
|
public:
|
|
621
613
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
622
614
|
//@{
|
|
@@ -768,10 +760,7 @@ public:
|
|
|
768
760
|
//@}
|
|
769
761
|
|
|
770
762
|
/// constructor
|
|
771
|
-
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond)
|
|
772
|
-
{
|
|
773
|
-
assert(opnds.size()==2 && "SelectStmt can only have two operands!");
|
|
774
|
-
}
|
|
763
|
+
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond);
|
|
775
764
|
virtual const std::string toString() const override;
|
|
776
765
|
|
|
777
766
|
inline const SVFVar* getCondition() const
|
|
@@ -860,10 +849,7 @@ public:
|
|
|
860
849
|
//@}
|
|
861
850
|
|
|
862
851
|
/// constructor
|
|
863
|
-
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre)
|
|
864
|
-
{
|
|
865
|
-
assert(opnds.size()==2 && "CmpStmt can only have two operands!");
|
|
866
|
-
}
|
|
852
|
+
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre);
|
|
867
853
|
|
|
868
854
|
u32_t getPredicate() const
|
|
869
855
|
{
|
|
@@ -914,10 +900,7 @@ public:
|
|
|
914
900
|
//@}
|
|
915
901
|
|
|
916
902
|
/// constructor
|
|
917
|
-
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc)
|
|
918
|
-
{
|
|
919
|
-
assert(opnds.size()==2 && "BinaryOPStmt can only have two operands!");
|
|
920
|
-
}
|
|
903
|
+
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc);
|
|
921
904
|
|
|
922
905
|
u32_t getOpcode() const
|
|
923
906
|
{
|
|
@@ -943,6 +926,12 @@ private:
|
|
|
943
926
|
|
|
944
927
|
u32_t opcode;
|
|
945
928
|
public:
|
|
929
|
+
/// OpCode for UnaryOPStmt, enum value is same to llvm::UnaryOperator
|
|
930
|
+
enum OpCode : unsigned
|
|
931
|
+
{
|
|
932
|
+
FNeg = 12
|
|
933
|
+
};
|
|
934
|
+
|
|
946
935
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
947
936
|
//@{
|
|
948
937
|
static inline bool classof(const UnaryOPStmt *)
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
#include <string>
|
|
37
37
|
#include <map>
|
|
38
38
|
|
|
39
|
-
#define EXTAPI_JSON_PATH "/include/Util/ExtAPI.json"
|
|
39
|
+
#define EXTAPI_JSON_PATH "svf/include/Util/ExtAPI.json"
|
|
40
40
|
#define JSON_OPT_OVERWRITE "overwrite_app_function"
|
|
41
41
|
#define JSON_OPT_FUNCTIONTYPE "type"
|
|
42
42
|
|
|
@@ -256,7 +256,7 @@ public:
|
|
|
256
256
|
std::vector<std::string> operandStr;
|
|
257
257
|
std::vector<NodeID> operands;
|
|
258
258
|
};
|
|
259
|
-
static ExtAPI *getExtAPI(const std::string
|
|
259
|
+
static ExtAPI *getExtAPI(const std::string& = "");
|
|
260
260
|
|
|
261
261
|
static void destory();
|
|
262
262
|
|
|
@@ -264,7 +264,7 @@ public:
|
|
|
264
264
|
void add_entry(const char* funName, extType type, bool overwrite_app_function);
|
|
265
265
|
|
|
266
266
|
// Get numeric index of the argument in external function
|
|
267
|
-
u32_t getArgPos(std::string s);
|
|
267
|
+
u32_t getArgPos(const std::string& s);
|
|
268
268
|
|
|
269
269
|
// return value >= 0 is an argument node
|
|
270
270
|
// return value = -1 is an inst node
|
|
@@ -272,7 +272,7 @@ public:
|
|
|
272
272
|
// return value = -3 is an object node
|
|
273
273
|
// return value = -4 is an offset
|
|
274
274
|
// return value = -5 is an illegal operand format
|
|
275
|
-
s32_t getNodeIDType(std::string s);
|
|
275
|
+
s32_t getNodeIDType(const std::string& s);
|
|
276
276
|
|
|
277
277
|
// Get the corresponding name in ext_t, e.g. "EXT_ADDR" in {"addr", EXT_ADDR},
|
|
278
278
|
std::string get_opName(const std::string& s);
|
|
@@ -336,4 +336,4 @@ public:
|
|
|
336
336
|
};
|
|
337
337
|
} // End namespace SVF
|
|
338
338
|
|
|
339
|
-
#endif
|
|
339
|
+
#endif
|