svf-tools 1.0.908 → 1.0.910
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-doxygen/html/AbstractInterpretation_8cpp_source.html +1549 -1576
- package/SVF-doxygen/html/AbstractInterpretation_8h_source.html +68 -75
- package/SVF-doxygen/html/AbstractState_8cpp_source.html +25 -25
- package/SVF-doxygen/html/AbstractState_8h_source.html +390 -391
- package/SVF-doxygen/html/BufOverflowChecker_8cpp_source.html +15 -15
- package/SVF-doxygen/html/RelExeState_8cpp_source.html +5 -5
- package/SVF-doxygen/html/RelExeState_8h_source.html +178 -179
- package/SVF-doxygen/html/RelationSolver_8cpp_source.html +3 -3
- package/SVF-doxygen/html/SVFIR2AbsState_8cpp_source.html +10 -10
- package/SVF-doxygen/html/SVFIR2AbsState_8h_source.html +12 -17
- package/SVF-doxygen/html/ae_8cpp_source.html +3 -3
- package/SVF-doxygen/html/classSVF_1_1AEStat.html +115 -115
- package/SVF-doxygen/html/classSVF_1_1AbstractInterpretation-members.html +7 -9
- package/SVF-doxygen/html/classSVF_1_1AbstractInterpretation.html +1435 -1521
- package/SVF-doxygen/html/classSVF_1_1AbstractState-members.html +25 -25
- package/SVF-doxygen/html/classSVF_1_1AbstractState.html +340 -342
- package/SVF-doxygen/html/classSVF_1_1BufOverflowChecker-members.html +7 -9
- package/SVF-doxygen/html/classSVF_1_1BufOverflowChecker.html +20 -10
- package/SVF-doxygen/html/classSVF_1_1RelExeState-members.html +19 -19
- package/SVF-doxygen/html/classSVF_1_1RelExeState.html +131 -132
- package/SVF-doxygen/html/classSVF_1_1RelationSolver.html +3 -3
- package/SVF-doxygen/html/classSVF_1_1SVFIR2AbsState-members.html +22 -24
- package/SVF-doxygen/html/classSVF_1_1SVFIR2AbsState.html +23 -91
- package/SVF-doxygen/html/classSymblicAbstractionTest.html +2 -2
- package/SVF-doxygen/html/functions.html +6 -9
- package/SVF-doxygen/html/functions_a.html +9 -3
- package/SVF-doxygen/html/functions_f.html +3 -3
- package/SVF-doxygen/html/functions_func.html +1 -1
- package/SVF-doxygen/html/functions_func_g.html +9 -9
- package/SVF-doxygen/html/functions_func_i.html +7 -13
- package/SVF-doxygen/html/functions_func_p.html +3 -3
- package/SVF-doxygen/html/functions_g.html +10 -10
- package/SVF-doxygen/html/functions_i.html +12 -18
- package/SVF-doxygen/html/functions_l.html +3 -9
- package/SVF-doxygen/html/functions_o.html +17 -17
- package/SVF-doxygen/html/functions_p.html +18 -22
- package/SVF-doxygen/html/functions_r.html +1 -1
- package/SVF-doxygen/html/functions_s.html +12 -14
- package/SVF-doxygen/html/functions_t.html +2 -2
- package/SVF-doxygen/html/functions_type.html +6 -0
- package/SVF-doxygen/html/functions_type_l.html +0 -6
- package/SVF-doxygen/html/functions_v.html +3 -3
- package/SVF-doxygen/html/functions_vars.html +6 -9
- package/SVF-doxygen/html/functions_w.html +1 -1
- package/SVF-doxygen/html/search/all_0.js +167 -168
- package/SVF-doxygen/html/search/all_1.js +504 -502
- package/SVF-doxygen/html/search/all_10.js +326 -326
- package/SVF-doxygen/html/search/all_11.js +227 -227
- package/SVF-doxygen/html/search/all_12.js +562 -562
- package/SVF-doxygen/html/search/all_13.js +186 -186
- package/SVF-doxygen/html/search/all_14.js +74 -74
- package/SVF-doxygen/html/search/all_15.js +175 -175
- package/SVF-doxygen/html/search/all_16.js +77 -77
- package/SVF-doxygen/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/search/all_18.js +1 -1
- package/SVF-doxygen/html/search/all_19.js +27 -27
- package/SVF-doxygen/html/search/all_1a.js +174 -174
- package/SVF-doxygen/html/search/all_2.js +180 -180
- package/SVF-doxygen/html/search/all_3.js +635 -635
- package/SVF-doxygen/html/search/all_4.js +237 -237
- package/SVF-doxygen/html/search/all_5.js +120 -120
- package/SVF-doxygen/html/search/all_6.js +236 -236
- package/SVF-doxygen/html/search/all_7.js +1039 -1039
- package/SVF-doxygen/html/search/all_8.js +224 -224
- package/SVF-doxygen/html/search/all_9.js +623 -625
- package/SVF-doxygen/html/search/all_a.js +46 -46
- package/SVF-doxygen/html/search/all_b.js +24 -24
- package/SVF-doxygen/html/search/all_c.js +111 -113
- package/SVF-doxygen/html/search/all_d.js +204 -204
- package/SVF-doxygen/html/search/all_e.js +207 -207
- package/SVF-doxygen/html/search/all_f.js +122 -122
- package/SVF-doxygen/html/search/classes_0.js +29 -29
- package/SVF-doxygen/html/search/classes_1.js +11 -11
- package/SVF-doxygen/html/search/classes_10.js +71 -71
- package/SVF-doxygen/html/search/classes_11.js +14 -14
- package/SVF-doxygen/html/search/classes_12.js +2 -2
- package/SVF-doxygen/html/search/classes_13.js +10 -10
- package/SVF-doxygen/html/search/classes_14.js +19 -19
- package/SVF-doxygen/html/search/classes_15.js +1 -1
- package/SVF-doxygen/html/search/classes_2.js +72 -72
- package/SVF-doxygen/html/search/classes_3.js +35 -35
- package/SVF-doxygen/html/search/classes_4.js +7 -7
- package/SVF-doxygen/html/search/classes_5.js +28 -28
- package/SVF-doxygen/html/search/classes_6.js +98 -98
- package/SVF-doxygen/html/search/classes_7.js +33 -33
- package/SVF-doxygen/html/search/classes_8.js +57 -57
- package/SVF-doxygen/html/search/classes_9.js +1 -1
- package/SVF-doxygen/html/search/classes_a.js +12 -12
- package/SVF-doxygen/html/search/classes_b.js +29 -29
- package/SVF-doxygen/html/search/classes_c.js +6 -6
- package/SVF-doxygen/html/search/classes_d.js +19 -19
- package/SVF-doxygen/html/search/classes_e.js +36 -36
- package/SVF-doxygen/html/search/classes_f.js +25 -25
- package/SVF-doxygen/html/search/defines_0.js +3 -3
- package/SVF-doxygen/html/search/defines_1.js +3 -3
- package/SVF-doxygen/html/search/defines_10.js +2 -2
- package/SVF-doxygen/html/search/defines_2.js +30 -30
- package/SVF-doxygen/html/search/defines_3.js +20 -20
- package/SVF-doxygen/html/search/defines_4.js +3 -3
- package/SVF-doxygen/html/search/defines_5.js +4 -4
- package/SVF-doxygen/html/search/defines_6.js +2 -2
- package/SVF-doxygen/html/search/defines_7.js +5 -5
- package/SVF-doxygen/html/search/defines_8.js +11 -11
- package/SVF-doxygen/html/search/defines_9.js +9 -9
- package/SVF-doxygen/html/search/defines_a.js +2 -2
- package/SVF-doxygen/html/search/defines_b.js +1 -1
- package/SVF-doxygen/html/search/defines_c.js +3 -3
- package/SVF-doxygen/html/search/defines_d.js +2 -2
- package/SVF-doxygen/html/search/defines_e.js +8 -8
- package/SVF-doxygen/html/search/defines_f.js +4 -4
- package/SVF-doxygen/html/search/enums_0.js +3 -3
- package/SVF-doxygen/html/search/enums_1.js +2 -2
- package/SVF-doxygen/html/search/enums_10.js +1 -1
- package/SVF-doxygen/html/search/enums_11.js +1 -1
- package/SVF-doxygen/html/search/enums_2.js +9 -9
- package/SVF-doxygen/html/search/enums_3.js +2 -2
- package/SVF-doxygen/html/search/enums_4.js +3 -3
- package/SVF-doxygen/html/search/enums_5.js +1 -1
- package/SVF-doxygen/html/search/enums_6.js +2 -2
- package/SVF-doxygen/html/search/enums_7.js +2 -2
- package/SVF-doxygen/html/search/enums_8.js +4 -4
- package/SVF-doxygen/html/search/enums_9.js +1 -1
- package/SVF-doxygen/html/search/enums_a.js +1 -1
- package/SVF-doxygen/html/search/enums_b.js +7 -7
- package/SVF-doxygen/html/search/enums_c.js +1 -1
- package/SVF-doxygen/html/search/enums_d.js +4 -4
- package/SVF-doxygen/html/search/enums_e.js +2 -2
- package/SVF-doxygen/html/search/enums_f.js +4 -4
- package/SVF-doxygen/html/search/enumvalues_0.js +15 -15
- package/SVF-doxygen/html/search/enumvalues_1.js +16 -16
- package/SVF-doxygen/html/search/enumvalues_10.js +36 -36
- package/SVF-doxygen/html/search/enumvalues_11.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_12.js +10 -10
- package/SVF-doxygen/html/search/enumvalues_13.js +1 -1
- package/SVF-doxygen/html/search/enumvalues_14.js +1 -1
- package/SVF-doxygen/html/search/enumvalues_15.js +4 -4
- package/SVF-doxygen/html/search/enumvalues_2.js +36 -36
- package/SVF-doxygen/html/search/enumvalues_3.js +13 -13
- package/SVF-doxygen/html/search/enumvalues_4.js +2 -2
- package/SVF-doxygen/html/search/enumvalues_5.js +50 -50
- package/SVF-doxygen/html/search/enumvalues_6.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_7.js +8 -8
- package/SVF-doxygen/html/search/enumvalues_8.js +24 -24
- package/SVF-doxygen/html/search/enumvalues_9.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_a.js +17 -17
- package/SVF-doxygen/html/search/enumvalues_b.js +11 -11
- package/SVF-doxygen/html/search/enumvalues_c.js +5 -5
- package/SVF-doxygen/html/search/enumvalues_d.js +19 -19
- package/SVF-doxygen/html/search/enumvalues_e.js +9 -9
- package/SVF-doxygen/html/search/enumvalues_f.js +48 -48
- package/SVF-doxygen/html/search/files_0.js +18 -18
- package/SVF-doxygen/html/search/files_1.js +9 -9
- package/SVF-doxygen/html/search/files_10.js +8 -8
- package/SVF-doxygen/html/search/files_11.js +8 -8
- package/SVF-doxygen/html/search/files_12.js +2 -2
- package/SVF-doxygen/html/search/files_2.js +51 -51
- package/SVF-doxygen/html/search/files_3.js +14 -14
- package/SVF-doxygen/html/search/files_4.js +3 -3
- package/SVF-doxygen/html/search/files_5.js +13 -13
- package/SVF-doxygen/html/search/files_6.js +10 -10
- package/SVF-doxygen/html/search/files_7.js +15 -15
- package/SVF-doxygen/html/search/files_8.js +13 -13
- package/SVF-doxygen/html/search/files_9.js +18 -18
- package/SVF-doxygen/html/search/files_a.js +3 -3
- package/SVF-doxygen/html/search/files_b.js +4 -4
- package/SVF-doxygen/html/search/files_c.js +20 -20
- package/SVF-doxygen/html/search/files_d.js +4 -4
- package/SVF-doxygen/html/search/files_e.js +57 -57
- package/SVF-doxygen/html/search/files_f.js +8 -8
- package/SVF-doxygen/html/search/functions_0.js +13 -13
- package/SVF-doxygen/html/search/functions_1.js +366 -366
- package/SVF-doxygen/html/search/functions_10.js +140 -140
- package/SVF-doxygen/html/search/functions_11.js +140 -140
- package/SVF-doxygen/html/search/functions_12.js +293 -293
- package/SVF-doxygen/html/search/functions_13.js +52 -52
- package/SVF-doxygen/html/search/functions_14.js +41 -41
- package/SVF-doxygen/html/search/functions_15.js +70 -70
- package/SVF-doxygen/html/search/functions_16.js +38 -38
- package/SVF-doxygen/html/search/functions_17.js +3 -3
- package/SVF-doxygen/html/search/functions_18.js +174 -174
- package/SVF-doxygen/html/search/functions_2.js +92 -92
- package/SVF-doxygen/html/search/functions_3.js +257 -257
- package/SVF-doxygen/html/search/functions_4.js +85 -85
- package/SVF-doxygen/html/search/functions_5.js +54 -54
- package/SVF-doxygen/html/search/functions_6.js +65 -65
- package/SVF-doxygen/html/search/functions_7.js +857 -857
- package/SVF-doxygen/html/search/functions_8.js +176 -176
- package/SVF-doxygen/html/search/functions_9.js +436 -438
- package/SVF-doxygen/html/search/functions_a.js +30 -30
- package/SVF-doxygen/html/search/functions_b.js +2 -2
- package/SVF-doxygen/html/search/functions_c.js +22 -22
- package/SVF-doxygen/html/search/functions_d.js +81 -81
- package/SVF-doxygen/html/search/functions_e.js +34 -34
- package/SVF-doxygen/html/search/functions_f.js +58 -58
- package/SVF-doxygen/html/search/namespaces_0.js +1 -1
- package/SVF-doxygen/html/search/namespaces_1.js +7 -7
- package/SVF-doxygen/html/search/related_0.js +4 -4
- package/SVF-doxygen/html/search/related_1.js +2 -2
- package/SVF-doxygen/html/search/related_2.js +2 -2
- package/SVF-doxygen/html/search/related_3.js +2 -2
- package/SVF-doxygen/html/search/related_4.js +2 -2
- package/SVF-doxygen/html/search/related_5.js +1 -1
- package/SVF-doxygen/html/search/related_6.js +2 -2
- package/SVF-doxygen/html/search/related_7.js +5 -5
- package/SVF-doxygen/html/search/related_8.js +2 -2
- package/SVF-doxygen/html/search/related_9.js +4 -4
- package/SVF-doxygen/html/search/related_a.js +19 -19
- package/SVF-doxygen/html/search/related_b.js +4 -4
- package/SVF-doxygen/html/search/related_c.js +2 -2
- package/SVF-doxygen/html/search/related_d.js +11 -11
- package/SVF-doxygen/html/search/related_e.js +2 -2
- package/SVF-doxygen/html/search/related_f.js +2 -2
- package/SVF-doxygen/html/search/typedefs_0.js +20 -18
- package/SVF-doxygen/html/search/typedefs_1.js +27 -27
- package/SVF-doxygen/html/search/typedefs_10.js +65 -65
- package/SVF-doxygen/html/search/typedefs_11.js +12 -12
- package/SVF-doxygen/html/search/typedefs_12.js +13 -13
- package/SVF-doxygen/html/search/typedefs_13.js +40 -40
- package/SVF-doxygen/html/search/typedefs_14.js +11 -11
- package/SVF-doxygen/html/search/typedefs_2.js +125 -125
- package/SVF-doxygen/html/search/typedefs_3.js +39 -39
- package/SVF-doxygen/html/search/typedefs_4.js +17 -17
- package/SVF-doxygen/html/search/typedefs_5.js +42 -42
- package/SVF-doxygen/html/search/typedefs_6.js +54 -54
- package/SVF-doxygen/html/search/typedefs_7.js +47 -47
- package/SVF-doxygen/html/search/typedefs_8.js +1 -1
- package/SVF-doxygen/html/search/typedefs_9.js +4 -4
- package/SVF-doxygen/html/search/typedefs_a.js +28 -30
- package/SVF-doxygen/html/search/typedefs_b.js +29 -29
- package/SVF-doxygen/html/search/typedefs_c.js +41 -41
- package/SVF-doxygen/html/search/typedefs_d.js +15 -15
- package/SVF-doxygen/html/search/typedefs_e.js +52 -52
- package/SVF-doxygen/html/search/typedefs_f.js +14 -14
- package/SVF-doxygen/html/search/variables_0.js +170 -171
- package/SVF-doxygen/html/search/variables_1.js +78 -78
- package/SVF-doxygen/html/search/variables_10.js +98 -98
- package/SVF-doxygen/html/search/variables_11.js +47 -47
- package/SVF-doxygen/html/search/variables_12.js +93 -93
- package/SVF-doxygen/html/search/variables_13.js +76 -76
- package/SVF-doxygen/html/search/variables_14.js +14 -14
- package/SVF-doxygen/html/search/variables_15.js +49 -49
- package/SVF-doxygen/html/search/variables_16.js +11 -11
- package/SVF-doxygen/html/search/variables_17.js +1 -1
- package/SVF-doxygen/html/search/variables_18.js +17 -17
- package/SVF-doxygen/html/search/variables_2.js +40 -40
- package/SVF-doxygen/html/search/variables_3.js +143 -143
- package/SVF-doxygen/html/search/variables_4.js +51 -51
- package/SVF-doxygen/html/search/variables_5.js +39 -39
- package/SVF-doxygen/html/search/variables_6.js +66 -66
- package/SVF-doxygen/html/search/variables_7.js +32 -32
- package/SVF-doxygen/html/search/variables_8.js +8 -8
- package/SVF-doxygen/html/search/variables_9.js +80 -80
- package/SVF-doxygen/html/search/variables_a.js +4 -4
- package/SVF-doxygen/html/search/variables_b.js +10 -10
- package/SVF-doxygen/html/search/variables_c.js +44 -44
- package/SVF-doxygen/html/search/variables_d.js +58 -58
- package/SVF-doxygen/html/search/variables_e.js +123 -123
- package/SVF-doxygen/html/search/variables_f.js +31 -31
- package/SVF-doxygen/html/structstd_1_1hash_3_01SVF_1_1RelExeState_01_4.html +6 -6
- package/package.json +1 -1
- package/svf/include/AE/Core/AbstractState.h +23 -24
- package/svf/include/AE/Core/RelExeState.h +10 -11
- package/svf/include/AE/Svfexe/AbstractInterpretation.h +4 -9
- package/svf/include/AE/Svfexe/SVFIR2AbsState.h +0 -3
- package/svf/lib/AE/Core/AbstractState.cpp +22 -22
- package/svf/lib/AE/Core/RelExeState.cpp +3 -3
- package/svf/lib/AE/Svfexe/AbstractInterpretation.cpp +3 -27
- package/svf/lib/AE/Svfexe/SVFIR2AbsState.cpp +8 -8
|
@@ -42,19 +42,18 @@ class RelExeState
|
|
|
42
42
|
|
|
43
43
|
public:
|
|
44
44
|
typedef Map<u32_t, Z3Expr> VarToValMap;
|
|
45
|
-
typedef VarToValMap
|
|
45
|
+
typedef VarToValMap AddrToValMap;
|
|
46
46
|
|
|
47
47
|
protected:
|
|
48
48
|
VarToValMap _varToVal;
|
|
49
|
-
|
|
49
|
+
AddrToValMap _addrToVal;
|
|
50
50
|
|
|
51
51
|
public:
|
|
52
52
|
RelExeState() = default;
|
|
53
53
|
|
|
54
|
-
RelExeState(VarToValMap &varToVal,
|
|
55
|
-
_locToVal(locToVal) {}
|
|
54
|
+
RelExeState(VarToValMap &varToVal, AddrToValMap&locToVal) : _varToVal(varToVal), _addrToVal(locToVal) {}
|
|
56
55
|
|
|
57
|
-
RelExeState(const RelExeState &rhs) : _varToVal(rhs.getVarToVal()),
|
|
56
|
+
RelExeState(const RelExeState &rhs) : _varToVal(rhs.getVarToVal()), _addrToVal(rhs.getLocToVal())
|
|
58
57
|
{
|
|
59
58
|
|
|
60
59
|
}
|
|
@@ -64,7 +63,7 @@ public:
|
|
|
64
63
|
RelExeState &operator=(const RelExeState &rhs);
|
|
65
64
|
|
|
66
65
|
RelExeState(RelExeState &&rhs) noexcept: _varToVal(std::move(rhs._varToVal)),
|
|
67
|
-
|
|
66
|
+
_addrToVal(std::move(rhs._addrToVal))
|
|
68
67
|
{
|
|
69
68
|
|
|
70
69
|
}
|
|
@@ -74,7 +73,7 @@ public:
|
|
|
74
73
|
if (&rhs != this)
|
|
75
74
|
{
|
|
76
75
|
_varToVal = std::move(rhs._varToVal);
|
|
77
|
-
|
|
76
|
+
_addrToVal = std::move(rhs._addrToVal);
|
|
78
77
|
}
|
|
79
78
|
return *this;
|
|
80
79
|
}
|
|
@@ -102,9 +101,9 @@ public:
|
|
|
102
101
|
return _varToVal;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
const
|
|
104
|
+
const AddrToValMap&getLocToVal() const
|
|
106
105
|
{
|
|
107
|
-
return
|
|
106
|
+
return _addrToVal;
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
inline Z3Expr &operator[](u32_t varId)
|
|
@@ -203,12 +202,12 @@ private:
|
|
|
203
202
|
protected:
|
|
204
203
|
inline void store(u32_t objId, const Z3Expr &z3Expr)
|
|
205
204
|
{
|
|
206
|
-
|
|
205
|
+
_addrToVal[objId] = z3Expr.simplify();
|
|
207
206
|
}
|
|
208
207
|
|
|
209
208
|
inline Z3Expr &load(u32_t objId)
|
|
210
209
|
{
|
|
211
|
-
return
|
|
210
|
+
return _addrToVal[objId];
|
|
212
211
|
}
|
|
213
212
|
}; // end class RelExeState
|
|
214
213
|
} // end namespace SVF
|
|
@@ -143,10 +143,10 @@ protected:
|
|
|
143
143
|
/**
|
|
144
144
|
* Check if execution state exist by merging states of predecessor nodes
|
|
145
145
|
*
|
|
146
|
-
* @param
|
|
146
|
+
* @param curNode The ICFGNode to analyse
|
|
147
147
|
* @return if this node has preceding execution state
|
|
148
148
|
*/
|
|
149
|
-
bool
|
|
149
|
+
bool propagateStateIfFeasible(const ICFGNode* curNode);
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Check if execution state exist at the branch edge
|
|
@@ -161,7 +161,7 @@ protected:
|
|
|
161
161
|
*
|
|
162
162
|
* @param block basic block that has a series of instructions
|
|
163
163
|
*/
|
|
164
|
-
void handleWTONode(const ICFGNode* node);
|
|
164
|
+
virtual void handleWTONode(const ICFGNode* node);
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* handle one instruction in ICFGNode
|
|
@@ -368,10 +368,7 @@ private:
|
|
|
368
368
|
virtual bool isIndirectCall(const CallICFGNode* callNode);
|
|
369
369
|
virtual void indirectCallFunPass(const CallICFGNode* callNode);
|
|
370
370
|
|
|
371
|
-
|
|
372
|
-
bool isFunEntry(const ICFGNode* node);
|
|
373
|
-
bool isGlobalEntry(const ICFGNode* node);
|
|
374
|
-
|
|
371
|
+
protected:
|
|
375
372
|
// helper functions in handleCycle
|
|
376
373
|
bool widenFixpointPass(const ICFGNode* cycle_head,
|
|
377
374
|
AbstractState& pre_es);
|
|
@@ -383,8 +380,6 @@ protected:
|
|
|
383
380
|
Map<std::string, std::function<void(const CallSite &)>> _func_map;
|
|
384
381
|
Set<const CallICFGNode*> _checkpoints;
|
|
385
382
|
Set<std::string> _checkpoint_names;
|
|
386
|
-
|
|
387
|
-
private:
|
|
388
383
|
Map<const ICFGNode*, AbstractState> _preAbstractTrace;
|
|
389
384
|
Map<const ICFGNode*, AbstractState> _postAbstractTrace;
|
|
390
385
|
std::string _moduleName;
|
|
@@ -66,12 +66,12 @@ AbstractState AbstractState::widening(const AbstractState& other)
|
|
|
66
66
|
if (it->second.isInterval() && other._varToAbsVal.at(key).isInterval())
|
|
67
67
|
it->second.getInterval().widen_with(other._varToAbsVal.at(key).getInterval());
|
|
68
68
|
}
|
|
69
|
-
for (auto it = es.
|
|
69
|
+
for (auto it = es._addrToAbsVal.begin(); it != es._addrToAbsVal.end(); ++it)
|
|
70
70
|
{
|
|
71
71
|
auto key = it->first;
|
|
72
|
-
if (other.
|
|
73
|
-
if (it->second.isInterval() && other.
|
|
74
|
-
it->second.getInterval().widen_with(other.
|
|
72
|
+
if (other._addrToAbsVal.find(key) != other._addrToAbsVal.end())
|
|
73
|
+
if (it->second.isInterval() && other._addrToAbsVal.at(key).isInterval())
|
|
74
|
+
it->second.getInterval().widen_with(other._addrToAbsVal.at(key).getInterval());
|
|
75
75
|
}
|
|
76
76
|
return es;
|
|
77
77
|
}
|
|
@@ -86,12 +86,12 @@ AbstractState AbstractState::narrowing(const AbstractState& other)
|
|
|
86
86
|
if (it->second.isInterval() && other._varToAbsVal.at(key).isInterval())
|
|
87
87
|
it->second.getInterval().narrow_with(other._varToAbsVal.at(key).getInterval());
|
|
88
88
|
}
|
|
89
|
-
for (auto it = es.
|
|
89
|
+
for (auto it = es._addrToAbsVal.begin(); it != es._addrToAbsVal.end(); ++it)
|
|
90
90
|
{
|
|
91
91
|
auto key = it->first;
|
|
92
|
-
if (other.
|
|
93
|
-
if (it->second.isInterval() && other.
|
|
94
|
-
it->second.getInterval().narrow_with(other.
|
|
92
|
+
if (other._addrToAbsVal.find(key) != other._addrToAbsVal.end())
|
|
93
|
+
if (it->second.isInterval() && other._addrToAbsVal.at(key).isInterval())
|
|
94
|
+
it->second.getInterval().narrow_with(other._addrToAbsVal.at(key).getInterval());
|
|
95
95
|
}
|
|
96
96
|
return es;
|
|
97
97
|
|
|
@@ -107,12 +107,12 @@ void AbstractState::widenWith(const AbstractState& other)
|
|
|
107
107
|
if (it->second.isInterval() && other._varToAbsVal.at(key).isInterval())
|
|
108
108
|
it->second.getInterval().widen_with(other._varToAbsVal.at(key).getInterval());
|
|
109
109
|
}
|
|
110
|
-
for (auto it =
|
|
110
|
+
for (auto it = _addrToAbsVal.begin(); it != _addrToAbsVal.end(); ++it)
|
|
111
111
|
{
|
|
112
112
|
auto key = it->first;
|
|
113
|
-
if (other.
|
|
113
|
+
if (other._addrToAbsVal.find(key) != other._addrToAbsVal.end())
|
|
114
114
|
if (it->second.isInterval() && other._varToAbsVal.at(key).isInterval())
|
|
115
|
-
it->second.getInterval().widen_with(other.
|
|
115
|
+
it->second.getInterval().widen_with(other._addrToAbsVal.at(key).getInterval());
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -143,11 +143,11 @@ void AbstractState::joinWith(const AbstractState& other)
|
|
|
143
143
|
_varToAbsVal.emplace(key, it->second);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
for (auto it = other.
|
|
146
|
+
for (auto it = other._addrToAbsVal.begin(); it != other._addrToAbsVal.end(); ++it)
|
|
147
147
|
{
|
|
148
148
|
auto key = it->first;
|
|
149
|
-
auto oit =
|
|
150
|
-
if (oit !=
|
|
149
|
+
auto oit = _addrToAbsVal.find(key);
|
|
150
|
+
if (oit != _addrToAbsVal.end())
|
|
151
151
|
{
|
|
152
152
|
if (oit->second.isInterval() && it->second.isInterval())
|
|
153
153
|
{
|
|
@@ -164,7 +164,7 @@ void AbstractState::joinWith(const AbstractState& other)
|
|
|
164
164
|
}
|
|
165
165
|
else
|
|
166
166
|
{
|
|
167
|
-
|
|
167
|
+
_addrToAbsVal.emplace(key, it->second);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -180,11 +180,11 @@ void AbstractState::narrowWith(const AbstractState& other)
|
|
|
180
180
|
if (it->second.isInterval() && oit->second.isInterval())
|
|
181
181
|
it->second.getInterval().narrow_with(oit->second.getInterval());
|
|
182
182
|
}
|
|
183
|
-
for (auto it =
|
|
183
|
+
for (auto it = _addrToAbsVal.begin(); it != _addrToAbsVal.end(); ++it)
|
|
184
184
|
{
|
|
185
185
|
auto key = it->first;
|
|
186
|
-
auto oit = other.
|
|
187
|
-
if (oit != other.
|
|
186
|
+
auto oit = other._addrToAbsVal.find(key);
|
|
187
|
+
if (oit != other._addrToAbsVal.end())
|
|
188
188
|
if (it->second.isInterval() && oit->second.isInterval())
|
|
189
189
|
it->second.getInterval().narrow_with(oit->second.getInterval());
|
|
190
190
|
}
|
|
@@ -213,11 +213,11 @@ void AbstractState::meetWith(const AbstractState& other)
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
for (auto it = other.
|
|
216
|
+
for (auto it = other._addrToAbsVal.begin(); it != other._addrToAbsVal.end(); ++it)
|
|
217
217
|
{
|
|
218
218
|
auto key = it->first;
|
|
219
|
-
auto oit =
|
|
220
|
-
if (oit !=
|
|
219
|
+
auto oit = _addrToAbsVal.find(key);
|
|
220
|
+
if (oit != _addrToAbsVal.end())
|
|
221
221
|
{
|
|
222
222
|
if (oit->second.isInterval() && it->second.isInterval())
|
|
223
223
|
{
|
|
@@ -240,7 +240,7 @@ void AbstractState::printExprValues(std::ostream &oss) const
|
|
|
240
240
|
{
|
|
241
241
|
oss << "-----------Var and Value-----------\n";
|
|
242
242
|
printTable(_varToAbsVal, oss);
|
|
243
|
-
printTable(
|
|
243
|
+
printTable(_addrToAbsVal, oss);
|
|
244
244
|
oss << "-----------------------------------------\n";
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -106,7 +106,7 @@ RelExeState &RelExeState::operator=(const RelExeState &rhs)
|
|
|
106
106
|
if (*this != rhs)
|
|
107
107
|
{
|
|
108
108
|
_varToVal = rhs.getVarToVal();
|
|
109
|
-
|
|
109
|
+
_addrToVal = rhs.getLocToVal();
|
|
110
110
|
}
|
|
111
111
|
return *this;
|
|
112
112
|
}
|
|
@@ -119,7 +119,7 @@ RelExeState &RelExeState::operator=(const RelExeState &rhs)
|
|
|
119
119
|
bool RelExeState::operator==(const RelExeState &rhs) const
|
|
120
120
|
{
|
|
121
121
|
return eqVarToValMap(_varToVal, rhs.getVarToVal()) &&
|
|
122
|
-
eqVarToValMap(
|
|
122
|
+
eqVarToValMap(_addrToVal, rhs.getLocToVal());
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/*!
|
|
@@ -130,7 +130,7 @@ bool RelExeState::operator==(const RelExeState &rhs) const
|
|
|
130
130
|
bool RelExeState::operator<(const RelExeState &rhs) const
|
|
131
131
|
{
|
|
132
132
|
return lessThanVarToValMap(_varToVal, rhs.getVarToVal()) ||
|
|
133
|
-
lessThanVarToValMap(
|
|
133
|
+
lessThanVarToValMap(_addrToVal, rhs.getLocToVal());
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
bool RelExeState::eqVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs) const
|
|
@@ -177,7 +177,7 @@ void AbstractInterpretation::handleGlobalNode()
|
|
|
177
177
|
/// get execution state by merging states of predecessor blocks
|
|
178
178
|
/// Scenario 1: preblock -----(intraEdge)----> block, join the preES of inEdges
|
|
179
179
|
/// Scenario 2: preblock -----(callEdge)----> block
|
|
180
|
-
bool AbstractInterpretation::
|
|
180
|
+
bool AbstractInterpretation::propagateStateIfFeasible(const ICFGNode *block)
|
|
181
181
|
{
|
|
182
182
|
AbstractState es;
|
|
183
183
|
u32_t inEdgeNum = 0;
|
|
@@ -224,29 +224,6 @@ bool AbstractInterpretation::propogateAbsStateToCurNode(const ICFGNode *block)
|
|
|
224
224
|
assert(false && "implement this part");
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
bool AbstractInterpretation::isFunEntry(const SVF::ICFGNode *block)
|
|
228
|
-
{
|
|
229
|
-
if (SVFUtil::isa<FunEntryICFGNode>(block))
|
|
230
|
-
{
|
|
231
|
-
if (_preAbstractTrace.find(block) != _preAbstractTrace.end())
|
|
232
|
-
{
|
|
233
|
-
return true;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
bool AbstractInterpretation::isGlobalEntry(const SVF::ICFGNode *block)
|
|
240
|
-
{
|
|
241
|
-
for (auto *edge : _icfg->getGlobalICFGNode()->getOutEdges())
|
|
242
|
-
{
|
|
243
|
-
if (edge->getDstNode() == block)
|
|
244
|
-
{
|
|
245
|
-
return true;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
return false;
|
|
249
|
-
}
|
|
250
227
|
|
|
251
228
|
bool AbstractInterpretation::hasCmpBranchES(const CmpStmt* cmpStmt, s64_t succ,
|
|
252
229
|
AbstractState& es)
|
|
@@ -544,7 +521,7 @@ void AbstractInterpretation::handleWTONode(const ICFGNode *node)
|
|
|
544
521
|
{
|
|
545
522
|
_stat->getBlockTrace()++;
|
|
546
523
|
// Get execution states from in edges
|
|
547
|
-
if (!
|
|
524
|
+
if (!propagateStateIfFeasible(node))
|
|
548
525
|
{
|
|
549
526
|
// No ES on the in edges - Infeasible block
|
|
550
527
|
return;
|
|
@@ -717,7 +694,7 @@ void AbstractInterpretation::handleICFGNode(const ICFGNode *curICFGNode)
|
|
|
717
694
|
void AbstractInterpretation::handleCycle(const ICFGWTOCycle *cycle)
|
|
718
695
|
{
|
|
719
696
|
// Get execution states from in edges
|
|
720
|
-
if (!
|
|
697
|
+
if (!propagateStateIfFeasible(cycle->head()))
|
|
721
698
|
{
|
|
722
699
|
// No ES on the in edges - Infeasible block
|
|
723
700
|
return;
|
|
@@ -851,7 +828,6 @@ void AbstractInterpretation::handleFunc(const SVFFunction *func)
|
|
|
851
828
|
|
|
852
829
|
void AbstractInterpretation::handleSVFStatement(const SVFStmt *stmt)
|
|
853
830
|
{
|
|
854
|
-
std::cout << stmt->toString() << std::endl;
|
|
855
831
|
if (const AddrStmt *addr = SVFUtil::dyn_cast<AddrStmt>(stmt))
|
|
856
832
|
{
|
|
857
833
|
_svfir2ExeState->handleAddr(addr);
|
|
@@ -277,9 +277,9 @@ void SVFIR2AbsState::applySummary(AbstractState&es)
|
|
|
277
277
|
{
|
|
278
278
|
_es._varToAbsVal[item.first] = item.second;
|
|
279
279
|
}
|
|
280
|
-
for (const auto &item: es.
|
|
280
|
+
for (const auto &item: es._addrToAbsVal)
|
|
281
281
|
{
|
|
282
|
-
_es.
|
|
282
|
+
_es._addrToAbsVal[item.first] = item.second;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
@@ -305,10 +305,10 @@ void SVFIR2AbsState::widenAddrs(AbstractState&lhs, const AbstractState&rhs)
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
for (const auto &rhsItem: rhs.
|
|
308
|
+
for (const auto &rhsItem: rhs._addrToAbsVal)
|
|
309
309
|
{
|
|
310
|
-
auto lhsIter = lhs.
|
|
311
|
-
if (lhsIter != lhs.
|
|
310
|
+
auto lhsIter = lhs._addrToAbsVal.find(rhsItem.first);
|
|
311
|
+
if (lhsIter != lhs._addrToAbsVal.end())
|
|
312
312
|
{
|
|
313
313
|
if (rhsItem.second.isAddr())
|
|
314
314
|
{
|
|
@@ -349,10 +349,10 @@ void SVFIR2AbsState::narrowAddrs(AbstractState&lhs, const AbstractState&rhs)
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
for (const auto &rhsItem: rhs.
|
|
352
|
+
for (const auto &rhsItem: rhs._addrToAbsVal)
|
|
353
353
|
{
|
|
354
|
-
auto lhsIter = lhs.
|
|
355
|
-
if (lhsIter != lhs.
|
|
354
|
+
auto lhsIter = lhs._addrToAbsVal.find(rhsItem.first);
|
|
355
|
+
if (lhsIter != lhs._addrToAbsVal.end())
|
|
356
356
|
{
|
|
357
357
|
if (lhsIter->second.isAddr())
|
|
358
358
|
{
|