svf-lib 1.0.1815 → 1.0.1817
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/svf/include/DDA/DDAStat.h +0 -17
- package/SVF-linux/svf/include/Graphs/ConsG.h +2 -0
- package/SVF-linux/svf/include/Util/PTAStat.h +19 -1
- 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 +7 -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/DDA/DDAStat.h +0 -17
- 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/ConsG.h +2 -0
- 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/PTAStat.h +19 -1
- 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
|
@@ -60,6 +60,7 @@ public:
|
|
|
60
60
|
|
|
61
61
|
typedef SaberCondAllocator::SVFGNodeToSVFGNodeSetMap SVFGNodeToSVFGNodeSetMap;
|
|
62
62
|
|
|
63
|
+
|
|
63
64
|
/// Constructor
|
|
64
65
|
ProgSlice(const SVFGNode* src, SaberCondAllocator* pa, const SVFG* graph):
|
|
65
66
|
root(src), partialReachable(false), fullReachable(false), reachGlob(false),
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
#include "Graphs/SVFG.h"
|
|
37
37
|
#include "Util/Z3Expr.h"
|
|
38
38
|
|
|
39
|
+
|
|
39
40
|
namespace SVF
|
|
40
41
|
{
|
|
41
42
|
|
|
@@ -57,6 +58,7 @@ public:
|
|
|
57
58
|
typedef FIFOWorkList<const SVFBasicBlock*> CFWorkList; ///< worklist for control-flow guard computation
|
|
58
59
|
typedef Map<const SVFGNode*, Set<const SVFGNode*>> SVFGNodeToSVFGNodeSetMap;
|
|
59
60
|
|
|
61
|
+
|
|
60
62
|
/// Constructor
|
|
61
63
|
SaberCondAllocator();
|
|
62
64
|
|
|
@@ -231,6 +233,7 @@ public:
|
|
|
231
233
|
}
|
|
232
234
|
//@}
|
|
233
235
|
|
|
236
|
+
|
|
234
237
|
/// mark neg Z3 expression
|
|
235
238
|
inline void setNegCondInst(const Condition &condition, const SVFInstruction* inst)
|
|
236
239
|
{
|
|
@@ -295,6 +298,7 @@ private:
|
|
|
295
298
|
/// extract subexpression from a Z3 expression
|
|
296
299
|
void extractSubConds(const Condition &condition, NodeBS &support) const;
|
|
297
300
|
|
|
301
|
+
|
|
298
302
|
FunToExitBBsMap funToExitBBsMap; ///< map a function to all its basic blocks calling program exit
|
|
299
303
|
BBToCondMap bbToCondMap; ///< map a basic block to its path condition starting from root
|
|
300
304
|
const SVFGNode* curEvalSVFGNode{}; ///< current llvm value to evaluate branch condition when computing guards
|
|
@@ -300,6 +300,7 @@ public:
|
|
|
300
300
|
return getPointerToTy;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
|
|
303
304
|
inline void setTypeInfo(StInfo* ti)
|
|
304
305
|
{
|
|
305
306
|
typeinfo = ti;
|
|
@@ -502,6 +503,7 @@ public:
|
|
|
502
503
|
numOfElement = elemNum;
|
|
503
504
|
}
|
|
504
505
|
|
|
506
|
+
|
|
505
507
|
};
|
|
506
508
|
|
|
507
509
|
class SVFOtherType : public SVFType
|
|
@@ -40,6 +40,7 @@ namespace SVF
|
|
|
40
40
|
/// LLVM Aliases and constants
|
|
41
41
|
typedef SVF::GraphPrinter GraphPrinter;
|
|
42
42
|
|
|
43
|
+
|
|
43
44
|
class SVFInstruction;
|
|
44
45
|
class SVFBasicBlock;
|
|
45
46
|
class SVFArgument;
|
|
@@ -134,6 +135,7 @@ public:
|
|
|
134
135
|
return bb2PIdom;
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
|
|
137
139
|
inline Map<const SVFBasicBlock*,BBSet>& getDomTreeMap()
|
|
138
140
|
{
|
|
139
141
|
return dtBBsMap;
|
|
@@ -1102,6 +1104,7 @@ public:
|
|
|
1102
1104
|
}
|
|
1103
1105
|
};
|
|
1104
1106
|
|
|
1107
|
+
|
|
1105
1108
|
class CallSite
|
|
1106
1109
|
{
|
|
1107
1110
|
friend class SVFIRReader;
|
|
@@ -73,6 +73,7 @@ public:
|
|
|
73
73
|
DummyObjNode,
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
+
|
|
76
77
|
protected:
|
|
77
78
|
const SVFValue* value; ///< value of this SVFIR node
|
|
78
79
|
SVFStmt::KindToSVFStmtMapTy InEdgeKindToSetMap;
|
|
@@ -253,6 +254,8 @@ public:
|
|
|
253
254
|
//@}
|
|
254
255
|
};
|
|
255
256
|
|
|
257
|
+
|
|
258
|
+
|
|
256
259
|
/*
|
|
257
260
|
* Value (Pointer) variable
|
|
258
261
|
*/
|
|
@@ -368,6 +371,7 @@ public:
|
|
|
368
371
|
virtual const std::string toString() const;
|
|
369
372
|
};
|
|
370
373
|
|
|
374
|
+
|
|
371
375
|
/*
|
|
372
376
|
* Gep Value (Pointer) variable, this variable can be dynamic generated for field sensitive analysis
|
|
373
377
|
* e.g. memcpy, temp gep value variable needs to be created
|
|
@@ -436,6 +440,7 @@ public:
|
|
|
436
440
|
virtual const std::string toString() const;
|
|
437
441
|
};
|
|
438
442
|
|
|
443
|
+
|
|
439
444
|
/*
|
|
440
445
|
* Gep Obj variable, this is dynamic generated for field sensitive analysis
|
|
441
446
|
* Each gep obj variable is one field of a MemObj (base)
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
#ifndef INCLUDE_SVFIR_SYMBOLTABLEINFO_H_
|
|
31
31
|
#define INCLUDE_SVFIR_SYMBOLTABLEINFO_H_
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
#include "Util/SVFUtil.h"
|
|
34
35
|
#include "MemoryModel/AccessPath.h"
|
|
35
36
|
#include "SVFIR/SVFModule.h"
|
|
@@ -241,6 +242,7 @@ public:
|
|
|
241
242
|
}
|
|
242
243
|
//@}
|
|
243
244
|
|
|
245
|
+
|
|
244
246
|
/// Statistics
|
|
245
247
|
//@{
|
|
246
248
|
inline u32_t getTotalSymNum() const
|
|
@@ -371,6 +373,7 @@ protected:
|
|
|
371
373
|
Set<const StInfo*> stInfos;
|
|
372
374
|
};
|
|
373
375
|
|
|
376
|
+
|
|
374
377
|
/*!
|
|
375
378
|
* Memory object symbols or MemObj (address-taken variables in LLVM-based languages)
|
|
376
379
|
*/
|
|
@@ -441,6 +444,7 @@ public:
|
|
|
441
444
|
/// Check if byte size is a const value
|
|
442
445
|
bool isConstantByteSize() const;
|
|
443
446
|
|
|
447
|
+
|
|
444
448
|
/// object attributes methods
|
|
445
449
|
//@{
|
|
446
450
|
bool isFunction() const;
|
|
@@ -643,6 +647,7 @@ public:
|
|
|
643
647
|
//@}
|
|
644
648
|
};
|
|
645
649
|
|
|
650
|
+
|
|
646
651
|
} // End namespace SVF
|
|
647
652
|
|
|
648
653
|
#endif /* INCLUDE_SVFIR_SYMBOLTABLEINFO_H_ */
|
|
@@ -60,8 +60,11 @@ public:
|
|
|
60
60
|
/// build map at icfg node level
|
|
61
61
|
void buildICFGNodeControlMap();
|
|
62
62
|
|
|
63
|
+
|
|
64
|
+
|
|
63
65
|
private:
|
|
64
66
|
|
|
67
|
+
|
|
65
68
|
/// extract basic block edges to be processed
|
|
66
69
|
static void
|
|
67
70
|
extractBBS(const SVFFunction *func,
|
|
@@ -72,14 +75,17 @@ private:
|
|
|
72
75
|
extractNodesBetweenPdomNodes(const SVFBasicBlock *succ, const SVFBasicBlock *LCA,
|
|
73
76
|
std::vector<const SVFBasicBlock *> &tgtNodes);
|
|
74
77
|
|
|
78
|
+
|
|
75
79
|
void dfsNodesBetweenPdomNodes(const SVFBasicBlock *cur,
|
|
76
80
|
const SVFBasicBlock *tgt,
|
|
77
81
|
std::vector<const SVFBasicBlock *> &path,
|
|
78
82
|
std::vector<const SVFBasicBlock *> &tgtNodes,
|
|
79
83
|
SVFLoopAndDomInfo *ld);
|
|
80
84
|
|
|
85
|
+
|
|
81
86
|
s64_t getBBSuccessorBranchID(const SVFBasicBlock *BB, const SVFBasicBlock *Succ);
|
|
82
87
|
|
|
88
|
+
|
|
83
89
|
/// update map
|
|
84
90
|
inline void updateMap(const SVFBasicBlock *pred, const SVFBasicBlock *bb, s32_t pos)
|
|
85
91
|
{
|
|
@@ -87,6 +93,7 @@ private:
|
|
|
87
93
|
_svfdependentOnMap[bb][pred].insert(pos);
|
|
88
94
|
}
|
|
89
95
|
|
|
96
|
+
|
|
90
97
|
private:
|
|
91
98
|
CDG *_controlDG;
|
|
92
99
|
Map<const SVFBasicBlock *, Map<const SVFBasicBlock *, Set<s32_t>>> _svfcontrolMap; ///< map a basicblock to its controlling BBs (position, set of BBs)
|
|
@@ -96,4 +103,5 @@ private:
|
|
|
96
103
|
};
|
|
97
104
|
}
|
|
98
105
|
|
|
106
|
+
|
|
99
107
|
#endif //SVF_CDGBUILDER_H
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#ifndef INCLUDE_UTIL_CASTING_H_
|
|
9
9
|
#define INCLUDE_UTIL_CASTING_H_
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
//===- llvm/Support/Casting.h - Allow flexible, checked, casts --*- C++ -*-===//
|
|
12
13
|
//
|
|
13
14
|
// The LLVM Compiler Infrastructure
|
|
@@ -381,7 +382,7 @@ inline typename cast_retty<X, Y *>::ret_type cast(Y *Val)
|
|
|
381
382
|
|
|
382
383
|
template <class X, class Y>
|
|
383
384
|
inline typename cast_retty<X, std::unique_ptr<Y>>::ret_type
|
|
384
|
-
|
|
385
|
+
cast(std::unique_ptr<Y> &&Val)
|
|
385
386
|
{
|
|
386
387
|
assert(SVFUtil::isa<X>(Val.get()) && "cast<Ty>() argument of incompatible type!");
|
|
387
388
|
using ret_type = typename cast_retty<X, std::unique_ptr<Y>>::ret_type;
|
|
@@ -116,6 +116,7 @@ protected:
|
|
|
116
116
|
const SVFInstruction* inst;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
|
|
119
120
|
/*!
|
|
120
121
|
* Context-sensitive thread statement <t,c,s>
|
|
121
122
|
*/
|
|
@@ -180,6 +181,7 @@ private:
|
|
|
180
181
|
NodeID tid;
|
|
181
182
|
};
|
|
182
183
|
|
|
184
|
+
|
|
183
185
|
/*!
|
|
184
186
|
* Context-sensitive thread <c,t>
|
|
185
187
|
*/
|
|
@@ -297,6 +299,7 @@ protected:
|
|
|
297
299
|
bool incycle;
|
|
298
300
|
};
|
|
299
301
|
|
|
302
|
+
|
|
300
303
|
/*!
|
|
301
304
|
* Context-sensitive procedure <c,m>
|
|
302
305
|
* c represent current context
|
|
@@ -382,6 +385,7 @@ protected:
|
|
|
382
385
|
const SVFFunction* fun;
|
|
383
386
|
};
|
|
384
387
|
|
|
388
|
+
|
|
385
389
|
/*!
|
|
386
390
|
* Context-sensitive procedure <t,c,m>
|
|
387
391
|
* t represent current thread during traversing
|
|
@@ -192,8 +192,8 @@ public:
|
|
|
192
192
|
|
|
193
193
|
// From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences).
|
|
194
194
|
static inline std::pair<hclust_fast_methods, std::vector<NodeID>> determineBestMapping(
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
196
|
+
Map<PointsTo, unsigned> pointsToSets, const std::string &evalSubtitle, double &evalTime);
|
|
197
197
|
|
|
198
198
|
};
|
|
199
199
|
};
|
|
@@ -53,11 +53,29 @@ public:
|
|
|
53
53
|
|
|
54
54
|
NodeBS localVarInRecursion;
|
|
55
55
|
|
|
56
|
+
inline void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
|
|
57
|
+
{
|
|
58
|
+
_vmrssUsageBefore = vmrss;
|
|
59
|
+
_vmsizeUsageBefore = vmsize;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
inline void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
|
|
63
|
+
{
|
|
64
|
+
_vmrssUsageAfter = vmrss;
|
|
65
|
+
_vmsizeUsageAfter = vmsize;
|
|
66
|
+
}
|
|
67
|
+
|
|
56
68
|
void performStat() override;
|
|
57
69
|
|
|
58
70
|
void callgraphStat() override;
|
|
59
|
-
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
protected:
|
|
60
74
|
PointerAnalysis* pta;
|
|
75
|
+
u32_t _vmrssUsageBefore;
|
|
76
|
+
u32_t _vmrssUsageAfter;
|
|
77
|
+
u32_t _vmsizeUsageBefore;
|
|
78
|
+
u32_t _vmsizeUsageAfter;
|
|
61
79
|
};
|
|
62
80
|
|
|
63
81
|
} // End namespace SVF
|
|
@@ -121,6 +121,7 @@ public:
|
|
|
121
121
|
_I(0)
|
|
122
122
|
{}
|
|
123
123
|
|
|
124
|
+
|
|
124
125
|
// Return a handle to the stack of nodes in topological
|
|
125
126
|
// order. This will be used to seed the initial solution
|
|
126
127
|
// and improve efficiency.
|
|
@@ -143,6 +144,7 @@ public:
|
|
|
143
144
|
return rep!= UINT_MAX ? rep : n ;
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
|
|
146
148
|
/// whether the node is in a cycle
|
|
147
149
|
inline bool isInCycle(NodeID n) const
|
|
148
150
|
{
|
|
@@ -93,6 +93,7 @@ public:
|
|
|
93
93
|
/// release z3 solver
|
|
94
94
|
static void releaseSolver();
|
|
95
95
|
|
|
96
|
+
|
|
96
97
|
/// null expression
|
|
97
98
|
static z3::expr nullExpr()
|
|
98
99
|
{
|
|
@@ -272,6 +273,7 @@ public:
|
|
|
272
273
|
/// output Z3 expression as a string
|
|
273
274
|
static std::string dumpStr(const Z3Expr &z3Expr);
|
|
274
275
|
|
|
276
|
+
|
|
275
277
|
/// get the number of subexpression of a Z3 expression
|
|
276
278
|
static u32_t getExprSize(const Z3Expr &z3Expr);
|
|
277
279
|
|
|
@@ -281,6 +283,7 @@ public:
|
|
|
281
283
|
return getContext().bool_val(true);
|
|
282
284
|
}
|
|
283
285
|
|
|
286
|
+
|
|
284
287
|
/// Return the unique false condition
|
|
285
288
|
static inline Z3Expr getFalseCond()
|
|
286
289
|
{
|
|
@@ -312,3 +315,4 @@ struct std::hash<SVF::Z3Expr>
|
|
|
312
315
|
};
|
|
313
316
|
|
|
314
317
|
#endif //Z3_EXAMPLE_Z3EXPR_H
|
|
318
|
+
|
|
@@ -352,7 +352,7 @@ struct pointee_iter
|
|
|
352
352
|
template <typename RangeT, typename WrappedIteratorT =
|
|
353
353
|
decltype(std::begin(std::declval<RangeT>()))>
|
|
354
354
|
iter_range<pointee_iter<WrappedIteratorT>>
|
|
355
|
-
|
|
355
|
+
make_pointee_range(RangeT &&Range)
|
|
356
356
|
{
|
|
357
357
|
using PointeeIteratorT = pointee_iter<WrappedIteratorT>;
|
|
358
358
|
return make_range(PointeeIteratorT(std::begin(std::forward<RangeT>(Range))),
|
|
@@ -388,7 +388,7 @@ public:
|
|
|
388
388
|
template <typename RangeT, typename WrappedIteratorT =
|
|
389
389
|
decltype(std::begin(std::declval<RangeT>()))>
|
|
390
390
|
iter_range<pointer_iterator<WrappedIteratorT>>
|
|
391
|
-
|
|
391
|
+
make_pointer_range(RangeT &&Range)
|
|
392
392
|
{
|
|
393
393
|
using PointerIteratorT = pointer_iterator<WrappedIteratorT>;
|
|
394
394
|
return make_range(PointerIteratorT(std::begin(std::forward<RangeT>(Range))),
|
|
@@ -156,6 +156,7 @@ protected:
|
|
|
156
156
|
class Andersen: public AndersenBase
|
|
157
157
|
{
|
|
158
158
|
|
|
159
|
+
|
|
159
160
|
public:
|
|
160
161
|
typedef SCCDetection<ConstraintGraph*> CGSCC;
|
|
161
162
|
typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
|
|
@@ -231,6 +232,7 @@ public:
|
|
|
231
232
|
return getPTDataTy()->unionPts(id,ptd);
|
|
232
233
|
}
|
|
233
234
|
|
|
235
|
+
|
|
234
236
|
void dumpTopLevelPtsTo();
|
|
235
237
|
|
|
236
238
|
void setDetectPWC(bool flag)
|
|
@@ -339,6 +341,8 @@ protected:
|
|
|
339
341
|
/// SCC detection
|
|
340
342
|
virtual NodeStack& SCCDetect();
|
|
341
343
|
|
|
344
|
+
|
|
345
|
+
|
|
342
346
|
/// Sanitize pts for field insensitive objects
|
|
343
347
|
void sanitizePts()
|
|
344
348
|
{
|
|
@@ -372,6 +376,8 @@ protected:
|
|
|
372
376
|
virtual void cluster(void) const;
|
|
373
377
|
};
|
|
374
378
|
|
|
379
|
+
|
|
380
|
+
|
|
375
381
|
/**
|
|
376
382
|
* Wave propagation with diff points-to set.
|
|
377
383
|
*/
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
#ifndef PROJECT_ANDERSENSFR_H
|
|
31
31
|
#define PROJECT_ANDERSENSFR_H
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
#include "WPA/Andersen.h"
|
|
34
35
|
#include "WPA/CSC.h"
|
|
35
36
|
#include "MemoryModel/PointsTo.h"
|
|
@@ -93,6 +94,8 @@ protected:
|
|
|
93
94
|
|
|
94
95
|
};
|
|
95
96
|
|
|
97
|
+
|
|
98
|
+
|
|
96
99
|
/*!
|
|
97
100
|
* Selective Cycle Detection with Stride-based Field Representation
|
|
98
101
|
*/
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
+
|
|
35
36
|
#ifndef WPAFSSOLVER_H_
|
|
36
37
|
#define WPAFSSOLVER_H_
|
|
37
38
|
|
|
@@ -97,6 +98,8 @@ protected:
|
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
100
|
|
|
101
|
+
|
|
102
|
+
|
|
100
103
|
/*!
|
|
101
104
|
* Solver based on SCC cycles.
|
|
102
105
|
*/
|
|
@@ -168,6 +171,8 @@ protected:
|
|
|
168
171
|
NodeID curSCCID; ///< index of current SCC.
|
|
169
172
|
};
|
|
170
173
|
|
|
174
|
+
|
|
175
|
+
|
|
171
176
|
/*!
|
|
172
177
|
* Only solve nodes which need to be analyzed.
|
|
173
178
|
*/
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
/*
|
|
24
25
|
* WPASolver.h
|
|
25
26
|
*
|
|
@@ -171,6 +172,7 @@ protected:
|
|
|
171
172
|
/// print out statistics for i-th iteration
|
|
172
173
|
u32_t iterationForPrintStat;
|
|
173
174
|
|
|
175
|
+
|
|
174
176
|
/// Get node on the graph
|
|
175
177
|
inline GNODE* Node(NodeID id)
|
|
176
178
|
{
|
|
@@ -447,6 +447,7 @@ private:
|
|
|
447
447
|
return nullptr;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
|
|
450
451
|
/// Creates an edge between from t1 to t2.
|
|
451
452
|
DCHEdge* addEdge(const DIType* t1, const DIType* t2, DCHEdge::GEdgeKind et);
|
|
452
453
|
/// Returns the edge between t1 and t2 if it exists, returns nullptr otherwise.
|
|
@@ -100,6 +100,7 @@ public:
|
|
|
100
100
|
return const_cast<Value*>(&**OpIt);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
|
|
103
104
|
generic_bridge_gep_type_iterator& operator++()
|
|
104
105
|
{
|
|
105
106
|
if ( CurTy.getInt() )
|
|
@@ -132,6 +133,7 @@ public:
|
|
|
132
133
|
return *this;
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
|
|
135
137
|
generic_bridge_gep_type_iterator operator++(int)
|
|
136
138
|
{
|
|
137
139
|
generic_bridge_gep_type_iterator tmp = *this;
|
|
@@ -141,6 +143,7 @@ public:
|
|
|
141
143
|
|
|
142
144
|
};
|
|
143
145
|
|
|
146
|
+
|
|
144
147
|
typedef generic_bridge_gep_type_iterator<> bridge_gep_iterator;
|
|
145
148
|
|
|
146
149
|
inline bridge_gep_iterator bridge_gep_begin(const User* GEP)
|