svf-lib 1.0.2694 → 1.0.2695
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/bin/ae +0 -0
- package/SVF-osx/bin/mta +0 -0
- package/SVF-osx/bin/svf-ex +0 -0
- package/SVF-osx/include/AE/Core/AbstractState.h +1 -1
- package/SVF-osx/include/AE/Core/AddressValue.h +3 -3
- package/SVF-osx/include/AE/Core/IntervalValue.h +64 -64
- package/SVF-osx/include/AE/Core/NumericValue.h +44 -44
- package/SVF-osx/include/AE/Svfexe/AEDetector.h +7 -7
- package/SVF-osx/include/DDA/FlowDDA.h +2 -2
- package/SVF-osx/include/Graphs/CDG.h +2 -2
- package/SVF-osx/include/Graphs/CHG.h +3 -3
- package/SVF-osx/include/Graphs/IRGraph.h +3 -3
- package/SVF-osx/include/Graphs/VFG.h +5 -5
- package/SVF-osx/include/Graphs/WTO.h +1 -1
- package/SVF-osx/include/MTA/LockAnalysis.h +8 -8
- package/SVF-osx/include/MTA/MTASVFGBuilder.h +1 -1
- package/SVF-osx/include/MemoryModel/AbstractPointsToDS.h +6 -0
- package/SVF-osx/include/MemoryModel/ConditionalPT.h +69 -69
- package/SVF-osx/include/MemoryModel/MutablePointsToDS.h +33 -33
- package/SVF-osx/include/MemoryModel/PersistentPointsToDS.h +18 -18
- package/SVF-osx/include/MemoryModel/PointerAnalysis.h +4 -0
- package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +4 -0
- package/SVF-osx/include/SABER/SaberCheckerAPI.h +2 -2
- package/SVF-osx/include/SVF-LLVM/GEPTypeBridgeIterator.h +11 -11
- package/SVF-osx/include/SVF-LLVM/LLVMModule.h +2 -2
- package/SVF-osx/include/SVFIR/SVFIR.h +3 -3
- package/SVF-osx/include/SVFIR/SVFVariables.h +1 -1
- package/SVF-osx/include/Util/CommandLine.h +10 -10
- package/SVF-osx/include/Util/SparseBitVector.h +30 -30
- package/SVF-osx/include/Util/iterator.h +15 -15
- package/SVF-osx/include/WPA/Andersen.h +10 -0
- package/SVF-osx/lib/libSvfCore.3.4.dylib +0 -0
- package/package.json +1 -1
|
@@ -531,27 +531,27 @@ class SparseBitVector
|
|
|
531
531
|
const_cast<SparseBitVector<ElementSize> *>(this)->Elements.end();
|
|
532
532
|
|
|
533
533
|
if (Elements.empty())
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
534
|
+
{
|
|
535
|
+
CurrElementIter = Begin;
|
|
536
|
+
return CurrElementIter;
|
|
537
|
+
}
|
|
538
538
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
539
|
+
// Make sure our current iterator is valid.
|
|
540
|
+
if (CurrElementIter == End)
|
|
541
|
+
{
|
|
542
|
+
--CurrElementIter;
|
|
543
|
+
}
|
|
544
544
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
545
|
+
// Search from our current iterator, either backwards or forwards,
|
|
546
|
+
// depending on what element we are looking for.
|
|
547
|
+
ElementListIter ElementIter = CurrElementIter;
|
|
548
|
+
if (CurrElementIter->index() == ElementIndex)
|
|
549
|
+
{
|
|
550
|
+
return ElementIter;
|
|
551
|
+
}
|
|
552
|
+
else if (CurrElementIter->index() > ElementIndex)
|
|
553
|
+
{
|
|
554
|
+
while (ElementIter != Begin
|
|
555
555
|
&& ElementIter->index() > ElementIndex)
|
|
556
556
|
--ElementIter;
|
|
557
557
|
}
|
|
@@ -701,13 +701,13 @@ class SparseBitVector
|
|
|
701
701
|
{
|
|
702
702
|
// If they are both at the end, ignore the rest of the fields.
|
|
703
703
|
if (AtEnd && RHS.AtEnd)
|
|
704
|
-
|
|
704
|
+
return true;
|
|
705
705
|
// Otherwise they are the same if they have the same bit number and
|
|
706
706
|
// bitmap.
|
|
707
707
|
return AtEnd == RHS.AtEnd && RHS.BitNumber == BitNumber;
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
|
|
710
|
+
bool operator!=(const SparseBitVectorIterator &RHS) const
|
|
711
711
|
{
|
|
712
712
|
return !(*this == RHS);
|
|
713
713
|
}
|
|
@@ -750,7 +750,7 @@ public:
|
|
|
750
750
|
bool test(unsigned Idx) const
|
|
751
751
|
{
|
|
752
752
|
if (Elements.empty())
|
|
753
|
-
|
|
753
|
+
return false;
|
|
754
754
|
|
|
755
755
|
unsigned ElementIndex = Idx / ElementSize;
|
|
756
756
|
ElementListConstIter ElementIter = FindLowerBoundConst(ElementIndex);
|
|
@@ -758,14 +758,14 @@ public:
|
|
|
758
758
|
// If we can't find an element that is supposed to contain this bit, there
|
|
759
759
|
// is nothing more to do.
|
|
760
760
|
if (ElementIter == Elements.end() ||
|
|
761
|
-
|
|
761
|
+
ElementIter->index() != ElementIndex)
|
|
762
762
|
{
|
|
763
763
|
return false;
|
|
764
764
|
}
|
|
765
|
-
|
|
766
|
-
}
|
|
765
|
+
return ElementIter->test(Idx % ElementSize);
|
|
766
|
+
}
|
|
767
767
|
|
|
768
|
-
void reset(unsigned Idx)
|
|
768
|
+
void reset(unsigned Idx)
|
|
769
769
|
{
|
|
770
770
|
if (Elements.empty())
|
|
771
771
|
return;
|
|
@@ -1125,22 +1125,22 @@ void reset(unsigned Idx)
|
|
|
1125
1125
|
int find_first() const
|
|
1126
1126
|
{
|
|
1127
1127
|
if (Elements.empty())
|
|
1128
|
-
|
|
1128
|
+
return -1;
|
|
1129
1129
|
const SparseBitVectorElement<ElementSize> &First = *(Elements.begin());
|
|
1130
1130
|
return (First.index() * ElementSize) + First.find_first();
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
1133
|
// Return the last set bit in the bitmap. Return -1 if no bits are set.
|
|
1134
|
-
int find_last() const
|
|
1134
|
+
int find_last() const
|
|
1135
1135
|
{
|
|
1136
1136
|
if (Elements.empty())
|
|
1137
|
-
|
|
1137
|
+
return -1;
|
|
1138
1138
|
const SparseBitVectorElement<ElementSize> &Last = *(Elements.rbegin());
|
|
1139
1139
|
return (Last.index() * ElementSize) + Last.find_last();
|
|
1140
1140
|
}
|
|
1141
1141
|
|
|
1142
1142
|
// Return true if the SparseBitVector is empty
|
|
1143
|
-
bool empty() const
|
|
1143
|
+
bool empty() const
|
|
1144
1144
|
{
|
|
1145
1145
|
return Elements.empty();
|
|
1146
1146
|
}
|
|
@@ -106,10 +106,10 @@ public:
|
|
|
106
106
|
DerivedT operator+(DifferenceTypeT n) const
|
|
107
107
|
{
|
|
108
108
|
static_assert(std::is_base_of<iter_facade_base, DerivedT>::value,
|
|
109
|
-
|
|
109
|
+
"Must pass the derived type to this template!");
|
|
110
110
|
static_assert(
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
IsRandomAccess,
|
|
112
|
+
"The '+' operator is only defined for random access iterators.");
|
|
113
113
|
DerivedT tmp = *static_cast<const DerivedT *>(this);
|
|
114
114
|
tmp += n;
|
|
115
115
|
return tmp;
|
|
@@ -124,8 +124,8 @@ public:
|
|
|
124
124
|
DerivedT operator-(DifferenceTypeT n) const
|
|
125
125
|
{
|
|
126
126
|
static_assert(
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
IsRandomAccess,
|
|
128
|
+
"The '-' operator is only defined for random access iterators.");
|
|
129
129
|
DerivedT tmp = *static_cast<const DerivedT *>(this);
|
|
130
130
|
tmp -= n;
|
|
131
131
|
return tmp;
|
|
@@ -170,23 +170,23 @@ public:
|
|
|
170
170
|
bool operator>(const DerivedT &RHS) const
|
|
171
171
|
{
|
|
172
172
|
static_assert(
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
IsRandomAccess,
|
|
174
|
+
"Relational operators are only defined for random access iterators.");
|
|
175
175
|
return !(static_cast<const DerivedT &>(*this) < RHS) &&
|
|
176
|
-
|
|
176
|
+
!(static_cast<const DerivedT &>(*this) == RHS);
|
|
177
177
|
}
|
|
178
178
|
bool operator<=(const DerivedT &RHS) const
|
|
179
179
|
{
|
|
180
180
|
static_assert(
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
IsRandomAccess,
|
|
182
|
+
"Relational operators are only defined for random access iterators.");
|
|
183
183
|
return !(static_cast<const DerivedT &>(*this) > RHS);
|
|
184
184
|
}
|
|
185
185
|
bool operator>=(const DerivedT &RHS) const
|
|
186
186
|
{
|
|
187
187
|
static_assert(
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
IsRandomAccess,
|
|
189
|
+
"Relational operators are only defined for random access iterators.");
|
|
190
190
|
return !(static_cast<const DerivedT &>(*this) < RHS);
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -207,7 +207,7 @@ public:
|
|
|
207
207
|
ReferenceProxy operator[](DifferenceTypeT n) const
|
|
208
208
|
{
|
|
209
209
|
static_assert(IsRandomAccess,
|
|
210
|
-
|
|
210
|
+
"Subscripting is only defined for random access iterators.");
|
|
211
211
|
return ReferenceProxy(static_cast<const DerivedT *>(this)->operator+(n));
|
|
212
212
|
}
|
|
213
213
|
};
|
|
@@ -277,8 +277,8 @@ public:
|
|
|
277
277
|
difference_type operator-(const DerivedT &RHS) const
|
|
278
278
|
{
|
|
279
279
|
static_assert(
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
BaseT::IsRandomAccess,
|
|
281
|
+
"The '-' operator is only defined for random access iterators.");
|
|
282
282
|
return I - RHS.I;
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -252,6 +252,9 @@ public:
|
|
|
252
252
|
return getPTDataTy()->unionPts(id,ptd);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
/// Collect exactly the SVFIR nodes q for which mayAlias(node, q) holds
|
|
256
|
+
virtual NodeBS getMayAliases(NodeID node);
|
|
257
|
+
|
|
255
258
|
|
|
256
259
|
void dumpTopLevelPtsTo();
|
|
257
260
|
|
|
@@ -354,6 +357,13 @@ protected:
|
|
|
354
357
|
/// SCC detection
|
|
355
358
|
virtual NodeStack& SCCDetect();
|
|
356
359
|
|
|
360
|
+
/// Collect may-alias candidates. Attempts to do so from reverse points-to sets (cheaper),
|
|
361
|
+
/// and if not possible, falls back to trying every node (costlier).
|
|
362
|
+
NodeBS getMayAliasCandidates(NodeID node);
|
|
363
|
+
|
|
364
|
+
/// Also check getMayAliases on the pointers that the alias tests use
|
|
365
|
+
virtual void validateSuccessTests(std::string fun);
|
|
366
|
+
|
|
357
367
|
|
|
358
368
|
|
|
359
369
|
/// Sanitize pts for field insensitive objects
|
|
Binary file
|