svf-lib 1.0.2125 → 1.0.2127

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.
Files changed (59) hide show
  1. package/SVF-linux/Release-build/bin/ae +0 -0
  2. package/SVF-linux/Release-build/bin/cfl +0 -0
  3. package/SVF-linux/Release-build/bin/dvf +0 -0
  4. package/SVF-linux/Release-build/bin/llvm2svf +0 -0
  5. package/SVF-linux/Release-build/bin/mta +0 -0
  6. package/SVF-linux/Release-build/bin/saber +0 -0
  7. package/SVF-linux/Release-build/bin/svf-ex +0 -0
  8. package/SVF-linux/Release-build/bin/wpa +0 -0
  9. package/SVF-linux/Release-build/include/Graphs/ICFG.h +43 -0
  10. package/SVF-linux/Release-build/include/Graphs/ICFGNode.h +48 -33
  11. package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
  12. package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
  13. package/SVF-osx/Release-build/bin/ae +0 -0
  14. package/SVF-osx/Release-build/bin/cfl +0 -0
  15. package/SVF-osx/Release-build/bin/dvf +0 -0
  16. package/SVF-osx/Release-build/bin/llvm2svf +0 -0
  17. package/SVF-osx/Release-build/bin/mta +0 -0
  18. package/SVF-osx/Release-build/bin/saber +0 -0
  19. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  20. package/SVF-osx/Release-build/bin/wpa +0 -0
  21. package/SVF-osx/Release-build/include/AE/Core/IntervalValue.h +2 -2
  22. package/SVF-osx/Release-build/include/AE/Core/NumericValue.h +3 -3
  23. package/SVF-osx/Release-build/include/CFL/CFGrammar.h +7 -7
  24. package/SVF-osx/Release-build/include/CFL/CFLGraphBuilder.h +10 -8
  25. package/SVF-osx/Release-build/include/Graphs/CallGraph.h +4 -4
  26. package/SVF-osx/Release-build/include/Graphs/ConsG.h +1 -1
  27. package/SVF-osx/Release-build/include/Graphs/ConsGEdge.h +7 -7
  28. package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +4 -4
  29. package/SVF-osx/Release-build/include/Graphs/ICFG.h +43 -0
  30. package/SVF-osx/Release-build/include/Graphs/ICFGEdge.h +1 -1
  31. package/SVF-osx/Release-build/include/Graphs/ICFGNode.h +48 -33
  32. package/SVF-osx/Release-build/include/Graphs/SVFGEdge.h +6 -6
  33. package/SVF-osx/Release-build/include/Graphs/ThreadCallGraph.h +1 -1
  34. package/SVF-osx/Release-build/include/Graphs/VFGEdge.h +4 -4
  35. package/SVF-osx/Release-build/include/Graphs/WTO.h +2 -2
  36. package/SVF-osx/Release-build/include/MSSA/MSSAMuChi.h +2 -2
  37. package/SVF-osx/Release-build/include/MemoryModel/AbstractPointsToDS.h +8 -8
  38. package/SVF-osx/Release-build/include/MemoryModel/AccessPath.h +1 -1
  39. package/SVF-osx/Release-build/include/MemoryModel/MutablePointsToDS.h +1 -1
  40. package/SVF-osx/Release-build/include/MemoryModel/PersistentPointsToDS.h +1 -1
  41. package/SVF-osx/Release-build/include/SABER/SaberCondAllocator.h +4 -4
  42. package/SVF-osx/Release-build/include/SVF-LLVM/DCHG.h +3 -2
  43. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +4 -4
  44. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +6 -6
  45. package/SVF-osx/Release-build/include/SVFIR/SVFFileSystem.h +2 -2
  46. package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +5 -5
  47. package/SVF-osx/Release-build/include/SVFIR/SVFStatements.h +42 -40
  48. package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +19 -19
  49. package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +2 -2
  50. package/SVF-osx/Release-build/include/Util/Casting.h +6 -6
  51. package/SVF-osx/Release-build/include/Util/GeneralType.h +26 -26
  52. package/SVF-osx/Release-build/include/Util/SVFUtil.h +3 -3
  53. package/SVF-osx/Release-build/include/Util/SparseBitVector.h +7 -7
  54. package/SVF-osx/Release-build/include/Util/iterator.h +1 -1
  55. package/SVF-osx/Release-build/include/WPA/Andersen.h +9 -9
  56. package/SVF-osx/Release-build/include/WPA/FlowSensitive.h +2 -2
  57. package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
  58. package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
  59. package/package.json +1 -1
@@ -149,7 +149,7 @@ public:
149
149
  inline bool isUnreachable(const SVFBasicBlock* bb) const
150
150
  {
151
151
  return std::find(reachableBBs.begin(), reachableBBs.end(), bb) ==
152
- reachableBBs.end();
152
+ reachableBBs.end();
153
153
  }
154
154
 
155
155
  inline const BBList& getReachableBBs() const
@@ -215,7 +215,7 @@ protected:
215
215
  /// Constructor without name
216
216
  SVFValue(const SVFType* ty, SVFValKind k)
217
217
  : kind(k), ptrInUncalledFun(false),
218
- constDataOrAggData(SVFConstData == k), type(ty), sourceLoc("NoLoc")
218
+ constDataOrAggData(SVFConstData == k), type(ty), sourceLoc("NoLoc")
219
219
  {
220
220
  }
221
221
 
@@ -540,7 +540,7 @@ protected:
540
540
  inline void addICFGNode(const ICFGNode* icfgNode)
541
541
  {
542
542
  assert(std::find(getICFGNodeList().begin(), getICFGNodeList().end(),
543
- icfgNode) == getICFGNodeList().end() && "duplicated icfgnode");
543
+ icfgNode) == getICFGNodeList().end() && "duplicated icfgnode");
544
544
  allICFGNodes.push_back(icfgNode);
545
545
  }
546
546
 
@@ -641,8 +641,8 @@ public:
641
641
  static inline bool classof(const SVFValue *node)
642
642
  {
643
643
  return node->getKind() == SVFInst ||
644
- node->getKind() == SVFCall ||
645
- node->getKind() == SVFVCall;
644
+ node->getKind() == SVFCall ||
645
+ node->getKind() == SVFVCall;
646
646
  }
647
647
 
648
648
  inline const SVFBasicBlock* getParent() const
@@ -808,12 +808,12 @@ public:
808
808
  static inline bool classof(const SVFValue *node)
809
809
  {
810
810
  return node->getKind() == SVFConst ||
811
- node->getKind() == SVFGlob ||
812
- node->getKind() == SVFConstData ||
813
- node->getKind() == SVFConstInt ||
814
- node->getKind() == SVFConstFP ||
815
- node->getKind() == SVFNullPtr ||
816
- node->getKind() == SVFBlackHole;
811
+ node->getKind() == SVFGlob ||
812
+ node->getKind() == SVFConstData ||
813
+ node->getKind() == SVFConstInt ||
814
+ node->getKind() == SVFConstFP ||
815
+ node->getKind() == SVFNullPtr ||
816
+ node->getKind() == SVFBlackHole;
817
817
  }
818
818
 
819
819
  };
@@ -913,18 +913,18 @@ public:
913
913
  static inline bool classof(const SVFValue *node)
914
914
  {
915
915
  return node->getKind() == SVFConstData ||
916
- node->getKind() == SVFConstInt ||
917
- node->getKind() == SVFConstFP ||
918
- node->getKind() == SVFNullPtr ||
919
- node->getKind() == SVFBlackHole;
916
+ node->getKind() == SVFConstInt ||
917
+ node->getKind() == SVFConstFP ||
918
+ node->getKind() == SVFNullPtr ||
919
+ node->getKind() == SVFBlackHole;
920
920
  }
921
921
  static inline bool classof(const SVFConstantData *node)
922
922
  {
923
923
  return node->getKind() == SVFConstData ||
924
- node->getKind() == SVFConstInt ||
925
- node->getKind() == SVFConstFP ||
926
- node->getKind() == SVFNullPtr ||
927
- node->getKind() == SVFBlackHole;
924
+ node->getKind() == SVFConstInt ||
925
+ node->getKind() == SVFConstFP ||
926
+ node->getKind() == SVFNullPtr ||
927
+ node->getKind() == SVFBlackHole;
928
928
  }
929
929
  };
930
930
 
@@ -83,8 +83,8 @@ public:
83
83
  inline const SVFValue* getValue() const
84
84
  {
85
85
  assert(this->getNodeKind() != DummyValNode &&
86
- this->getNodeKind() != DummyObjNode &&
87
- "dummy node do not have value!");
86
+ this->getNodeKind() != DummyObjNode &&
87
+ "dummy node do not have value!");
88
88
  assert(!SymbolTableInfo::isBlkObjOrConstantObj(this->getId()) &&
89
89
  "blackhole and constant obj do not have value");
90
90
  assert(value &&
@@ -217,8 +217,8 @@ struct isa_impl_wrap
217
217
  static bool doit(const From &Val)
218
218
  {
219
219
  return isa_impl_wrap<To, SimpleFrom,
220
- typename simplify_type<SimpleFrom>::SimpleType>::doit(
221
- simplify_type<const From>::getSimplifiedValue(Val));
220
+ typename simplify_type<SimpleFrom>::SimpleType>::doit(
221
+ simplify_type<const From>::getSimplifiedValue(Val));
222
222
  }
223
223
  };
224
224
 
@@ -285,11 +285,11 @@ template<class To, class From> struct cast_retty_impl<To, const From*const>
285
285
  template <class To, class From>
286
286
  struct cast_retty_impl<To, std::unique_ptr<From>>
287
287
  {
288
- private:
288
+ private:
289
289
  using PointerType = typename cast_retty_impl<To, From *>::ret_type;
290
290
  using ResultType = typename std::remove_pointer<PointerType>::type;
291
291
 
292
- public:
292
+ public:
293
293
  using ret_type = std::unique_ptr<ResultType>;
294
294
  };
295
295
 
@@ -325,8 +325,8 @@ template<class To, class From, class SimpleFrom> struct cast_convert_val
325
325
  static typename cast_retty<To, From>::ret_type doit(From &Val)
326
326
  {
327
327
  return cast_convert_val<To, SimpleFrom,
328
- typename simplify_type<SimpleFrom>::SimpleType>::doit(
329
- simplify_type<From>::getSimplifiedValue(Val));
328
+ typename simplify_type<SimpleFrom>::SimpleType>::doit(
329
+ simplify_type<From>::getSimplifiedValue(Val));
330
330
  }
331
331
  };
332
332
 
@@ -98,30 +98,30 @@ using Set = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
98
98
  template <typename Key, typename Value, typename Hash = Hash<Key>,
99
99
  typename KeyEqual = std::equal_to<Key>,
100
100
  typename Allocator = std::allocator<std::pair<const Key, Value>>>
101
- using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
102
-
103
- template <typename Key, typename Compare = std::less<Key>,
104
- typename Allocator = std::allocator<Key>>
105
- using OrderedSet = std::set<Key, Compare, Allocator>;
106
-
107
- template <typename Key, typename Value, typename Compare = std::less<Key>,
108
- typename Allocator = std::allocator<std::pair<const Key, Value>>>
109
- using OrderedMap = std::map<Key, Value, Compare, Allocator>;
110
-
111
- typedef std::pair<NodeID, NodeID> NodePair;
112
- typedef OrderedSet<NodeID> OrderedNodeSet;
113
- typedef Set<NodeID> NodeSet;
114
- typedef Set<NodePair> NodePairSet;
115
- typedef Map<NodePair, NodeID> NodePairMap;
116
- typedef std::vector<NodeID> NodeVector;
117
- typedef std::vector<EdgeID> EdgeVector;
118
- typedef std::stack<NodeID> NodeStack;
119
- typedef std::list<NodeID> NodeList;
120
- typedef std::deque<NodeID> NodeDeque;
121
- typedef NodeSet EdgeSet;
122
- typedef std::vector<u32_t> CallStrCxt;
123
- typedef unsigned Version;
124
- typedef Set<Version> VersionSet;
125
- typedef std::pair<NodeID, Version> VersionedVar;
126
- typedef Set<VersionedVar> VersionedVarSet;
101
+ using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
102
+
103
+ template <typename Key, typename Compare = std::less<Key>,
104
+ typename Allocator = std::allocator<Key>>
105
+ using OrderedSet = std::set<Key, Compare, Allocator>;
106
+
107
+ template <typename Key, typename Value, typename Compare = std::less<Key>,
108
+ typename Allocator = std::allocator<std::pair<const Key, Value>>>
109
+ using OrderedMap = std::map<Key, Value, Compare, Allocator>;
110
+
111
+ typedef std::pair<NodeID, NodeID> NodePair;
112
+ typedef OrderedSet<NodeID> OrderedNodeSet;
113
+ typedef Set<NodeID> NodeSet;
114
+ typedef Set<NodePair> NodePairSet;
115
+ typedef Map<NodePair, NodeID> NodePairMap;
116
+ typedef std::vector<NodeID> NodeVector;
117
+ typedef std::vector<EdgeID> EdgeVector;
118
+ typedef std::stack<NodeID> NodeStack;
119
+ typedef std::list<NodeID> NodeList;
120
+ typedef std::deque<NodeID> NodeDeque;
121
+ typedef NodeSet EdgeSet;
122
+ typedef std::vector<u32_t> CallStrCxt;
123
+ typedef unsigned Version;
124
+ typedef Set<Version> VersionSet;
125
+ typedef std::pair<NodeID, Version> VersionedVar;
126
+ typedef Set<VersionedVar> VersionedVarSet;
127
127
  }
@@ -356,8 +356,8 @@ inline const SVFFunction* getProgEntryFunction(SVFModule* svfModule)
356
356
  inline bool isProgExitFunction (const SVFFunction * fun)
357
357
  {
358
358
  return fun && (fun->getName() == "exit" ||
359
- fun->getName() == "__assert_rtn" ||
360
- fun->getName() == "__assert_fail" );
359
+ fun->getName() == "__assert_rtn" ||
360
+ fun->getName() == "__assert_fail" );
361
361
  }
362
362
 
363
363
  /// Return true if this argument belongs to an uncalled function
@@ -480,7 +480,7 @@ template <typename... Ts> using void_t = typename make_void<Ts...>::type;
480
480
  template <typename T, typename = void> struct is_iterable : std::false_type {};
481
481
  template <typename T>
482
482
  struct is_iterable<T, void_t<decltype(std::begin(std::declval<T&>()) !=
483
- std::end(std::declval<T&>()))>>
483
+ std::end(std::declval<T&>()))>>
484
484
  : std::true_type {};
485
485
  template <typename T> constexpr bool is_iterable_v = is_iterable<T>::value;
486
486
  ///@}
@@ -388,7 +388,7 @@ public:
388
388
  unsigned BitPos = Curr % BITWORD_SIZE;
389
389
  BitWord Copy = Bits[WordPos];
390
390
  assert(WordPos <= BITWORDS_PER_ELEMENT
391
- && "Word Position outside of element");
391
+ && "Word Position outside of element");
392
392
 
393
393
  // Mask off previous bits.
394
394
  Copy &= ~0UL << BitPos;
@@ -552,13 +552,13 @@ class SparseBitVector
552
552
  else if (CurrElementIter->index() > ElementIndex)
553
553
  {
554
554
  while (ElementIter != Begin
555
- && ElementIter->index() > ElementIndex)
555
+ && ElementIter->index() > ElementIndex)
556
556
  --ElementIter;
557
557
  }
558
558
  else
559
559
  {
560
560
  while (ElementIter != End &&
561
- ElementIter->index() < ElementIndex)
561
+ ElementIter->index() < ElementIndex)
562
562
  ++ElementIter;
563
563
  }
564
564
  CurrElementIter = ElementIter;
@@ -758,7 +758,7 @@ 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
- ElementIter->index() != ElementIndex)
761
+ ElementIter->index() != ElementIndex)
762
762
  return false;
763
763
  return ElementIter->test(Idx % ElementSize);
764
764
  }
@@ -774,7 +774,7 @@ public:
774
774
  // If we can't find an element that is supposed to contain this bit, there
775
775
  // is nothing more to do.
776
776
  if (ElementIter == Elements.end() ||
777
- ElementIter->index() != ElementIndex)
777
+ ElementIter->index() != ElementIndex)
778
778
  return;
779
779
  ElementIter->reset(Idx % ElementSize);
780
780
 
@@ -799,13 +799,13 @@ public:
799
799
  ElementIter = FindLowerBound(ElementIndex);
800
800
 
801
801
  if (ElementIter == Elements.end() ||
802
- ElementIter->index() != ElementIndex)
802
+ ElementIter->index() != ElementIndex)
803
803
  {
804
804
  // We may have hit the beginning of our SparseBitVector, in which case,
805
805
  // we may need to insert right after this element, which requires moving
806
806
  // the current iterator forward one, because insert does insert before.
807
807
  if (ElementIter != Elements.end() &&
808
- ElementIter->index() < ElementIndex)
808
+ ElementIter->index() < ElementIndex)
809
809
  ++ElementIter;
810
810
  ElementIter = Elements.emplace(ElementIter, ElementIndex);
811
811
  }
@@ -173,7 +173,7 @@ public:
173
173
  IsRandomAccess,
174
174
  "Relational operators are only defined for random access iterators.");
175
175
  return !(static_cast<const DerivedT &>(*this) < RHS) &&
176
- !(static_cast<const DerivedT &>(*this) == RHS);
176
+ !(static_cast<const DerivedT &>(*this) == RHS);
177
177
  }
178
178
  bool operator<=(const DerivedT &RHS) const
179
179
  {
@@ -109,12 +109,12 @@ public:
109
109
  static inline bool classof(const PointerAnalysis *pta)
110
110
  {
111
111
  return ( pta->getAnalysisTy() == Andersen_BASE
112
- || pta->getAnalysisTy() == Andersen_WPA
113
- || pta->getAnalysisTy() == AndersenWaveDiff_WPA
114
- || pta->getAnalysisTy() == AndersenSCD_WPA
115
- || pta->getAnalysisTy() == AndersenSFR_WPA
116
- || pta->getAnalysisTy() == TypeCPP_WPA
117
- || pta->getAnalysisTy() == Steensgaard_WPA);
112
+ || pta->getAnalysisTy() == Andersen_WPA
113
+ || pta->getAnalysisTy() == AndersenWaveDiff_WPA
114
+ || pta->getAnalysisTy() == AndersenSCD_WPA
115
+ || pta->getAnalysisTy() == AndersenSFR_WPA
116
+ || pta->getAnalysisTy() == TypeCPP_WPA
117
+ || pta->getAnalysisTy() == Steensgaard_WPA);
118
118
  }
119
119
  //@}
120
120
 
@@ -229,9 +229,9 @@ public:
229
229
  static inline bool classof(const PointerAnalysis *pta)
230
230
  {
231
231
  return (pta->getAnalysisTy() == Andersen_WPA
232
- || pta->getAnalysisTy() == AndersenWaveDiff_WPA
233
- || pta->getAnalysisTy() == AndersenSCD_WPA
234
- || pta->getAnalysisTy() == AndersenSFR_WPA);
232
+ || pta->getAnalysisTy() == AndersenWaveDiff_WPA
233
+ || pta->getAnalysisTy() == AndersenSCD_WPA
234
+ || pta->getAnalysisTy() == AndersenSFR_WPA);
235
235
  }
236
236
  //@}
237
237
 
@@ -247,11 +247,11 @@ protected:
247
247
  //@{
248
248
  inline const PointsTo& getDFInPtsSet(const SVFGNode* stmt, const NodeID node)
249
249
  {
250
- return getDFPTDataTy()->getDFInPtsSet(stmt->getId(),node);
250
+ return getDFPTDataTy()->getDFInPtsSet(stmt->getId(), node);
251
251
  }
252
252
  inline const PointsTo& getDFOutPtsSet(const SVFGNode* stmt, const NodeID node)
253
253
  {
254
- return getDFPTDataTy()->getDFOutPtsSet(stmt->getId(),node);
254
+ return getDFPTDataTy()->getDFOutPtsSet(stmt->getId(), node);
255
255
  }
256
256
  //@}
257
257
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2125",
3
+ "version": "1.0.2127",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {