svf-lib 1.0.805 → 1.0.809
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/lib/libSvf.a +0 -0
- package/SVF-linux/include/DDA/DDAVFSolver.h +1 -1
- package/SVF-linux/include/MSSA/SVFGBuilder.h +0 -2
- package/SVF-linux/include/MemoryModel/LocationSet.h +4 -0
- package/SVF-linux/include/MemoryModel/SVFStatements.h +4 -0
- package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +27 -6
- package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/DDA/DDAVFSolver.h +1 -1
- package/SVF-osx/include/MSSA/SVFGBuilder.h +0 -2
- package/SVF-osx/include/MemoryModel/LocationSet.h +4 -0
- package/SVF-osx/include/MemoryModel/SVFStatements.h +4 -0
- package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +27 -6
- package/package.json +1 -1
|
Binary file
|
|
@@ -290,7 +290,7 @@ protected:
|
|
|
290
290
|
virtual inline void buildSVFG(SVFIR* pag)
|
|
291
291
|
{
|
|
292
292
|
_ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
|
|
293
|
-
_svfg = svfgBuilder.
|
|
293
|
+
_svfg = svfgBuilder.buildPTROnlySVFG(_ander);
|
|
294
294
|
_pag = _svfg->getPAG();
|
|
295
295
|
}
|
|
296
296
|
/// Reset visited map for next points-to query
|
|
@@ -74,9 +74,7 @@ public:
|
|
|
74
74
|
static SVFG* globalSvfg;
|
|
75
75
|
|
|
76
76
|
SVFG* buildPTROnlySVFG(BVDataPTAImpl* pta);
|
|
77
|
-
SVFG* buildPTROnlySVFGWithoutOPT(BVDataPTAImpl* pta);
|
|
78
77
|
SVFG* buildFullSVFG(BVDataPTAImpl* pta);
|
|
79
|
-
SVFG* buildFullSVFGWithoutOPT(BVDataPTAImpl* pta);
|
|
80
78
|
|
|
81
79
|
/// Clean up
|
|
82
80
|
static void releaseSVFG()
|
|
@@ -131,8 +131,12 @@ public:
|
|
|
131
131
|
}
|
|
132
132
|
//@}
|
|
133
133
|
|
|
134
|
+
/// Return accumulated constant offset given OffsetValueVec
|
|
134
135
|
s64_t accumulateConstantOffset() const;
|
|
135
136
|
|
|
137
|
+
/// Return element number of a type.
|
|
138
|
+
u32_t getElementNum(const Type* type) const;
|
|
139
|
+
|
|
136
140
|
bool addOffsetValue(const Value* offsetValue, const Type* type);
|
|
137
141
|
|
|
138
142
|
/// Return TRUE if this is a constant location set.
|
|
@@ -364,7 +364,11 @@ public:
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
///Get a reference to the components of struct_info.
|
|
367
|
-
|
|
367
|
+
/// Flatterned full offset information of a struct including its array fields
|
|
368
|
+
const std::vector<u32_t>& getFlattenedOffsetVec(const StructType *T);
|
|
369
|
+
/// Flatterned field index information of a struct ignoring any array field
|
|
370
|
+
const std::vector<u32_t>& getFlattenedFieldIdxVec(const StructType *T);
|
|
371
|
+
|
|
368
372
|
const std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec(const Type *T);
|
|
369
373
|
|
|
370
374
|
/// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
|
|
@@ -501,25 +505,32 @@ public:
|
|
|
501
505
|
|
|
502
506
|
|
|
503
507
|
/*!
|
|
504
|
-
*
|
|
508
|
+
* Flatterned type information of StructType, ArrayType and SingleValueType
|
|
505
509
|
*/
|
|
506
510
|
class StInfo
|
|
507
511
|
{
|
|
508
512
|
|
|
509
513
|
private:
|
|
510
|
-
/// flattened field indices of a struct
|
|
514
|
+
/// flattened field indices of a struct (ignoring arrays)
|
|
511
515
|
std::vector<u32_t> fldIdxVec;
|
|
516
|
+
/// flattened full offset (including array strides)
|
|
517
|
+
std::vector<u32_t> fullOffsetVec;
|
|
512
518
|
/// Types of all fields of a struct
|
|
513
519
|
Map<u32_t, const Type*> fldIdx2TypeMap;
|
|
514
520
|
/// All field infos after flattening a struct
|
|
515
521
|
std::vector<FlattenedFieldInfo> finfo;
|
|
516
|
-
|
|
522
|
+
/// stride represents the number of repetitive elements if this StInfo represent an ArrayType. stride is 1 by default.
|
|
523
|
+
u32_t stride;
|
|
517
524
|
/// Max field limit
|
|
518
525
|
static u32_t maxFieldLimit;
|
|
519
526
|
|
|
527
|
+
StInfo(); ///< place holder
|
|
528
|
+
StInfo(const StInfo& st); ///< place holder
|
|
529
|
+
void operator=(const StInfo&); ///< place holder
|
|
530
|
+
|
|
520
531
|
public:
|
|
521
532
|
/// Constructor
|
|
522
|
-
StInfo()
|
|
533
|
+
StInfo(u32_t s) : stride(s)
|
|
523
534
|
{
|
|
524
535
|
}
|
|
525
536
|
/// Destructor
|
|
@@ -560,6 +571,10 @@ public:
|
|
|
560
571
|
{
|
|
561
572
|
return fldIdxVec;
|
|
562
573
|
}
|
|
574
|
+
inline std::vector<u32_t>& getFlattenedOffsetVec()
|
|
575
|
+
{
|
|
576
|
+
return fullOffsetVec;
|
|
577
|
+
}
|
|
563
578
|
inline std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec()
|
|
564
579
|
{
|
|
565
580
|
return finfo;
|
|
@@ -567,11 +582,17 @@ public:
|
|
|
567
582
|
//@}
|
|
568
583
|
|
|
569
584
|
/// Add field (index and offset) with its corresponding type
|
|
570
|
-
inline void addFldWithType(u32_t fldIdx, const Type* type)
|
|
585
|
+
inline void addFldWithType(u32_t fldIdx, const Type* type, u32_t fullOffset)
|
|
571
586
|
{
|
|
572
587
|
fldIdxVec.push_back(fldIdx);
|
|
588
|
+
fullOffsetVec.push_back(fullOffset);
|
|
573
589
|
fldIdx2TypeMap[fldIdx] = type;
|
|
574
590
|
}
|
|
591
|
+
|
|
592
|
+
/// Array Type can have
|
|
593
|
+
inline u32_t getStride() const {
|
|
594
|
+
return stride;
|
|
595
|
+
}
|
|
575
596
|
};
|
|
576
597
|
|
|
577
598
|
/*!
|
|
Binary file
|
|
Binary file
|
|
@@ -290,7 +290,7 @@ protected:
|
|
|
290
290
|
virtual inline void buildSVFG(SVFIR* pag)
|
|
291
291
|
{
|
|
292
292
|
_ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
|
|
293
|
-
_svfg = svfgBuilder.
|
|
293
|
+
_svfg = svfgBuilder.buildPTROnlySVFG(_ander);
|
|
294
294
|
_pag = _svfg->getPAG();
|
|
295
295
|
}
|
|
296
296
|
/// Reset visited map for next points-to query
|
|
@@ -74,9 +74,7 @@ public:
|
|
|
74
74
|
static SVFG* globalSvfg;
|
|
75
75
|
|
|
76
76
|
SVFG* buildPTROnlySVFG(BVDataPTAImpl* pta);
|
|
77
|
-
SVFG* buildPTROnlySVFGWithoutOPT(BVDataPTAImpl* pta);
|
|
78
77
|
SVFG* buildFullSVFG(BVDataPTAImpl* pta);
|
|
79
|
-
SVFG* buildFullSVFGWithoutOPT(BVDataPTAImpl* pta);
|
|
80
78
|
|
|
81
79
|
/// Clean up
|
|
82
80
|
static void releaseSVFG()
|
|
@@ -131,8 +131,12 @@ public:
|
|
|
131
131
|
}
|
|
132
132
|
//@}
|
|
133
133
|
|
|
134
|
+
/// Return accumulated constant offset given OffsetValueVec
|
|
134
135
|
s64_t accumulateConstantOffset() const;
|
|
135
136
|
|
|
137
|
+
/// Return element number of a type.
|
|
138
|
+
u32_t getElementNum(const Type* type) const;
|
|
139
|
+
|
|
136
140
|
bool addOffsetValue(const Value* offsetValue, const Type* type);
|
|
137
141
|
|
|
138
142
|
/// Return TRUE if this is a constant location set.
|
|
@@ -364,7 +364,11 @@ public:
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
///Get a reference to the components of struct_info.
|
|
367
|
-
|
|
367
|
+
/// Flatterned full offset information of a struct including its array fields
|
|
368
|
+
const std::vector<u32_t>& getFlattenedOffsetVec(const StructType *T);
|
|
369
|
+
/// Flatterned field index information of a struct ignoring any array field
|
|
370
|
+
const std::vector<u32_t>& getFlattenedFieldIdxVec(const StructType *T);
|
|
371
|
+
|
|
368
372
|
const std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec(const Type *T);
|
|
369
373
|
|
|
370
374
|
/// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
|
|
@@ -501,25 +505,32 @@ public:
|
|
|
501
505
|
|
|
502
506
|
|
|
503
507
|
/*!
|
|
504
|
-
*
|
|
508
|
+
* Flatterned type information of StructType, ArrayType and SingleValueType
|
|
505
509
|
*/
|
|
506
510
|
class StInfo
|
|
507
511
|
{
|
|
508
512
|
|
|
509
513
|
private:
|
|
510
|
-
/// flattened field indices of a struct
|
|
514
|
+
/// flattened field indices of a struct (ignoring arrays)
|
|
511
515
|
std::vector<u32_t> fldIdxVec;
|
|
516
|
+
/// flattened full offset (including array strides)
|
|
517
|
+
std::vector<u32_t> fullOffsetVec;
|
|
512
518
|
/// Types of all fields of a struct
|
|
513
519
|
Map<u32_t, const Type*> fldIdx2TypeMap;
|
|
514
520
|
/// All field infos after flattening a struct
|
|
515
521
|
std::vector<FlattenedFieldInfo> finfo;
|
|
516
|
-
|
|
522
|
+
/// stride represents the number of repetitive elements if this StInfo represent an ArrayType. stride is 1 by default.
|
|
523
|
+
u32_t stride;
|
|
517
524
|
/// Max field limit
|
|
518
525
|
static u32_t maxFieldLimit;
|
|
519
526
|
|
|
527
|
+
StInfo(); ///< place holder
|
|
528
|
+
StInfo(const StInfo& st); ///< place holder
|
|
529
|
+
void operator=(const StInfo&); ///< place holder
|
|
530
|
+
|
|
520
531
|
public:
|
|
521
532
|
/// Constructor
|
|
522
|
-
StInfo()
|
|
533
|
+
StInfo(u32_t s) : stride(s)
|
|
523
534
|
{
|
|
524
535
|
}
|
|
525
536
|
/// Destructor
|
|
@@ -560,6 +571,10 @@ public:
|
|
|
560
571
|
{
|
|
561
572
|
return fldIdxVec;
|
|
562
573
|
}
|
|
574
|
+
inline std::vector<u32_t>& getFlattenedOffsetVec()
|
|
575
|
+
{
|
|
576
|
+
return fullOffsetVec;
|
|
577
|
+
}
|
|
563
578
|
inline std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec()
|
|
564
579
|
{
|
|
565
580
|
return finfo;
|
|
@@ -567,11 +582,17 @@ public:
|
|
|
567
582
|
//@}
|
|
568
583
|
|
|
569
584
|
/// Add field (index and offset) with its corresponding type
|
|
570
|
-
inline void addFldWithType(u32_t fldIdx, const Type* type)
|
|
585
|
+
inline void addFldWithType(u32_t fldIdx, const Type* type, u32_t fullOffset)
|
|
571
586
|
{
|
|
572
587
|
fldIdxVec.push_back(fldIdx);
|
|
588
|
+
fullOffsetVec.push_back(fullOffset);
|
|
573
589
|
fldIdx2TypeMap[fldIdx] = type;
|
|
574
590
|
}
|
|
591
|
+
|
|
592
|
+
/// Array Type can have
|
|
593
|
+
inline u32_t getStride() const {
|
|
594
|
+
return stride;
|
|
595
|
+
}
|
|
575
596
|
};
|
|
576
597
|
|
|
577
598
|
/*!
|