svf-lib 1.0.1375 → 1.0.1376
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-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/include/AbstractExecution/AbstractValue.h +79 -0
- package/SVF-osx/svf/include/include/AbstractExecution/AddressValue.h +210 -0
- package/SVF-osx/svf/include/include/AbstractExecution/ExeState.h +223 -0
- package/SVF-osx/svf/include/include/AbstractExecution/IntervalExeState.h +425 -0
- package/SVF-osx/svf/include/include/AbstractExecution/IntervalValue.h +868 -0
- package/SVF-osx/svf/include/include/AbstractExecution/NumericLiteral.h +406 -0
- package/SVF-osx/svf/include/include/AbstractExecution/RelExeState.h +225 -0
- package/SVF-osx/svf/include/include/AbstractExecution/RelationSolver.h +68 -0
- package/SVF-osx/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +186 -0
- package/SVF-osx/svf/include/include/AbstractExecution/WTO.h +845 -0
- package/SVF-osx/svf/include/include/CFL/CFGNormalizer.h +84 -0
- package/SVF-osx/svf/include/include/CFL/CFLAlias.h +176 -0
- package/SVF-osx/svf/include/include/CFL/CFLBase.h +115 -0
- package/SVF-osx/svf/include/include/CFL/CFLData.h +316 -0
- package/SVF-osx/svf/include/include/CFL/CFLDataBuilder.h +91 -0
- package/SVF-osx/svf/include/include/CFL/CFLGramGraphChecker.h +74 -0
- package/SVF-osx/svf/include/include/CFL/CFLGrammar.h +468 -0
- package/SVF-osx/svf/include/include/CFL/CFLGrammar.txt +15 -0
- package/SVF-osx/svf/include/include/CFL/CFLGraphBuilder.h +193 -0
- package/SVF-osx/svf/include/include/CFL/CFLSolver.h +136 -0
- package/SVF-osx/svf/include/include/CFL/CFLStat.h +67 -0
- package/SVF-osx/svf/include/include/CFL/CFLVF.h +65 -0
- package/SVF-osx/svf/include/include/CFL/GrammarBuilder.h +100 -0
- package/SVF-osx/svf/include/include/CFL/PEGGrammar.txt +11 -0
- package/SVF-osx/svf/include/include/CFL/VFG.txt +7 -0
- package/SVF-osx/svf/include/include/DDA/ContextDDA.h +230 -0
- package/SVF-osx/svf/include/include/DDA/DDAClient.h +168 -0
- package/SVF-osx/svf/include/include/DDA/DDAPass.h +99 -0
- package/SVF-osx/svf/include/include/DDA/DDAStat.h +138 -0
- package/SVF-osx/svf/include/include/DDA/DDAVFSolver.h +789 -0
- package/SVF-osx/svf/include/include/DDA/FlowDDA.h +178 -0
- package/SVF-osx/svf/include/include/FastCluster/LICENSE.TXT +13 -0
- package/SVF-osx/svf/include/include/FastCluster/fastcluster.h +80 -0
- package/SVF-osx/svf/include/include/Graphs/CFLGraph.h +215 -0
- package/SVF-osx/svf/include/include/Graphs/CHG.h +351 -0
- package/SVF-osx/svf/include/include/Graphs/ConsG.h +408 -0
- package/SVF-osx/svf/include/include/Graphs/ConsGEdge.h +353 -0
- package/SVF-osx/svf/include/include/Graphs/ConsGNode.h +391 -0
- package/SVF-osx/svf/include/include/Graphs/DOTGraphTraits.h +188 -0
- package/SVF-osx/svf/include/include/Graphs/GenericGraph.h +620 -0
- package/SVF-osx/svf/include/include/Graphs/GraphPrinter.h +111 -0
- package/SVF-osx/svf/include/include/Graphs/GraphTraits.h +150 -0
- package/SVF-osx/svf/include/include/Graphs/GraphWriter.h +380 -0
- package/SVF-osx/svf/include/include/Graphs/ICFG.h +331 -0
- package/SVF-osx/svf/include/include/Graphs/ICFGEdge.h +264 -0
- package/SVF-osx/svf/include/include/Graphs/ICFGNode.h +523 -0
- package/SVF-osx/svf/include/include/Graphs/ICFGStat.h +164 -0
- package/SVF-osx/svf/include/include/Graphs/IRGraph.h +243 -0
- package/SVF-osx/svf/include/include/Graphs/PTACallGraph.h +471 -0
- package/SVF-osx/svf/include/include/Graphs/SVFG.h +490 -0
- package/SVF-osx/svf/include/include/Graphs/SVFGEdge.h +237 -0
- package/SVF-osx/svf/include/include/Graphs/SVFGNode.h +513 -0
- package/SVF-osx/svf/include/include/Graphs/SVFGOPT.h +362 -0
- package/SVF-osx/svf/include/include/Graphs/SVFGStat.h +273 -0
- package/SVF-osx/svf/include/include/Graphs/ThreadCallGraph.h +422 -0
- package/SVF-osx/svf/include/include/Graphs/VFG.h +664 -0
- package/SVF-osx/svf/include/include/Graphs/VFGEdge.h +295 -0
- package/SVF-osx/svf/include/include/Graphs/VFGNode.h +1197 -0
- package/SVF-osx/svf/include/include/MSSA/MSSAMuChi.h +722 -0
- package/SVF-osx/svf/include/include/MSSA/MemPartition.h +169 -0
- package/SVF-osx/svf/include/include/MSSA/MemRegion.h +491 -0
- package/SVF-osx/svf/include/include/MSSA/MemSSA.h +452 -0
- package/SVF-osx/svf/include/include/MSSA/SVFGBuilder.h +98 -0
- package/SVF-osx/svf/include/include/MTA/FSMPTA.h +270 -0
- package/SVF-osx/svf/include/include/MTA/LockAnalysis.h +517 -0
- package/SVF-osx/svf/include/include/MTA/MHP.h +565 -0
- package/SVF-osx/svf/include/include/MTA/MTA.h +101 -0
- package/SVF-osx/svf/include/include/MTA/MTAResultValidator.h +448 -0
- package/SVF-osx/svf/include/include/MTA/MTAStat.h +74 -0
- package/SVF-osx/svf/include/include/MTA/PCG.h +229 -0
- package/SVF-osx/svf/include/include/MTA/TCT.h +599 -0
- package/SVF-osx/svf/include/include/MemoryModel/AbstractPointsToDS.h +316 -0
- package/SVF-osx/svf/include/include/MemoryModel/ConditionalPT.h +878 -0
- package/SVF-osx/svf/include/include/MemoryModel/LocationSet.h +148 -0
- package/SVF-osx/svf/include/include/MemoryModel/MutablePointsToDS.h +1025 -0
- package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToCache.h +463 -0
- package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToDS.h +955 -0
- package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysis.h +452 -0
- package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysisImpl.h +590 -0
- package/SVF-osx/svf/include/include/MemoryModel/PointsTo.h +255 -0
- package/SVF-osx/svf/include/include/MemoryModel/SVFLoop.h +164 -0
- package/SVF-osx/svf/include/include/SABER/DoubleFreeChecker.h +76 -0
- package/SVF-osx/svf/include/include/SABER/FileChecker.h +82 -0
- package/SVF-osx/svf/include/include/SABER/LeakChecker.h +124 -0
- package/SVF-osx/svf/include/include/SABER/ProgSlice.h +313 -0
- package/SVF-osx/svf/include/include/SABER/SaberCheckerAPI.h +166 -0
- package/SVF-osx/svf/include/include/SABER/SaberCondAllocator.h +310 -0
- package/SVF-osx/svf/include/include/SABER/SaberSVFGBuilder.h +104 -0
- package/SVF-osx/svf/include/include/SABER/SrcSnkDDA.h +321 -0
- package/SVF-osx/svf/include/include/SABER/SrcSnkSolver.h +186 -0
- package/SVF-osx/svf/include/include/SVFIR/PAGBuilderFromFile.h +80 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFIR.h +659 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFModule.h +233 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFStatements.h +1136 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFType.h +527 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFValue.h +1120 -0
- package/SVF-osx/svf/include/include/SVFIR/SVFVariables.h +721 -0
- package/SVF-osx/svf/include/include/SVFIR/SymbolTableInfo.h +597 -0
- package/SVF-osx/svf/include/include/Util/Annotator.h +180 -0
- package/SVF-osx/svf/include/include/Util/BitVector.h +55 -0
- package/SVF-osx/svf/include/include/Util/CallGraphBuilder.h +74 -0
- package/SVF-osx/svf/include/include/Util/Casting.h +426 -0
- package/SVF-osx/svf/include/include/Util/CommandLine.h +530 -0
- package/SVF-osx/svf/include/include/Util/CoreBitVector.h +214 -0
- package/SVF-osx/svf/include/include/Util/CppUtil.h +81 -0
- package/SVF-osx/svf/include/include/Util/CxtStmt.h +501 -0
- package/SVF-osx/svf/include/include/Util/DPItem.h +618 -0
- package/SVF-osx/svf/include/include/Util/ExtAPI.h +339 -0
- package/SVF-osx/svf/include/include/Util/ExtAPI.json +5707 -0
- package/SVF-osx/svf/include/include/Util/GraphReachSolver.h +186 -0
- package/SVF-osx/svf/include/include/Util/NodeIDAllocator.h +194 -0
- package/SVF-osx/svf/include/include/Util/Options.h +266 -0
- package/SVF-osx/svf/include/include/Util/PTAStat.h +65 -0
- package/SVF-osx/svf/include/include/Util/SCC.h +354 -0
- package/SVF-osx/svf/include/include/Util/SVFStat.h +100 -0
- package/SVF-osx/svf/include/include/Util/SVFUtil.h +660 -0
- package/SVF-osx/svf/include/include/Util/SparseBitVector.h +1202 -0
- package/SVF-osx/svf/include/include/Util/ThreadAPI.h +330 -0
- package/SVF-osx/svf/include/include/Util/WorkList.h +317 -0
- package/SVF-osx/svf/include/include/Util/Z3Expr.h +318 -0
- package/SVF-osx/svf/include/include/Util/cJSON.h +300 -0
- package/SVF-osx/svf/include/include/Util/iterator.h +407 -0
- package/SVF-osx/svf/include/include/Util/iterator_range.h +76 -0
- package/SVF-osx/svf/include/include/WPA/Andersen.h +416 -0
- package/SVF-osx/svf/include/include/WPA/AndersenPWC.h +160 -0
- package/SVF-osx/svf/include/include/WPA/CSC.h +95 -0
- package/SVF-osx/svf/include/include/WPA/FlowSensitive.h +317 -0
- package/SVF-osx/svf/include/include/WPA/Steensgaard.h +126 -0
- package/SVF-osx/svf/include/include/WPA/TypeAnalysis.h +83 -0
- package/SVF-osx/svf/include/include/WPA/VersionedFlowSensitive.h +287 -0
- package/SVF-osx/svf/include/include/WPA/WPAFSSolver.h +254 -0
- package/SVF-osx/svf/include/include/WPA/WPAPass.h +119 -0
- package/SVF-osx/svf/include/include/WPA/WPASolver.h +205 -0
- package/SVF-osx/svf/include/include/WPA/WPAStat.h +222 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +250 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +94 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +73 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +484 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +106 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +61 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +360 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +466 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +417 -0
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +110 -0
- package/package.json +1 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Annotator.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: May 4, 2014
|
|
5
|
+
* Author: Yulei Sui
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#ifndef ANNOTATOR_H_
|
|
9
|
+
#define ANNOTATOR_H_
|
|
10
|
+
|
|
11
|
+
#include <SVF-LLVM/BasicTypes.h> // TODO: Remove LLVM Header
|
|
12
|
+
#include "SVFIR/SVFValue.h"
|
|
13
|
+
#include <vector>
|
|
14
|
+
|
|
15
|
+
namespace SVF
|
|
16
|
+
{
|
|
17
|
+
|
|
18
|
+
/*!
|
|
19
|
+
* Program annotator to write meta data information on LLVM IR
|
|
20
|
+
*/
|
|
21
|
+
class Annotator
|
|
22
|
+
{
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/// Constructor
|
|
26
|
+
Annotator()
|
|
27
|
+
{
|
|
28
|
+
SB_SLICESOURCE = "SOURCE_";
|
|
29
|
+
SB_SLICESINK = "SINK_";
|
|
30
|
+
SB_FESIBLE = "FESIBLE_";
|
|
31
|
+
SB_INFESIBLE = "INFESIBLE_";
|
|
32
|
+
|
|
33
|
+
DR_NOT_CHECK = "DRNOTCHECK_";
|
|
34
|
+
DR_CHECK = "DRCHECK_";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// Destructor
|
|
38
|
+
virtual ~Annotator()
|
|
39
|
+
{
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// SB Has flag methods
|
|
43
|
+
//@{
|
|
44
|
+
inline bool hasSBSourceFlag(Instruction* inst) const
|
|
45
|
+
{
|
|
46
|
+
std::vector<Value* > values;
|
|
47
|
+
return evalMDTag(inst, inst, SB_SLICESOURCE, values);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
inline bool hasSBSinkFlag(Instruction* inst) const
|
|
51
|
+
{
|
|
52
|
+
std::vector<Value* > values;
|
|
53
|
+
return evalMDTag(inst, inst, SB_SLICESINK, values);
|
|
54
|
+
}
|
|
55
|
+
//@}
|
|
56
|
+
|
|
57
|
+
/// Race Detection Has flag methods
|
|
58
|
+
//@{
|
|
59
|
+
inline bool hasDRNotCheckFlag(Instruction* inst) const
|
|
60
|
+
{
|
|
61
|
+
//std::vector<Value* > values;
|
|
62
|
+
//return evalMDTag(inst, inst, DR_NOT_CHECK, values);
|
|
63
|
+
return inst->getMetadata(DR_NOT_CHECK);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
inline bool hasDRNotCheckFlag(const Instruction* inst) const
|
|
67
|
+
{
|
|
68
|
+
//std::vector<Value* > values;
|
|
69
|
+
//return evalMDTag(inst, inst, DR_NOT_CHECK, values);
|
|
70
|
+
return inst->getMetadata(DR_NOT_CHECK);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
inline bool hasDRCheckFlag(Instruction* inst) const
|
|
74
|
+
{
|
|
75
|
+
//std::vector<Value* > values;
|
|
76
|
+
//return evalMDTag(inst, inst, DR_CHECK, values);
|
|
77
|
+
return inst->getMetadata(DR_CHECK);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
inline bool hasDRCheckFlag(const Instruction* inst) const
|
|
81
|
+
{
|
|
82
|
+
//std::vector<Value* > values;
|
|
83
|
+
//return evalMDTag(inst, inst, DR_CHECK, values);
|
|
84
|
+
return inst->getMetadata(DR_CHECK);
|
|
85
|
+
}
|
|
86
|
+
//@}
|
|
87
|
+
|
|
88
|
+
/// Simple add/remove meta data information
|
|
89
|
+
//@{
|
|
90
|
+
inline void addMDTag(Instruction* inst, std::string str)
|
|
91
|
+
{
|
|
92
|
+
addMDTag(inst, inst, str);
|
|
93
|
+
}
|
|
94
|
+
inline void removeMDTag(Instruction* inst, std::string str)
|
|
95
|
+
{
|
|
96
|
+
removeMDTag(inst, inst, str);
|
|
97
|
+
}
|
|
98
|
+
//@}
|
|
99
|
+
|
|
100
|
+
/// manipulate llvm meta data on instructions for a specific value
|
|
101
|
+
//@{
|
|
102
|
+
/// add flag to llvm metadata
|
|
103
|
+
inline void addMDTag(Instruction* inst, Value* val, std::string str)
|
|
104
|
+
{
|
|
105
|
+
assert(!val->getType()->isVoidTy() && "expecting non-void value for MD!");
|
|
106
|
+
std::vector<Value* > values;
|
|
107
|
+
//std::vector<llvm::Metadata *> metavalues;
|
|
108
|
+
// add the flag if we did not see it before
|
|
109
|
+
if (evalMDTag(inst, val, str, values) == false)
|
|
110
|
+
{
|
|
111
|
+
|
|
112
|
+
values.push_back(val);
|
|
113
|
+
//llvm::ArrayRef<llvm::Metadata*> ar(metavalues);
|
|
114
|
+
// FIXME: delete the old MDNode
|
|
115
|
+
inst->setMetadata(str, MDNode::get(inst->getContext(), llvm::None));
|
|
116
|
+
//inst->setMetadata(str, llvm::MDNode::get(inst->getContext(), ar));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// remove flag from llvm metadata
|
|
121
|
+
inline void removeMDTag(Instruction* inst, Value* val, std::string str)
|
|
122
|
+
{
|
|
123
|
+
assert(!val->getType()->isVoidTy() && "expecting non-void value for MD!");
|
|
124
|
+
std::vector<Value* > values;
|
|
125
|
+
|
|
126
|
+
// remove the flag if it is there
|
|
127
|
+
if (evalMDTag(inst, val, str, values) == true)
|
|
128
|
+
{
|
|
129
|
+
llvm::ArrayRef<Value* > ar(values);
|
|
130
|
+
// FIXME: delete the old MDNode
|
|
131
|
+
//inst->setMetadata(str, llvm::MDNode::get(inst->getContext(), ar));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//@}
|
|
135
|
+
|
|
136
|
+
private:
|
|
137
|
+
|
|
138
|
+
/// evaluate llvm metadata
|
|
139
|
+
inline bool evalMDTag(const Instruction* inst, const Value* val, std::string str,
|
|
140
|
+
std::vector<Value* >&) const
|
|
141
|
+
{
|
|
142
|
+
|
|
143
|
+
assert(val && "value should not be null");
|
|
144
|
+
|
|
145
|
+
bool hasFlag = false;
|
|
146
|
+
if (MDNode *mdNode = inst->getMetadata(str))
|
|
147
|
+
{
|
|
148
|
+
/// When mdNode has operands and value is not null
|
|
149
|
+
for (unsigned k = 0; k < mdNode->getNumOperands(); ++k)
|
|
150
|
+
{
|
|
151
|
+
//Value* v = mdNode->getOperand(k);
|
|
152
|
+
// if (v == val)
|
|
153
|
+
// hasFlag = true;
|
|
154
|
+
//else
|
|
155
|
+
// values.push_back(v);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return hasFlag;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
protected:
|
|
162
|
+
|
|
163
|
+
/// Saber annotations
|
|
164
|
+
//@{
|
|
165
|
+
const char* SB_SLICESOURCE;
|
|
166
|
+
const char* SB_SLICESINK;
|
|
167
|
+
const char* SB_FESIBLE;
|
|
168
|
+
const char* SB_INFESIBLE;
|
|
169
|
+
//@}
|
|
170
|
+
|
|
171
|
+
/// Race Detection annotations
|
|
172
|
+
//@{
|
|
173
|
+
const char* DR_NOT_CHECK;
|
|
174
|
+
const char* DR_CHECK;
|
|
175
|
+
//@}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
} // End namespace SVF
|
|
179
|
+
|
|
180
|
+
#endif /* ANNOTATOR_H_ */
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//===- BitVector.h -- variably sized bit vector data structure ------------//
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* BitVector.h
|
|
5
|
+
*
|
|
6
|
+
* Contiguous bit vector with trailing 0s stripped.
|
|
7
|
+
*
|
|
8
|
+
* Created on: Jul 4, 2021
|
|
9
|
+
* Author: Mohamad Barbar
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#ifndef BITVECTOR_H_
|
|
13
|
+
#define BITVECTOR_H_
|
|
14
|
+
|
|
15
|
+
#include <Util/CoreBitVector.h>
|
|
16
|
+
|
|
17
|
+
namespace SVF
|
|
18
|
+
{
|
|
19
|
+
|
|
20
|
+
/// A contiguous bit vector in which trailing 0s are stripped.
|
|
21
|
+
/// Does not shrink - only grows. This isn't a problem for
|
|
22
|
+
/// points-to analysis, usually, but may be for other applications.
|
|
23
|
+
///
|
|
24
|
+
/// Implemented as a CBV that has an offset of zero.
|
|
25
|
+
/// There is an extremely slight performance penalty in the form
|
|
26
|
+
/// of checking if we need to extend backwards.
|
|
27
|
+
/// Since the CBV also grows monotonically, this means this BV will
|
|
28
|
+
/// always contain a word for 0 till the last ever set bit.
|
|
29
|
+
/// TODO: if we change the CBV to shrink, we need to modify this
|
|
30
|
+
/// implementation accordingly.
|
|
31
|
+
class BitVector : public CoreBitVector
|
|
32
|
+
{
|
|
33
|
+
public:
|
|
34
|
+
/// Construct empty BV.
|
|
35
|
+
BitVector(void);
|
|
36
|
+
|
|
37
|
+
/// Construct empty BV with space reserved for n Words.
|
|
38
|
+
BitVector(size_t n);
|
|
39
|
+
|
|
40
|
+
/// Copy constructor.
|
|
41
|
+
BitVector(const BitVector &bv);
|
|
42
|
+
|
|
43
|
+
/// Move constructor.
|
|
44
|
+
BitVector(BitVector &&bv);
|
|
45
|
+
|
|
46
|
+
/// Copy assignment.
|
|
47
|
+
BitVector &operator=(const BitVector &rhs);
|
|
48
|
+
|
|
49
|
+
/// Move assignment.
|
|
50
|
+
BitVector &operator=(BitVector &&rhs);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
}; // namespace SVF
|
|
54
|
+
|
|
55
|
+
#endif // BITVECTOR_H_
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
//===- CallGraphBuilder.h ----------------------------------------------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* CallGraphBuilder.h
|
|
26
|
+
*
|
|
27
|
+
* Created on: 13Mar.,2020
|
|
28
|
+
* Author: Yulei Sui
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#ifndef INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
|
|
32
|
+
#define INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
|
|
33
|
+
|
|
34
|
+
#include "Graphs/PTACallGraph.h"
|
|
35
|
+
#include "Graphs/ThreadCallGraph.h"
|
|
36
|
+
|
|
37
|
+
namespace SVF
|
|
38
|
+
{
|
|
39
|
+
|
|
40
|
+
class ICFG;
|
|
41
|
+
|
|
42
|
+
class CallGraphBuilder
|
|
43
|
+
{
|
|
44
|
+
|
|
45
|
+
protected:
|
|
46
|
+
PTACallGraph* callgraph;
|
|
47
|
+
ICFG* icfg;
|
|
48
|
+
public:
|
|
49
|
+
CallGraphBuilder(PTACallGraph* cg, ICFG* i): callgraph(cg),icfg(i)
|
|
50
|
+
{
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// Build normal callgraph
|
|
54
|
+
PTACallGraph* buildCallGraph(SVFModule* svfModule);
|
|
55
|
+
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
class ThreadCallGraphBuilder : public CallGraphBuilder
|
|
59
|
+
{
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
ThreadCallGraphBuilder(ThreadCallGraph* cg, ICFG* i): CallGraphBuilder(cg,i)
|
|
63
|
+
{
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// Build thread-aware callgraph
|
|
67
|
+
PTACallGraph* buildThreadCallGraph(SVFModule* svfModule);
|
|
68
|
+
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // End namespace SVF
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
#endif /* INCLUDE_UTIL_CALLGRAPHBUILDER_H_ */
|