svf-lib 1.0.1806 → 1.0.1807
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/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +0 -2
- package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +0 -8
- package/SVF-osx/svf/include/AbstractExecution/ExeState.h +0 -8
- package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +272 -107
- package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +0 -3
- package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +0 -2
- package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +0 -1
- package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +9 -10
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +0 -1
- package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +0 -4
- package/SVF-osx/svf/include/AbstractExecution/SingleAbsValue.h +0 -2
- package/SVF-osx/svf/include/AbstractExecution/SymState.h +0 -4
- package/SVF-osx/svf/include/AbstractExecution/WTO.h +0 -5
- package/SVF-osx/svf/include/CFL/CFGrammar.h +0 -4
- package/SVF-osx/svf/include/CFL/CFLAlias.h +0 -1
- package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +0 -1
- package/SVF-osx/svf/include/CFL/CFLStat.h +0 -1
- package/SVF-osx/svf/include/CFL/CFLVF.h +0 -1
- package/SVF-osx/svf/include/DDA/ContextDDA.h +0 -1
- package/SVF-osx/svf/include/DDA/DDAClient.h +0 -5
- package/SVF-osx/svf/include/DDA/DDAPass.h +0 -1
- package/SVF-osx/svf/include/FastCluster/fastcluster.h +0 -1
- package/SVF-osx/svf/include/Graphs/CDG.h +0 -3
- package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +0 -3
- package/SVF-osx/svf/include/Graphs/CFLGraph.h +0 -1
- package/SVF-osx/svf/include/Graphs/CHG.h +2 -4
- package/SVF-osx/svf/include/Graphs/ConsGEdge.h +0 -5
- package/SVF-osx/svf/include/Graphs/ConsGNode.h +0 -1
- package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +0 -1
- package/SVF-osx/svf/include/Graphs/GenericGraph.h +0 -1
- package/SVF-osx/svf/include/Graphs/GraphPrinter.h +0 -3
- package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
- package/SVF-osx/svf/include/Graphs/ICFG.h +0 -1
- package/SVF-osx/svf/include/Graphs/ICFGNode.h +0 -3
- package/SVF-osx/svf/include/Graphs/ICFGStat.h +0 -2
- package/SVF-osx/svf/include/Graphs/IRGraph.h +0 -1
- package/SVF-osx/svf/include/Graphs/PTACallGraph.h +0 -3
- package/SVF-osx/svf/include/Graphs/SVFG.h +0 -2
- package/SVF-osx/svf/include/Graphs/SVFGEdge.h +0 -1
- package/SVF-osx/svf/include/Graphs/SVFGNode.h +0 -7
- package/SVF-osx/svf/include/Graphs/SVFGOPT.h +0 -3
- package/SVF-osx/svf/include/Graphs/SVFGStat.h +0 -2
- package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +0 -3
- package/SVF-osx/svf/include/Graphs/VFG.h +0 -2
- package/SVF-osx/svf/include/Graphs/VFGEdge.h +0 -3
- package/SVF-osx/svf/include/Graphs/VFGNode.h +0 -8
- package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +0 -4
- package/SVF-osx/svf/include/MSSA/MemPartition.h +0 -1
- package/SVF-osx/svf/include/MSSA/MemRegion.h +0 -1
- package/SVF-osx/svf/include/MSSA/MemSSA.h +0 -1
- package/SVF-osx/svf/include/MTA/FSMPTA.h +0 -6
- package/SVF-osx/svf/include/MTA/LockAnalysis.h +0 -5
- package/SVF-osx/svf/include/MTA/MHP.h +0 -3
- package/SVF-osx/svf/include/MTA/MTA.h +0 -1
- package/SVF-osx/svf/include/MTA/MTAResultValidator.h +0 -2
- package/SVF-osx/svf/include/MTA/TCT.h +0 -1
- package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +0 -2
- package/SVF-osx/svf/include/MemoryModel/AccessPath.h +0 -5
- package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +0 -5
- package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +0 -1
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +0 -1
- package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +0 -1
- package/SVF-osx/svf/include/MemoryModel/PointsTo.h +0 -1
- package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +0 -1
- package/SVF-osx/svf/include/SABER/ProgSlice.h +0 -1
- package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +0 -4
- package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +0 -1
- package/SVF-osx/svf/include/SVFIR/SVFIR.h +0 -2
- package/SVF-osx/svf/include/SVFIR/SVFStatements.h +0 -2
- package/SVF-osx/svf/include/SVFIR/SVFType.h +0 -2
- package/SVF-osx/svf/include/SVFIR/SVFValue.h +0 -3
- package/SVF-osx/svf/include/SVFIR/SVFVariables.h +0 -5
- package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +0 -5
- package/SVF-osx/svf/include/Util/CDGBuilder.h +0 -8
- package/SVF-osx/svf/include/Util/CallGraphBuilder.h +0 -2
- package/SVF-osx/svf/include/Util/Casting.h +1 -2
- package/SVF-osx/svf/include/Util/CommandLine.h +0 -1
- package/SVF-osx/svf/include/Util/CxtStmt.h +0 -4
- package/SVF-osx/svf/include/Util/DPItem.h +0 -2
- package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
- package/SVF-osx/svf/include/Util/SCC.h +0 -2
- package/SVF-osx/svf/include/Util/SVFBugReport.h +0 -1
- package/SVF-osx/svf/include/Util/SVFStat.h +0 -1
- package/SVF-osx/svf/include/Util/SVFUtil.h +0 -1
- package/SVF-osx/svf/include/Util/ThreadAPI.h +0 -1
- package/SVF-osx/svf/include/Util/WorkList.h +0 -1
- package/SVF-osx/svf/include/Util/Z3Expr.h +0 -4
- package/SVF-osx/svf/include/Util/iterator.h +2 -2
- package/SVF-osx/svf/include/WPA/Andersen.h +0 -6
- package/SVF-osx/svf/include/WPA/AndersenPWC.h +0 -3
- package/SVF-osx/svf/include/WPA/WPAFSSolver.h +0 -5
- package/SVF-osx/svf/include/WPA/WPAPass.h +0 -2
- package/SVF-osx/svf/include/WPA/WPASolver.h +0 -2
- package/SVF-osx/svf/include/WPA/WPAStat.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +0 -3
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +0 -1
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +0 -1
- package/package.json +1 -1
|
@@ -174,7 +174,6 @@ public:
|
|
|
174
174
|
return _n.geq(rhs._n).simplify().is_true();
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
|
|
178
177
|
/// Reload operator
|
|
179
178
|
//{%
|
|
180
179
|
friend NumericLiteral operator==(const NumericLiteral &lhs, const NumericLiteral &rhs)
|
|
@@ -434,7 +433,6 @@ public:
|
|
|
434
433
|
|
|
435
434
|
//%}
|
|
436
435
|
|
|
437
|
-
|
|
438
436
|
}; // end class NumericLiteral
|
|
439
437
|
} // end namespace SVF
|
|
440
438
|
|
|
@@ -41,21 +41,20 @@ public:
|
|
|
41
41
|
RelationSolver() = default;
|
|
42
42
|
|
|
43
43
|
/* gamma_hat, beta and abstract_consequence works on
|
|
44
|
-
|
|
44
|
+
IntervalESBase (the last element of inputs) for RSY or bilateral solver */
|
|
45
45
|
|
|
46
46
|
/// Return Z3Expr according to valToValMap
|
|
47
|
-
Z3Expr gamma_hat(const
|
|
47
|
+
Z3Expr gamma_hat(const IntervalESBase &exeState) const;
|
|
48
48
|
|
|
49
49
|
/// Return Z3Expr according to another valToValMap
|
|
50
|
-
Z3Expr gamma_hat(const
|
|
50
|
+
Z3Expr gamma_hat(const IntervalESBase &alpha, const IntervalESBase &exeState) const;
|
|
51
51
|
|
|
52
52
|
/// Return Z3Expr from a NodeID
|
|
53
|
-
Z3Expr gamma_hat(u32_t id, const
|
|
53
|
+
Z3Expr gamma_hat(u32_t id, const IntervalESBase &exeState) const;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
IntervalExeState beta(const Map<u32_t, double> &sigma, const IntervalExeState &exeState) const;
|
|
55
|
+
IntervalESBase abstract_consequence(const IntervalESBase &lower, const IntervalESBase &upper, const IntervalESBase &domain) const;
|
|
58
56
|
|
|
57
|
+
IntervalESBase beta(const Map<u32_t, double> &sigma, const IntervalESBase &exeState) const;
|
|
59
58
|
|
|
60
59
|
/// Return Z3 expression lazily based on SVFVar ID
|
|
61
60
|
virtual inline Z3Expr toZ3Expr(u32_t varId) const
|
|
@@ -65,13 +64,13 @@ public:
|
|
|
65
64
|
|
|
66
65
|
/* two optional solvers: RSY and bilateral */
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
IntervalESBase bilateral(const IntervalESBase& domain, const Z3Expr &phi, u32_t descend_check = 0);
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
IntervalESBase RSY(const IntervalESBase& domain, const Z3Expr &phi);
|
|
71
70
|
|
|
72
71
|
Map<u32_t, NumericLiteral> BoxedOptSolver(const Z3Expr& phi, Map<u32_t, NumericLiteral>& ret, Map<u32_t, NumericLiteral>& low_values, Map<u32_t, NumericLiteral>& high_values);
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
IntervalESBase BS(const IntervalESBase& domain, const Z3Expr &phi);
|
|
75
74
|
|
|
76
75
|
void updateMap(Map<u32_t, NumericLiteral>& map, u32_t key, const NumericLiteral& value);
|
|
77
76
|
|
|
@@ -86,7 +86,6 @@ public:
|
|
|
86
86
|
/// Return the offset expression of a GepStmt
|
|
87
87
|
IntervalValue getItvOfFlattenedElemIndex(const GepStmt *gep);
|
|
88
88
|
|
|
89
|
-
|
|
90
89
|
static z3::context &getContext()
|
|
91
90
|
{
|
|
92
91
|
return Z3Expr::getContext();
|
|
@@ -94,7 +93,6 @@ public:
|
|
|
94
93
|
|
|
95
94
|
void applySummary(IntervalExeState &es);
|
|
96
95
|
|
|
97
|
-
|
|
98
96
|
/// Init ObjVar
|
|
99
97
|
void initObjVar(const ObjVar *objVar, u32_t varId);
|
|
100
98
|
|
|
@@ -109,7 +107,6 @@ public:
|
|
|
109
107
|
return globalNulladdrs;
|
|
110
108
|
}
|
|
111
109
|
|
|
112
|
-
|
|
113
110
|
/// whether the variable is in varToVal table
|
|
114
111
|
inline bool inVarToValTable(u32_t id) const
|
|
115
112
|
{
|
|
@@ -122,7 +119,6 @@ public:
|
|
|
122
119
|
return _es.inVarToAddrsTable(id);
|
|
123
120
|
}
|
|
124
121
|
|
|
125
|
-
|
|
126
122
|
/// whether the memory address stores a interval value
|
|
127
123
|
inline bool inLocToValTable(u32_t id) const
|
|
128
124
|
{
|
|
@@ -135,7 +135,6 @@ public:
|
|
|
135
135
|
return (getExpr() >= rhs.getExpr()).simplify().is_true();
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
139
138
|
/// Reload operator
|
|
140
139
|
//{%
|
|
141
140
|
friend SingleAbsValue operator==(const SingleAbsValue &lhs, const SingleAbsValue &rhs)
|
|
@@ -473,5 +472,4 @@ struct std::hash<SVF::SingleAbsValue>
|
|
|
473
472
|
}
|
|
474
473
|
};
|
|
475
474
|
|
|
476
|
-
|
|
477
475
|
#endif //SVF_SINGLEABSVALUE_H
|
|
@@ -83,7 +83,6 @@ public:
|
|
|
83
83
|
return *this;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
87
86
|
/// Move Constructor
|
|
88
87
|
SymState(SymState &&rhs) noexcept: _exeState(SVFUtil::move(rhs._exeState)),
|
|
89
88
|
_typeState(SVFUtil::move(rhs._typeState)),
|
|
@@ -111,7 +110,6 @@ public:
|
|
|
111
110
|
return _keyNodesSet;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
|
|
115
113
|
void insertKeyNode(NodeID id)
|
|
116
114
|
{
|
|
117
115
|
if (_keyNodesSet.empty())
|
|
@@ -203,8 +201,6 @@ public:
|
|
|
203
201
|
|
|
204
202
|
} // end namespace SVF
|
|
205
203
|
|
|
206
|
-
|
|
207
|
-
|
|
208
204
|
/// Specialise hash for SymState
|
|
209
205
|
template<>
|
|
210
206
|
struct std::hash<SVF::SymState>
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
#include "SVFIR/SVFValue.h"
|
|
40
40
|
#include "Graphs/CFBasicBlockG.h"
|
|
41
41
|
|
|
42
|
-
|
|
43
42
|
namespace SVF
|
|
44
43
|
{
|
|
45
44
|
|
|
@@ -333,7 +332,6 @@ private:
|
|
|
333
332
|
|
|
334
333
|
}; // end class CFBasicBlockGWTOComp
|
|
335
334
|
|
|
336
|
-
|
|
337
335
|
/*!
|
|
338
336
|
* WTO node for CFBasicBlockG
|
|
339
337
|
*/
|
|
@@ -379,7 +377,6 @@ public:
|
|
|
379
377
|
|
|
380
378
|
}; // end class CFBasicBlockGWTONode
|
|
381
379
|
|
|
382
|
-
|
|
383
380
|
/*!
|
|
384
381
|
* WTO cycle for CFBasicBlockG
|
|
385
382
|
*/
|
|
@@ -457,7 +454,6 @@ public:
|
|
|
457
454
|
|
|
458
455
|
}; // end class CFBasicBlockGWTOCycle
|
|
459
456
|
|
|
460
|
-
|
|
461
457
|
/*!
|
|
462
458
|
* Weak topological order for CFBasicBlockG
|
|
463
459
|
*/
|
|
@@ -550,7 +546,6 @@ public:
|
|
|
550
546
|
return it->second;
|
|
551
547
|
}
|
|
552
548
|
|
|
553
|
-
|
|
554
549
|
/// Get the wto-cycle-depth of the given node
|
|
555
550
|
const CFBasicBlockGWTOCycleDepth &getWTOCycleDepth(const CFBasicBlockNode *n) const
|
|
556
551
|
{
|
|
@@ -127,7 +127,6 @@ public:
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
|
|
131
130
|
struct SymbolVectorHash
|
|
132
131
|
{
|
|
133
132
|
size_t operator()(const std::vector<Symbol> &v) const
|
|
@@ -156,7 +155,6 @@ public:
|
|
|
156
155
|
typedef std::vector<Symbol> Production;
|
|
157
156
|
typedef SymbolSet<Production> Productions;
|
|
158
157
|
|
|
159
|
-
|
|
160
158
|
inline Map<std::string, Kind>& getNonterminals()
|
|
161
159
|
{
|
|
162
160
|
return this->nonterminals;
|
|
@@ -364,7 +362,6 @@ public:
|
|
|
364
362
|
return it->second;
|
|
365
363
|
}
|
|
366
364
|
|
|
367
|
-
|
|
368
365
|
const Symbol& getLHSSymbol(const Production& prod) const
|
|
369
366
|
{
|
|
370
367
|
return prod.at(0);
|
|
@@ -384,7 +381,6 @@ public:
|
|
|
384
381
|
|
|
385
382
|
void dump(std::string fileName) const;
|
|
386
383
|
|
|
387
|
-
|
|
388
384
|
const inline u32_t num_generator()
|
|
389
385
|
{
|
|
390
386
|
return newTerminalSubscript++;
|
|
@@ -118,7 +118,6 @@ 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
|
-
|
|
122
121
|
/// Pop recursive callsites
|
|
123
122
|
inline virtual void popRecursiveCallSites(CxtLocDPItem& dpm)
|
|
124
123
|
{
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
-
|
|
24
23
|
/*
|
|
25
24
|
* @file: DDAClient.h
|
|
26
25
|
* @author: yesen
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
*
|
|
31
30
|
*/
|
|
32
31
|
|
|
33
|
-
|
|
34
32
|
#ifndef DDACLIENT_H_
|
|
35
33
|
#define DDACLIENT_H_
|
|
36
34
|
|
|
@@ -118,7 +116,6 @@ private:
|
|
|
118
116
|
bool solveAll; ///< TRUE if all top level pointers are being queried
|
|
119
117
|
};
|
|
120
118
|
|
|
121
|
-
|
|
122
119
|
/**
|
|
123
120
|
* DDA client with function pointers as query candidates.
|
|
124
121
|
*/
|
|
@@ -136,8 +133,6 @@ public:
|
|
|
136
133
|
virtual void performStat(PointerAnalysis* pta);
|
|
137
134
|
};
|
|
138
135
|
|
|
139
|
-
|
|
140
|
-
|
|
141
136
|
/**
|
|
142
137
|
* DDA client with function pointers as query candidates.
|
|
143
138
|
*/
|
|
@@ -79,7 +79,6 @@ public:
|
|
|
79
79
|
}
|
|
80
80
|
//@}
|
|
81
81
|
|
|
82
|
-
|
|
83
82
|
private:
|
|
84
83
|
Set<BranchCondition> brConditions;
|
|
85
84
|
};
|
|
@@ -114,7 +113,6 @@ public:
|
|
|
114
113
|
return _icfgNode;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
|
|
118
116
|
private:
|
|
119
117
|
const ICFGNode *_icfgNode;
|
|
120
118
|
};
|
|
@@ -142,7 +140,6 @@ private:
|
|
|
142
140
|
|
|
143
141
|
}
|
|
144
142
|
|
|
145
|
-
|
|
146
143
|
public:
|
|
147
144
|
/// Singleton design here to make sure we only have one instance during any analysis
|
|
148
145
|
//@{
|
|
@@ -376,7 +376,6 @@ public:
|
|
|
376
376
|
return hasGNode(id);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
|
|
380
379
|
bool hasCFBasicBlockEdge(CFBasicBlockNode *src, CFBasicBlockNode *dst, ICFGEdge *icfgEdge)
|
|
381
380
|
{
|
|
382
381
|
CFBasicBlockEdge edge(src, dst, icfgEdge);
|
|
@@ -436,7 +435,6 @@ public:
|
|
|
436
435
|
_totalCFBasicBlockNode--;
|
|
437
436
|
}
|
|
438
437
|
|
|
439
|
-
|
|
440
438
|
/// Remove node from nodeID
|
|
441
439
|
inline bool removeCFBBNode(NodeID id)
|
|
442
440
|
{
|
|
@@ -468,7 +466,6 @@ public:
|
|
|
468
466
|
|
|
469
467
|
}
|
|
470
468
|
|
|
471
|
-
|
|
472
469
|
namespace SVF
|
|
473
470
|
{
|
|
474
471
|
/* !
|
|
@@ -73,7 +73,6 @@ protected:
|
|
|
73
73
|
CHGKind kind;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
|
|
77
76
|
typedef GenericEdge<CHNode> GenericCHEdgeTy;
|
|
78
77
|
class CHEdge: public GenericCHEdgeTy
|
|
79
78
|
{
|
|
@@ -314,7 +313,6 @@ public:
|
|
|
314
313
|
return chg->getKind() == Standard;
|
|
315
314
|
}
|
|
316
315
|
|
|
317
|
-
|
|
318
316
|
private:
|
|
319
317
|
SVFModule* svfMod;
|
|
320
318
|
u32_t classNum;
|
|
@@ -350,8 +348,8 @@ struct GenericGraphTraits<SVF::CHNode*>
|
|
|
350
348
|
/// for inverse traversal.
|
|
351
349
|
template <>
|
|
352
350
|
struct GenericGraphTraits<Inverse<SVF::CHNode*>>
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
: public GenericGraphTraits<
|
|
352
|
+
Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
|
|
355
353
|
{
|
|
356
354
|
};
|
|
357
355
|
|
|
@@ -86,7 +86,6 @@ public:
|
|
|
86
86
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
|
|
90
89
|
/*!
|
|
91
90
|
* Copy edge
|
|
92
91
|
*/
|
|
@@ -117,7 +116,6 @@ public:
|
|
|
117
116
|
AddrCGEdge(ConstraintNode* s, ConstraintNode* d, EdgeID id);
|
|
118
117
|
};
|
|
119
118
|
|
|
120
|
-
|
|
121
119
|
/*!
|
|
122
120
|
* Copy edge
|
|
123
121
|
*/
|
|
@@ -150,7 +148,6 @@ public:
|
|
|
150
148
|
}
|
|
151
149
|
};
|
|
152
150
|
|
|
153
|
-
|
|
154
151
|
/*!
|
|
155
152
|
* Store edge
|
|
156
153
|
*/
|
|
@@ -184,7 +181,6 @@ public:
|
|
|
184
181
|
}
|
|
185
182
|
};
|
|
186
183
|
|
|
187
|
-
|
|
188
184
|
/*!
|
|
189
185
|
* Load edge
|
|
190
186
|
*/
|
|
@@ -218,7 +214,6 @@ public:
|
|
|
218
214
|
}
|
|
219
215
|
};
|
|
220
216
|
|
|
221
|
-
|
|
222
217
|
/*!
|
|
223
218
|
* Gep edge
|
|
224
219
|
*/
|
|
@@ -172,7 +172,6 @@ public:
|
|
|
172
172
|
static void addCustomGraphFeatures(const GraphType &, GraphWriter &) {}
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
-
|
|
176
175
|
/// DOTGraphTraits - Template class that can be specialized to customize how
|
|
177
176
|
/// graphs are converted to 'dot' graphs. When specializing, you may inherit
|
|
178
177
|
/// from DefaultDOTGraphTraits if you don't need to override everything.
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
//
|
|
21
21
|
//===----------------------------------------------------------------------===//
|
|
22
22
|
|
|
23
|
-
|
|
24
23
|
/*
|
|
25
24
|
* GraphPrinter.h
|
|
26
25
|
*
|
|
@@ -106,6 +105,4 @@ public:
|
|
|
106
105
|
|
|
107
106
|
} // End namespace llvm
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
|
|
111
108
|
#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
|
-
inverse_nodes(const GraphType &G)
|
|
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
|
-
inverse_children(const typename GenericGraphTraits<GraphType>::NodeRef &G)
|
|
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,7 +94,6 @@ public:
|
|
|
94
94
|
return bb;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
97
|
/// Overloading operator << for dumping ICFG node ID
|
|
99
98
|
//@{
|
|
100
99
|
friend OutStream &operator<<(OutStream &o, const ICFGNode &node)
|
|
@@ -254,7 +253,6 @@ public:
|
|
|
254
253
|
//@}
|
|
255
254
|
};
|
|
256
255
|
|
|
257
|
-
|
|
258
256
|
/*!
|
|
259
257
|
* Function entry ICFGNode containing a set of FormalParmVFGNodes of a function
|
|
260
258
|
*/
|
|
@@ -480,7 +478,6 @@ public:
|
|
|
480
478
|
virtual const std::string toString() const;
|
|
481
479
|
};
|
|
482
480
|
|
|
483
|
-
|
|
484
481
|
/*!
|
|
485
482
|
* Return ICFGNode containing (at most one) ActualRetVFGNode at a callsite
|
|
486
483
|
*/
|
|
@@ -123,7 +123,6 @@ public:
|
|
|
123
123
|
else if (SVFUtil::isa<FunExitICFGNode>(node))
|
|
124
124
|
numOfExitNodes++;
|
|
125
125
|
|
|
126
|
-
|
|
127
126
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeIt =
|
|
128
127
|
it->second->OutEdgeBegin();
|
|
129
128
|
ICFGEdge::ICFGEdgeSetTy::iterator edgeEit =
|
|
@@ -161,4 +160,3 @@ public:
|
|
|
161
160
|
} // End namespace SVF
|
|
162
161
|
|
|
163
162
|
#endif /* INCLUDE_UTIL_ICFGSTAT_H_ */
|
|
164
|
-
|
|
@@ -41,7 +41,6 @@ namespace SVF
|
|
|
41
41
|
class PTACallGraphNode;
|
|
42
42
|
class SVFModule;
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
/*
|
|
46
45
|
* Call Graph edge representing a calling relation between two functions
|
|
47
46
|
* Multiple calls from function A to B are merged into one call edge
|
|
@@ -58,7 +57,6 @@ public:
|
|
|
58
57
|
CallRetEdge,TDForkEdge,TDJoinEdge,HareParForEdge
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
|
|
62
60
|
private:
|
|
63
61
|
CallInstSet directCalls;
|
|
64
62
|
CallInstSet indirectCalls;
|
|
@@ -198,7 +196,6 @@ public:
|
|
|
198
196
|
/// Return TRUE if this function can be reached from main.
|
|
199
197
|
bool isReachableFromProgEntry() const;
|
|
200
198
|
|
|
201
|
-
|
|
202
199
|
/// Overloading operator << for dumping ICFG node ID
|
|
203
200
|
//@{
|
|
204
201
|
friend OutStream& operator<< (OutStream &o, const PTACallGraphNode &node)
|
|
@@ -57,7 +57,6 @@ typedef PHIVFGNode PHISVFGNode;
|
|
|
57
57
|
typedef IntraPHIVFGNode IntraPHISVFGNode;
|
|
58
58
|
typedef InterPHIVFGNode InterPHISVFGNode;
|
|
59
59
|
|
|
60
|
-
|
|
61
60
|
/*!
|
|
62
61
|
* Sparse value flow graph
|
|
63
62
|
* Each node stands for a definition, each edge stands for value flow relations
|
|
@@ -346,7 +345,6 @@ protected:
|
|
|
346
345
|
}
|
|
347
346
|
//@}
|
|
348
347
|
|
|
349
|
-
|
|
350
348
|
/// Given a PAGNode, set/get its def SVFG node (definition of top level pointers)
|
|
351
349
|
//@{
|
|
352
350
|
inline void setDef(const PAGNode* pagNode, const SVFGNode* node)
|
|
@@ -131,7 +131,6 @@ public:
|
|
|
131
131
|
virtual const std::string toString() const;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
|
|
135
134
|
/*
|
|
136
135
|
* SVFG Node stands for return mu node (address-taken variables)
|
|
137
136
|
*/
|
|
@@ -173,7 +172,6 @@ public:
|
|
|
173
172
|
virtual const std::string toString() const;
|
|
174
173
|
};
|
|
175
174
|
|
|
176
|
-
|
|
177
175
|
/*
|
|
178
176
|
* SVFG Node stands for callsite mu node (address-taken variables)
|
|
179
177
|
*/
|
|
@@ -202,7 +200,6 @@ public:
|
|
|
202
200
|
return ver;
|
|
203
201
|
}
|
|
204
202
|
|
|
205
|
-
|
|
206
203
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
207
204
|
//@{
|
|
208
205
|
static inline bool classof(const ActualINSVFGNode *)
|
|
@@ -222,7 +219,6 @@ public:
|
|
|
222
219
|
virtual const std::string toString() const;
|
|
223
220
|
};
|
|
224
221
|
|
|
225
|
-
|
|
226
222
|
/*
|
|
227
223
|
* SVFG Node stands for callsite chi node (address-taken variables)
|
|
228
224
|
*/
|
|
@@ -269,7 +265,6 @@ public:
|
|
|
269
265
|
virtual const std::string toString() const;
|
|
270
266
|
};
|
|
271
267
|
|
|
272
|
-
|
|
273
268
|
/*
|
|
274
269
|
* SVFG Node stands for a memory ssa phi node or formalIn or ActualOut
|
|
275
270
|
*/
|
|
@@ -397,7 +392,6 @@ public:
|
|
|
397
392
|
virtual const std::string toString() const;
|
|
398
393
|
};
|
|
399
394
|
|
|
400
|
-
|
|
401
395
|
/*
|
|
402
396
|
* Inter MSSA PHI (formalIN/ActualOUT)
|
|
403
397
|
*/
|
|
@@ -507,7 +501,6 @@ private:
|
|
|
507
501
|
const Version version;
|
|
508
502
|
};
|
|
509
503
|
|
|
510
|
-
|
|
511
504
|
} // End namespace SVF
|
|
512
505
|
|
|
513
506
|
#endif /* INCLUDE_MSSA_SVFGNODE_H_ */
|
|
@@ -32,11 +32,9 @@
|
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
|
|
36
35
|
#ifndef SVFGOPT_H_
|
|
37
36
|
#define SVFGOPT_H_
|
|
38
37
|
|
|
39
|
-
|
|
40
38
|
#include "Graphs/SVFG.h"
|
|
41
39
|
#include "Util/WorkList.h"
|
|
42
40
|
|
|
@@ -345,7 +343,6 @@ private:
|
|
|
345
343
|
}
|
|
346
344
|
//@}
|
|
347
345
|
|
|
348
|
-
|
|
349
346
|
NodeIDToNodeIDMap actualInToDefMap; ///< map actual-in to its def-site node
|
|
350
347
|
NodeIDToNodeIDMap formalOutToDefMap; ///< map formal-out to its def-site node
|
|
351
348
|
NodeBS defNodes; ///< preserved def nodes of formal-in/actual-out
|