svf-lib 1.0.1802 → 1.0.1804
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-linux/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +8 -0
- package/SVF-osx/svf/include/AbstractExecution/ExeState.h +8 -0
- package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +5 -0
- package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +3 -0
- package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +1 -0
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +4 -0
- package/SVF-osx/svf/include/AbstractExecution/SingleAbsValue.h +2 -0
- package/SVF-osx/svf/include/AbstractExecution/SymState.h +4 -0
- package/SVF-osx/svf/include/AbstractExecution/WTO.h +5 -0
- package/SVF-osx/svf/include/CFL/CFGrammar.h +4 -0
- package/SVF-osx/svf/include/CFL/CFLAlias.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLStat.h +1 -0
- package/SVF-osx/svf/include/CFL/CFLVF.h +1 -0
- package/SVF-osx/svf/include/DDA/ContextDDA.h +1 -0
- package/SVF-osx/svf/include/DDA/DDAClient.h +5 -0
- package/SVF-osx/svf/include/DDA/DDAPass.h +1 -0
- package/SVF-osx/svf/include/FastCluster/fastcluster.h +1 -0
- package/SVF-osx/svf/include/Graphs/CDG.h +3 -0
- package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +3 -0
- package/SVF-osx/svf/include/Graphs/CFLGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/CHG.h +4 -2
- package/SVF-osx/svf/include/Graphs/ConsGEdge.h +5 -0
- package/SVF-osx/svf/include/Graphs/ConsGNode.h +1 -0
- package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +1 -0
- package/SVF-osx/svf/include/Graphs/GenericGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/GraphPrinter.h +3 -0
- package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
- package/SVF-osx/svf/include/Graphs/ICFG.h +1 -0
- package/SVF-osx/svf/include/Graphs/ICFGNode.h +3 -0
- package/SVF-osx/svf/include/Graphs/ICFGStat.h +2 -0
- package/SVF-osx/svf/include/Graphs/IRGraph.h +1 -0
- package/SVF-osx/svf/include/Graphs/PTACallGraph.h +3 -0
- package/SVF-osx/svf/include/Graphs/SVFG.h +2 -0
- package/SVF-osx/svf/include/Graphs/SVFGEdge.h +1 -0
- package/SVF-osx/svf/include/Graphs/SVFGNode.h +7 -0
- package/SVF-osx/svf/include/Graphs/SVFGOPT.h +3 -0
- package/SVF-osx/svf/include/Graphs/SVFGStat.h +2 -0
- package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +3 -0
- package/SVF-osx/svf/include/Graphs/VFG.h +2 -0
- package/SVF-osx/svf/include/Graphs/VFGEdge.h +3 -0
- package/SVF-osx/svf/include/Graphs/VFGNode.h +8 -0
- package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +4 -0
- package/SVF-osx/svf/include/MSSA/MemPartition.h +1 -0
- package/SVF-osx/svf/include/MSSA/MemRegion.h +1 -0
- package/SVF-osx/svf/include/MSSA/MemSSA.h +1 -0
- package/SVF-osx/svf/include/MTA/FSMPTA.h +6 -0
- package/SVF-osx/svf/include/MTA/LockAnalysis.h +5 -0
- package/SVF-osx/svf/include/MTA/MHP.h +3 -0
- package/SVF-osx/svf/include/MTA/MTA.h +1 -0
- package/SVF-osx/svf/include/MTA/MTAResultValidator.h +2 -0
- package/SVF-osx/svf/include/MTA/TCT.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +2 -0
- package/SVF-osx/svf/include/MemoryModel/AccessPath.h +5 -0
- package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +5 -0
- package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +1 -0
- package/SVF-osx/svf/include/MemoryModel/PointsTo.h +1 -0
- package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +1 -0
- package/SVF-osx/svf/include/SABER/ProgSlice.h +1 -0
- package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +4 -0
- package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +1 -0
- package/SVF-osx/svf/include/SVFIR/SVFIR.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFStatements.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFType.h +2 -0
- package/SVF-osx/svf/include/SVFIR/SVFValue.h +3 -0
- package/SVF-osx/svf/include/SVFIR/SVFVariables.h +5 -0
- package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +5 -0
- package/SVF-osx/svf/include/Util/CDGBuilder.h +8 -0
- package/SVF-osx/svf/include/Util/CallGraphBuilder.h +2 -0
- package/SVF-osx/svf/include/Util/Casting.h +2 -1
- package/SVF-osx/svf/include/Util/CommandLine.h +1 -0
- package/SVF-osx/svf/include/Util/CxtStmt.h +4 -0
- package/SVF-osx/svf/include/Util/DPItem.h +2 -0
- package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
- package/SVF-osx/svf/include/Util/SCC.h +2 -0
- package/SVF-osx/svf/include/Util/SVFBugReport.h +1 -0
- package/SVF-osx/svf/include/Util/SVFStat.h +1 -0
- package/SVF-osx/svf/include/Util/SVFUtil.h +1 -0
- package/SVF-osx/svf/include/Util/ThreadAPI.h +1 -0
- package/SVF-osx/svf/include/Util/WorkList.h +1 -0
- package/SVF-osx/svf/include/Util/Z3Expr.h +4 -0
- package/SVF-osx/svf/include/Util/iterator.h +2 -2
- package/SVF-osx/svf/include/WPA/Andersen.h +6 -0
- package/SVF-osx/svf/include/WPA/AndersenPWC.h +3 -0
- package/SVF-osx/svf/include/WPA/WPAFSSolver.h +5 -0
- package/SVF-osx/svf/include/WPA/WPAPass.h +2 -0
- package/SVF-osx/svf/include/WPA/WPASolver.h +2 -0
- package/SVF-osx/svf/include/WPA/WPAStat.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +3 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +1 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -63,6 +63,7 @@ public:
|
|
|
63
63
|
|
|
64
64
|
BoundedZ3Expr(BoundedZ3Expr &&z3Expr) : Z3Expr(z3Expr) {}
|
|
65
65
|
|
|
66
|
+
|
|
66
67
|
inline BoundedZ3Expr &operator=(BoundedZ3Expr &&rhs)
|
|
67
68
|
{
|
|
68
69
|
Z3Expr::operator=(rhs);
|
|
@@ -387,3 +388,4 @@ struct std::hash<SVF::BoundedZ3Expr>
|
|
|
387
388
|
}
|
|
388
389
|
};
|
|
389
390
|
#endif //SVF_BOUNDEDZ3EXPR_H
|
|
391
|
+
|
|
@@ -57,6 +57,7 @@ public:
|
|
|
57
57
|
public:
|
|
58
58
|
ConsExeState(): ExeState(ExeState::SingleValueK) {}
|
|
59
59
|
|
|
60
|
+
|
|
60
61
|
/// Constructor
|
|
61
62
|
ConsExeState(VarToValMap varToValMap, LocToValMap locToValMap) : ExeState(ExeState::SingleValueK), _varToVal(
|
|
62
63
|
SVFUtil::move(varToValMap)), _locToVal(SVFUtil::move(locToValMap)) {}
|
|
@@ -360,6 +361,8 @@ public:
|
|
|
360
361
|
|
|
361
362
|
public:
|
|
362
363
|
|
|
364
|
+
|
|
365
|
+
|
|
363
366
|
s64_t getNumber(u32_t lhs);
|
|
364
367
|
|
|
365
368
|
static inline SingleAbsValue getIntOneZ3Expr()
|
|
@@ -406,11 +409,14 @@ public:
|
|
|
406
409
|
/// Whether two var to value map is equivalent
|
|
407
410
|
static bool eqVarToValMap(const VarToValMap &pre, const VarToValMap &nxt);
|
|
408
411
|
|
|
412
|
+
|
|
409
413
|
/// Whether lhs is less than rhs
|
|
410
414
|
static bool lessThanVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs);
|
|
411
415
|
|
|
416
|
+
|
|
412
417
|
private:
|
|
413
418
|
|
|
419
|
+
|
|
414
420
|
static bool assign(SingleAbsValue &lhs, const SingleAbsValue &rhs);
|
|
415
421
|
|
|
416
422
|
inline bool store(u32_t objId, const SingleAbsValue &z3Expr)
|
|
@@ -440,4 +446,6 @@ struct std::hash<SVF::ConsExeState>
|
|
|
440
446
|
}
|
|
441
447
|
};
|
|
442
448
|
|
|
449
|
+
|
|
450
|
+
|
|
443
451
|
#endif // SVF_CONSEXESTATE_H
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
#ifndef Z3_EXAMPLE_EXESTATE_H
|
|
31
32
|
#define Z3_EXAMPLE_EXESTATE_H
|
|
32
33
|
|
|
@@ -89,6 +90,7 @@ public:
|
|
|
89
90
|
return *this;
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
|
|
92
94
|
protected:
|
|
93
95
|
VarToAddrs _varToAddrs{{0, getVirtualMemAddress(0)}}; ///< Map a variable (symbol) to its memory addresses
|
|
94
96
|
VarToAddrs _locToAddrs; ///< Map a memory address to its stored memory addresses
|
|
@@ -113,6 +115,7 @@ public:
|
|
|
113
115
|
return _locToAddrs.find(id) != _locToAddrs.end();
|
|
114
116
|
}
|
|
115
117
|
|
|
118
|
+
|
|
116
119
|
inline virtual const VarToAddrs &getVarToAddrs() const
|
|
117
120
|
{
|
|
118
121
|
return _varToAddrs;
|
|
@@ -145,6 +148,8 @@ public:
|
|
|
145
148
|
return _kind;
|
|
146
149
|
}
|
|
147
150
|
|
|
151
|
+
|
|
152
|
+
|
|
148
153
|
public:
|
|
149
154
|
inline virtual void storeAddrs(u32_t addr, const Addrs &vaddrs)
|
|
150
155
|
{
|
|
@@ -280,8 +285,11 @@ public:
|
|
|
280
285
|
return AddressValue::getInternalID(idx);
|
|
281
286
|
}
|
|
282
287
|
|
|
288
|
+
|
|
283
289
|
}; // end class ExeState
|
|
284
290
|
|
|
291
|
+
|
|
292
|
+
|
|
285
293
|
} // end namespace SVF
|
|
286
294
|
|
|
287
295
|
template<>
|
|
@@ -81,6 +81,7 @@ public:
|
|
|
81
81
|
|
|
82
82
|
virtual ~IntervalExeState() = default;
|
|
83
83
|
|
|
84
|
+
|
|
84
85
|
IntervalExeState &operator=(const IntervalExeState &rhs)
|
|
85
86
|
{
|
|
86
87
|
if (rhs != *this)
|
|
@@ -259,6 +260,7 @@ public:
|
|
|
259
260
|
/// domain meet with other varToValMap
|
|
260
261
|
void meetWith(VarToValMap *other);
|
|
261
262
|
|
|
263
|
+
|
|
262
264
|
/// Return int value from an expression if it is a numeral, otherwise return an approximate value
|
|
263
265
|
inline s32_t Interval2NumValue(const IntervalValue &e) const
|
|
264
266
|
{
|
|
@@ -394,6 +396,7 @@ public:
|
|
|
394
396
|
return true;
|
|
395
397
|
}
|
|
396
398
|
|
|
399
|
+
|
|
397
400
|
static bool lessThanVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs)
|
|
398
401
|
{
|
|
399
402
|
if (lhs.empty()) return !rhs.empty();
|
|
@@ -439,6 +442,7 @@ public:
|
|
|
439
442
|
return !(*this >= rhs);
|
|
440
443
|
}
|
|
441
444
|
|
|
445
|
+
|
|
442
446
|
bool operator>=(const IntervalExeState &rhs) const
|
|
443
447
|
{
|
|
444
448
|
return geqVarToValMap(_varToItvVal, rhs.getVarToVal()) && geqVarToValMap(_locToItvVal, rhs.getLocToVal());
|
|
@@ -452,6 +456,7 @@ public:
|
|
|
452
456
|
_varToAddrs.clear();
|
|
453
457
|
}
|
|
454
458
|
|
|
459
|
+
|
|
455
460
|
private:
|
|
456
461
|
void printTable(const VarToValMap &table, std::ostream &oss) const;
|
|
457
462
|
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
#ifndef Z3_EXAMPLE_IntervalValue_H
|
|
31
32
|
#define Z3_EXAMPLE_IntervalValue_H
|
|
32
33
|
|
|
@@ -320,6 +321,7 @@ public:
|
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
|
|
324
|
+
|
|
323
325
|
/// Equality comparison
|
|
324
326
|
bool equals(const IntervalValue &other) const
|
|
325
327
|
{
|
|
@@ -677,6 +679,7 @@ inline IntervalValue operator<(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
677
679
|
}
|
|
678
680
|
}
|
|
679
681
|
|
|
682
|
+
|
|
680
683
|
// Compare two IntervalValues for greater than or equal to
|
|
681
684
|
inline IntervalValue operator>=(const IntervalValue &lhs, const IntervalValue &rhs)
|
|
682
685
|
{
|
|
@@ -174,6 +174,7 @@ public:
|
|
|
174
174
|
return _n.geq(rhs._n).simplify().is_true();
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
|
|
177
178
|
/// Reload operator
|
|
178
179
|
//{%
|
|
179
180
|
friend NumericLiteral operator==(const NumericLiteral &lhs, const NumericLiteral &rhs)
|
|
@@ -433,6 +434,7 @@ public:
|
|
|
433
434
|
|
|
434
435
|
//%}
|
|
435
436
|
|
|
437
|
+
|
|
436
438
|
}; // end class NumericLiteral
|
|
437
439
|
} // end namespace SVF
|
|
438
440
|
|
|
@@ -86,6 +86,7 @@ public:
|
|
|
86
86
|
/// Return the offset expression of a GepStmt
|
|
87
87
|
IntervalValue getItvOfFlattenedElemIndex(const GepStmt *gep);
|
|
88
88
|
|
|
89
|
+
|
|
89
90
|
static z3::context &getContext()
|
|
90
91
|
{
|
|
91
92
|
return Z3Expr::getContext();
|
|
@@ -93,6 +94,7 @@ public:
|
|
|
93
94
|
|
|
94
95
|
void applySummary(IntervalExeState &es);
|
|
95
96
|
|
|
97
|
+
|
|
96
98
|
/// Init ObjVar
|
|
97
99
|
void initObjVar(const ObjVar *objVar, u32_t varId);
|
|
98
100
|
|
|
@@ -107,6 +109,7 @@ public:
|
|
|
107
109
|
return globalNulladdrs;
|
|
108
110
|
}
|
|
109
111
|
|
|
112
|
+
|
|
110
113
|
/// whether the variable is in varToVal table
|
|
111
114
|
inline bool inVarToValTable(u32_t id) const
|
|
112
115
|
{
|
|
@@ -119,6 +122,7 @@ public:
|
|
|
119
122
|
return _es.inVarToAddrsTable(id);
|
|
120
123
|
}
|
|
121
124
|
|
|
125
|
+
|
|
122
126
|
/// whether the memory address stores a interval value
|
|
123
127
|
inline bool inLocToValTable(u32_t id) const
|
|
124
128
|
{
|
|
@@ -135,6 +135,7 @@ public:
|
|
|
135
135
|
return (getExpr() >= rhs.getExpr()).simplify().is_true();
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
|
|
138
139
|
/// Reload operator
|
|
139
140
|
//{%
|
|
140
141
|
friend SingleAbsValue operator==(const SingleAbsValue &lhs, const SingleAbsValue &rhs)
|
|
@@ -472,4 +473,5 @@ struct std::hash<SVF::SingleAbsValue>
|
|
|
472
473
|
}
|
|
473
474
|
};
|
|
474
475
|
|
|
476
|
+
|
|
475
477
|
#endif //SVF_SINGLEABSVALUE_H
|
|
@@ -83,6 +83,7 @@ public:
|
|
|
83
83
|
return *this;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
|
|
86
87
|
/// Move Constructor
|
|
87
88
|
SymState(SymState &&rhs) noexcept: _exeState(SVFUtil::move(rhs._exeState)),
|
|
88
89
|
_typeState(SVFUtil::move(rhs._typeState)),
|
|
@@ -110,6 +111,7 @@ public:
|
|
|
110
111
|
return _keyNodesSet;
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
|
|
113
115
|
void insertKeyNode(NodeID id)
|
|
114
116
|
{
|
|
115
117
|
if (_keyNodesSet.empty())
|
|
@@ -201,6 +203,8 @@ public:
|
|
|
201
203
|
|
|
202
204
|
} // end namespace SVF
|
|
203
205
|
|
|
206
|
+
|
|
207
|
+
|
|
204
208
|
/// Specialise hash for SymState
|
|
205
209
|
template<>
|
|
206
210
|
struct std::hash<SVF::SymState>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
#include "SVFIR/SVFValue.h"
|
|
40
40
|
#include "Graphs/CFBasicBlockG.h"
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
namespace SVF
|
|
43
44
|
{
|
|
44
45
|
|
|
@@ -332,6 +333,7 @@ private:
|
|
|
332
333
|
|
|
333
334
|
}; // end class CFBasicBlockGWTOComp
|
|
334
335
|
|
|
336
|
+
|
|
335
337
|
/*!
|
|
336
338
|
* WTO node for CFBasicBlockG
|
|
337
339
|
*/
|
|
@@ -377,6 +379,7 @@ public:
|
|
|
377
379
|
|
|
378
380
|
}; // end class CFBasicBlockGWTONode
|
|
379
381
|
|
|
382
|
+
|
|
380
383
|
/*!
|
|
381
384
|
* WTO cycle for CFBasicBlockG
|
|
382
385
|
*/
|
|
@@ -454,6 +457,7 @@ public:
|
|
|
454
457
|
|
|
455
458
|
}; // end class CFBasicBlockGWTOCycle
|
|
456
459
|
|
|
460
|
+
|
|
457
461
|
/*!
|
|
458
462
|
* Weak topological order for CFBasicBlockG
|
|
459
463
|
*/
|
|
@@ -546,6 +550,7 @@ public:
|
|
|
546
550
|
return it->second;
|
|
547
551
|
}
|
|
548
552
|
|
|
553
|
+
|
|
549
554
|
/// Get the wto-cycle-depth of the given node
|
|
550
555
|
const CFBasicBlockGWTOCycleDepth &getWTOCycleDepth(const CFBasicBlockNode *n) const
|
|
551
556
|
{
|
|
@@ -127,6 +127,7 @@ public:
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
|
|
130
131
|
struct SymbolVectorHash
|
|
131
132
|
{
|
|
132
133
|
size_t operator()(const std::vector<Symbol> &v) const
|
|
@@ -155,6 +156,7 @@ public:
|
|
|
155
156
|
typedef std::vector<Symbol> Production;
|
|
156
157
|
typedef SymbolSet<Production> Productions;
|
|
157
158
|
|
|
159
|
+
|
|
158
160
|
inline Map<std::string, Kind>& getNonterminals()
|
|
159
161
|
{
|
|
160
162
|
return this->nonterminals;
|
|
@@ -362,6 +364,7 @@ public:
|
|
|
362
364
|
return it->second;
|
|
363
365
|
}
|
|
364
366
|
|
|
367
|
+
|
|
365
368
|
const Symbol& getLHSSymbol(const Production& prod) const
|
|
366
369
|
{
|
|
367
370
|
return prod.at(0);
|
|
@@ -381,6 +384,7 @@ public:
|
|
|
381
384
|
|
|
382
385
|
void dump(std::string fileName) const;
|
|
383
386
|
|
|
387
|
+
|
|
384
388
|
const inline u32_t num_generator()
|
|
385
389
|
{
|
|
386
390
|
return newTerminalSubscript++;
|
|
@@ -118,6 +118,7 @@ public:
|
|
|
118
118
|
/// get callsite id from return, return 0 if it is a spurious return edge
|
|
119
119
|
CallSiteID getCSIDAtRet(CxtLocDPItem& dpm, const SVFGEdge* edge);
|
|
120
120
|
|
|
121
|
+
|
|
121
122
|
/// Pop recursive callsites
|
|
122
123
|
inline virtual void popRecursiveCallSites(CxtLocDPItem& dpm)
|
|
123
124
|
{
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
/*
|
|
24
25
|
* @file: DDAClient.h
|
|
25
26
|
* @author: yesen
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
*
|
|
30
31
|
*/
|
|
31
32
|
|
|
33
|
+
|
|
32
34
|
#ifndef DDACLIENT_H_
|
|
33
35
|
#define DDACLIENT_H_
|
|
34
36
|
|
|
@@ -116,6 +118,7 @@ private:
|
|
|
116
118
|
bool solveAll; ///< TRUE if all top level pointers are being queried
|
|
117
119
|
};
|
|
118
120
|
|
|
121
|
+
|
|
119
122
|
/**
|
|
120
123
|
* DDA client with function pointers as query candidates.
|
|
121
124
|
*/
|
|
@@ -133,6 +136,8 @@ public:
|
|
|
133
136
|
virtual void performStat(PointerAnalysis* pta);
|
|
134
137
|
};
|
|
135
138
|
|
|
139
|
+
|
|
140
|
+
|
|
136
141
|
/**
|
|
137
142
|
* DDA client with function pointers as query candidates.
|
|
138
143
|
*/
|
|
@@ -79,6 +79,7 @@ public:
|
|
|
79
79
|
}
|
|
80
80
|
//@}
|
|
81
81
|
|
|
82
|
+
|
|
82
83
|
private:
|
|
83
84
|
Set<BranchCondition> brConditions;
|
|
84
85
|
};
|
|
@@ -113,6 +114,7 @@ public:
|
|
|
113
114
|
return _icfgNode;
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
|
|
116
118
|
private:
|
|
117
119
|
const ICFGNode *_icfgNode;
|
|
118
120
|
};
|
|
@@ -140,6 +142,7 @@ private:
|
|
|
140
142
|
|
|
141
143
|
}
|
|
142
144
|
|
|
145
|
+
|
|
143
146
|
public:
|
|
144
147
|
/// Singleton design here to make sure we only have one instance during any analysis
|
|
145
148
|
//@{
|
|
@@ -376,6 +376,7 @@ public:
|
|
|
376
376
|
return hasGNode(id);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
|
|
379
380
|
bool hasCFBasicBlockEdge(CFBasicBlockNode *src, CFBasicBlockNode *dst, ICFGEdge *icfgEdge)
|
|
380
381
|
{
|
|
381
382
|
CFBasicBlockEdge edge(src, dst, icfgEdge);
|
|
@@ -435,6 +436,7 @@ public:
|
|
|
435
436
|
_totalCFBasicBlockNode--;
|
|
436
437
|
}
|
|
437
438
|
|
|
439
|
+
|
|
438
440
|
/// Remove node from nodeID
|
|
439
441
|
inline bool removeCFBBNode(NodeID id)
|
|
440
442
|
{
|
|
@@ -466,6 +468,7 @@ public:
|
|
|
466
468
|
|
|
467
469
|
}
|
|
468
470
|
|
|
471
|
+
|
|
469
472
|
namespace SVF
|
|
470
473
|
{
|
|
471
474
|
/* !
|
|
@@ -73,6 +73,7 @@ protected:
|
|
|
73
73
|
CHGKind kind;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
+
|
|
76
77
|
typedef GenericEdge<CHNode> GenericCHEdgeTy;
|
|
77
78
|
class CHEdge: public GenericCHEdgeTy
|
|
78
79
|
{
|
|
@@ -313,6 +314,7 @@ public:
|
|
|
313
314
|
return chg->getKind() == Standard;
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
|
|
316
318
|
private:
|
|
317
319
|
SVFModule* svfMod;
|
|
318
320
|
u32_t classNum;
|
|
@@ -348,8 +350,8 @@ struct GenericGraphTraits<SVF::CHNode*>
|
|
|
348
350
|
/// for inverse traversal.
|
|
349
351
|
template <>
|
|
350
352
|
struct GenericGraphTraits<Inverse<SVF::CHNode*>>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
+
: public GenericGraphTraits<
|
|
354
|
+
Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
|
|
353
355
|
{
|
|
354
356
|
};
|
|
355
357
|
|
|
@@ -86,6 +86,7 @@ public:
|
|
|
86
86
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
|
|
89
90
|
/*!
|
|
90
91
|
* Copy edge
|
|
91
92
|
*/
|
|
@@ -116,6 +117,7 @@ public:
|
|
|
116
117
|
AddrCGEdge(ConstraintNode* s, ConstraintNode* d, EdgeID id);
|
|
117
118
|
};
|
|
118
119
|
|
|
120
|
+
|
|
119
121
|
/*!
|
|
120
122
|
* Copy edge
|
|
121
123
|
*/
|
|
@@ -148,6 +150,7 @@ public:
|
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
|
|
153
|
+
|
|
151
154
|
/*!
|
|
152
155
|
* Store edge
|
|
153
156
|
*/
|
|
@@ -181,6 +184,7 @@ public:
|
|
|
181
184
|
}
|
|
182
185
|
};
|
|
183
186
|
|
|
187
|
+
|
|
184
188
|
/*!
|
|
185
189
|
* Load edge
|
|
186
190
|
*/
|
|
@@ -214,6 +218,7 @@ public:
|
|
|
214
218
|
}
|
|
215
219
|
};
|
|
216
220
|
|
|
221
|
+
|
|
217
222
|
/*!
|
|
218
223
|
* Gep edge
|
|
219
224
|
*/
|
|
@@ -172,6 +172,7 @@ public:
|
|
|
172
172
|
static void addCustomGraphFeatures(const GraphType &, GraphWriter &) {}
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
|
|
175
176
|
/// DOTGraphTraits - Template class that can be specialized to customize how
|
|
176
177
|
/// graphs are converted to 'dot' graphs. When specializing, you may inherit
|
|
177
178
|
/// from DefaultDOTGraphTraits if you don't need to override everything.
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
/*
|
|
24
25
|
* GraphPrinter.h
|
|
25
26
|
*
|
|
@@ -105,4 +106,6 @@ public:
|
|
|
105
106
|
|
|
106
107
|
} // End namespace llvm
|
|
107
108
|
|
|
109
|
+
|
|
110
|
+
|
|
108
111
|
#endif /* INCLUDE_GRAPHS_GRAPHPRINTER_H_ */
|
|
@@ -115,7 +115,7 @@ nodes(const GraphType &G)
|
|
|
115
115
|
}
|
|
116
116
|
template <class GraphType>
|
|
117
117
|
iter_range<typename GenericGraphTraits<Inverse<GraphType>>::nodes_iterator>
|
|
118
|
-
|
|
118
|
+
inverse_nodes(const GraphType &G)
|
|
119
119
|
{
|
|
120
120
|
return make_range(GenericGraphTraits<Inverse<GraphType>>::nodes_begin(G),
|
|
121
121
|
GenericGraphTraits<Inverse<GraphType>>::nodes_end(G));
|
|
@@ -131,7 +131,7 @@ children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
|
131
131
|
|
|
132
132
|
template <class GraphType>
|
|
133
133
|
iter_range<typename GenericGraphTraits<Inverse<GraphType>>::ChildIteratorType>
|
|
134
|
-
|
|
134
|
+
inverse_children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
135
135
|
{
|
|
136
136
|
return make_range(GenericGraphTraits<Inverse<GraphType>>::child_begin(G),
|
|
137
137
|
GenericGraphTraits<Inverse<GraphType>>::child_end(G));
|
|
@@ -94,6 +94,7 @@ public:
|
|
|
94
94
|
return bb;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
|
|
97
98
|
/// Overloading operator << for dumping ICFG node ID
|
|
98
99
|
//@{
|
|
99
100
|
friend OutStream &operator<<(OutStream &o, const ICFGNode &node)
|
|
@@ -253,6 +254,7 @@ public:
|
|
|
253
254
|
//@}
|
|
254
255
|
};
|
|
255
256
|
|
|
257
|
+
|
|
256
258
|
/*!
|
|
257
259
|
* Function entry ICFGNode containing a set of FormalParmVFGNodes of a function
|
|
258
260
|
*/
|
|
@@ -478,6 +480,7 @@ public:
|
|
|
478
480
|
virtual const std::string toString() const;
|
|
479
481
|
};
|
|
480
482
|
|
|
483
|
+
|
|
481
484
|
/*!
|
|
482
485
|
* Return ICFGNode containing (at most one) ActualRetVFGNode at a callsite
|
|
483
486
|
*/
|
|
@@ -123,6 +123,7 @@ public:
|
|
|
123
123
|
else if (SVFUtil::isa<FunExitICFGNode>(node))
|
|
124
124
|
numOfExitNodes++;
|
|
125
125
|
|
|
126
|
+
|
|
126
127
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeIt =
|
|
127
128
|
it->second->OutEdgeBegin();
|
|
128
129
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeEit =
|
|
@@ -160,3 +161,4 @@ public:
|
|
|
160
161
|
} // End namespace SVF
|
|
161
162
|
|
|
162
163
|
#endif /* INCLUDE_UTIL_ICFGSTAT_H_ */
|
|
164
|
+
|