svf-lib 1.0.2309 → 1.0.2311
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-x86_64/Release-build/bin/ae +0 -0
- package/SVF-linux-x86_64/Release-build/include/Util/Options.h +4 -8
- package/SVF-linux-x86_64/Release-build/lib/libSvfCore.so +0 -0
- package/SVF-linux-x86_64/Release-build/lib/libSvfLLVM.so.16 +0 -0
- package/SVF-osx/Release-build/include/SVFIR/SVFType.h +26 -12
- package/SVF-osx/Release-build/lib/libSvfCore.dylib +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.dylib +0 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -4,14 +4,10 @@
|
|
|
4
4
|
#define OPTIONS_H_
|
|
5
5
|
|
|
6
6
|
#include <sstream>
|
|
7
|
-
#include "FastCluster/fastcluster.h"
|
|
8
7
|
#include "Util/CommandLine.h"
|
|
9
8
|
#include "Util/PTAStat.h"
|
|
10
9
|
#include "MemoryModel/PointerAnalysisImpl.h"
|
|
11
10
|
#include "Util/NodeIDAllocator.h"
|
|
12
|
-
#include "MSSA/MemSSA.h"
|
|
13
|
-
#include "WPA/WPAPass.h"
|
|
14
|
-
#include "AE/Svfexe/AbstractInterpretation.h"
|
|
15
11
|
|
|
16
12
|
namespace SVF
|
|
17
13
|
{
|
|
@@ -54,7 +50,7 @@ public:
|
|
|
54
50
|
/// TODO: we can separate it into two options, and make Clusterer::cluster take in a method
|
|
55
51
|
/// argument rather than plugging Options::ClusterMethod *inside* Clusterer::cluster
|
|
56
52
|
/// directly, but it seems we will always want single anyway, and this is for testing.
|
|
57
|
-
static const OptionMap<
|
|
53
|
+
static const OptionMap<u32_t> ClusterMethod;
|
|
58
54
|
|
|
59
55
|
/// Cluster partitions separately.
|
|
60
56
|
static const Option<bool> RegionedClustering;
|
|
@@ -143,7 +139,7 @@ public:
|
|
|
143
139
|
static const Option<bool> DumpMSSA;
|
|
144
140
|
static const Option<std::string> MSSAFun;
|
|
145
141
|
// static const llvm::cl::opt<string> MSSAFun;
|
|
146
|
-
static const OptionMap<
|
|
142
|
+
static const OptionMap<u32_t> MemPar;
|
|
147
143
|
|
|
148
144
|
// SVFG builder (SVFGBuilder.cpp)
|
|
149
145
|
static const Option<bool> SVFGWithIndirectCall;
|
|
@@ -223,7 +219,7 @@ public:
|
|
|
223
219
|
static const Option<bool> SABERFULLSVFG;
|
|
224
220
|
static const Option<bool> PrintAliases;
|
|
225
221
|
static OptionMultiple<PointerAnalysis::PTATY> PASelected;
|
|
226
|
-
static OptionMultiple<
|
|
222
|
+
static OptionMultiple<u32_t> AliasRule;
|
|
227
223
|
|
|
228
224
|
// DOTGraphTraits
|
|
229
225
|
static const Option<bool> ShowHiddenNode;
|
|
@@ -246,7 +242,7 @@ public:
|
|
|
246
242
|
// Abstract Execution
|
|
247
243
|
static const Option<u32_t> WidenDelay;
|
|
248
244
|
/// recursion handling mode, Default: TOP
|
|
249
|
-
static const OptionMap<
|
|
245
|
+
static const OptionMap<u32_t> HandleRecur;
|
|
250
246
|
/// the max time consumptions (seconds). Default: 4 hours 14400s
|
|
251
247
|
static const Option<u32_t> Timeout;
|
|
252
248
|
/// bug info output file, Default: output.db
|
|
Binary file
|
|
Binary file
|
|
@@ -197,15 +197,15 @@ private:
|
|
|
197
197
|
StInfo* typeinfo; ///< SVF's TypeInfo
|
|
198
198
|
bool isSingleValTy; ///< The type represents a single value, not struct or
|
|
199
199
|
u32_t byteSize; ///< LLVM Byte Size
|
|
200
|
+
u32_t id;
|
|
200
201
|
///< array
|
|
201
202
|
|
|
202
203
|
protected:
|
|
203
|
-
SVFType(bool svt, SVFTyKind k, u32_t Sz = 1)
|
|
204
|
+
SVFType(bool svt, SVFTyKind k, u32_t i = 0, u32_t Sz = 1)
|
|
204
205
|
: kind(k), typeinfo(nullptr),
|
|
205
|
-
isSingleValTy(svt), byteSize(Sz)
|
|
206
|
+
isSingleValTy(svt), byteSize(Sz), id(i)
|
|
206
207
|
{
|
|
207
208
|
}
|
|
208
|
-
|
|
209
209
|
public:
|
|
210
210
|
SVFType(void) = delete;
|
|
211
211
|
virtual ~SVFType() {}
|
|
@@ -222,6 +222,11 @@ public:
|
|
|
222
222
|
virtual void print(std::ostream& os) const = 0;
|
|
223
223
|
|
|
224
224
|
|
|
225
|
+
u32_t getId() const
|
|
226
|
+
{
|
|
227
|
+
return id;
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
inline void setTypeInfo(StInfo* ti)
|
|
226
231
|
{
|
|
227
232
|
typeinfo = ti;
|
|
@@ -275,8 +280,8 @@ class SVFPointerType : public SVFType
|
|
|
275
280
|
friend class SVFIRReader;
|
|
276
281
|
|
|
277
282
|
public:
|
|
278
|
-
SVFPointerType(u32_t byteSize = 1)
|
|
279
|
-
: SVFType(true, SVFPointerTy, byteSize)
|
|
283
|
+
SVFPointerType(u32_t i, u32_t byteSize = 1)
|
|
284
|
+
: SVFType(true, SVFPointerTy, i, byteSize)
|
|
280
285
|
{
|
|
281
286
|
}
|
|
282
287
|
|
|
@@ -297,7 +302,7 @@ private:
|
|
|
297
302
|
short signAndWidth; ///< For printing
|
|
298
303
|
|
|
299
304
|
public:
|
|
300
|
-
SVFIntegerType(u32_t byteSize = 1) : SVFType(true, SVFIntegerTy, byteSize) {}
|
|
305
|
+
SVFIntegerType(u32_t i, u32_t byteSize = 1) : SVFType(true, SVFIntegerTy, i, byteSize) {}
|
|
301
306
|
static inline bool classof(const SVFType* node)
|
|
302
307
|
{
|
|
303
308
|
return node->getKind() == SVFIntegerTy;
|
|
@@ -327,8 +332,8 @@ private:
|
|
|
327
332
|
bool varArg;
|
|
328
333
|
|
|
329
334
|
public:
|
|
330
|
-
SVFFunctionType(const SVFType* rt, const std::vector<const SVFType*>& p, bool isvararg)
|
|
331
|
-
: SVFType(false, SVFFunctionTy, 1), retTy(rt), params(p), varArg(isvararg)
|
|
335
|
+
SVFFunctionType(u32_t i, const SVFType* rt, const std::vector<const SVFType*>& p, bool isvararg)
|
|
336
|
+
: SVFType(false, SVFFunctionTy, i, 1), retTy(rt), params(p), varArg(isvararg)
|
|
332
337
|
{
|
|
333
338
|
}
|
|
334
339
|
|
|
@@ -363,9 +368,13 @@ class SVFStructType : public SVFType
|
|
|
363
368
|
private:
|
|
364
369
|
/// @brief Field for printing & debugging
|
|
365
370
|
std::string name;
|
|
371
|
+
std::vector<const SVFType*> fields;
|
|
366
372
|
|
|
367
373
|
public:
|
|
368
|
-
SVFStructType(u32_t
|
|
374
|
+
SVFStructType(u32_t i, std::vector<const SVFType *> &f, u32_t byteSize = 1) :
|
|
375
|
+
SVFType(false, SVFStructTy, i, byteSize), fields(f)
|
|
376
|
+
{
|
|
377
|
+
}
|
|
369
378
|
|
|
370
379
|
static inline bool classof(const SVFType* node)
|
|
371
380
|
{
|
|
@@ -386,6 +395,11 @@ public:
|
|
|
386
395
|
{
|
|
387
396
|
name = std::move(structName);
|
|
388
397
|
}
|
|
398
|
+
|
|
399
|
+
const std::vector<const SVFType*>& getFieldTypes() const
|
|
400
|
+
{
|
|
401
|
+
return fields;
|
|
402
|
+
}
|
|
389
403
|
};
|
|
390
404
|
|
|
391
405
|
class SVFArrayType : public SVFType
|
|
@@ -398,8 +412,8 @@ private:
|
|
|
398
412
|
const SVFType* typeOfElement; /// For printing & debugging
|
|
399
413
|
|
|
400
414
|
public:
|
|
401
|
-
SVFArrayType(u32_t byteSize = 1)
|
|
402
|
-
: SVFType(false, SVFArrayTy, byteSize), numOfElement(0), typeOfElement(nullptr)
|
|
415
|
+
SVFArrayType(u32_t i, u32_t byteSize = 1)
|
|
416
|
+
: SVFType(false, SVFArrayTy, i, byteSize), numOfElement(0), typeOfElement(nullptr)
|
|
403
417
|
{
|
|
404
418
|
}
|
|
405
419
|
|
|
@@ -437,7 +451,7 @@ private:
|
|
|
437
451
|
std::string repr; /// Field representation for printing
|
|
438
452
|
|
|
439
453
|
public:
|
|
440
|
-
SVFOtherType(bool isSingleValueTy, u32_t byteSize = 1) : SVFType(isSingleValueTy, SVFOtherTy, byteSize) {}
|
|
454
|
+
SVFOtherType(u32_t i, bool isSingleValueTy, u32_t byteSize = 1) : SVFType(isSingleValueTy, SVFOtherTy, i, byteSize) {}
|
|
441
455
|
|
|
442
456
|
static inline bool classof(const SVFType* node)
|
|
443
457
|
{
|
|
Binary file
|
|
Binary file
|