svf-lib 1.0.2158 → 1.0.2159

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 (39) hide show
  1. package/SVF-osx/Release-build/bin/ae +0 -0
  2. package/SVF-osx/Release-build/bin/cfl +0 -0
  3. package/SVF-osx/Release-build/bin/dvf +0 -0
  4. package/SVF-osx/Release-build/bin/llvm2svf +0 -0
  5. package/SVF-osx/Release-build/bin/mta +0 -0
  6. package/SVF-osx/Release-build/bin/saber +0 -0
  7. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  8. package/SVF-osx/Release-build/bin/wpa +0 -0
  9. package/SVF-osx/Release-build/include/AE/Core/IntervalValue.h +2 -2
  10. package/SVF-osx/Release-build/include/AE/Core/NumericValue.h +3 -3
  11. package/SVF-osx/Release-build/include/CFL/CFGrammar.h +7 -7
  12. package/SVF-osx/Release-build/include/Graphs/ConsG.h +1 -1
  13. package/SVF-osx/Release-build/include/Graphs/ConsGEdge.h +7 -7
  14. package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +4 -4
  15. package/SVF-osx/Release-build/include/Graphs/ICFGEdge.h +1 -1
  16. package/SVF-osx/Release-build/include/Graphs/PTACallGraph.h +4 -4
  17. package/SVF-osx/Release-build/include/Graphs/SVFGEdge.h +6 -6
  18. package/SVF-osx/Release-build/include/Graphs/ThreadCallGraph.h +1 -1
  19. package/SVF-osx/Release-build/include/Graphs/VFGEdge.h +4 -4
  20. package/SVF-osx/Release-build/include/MSSA/MSSAMuChi.h +2 -2
  21. package/SVF-osx/Release-build/include/MemoryModel/AbstractPointsToDS.h +8 -8
  22. package/SVF-osx/Release-build/include/MemoryModel/AccessPath.h +1 -1
  23. package/SVF-osx/Release-build/include/MemoryModel/MutablePointsToDS.h +1 -1
  24. package/SVF-osx/Release-build/include/MemoryModel/PersistentPointsToDS.h +1 -1
  25. package/SVF-osx/Release-build/include/SVF-LLVM/DCHG.h +1 -1
  26. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +6 -6
  27. package/SVF-osx/Release-build/include/SVFIR/SVFFileSystem.h +2 -2
  28. package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +5 -5
  29. package/SVF-osx/Release-build/include/SVFIR/SVFStatements.h +38 -38
  30. package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +19 -19
  31. package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +2 -2
  32. package/SVF-osx/Release-build/include/Util/GeneralType.h +26 -26
  33. package/SVF-osx/Release-build/include/Util/SVFUtil.h +3 -3
  34. package/SVF-osx/Release-build/include/Util/SparseBitVector.h +7 -7
  35. package/SVF-osx/Release-build/include/Util/iterator.h +1 -1
  36. package/SVF-osx/Release-build/include/WPA/Andersen.h +9 -9
  37. package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
  38. package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
  39. package/package.json +1 -1
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1002,7 +1002,7 @@ inline IntervalValue operator|(const IntervalValue &lhs, const IntervalValue &rh
1002
1002
  else if (lhs.is_numeral() && rhs.is_numeral())
1003
1003
  return IntervalValue(lhs.lb() | rhs.lb());
1004
1004
  else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
1005
- rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1005
+ rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1006
1006
  {
1007
1007
  s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
1008
1008
  s64_t ub = next_power_of_2(s64_t(m)) - 1;
@@ -1031,7 +1031,7 @@ inline IntervalValue operator^(const IntervalValue &lhs, const IntervalValue &rh
1031
1031
  else if (lhs.is_numeral() && rhs.is_numeral())
1032
1032
  return IntervalValue(lhs.lb() ^ rhs.lb());
1033
1033
  else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
1034
- rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1034
+ rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1035
1035
  {
1036
1036
  s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
1037
1037
  s64_t ub = next_power_of_2(s64_t(m)) - 1;
@@ -908,9 +908,9 @@ public:
908
908
  static double safeAdd(double lhs, double rhs)
909
909
  {
910
910
  if ((lhs == std::numeric_limits<double>::infinity() &&
911
- rhs == -std::numeric_limits<double>::infinity()) ||
912
- (lhs == -std::numeric_limits<double>::infinity() &&
913
- rhs == std::numeric_limits<double>::infinity()))
911
+ rhs == -std::numeric_limits<double>::infinity()) ||
912
+ (lhs == -std::numeric_limits<double>::infinity() &&
913
+ rhs == std::numeric_limits<double>::infinity()))
914
914
  {
915
915
  assert(false && "invalid add");
916
916
  }
@@ -147,17 +147,17 @@ public:
147
147
  template<typename Key, typename Value, typename Hash = SymbolHash,
148
148
  typename KeyEqual = std::equal_to<Key>,
149
149
  typename Allocator = std::allocator<std::pair<const Key, Value>>>
150
- using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
150
+ using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
151
151
 
152
- template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
153
- typename Allocator = std::allocator<Key>>
154
- using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
152
+ template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
153
+ typename Allocator = std::allocator<Key>>
154
+ using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
155
155
 
156
- typedef std::vector<Symbol> Production;
157
- typedef SymbolSet<Production> Productions;
156
+ typedef std::vector<Symbol> Production;
157
+ typedef SymbolSet<Production> Productions;
158
158
 
159
159
 
160
- inline Map<std::string, Kind>& getNonterminals()
160
+ inline Map<std::string, Kind>& getNonterminals()
161
161
  {
162
162
  return this->nonterminals;
163
163
  }
@@ -131,7 +131,7 @@ public:
131
131
  {
132
132
  ConstraintEdge edge(src,dst,kind);
133
133
  if(kind == ConstraintEdge::Copy ||
134
- kind == ConstraintEdge::NormalGep || kind == ConstraintEdge::VariantGep)
134
+ kind == ConstraintEdge::NormalGep || kind == ConstraintEdge::VariantGep)
135
135
  return directEdgeSet.find(&edge) != directEdgeSet.end();
136
136
  else if(kind == ConstraintEdge::Addr)
137
137
  return AddrCGEdgeSet.find(&edge) != AddrCGEdgeSet.end();
@@ -75,11 +75,11 @@ public:
75
75
  static inline bool classof(const GenericConsEdgeTy *edge)
76
76
  {
77
77
  return edge->getEdgeKind() == Addr ||
78
- edge->getEdgeKind() == Copy ||
79
- edge->getEdgeKind() == Store ||
80
- edge->getEdgeKind() == Load ||
81
- edge->getEdgeKind() == NormalGep ||
82
- edge->getEdgeKind() == VariantGep;
78
+ edge->getEdgeKind() == Copy ||
79
+ edge->getEdgeKind() == Store ||
80
+ edge->getEdgeKind() == Load ||
81
+ edge->getEdgeKind() == NormalGep ||
82
+ edge->getEdgeKind() == VariantGep;
83
83
  }
84
84
  /// Constraint edge type
85
85
  typedef GenericNode<ConstraintNode,ConstraintEdge>::GEdgeSetTy ConstraintEdgeSetTy;
@@ -248,12 +248,12 @@ public:
248
248
  static inline bool classof(const ConstraintEdge *edge)
249
249
  {
250
250
  return edge->getEdgeKind() == NormalGep ||
251
- edge->getEdgeKind() == VariantGep;
251
+ edge->getEdgeKind() == VariantGep;
252
252
  }
253
253
  static inline bool classof(const GenericConsEdgeTy *edge)
254
254
  {
255
255
  return edge->getEdgeKind() == NormalGep ||
256
- edge->getEdgeKind() == VariantGep;
256
+ edge->getEdgeKind() == VariantGep;
257
257
  }
258
258
  //@}
259
259
 
@@ -123,8 +123,8 @@ public:
123
123
  virtual inline bool operator==(const GenericEdge<NodeType>* rhs) const
124
124
  {
125
125
  return (rhs->edgeFlag == this->edgeFlag &&
126
- rhs->getSrcID() == this->getSrcID() &&
127
- rhs->getDstID() == this->getDstID());
126
+ rhs->getSrcID() == this->getSrcID() &&
127
+ rhs->getDstID() == this->getDstID());
128
128
  }
129
129
  //@}
130
130
 
@@ -680,8 +680,8 @@ public:
680
680
  inline void removeGNode(NodeType* node)
681
681
  {
682
682
  assert(node->hasIncomingEdge() == false
683
- && node->hasOutgoingEdge() == false
684
- && "node which have edges can't be deleted");
683
+ && node->hasOutgoingEdge() == false
684
+ && "node which have edges can't be deleted");
685
685
  iterator it = IDToNodeMap.find(node->getId());
686
686
  assert(it != IDToNodeMap.end() && "can not find the node");
687
687
  IDToNodeMap.erase(it);
@@ -72,7 +72,7 @@ public:
72
72
  inline bool isCFGEdge() const
73
73
  {
74
74
  return getEdgeKind() == IntraCF || getEdgeKind() == CallCF ||
75
- getEdgeKind() == RetCF;
75
+ getEdgeKind() == RetCF;
76
76
  }
77
77
  inline bool isCallCFGEdge() const
78
78
  {
@@ -148,8 +148,8 @@ public:
148
148
  static inline bool classof(const GenericPTACallGraphEdgeTy *edge)
149
149
  {
150
150
  return edge->getEdgeKind() == PTACallGraphEdge::CallRetEdge ||
151
- edge->getEdgeKind() == PTACallGraphEdge::TDForkEdge ||
152
- edge->getEdgeKind() == PTACallGraphEdge::TDJoinEdge;
151
+ edge->getEdgeKind() == PTACallGraphEdge::TDForkEdge ||
152
+ edge->getEdgeKind() == PTACallGraphEdge::TDJoinEdge;
153
153
  }
154
154
  //@}
155
155
 
@@ -431,14 +431,14 @@ public:
431
431
  {
432
432
  CallInstToCallGraphEdgesMap::const_iterator it = callinstToCallGraphEdgesMap.find(inst);
433
433
  assert(it!=callinstToCallGraphEdgesMap.end()
434
- && "call instruction does not have a valid callee");
434
+ && "call instruction does not have a valid callee");
435
435
  return it->second.begin();
436
436
  }
437
437
  inline CallGraphEdgeSet::const_iterator getCallEdgeEnd(const CallICFGNode* inst) const
438
438
  {
439
439
  CallInstToCallGraphEdgesMap::const_iterator it = callinstToCallGraphEdgesMap.find(inst);
440
440
  assert(it!=callinstToCallGraphEdgesMap.end()
441
- && "call instruction does not have a valid callee");
441
+ && "call instruction does not have a valid callee");
442
442
  return it->second.end();
443
443
  }
444
444
  //@}
@@ -72,16 +72,16 @@ public:
72
72
  static inline bool classof(const VFGEdge *edge)
73
73
  {
74
74
  return edge->getEdgeKind() == IntraIndirectVF ||
75
- edge->getEdgeKind() == CallIndVF ||
76
- edge->getEdgeKind() == RetIndVF ||
77
- edge->getEdgeKind() == TheadMHPIndirectVF;
75
+ edge->getEdgeKind() == CallIndVF ||
76
+ edge->getEdgeKind() == RetIndVF ||
77
+ edge->getEdgeKind() == TheadMHPIndirectVF;
78
78
  }
79
79
  static inline bool classof(const GenericVFGEdgeTy *edge)
80
80
  {
81
81
  return edge->getEdgeKind() == IntraIndirectVF ||
82
- edge->getEdgeKind() == CallIndVF ||
83
- edge->getEdgeKind() == RetIndVF ||
84
- edge->getEdgeKind() == TheadMHPIndirectVF;
82
+ edge->getEdgeKind() == CallIndVF ||
83
+ edge->getEdgeKind() == RetIndVF ||
84
+ edge->getEdgeKind() == TheadMHPIndirectVF;
85
85
  }
86
86
  //@}
87
87
 
@@ -205,7 +205,7 @@ public:
205
205
  inline bool hasThreadForkEdge(const CallICFGNode* cs) const
206
206
  {
207
207
  return callinstToThreadForkEdgesMap.find(cs) !=
208
- callinstToThreadForkEdgesMap.end();
208
+ callinstToThreadForkEdgesMap.end();
209
209
  }
210
210
  inline ForkEdgeSet::const_iterator getForkEdgeBegin(const CallICFGNode* cs) const
211
211
  {
@@ -155,14 +155,14 @@ public:
155
155
  static inline bool classof(const VFGEdge *edge)
156
156
  {
157
157
  return edge->getEdgeKind() == IntraDirectVF ||
158
- edge->getEdgeKind() == CallDirVF ||
159
- edge->getEdgeKind() == RetDirVF;
158
+ edge->getEdgeKind() == CallDirVF ||
159
+ edge->getEdgeKind() == RetDirVF;
160
160
  }
161
161
  static inline bool classof(const GenericVFGEdgeTy *edge)
162
162
  {
163
163
  return edge->getEdgeKind() == IntraDirectVF ||
164
- edge->getEdgeKind() == CallDirVF ||
165
- edge->getEdgeKind() == RetDirVF;
164
+ edge->getEdgeKind() == CallDirVF ||
165
+ edge->getEdgeKind() == RetDirVF;
166
166
  }
167
167
  //@}
168
168
 
@@ -439,8 +439,8 @@ public:
439
439
  static inline bool classof(const MSSADEF *chi)
440
440
  {
441
441
  return chi->getType() == MSSADEF::EntryMSSACHI ||
442
- chi->getType() == MSSADEF::StoreMSSACHI ||
443
- chi->getType() == MSSADEF::SSACHI ;
442
+ chi->getType() == MSSADEF::StoreMSSACHI ||
443
+ chi->getType() == MSSADEF::SSACHI ;
444
444
  }
445
445
  //@}
446
446
 
@@ -180,8 +180,8 @@ public:
180
180
  static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
181
181
  {
182
182
  return ptd->getPTDTY() == PTDataTy::Diff
183
- || ptd->getPTDTY() == PTDataTy::MutDiff
184
- || ptd->getPTDTY() == PTDataTy::PersDiff;
183
+ || ptd->getPTDTY() == PTDataTy::MutDiff
184
+ || ptd->getPTDTY() == PTDataTy::PersDiff;
185
185
  }
186
186
  ///@}
187
187
  };
@@ -254,10 +254,10 @@ public:
254
254
  static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
255
255
  {
256
256
  return ptd->getPTDTY() == BasePTData::DataFlow
257
- || ptd->getPTDTY() == BasePTData::MutDataFlow
258
- || ptd->getPTDTY() == BasePTData::MutIncDataFlow
259
- || ptd->getPTDTY() == BasePTData::PersDataFlow
260
- || ptd->getPTDTY() == BasePTData::PersIncDataFlow;
257
+ || ptd->getPTDTY() == BasePTData::MutDataFlow
258
+ || ptd->getPTDTY() == BasePTData::MutIncDataFlow
259
+ || ptd->getPTDTY() == BasePTData::PersDataFlow
260
+ || ptd->getPTDTY() == BasePTData::PersIncDataFlow;
261
261
  }
262
262
  ///@}
263
263
  };
@@ -299,8 +299,8 @@ public:
299
299
  static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
300
300
  {
301
301
  return ptd->getPTDTY() == PTDataTy::Versioned
302
- || ptd->getPTDTY() == PTDataTy::MutVersioned
303
- || ptd->getPTDTY() == PTDataTy::PersVersioned;
302
+ || ptd->getPTDTY() == PTDataTy::MutVersioned
303
+ || ptd->getPTDTY() == PTDataTy::PersVersioned;
304
304
  }
305
305
  private:
306
306
  using BasePTData::getPts;
@@ -91,7 +91,7 @@ public:
91
91
  inline bool operator==(const AccessPath& rhs) const
92
92
  {
93
93
  return this->fldIdx == rhs.fldIdx &&
94
- this->idxOperandPairs == rhs.idxOperandPairs && this->gepPointeeType == rhs.gepPointeeType;
94
+ this->idxOperandPairs == rhs.idxOperandPairs && this->gepPointeeType == rhs.gepPointeeType;
95
95
  }
96
96
  //@}
97
97
 
@@ -589,7 +589,7 @@ public:
589
589
  static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
590
590
  {
591
591
  return ptd->getPTDTY() == BaseDFPTData::MutDataFlow
592
- || ptd->getPTDTY() == BaseDFPTData::MutIncDataFlow;
592
+ || ptd->getPTDTY() == BaseDFPTData::MutIncDataFlow;
593
593
  }
594
594
  ///@}
595
595
 
@@ -541,7 +541,7 @@ public:
541
541
  static inline bool classof(const PTData<Key, KeySet, Data, DataSet> *ptd)
542
542
  {
543
543
  return ptd->getPTDTY() == PTDataTy::PersDataFlow
544
- || ptd->getPTDTY() == PTDataTy::PersIncDataFlow;
544
+ || ptd->getPTDTY() == PTDataTy::PersIncDataFlow;
545
545
  }
546
546
  ///@}
547
547
 
@@ -321,7 +321,7 @@ public:
321
321
  }
322
322
 
323
323
  if (!(base->getTag() == dwarf::DW_TAG_class_type ||
324
- base->getTag() == dwarf::DW_TAG_structure_type))
324
+ base->getTag() == dwarf::DW_TAG_structure_type))
325
325
  {
326
326
  return nullptr;
327
327
  }
@@ -233,10 +233,10 @@ inline const ConstantExpr* isTruncConstantExpr(const Value* val)
233
233
  if (const ConstantExpr* constExpr = SVFUtil::dyn_cast<ConstantExpr>(val))
234
234
  {
235
235
  if (constExpr->getOpcode() == Instruction::Trunc ||
236
- constExpr->getOpcode() == Instruction::FPTrunc ||
237
- constExpr->getOpcode() == Instruction::ZExt ||
238
- constExpr->getOpcode() == Instruction::SExt ||
239
- constExpr->getOpcode() == Instruction::FPExt)
236
+ constExpr->getOpcode() == Instruction::FPTrunc ||
237
+ constExpr->getOpcode() == Instruction::ZExt ||
238
+ constExpr->getOpcode() == Instruction::SExt ||
239
+ constExpr->getOpcode() == Instruction::FPExt)
240
240
  return constExpr;
241
241
  }
242
242
  return nullptr;
@@ -247,7 +247,7 @@ inline const ConstantExpr* isCmpConstantExpr(const Value* val)
247
247
  if (const ConstantExpr* constExpr = SVFUtil::dyn_cast<ConstantExpr>(val))
248
248
  {
249
249
  if (constExpr->getOpcode() == Instruction::ICmp ||
250
- constExpr->getOpcode() == Instruction::FCmp)
250
+ constExpr->getOpcode() == Instruction::FCmp)
251
251
  return constExpr;
252
252
  }
253
253
  return nullptr;
@@ -297,7 +297,7 @@ void getNextInsts(const Instruction* curInst,
297
297
  inline bool isNoPrecessorBasicBlock(const BasicBlock* bb)
298
298
  {
299
299
  return bb != &bb->getParent()->getEntryBlock() &&
300
- pred_empty(bb);
300
+ pred_empty(bb);
301
301
  }
302
302
 
303
303
  /// Check whether a file is an LLVM IR file
@@ -618,7 +618,7 @@ private:
618
618
 
619
619
  template <typename T,
620
620
  typename = std::enable_if_t<SVFUtil::is_iterable_v<T>>>
621
- cJSON* toJson(const T& container)
621
+ cJSON* toJson(const T& container)
622
622
  {
623
623
  cJSON* array = jsonCreateArray();
624
624
  for (const auto& item : container)
@@ -790,7 +790,7 @@ public:
790
790
  template <typename FillFunc> void fillObjs(FillFunc fillFunc)
791
791
  {
792
792
  assert(jsonArray.size() == ptrPool.size() &&
793
- "jsonArray and ptrPool should have same size");
793
+ "jsonArray and ptrPool should have same size");
794
794
  for (size_t i = 0; i < jsonArray.size(); ++i)
795
795
  {
796
796
  const cJSON*& objFieldJson = jsonArray[i];
@@ -216,7 +216,7 @@ public:
216
216
  inline bool hasPTASVFStmtList(const ICFGNode* inst) const
217
217
  {
218
218
  return icfgNode2PTASVFStmtsMap.find(inst) !=
219
- icfgNode2PTASVFStmtsMap.end();
219
+ icfgNode2PTASVFStmtsMap.end();
220
220
  }
221
221
  /// Given an instruction, get all its PAGEdges
222
222
  inline SVFStmtList& getSVFStmtList(const ICFGNode* inst)
@@ -625,16 +625,16 @@ private:
625
625
  inline NodeID addValNode(const SVFValue*, SVFVar *node, NodeID i)
626
626
  {
627
627
  assert(hasGNode(i) == false &&
628
- "This NodeID clashes here. Please check NodeIDAllocator. Switch "
629
- "Strategy::DBUG to SEQ or DENSE");
628
+ "This NodeID clashes here. Please check NodeIDAllocator. Switch "
629
+ "Strategy::DBUG to SEQ or DENSE");
630
630
  return addNode(node, i);
631
631
  }
632
632
  /// Add a memory obj node
633
633
  inline NodeID addObjNode(const SVFValue*, SVFVar *node, NodeID i)
634
634
  {
635
635
  assert(hasGNode(i) == false &&
636
- "This NodeID clashes here. Please check NodeIDAllocator. Switch "
637
- "Strategy::DBUG to SEQ or DENSE");
636
+ "This NodeID clashes here. Please check NodeIDAllocator. Switch "
637
+ "Strategy::DBUG to SEQ or DENSE");
638
638
  return addNode(node, i);
639
639
  }
640
640
  /// Add a unique return node for a procedure
@@ -107,20 +107,20 @@ public:
107
107
  static inline bool classof(const GenericPAGEdgeTy* edge)
108
108
  {
109
109
  return edge->getEdgeKind() == SVFStmt::Addr ||
110
- edge->getEdgeKind() == SVFStmt::Copy ||
111
- edge->getEdgeKind() == SVFStmt::Store ||
112
- edge->getEdgeKind() == SVFStmt::Load ||
113
- edge->getEdgeKind() == SVFStmt::Call ||
114
- edge->getEdgeKind() == SVFStmt::Ret ||
115
- edge->getEdgeKind() == SVFStmt::Gep ||
116
- edge->getEdgeKind() == SVFStmt::Phi ||
117
- edge->getEdgeKind() == SVFStmt::Select ||
118
- edge->getEdgeKind() == SVFStmt::Cmp ||
119
- edge->getEdgeKind() == SVFStmt::BinaryOp ||
120
- edge->getEdgeKind() == SVFStmt::UnaryOp ||
121
- edge->getEdgeKind() == SVFStmt::Branch ||
122
- edge->getEdgeKind() == SVFStmt::ThreadFork ||
123
- edge->getEdgeKind() == SVFStmt::ThreadJoin;
110
+ edge->getEdgeKind() == SVFStmt::Copy ||
111
+ edge->getEdgeKind() == SVFStmt::Store ||
112
+ edge->getEdgeKind() == SVFStmt::Load ||
113
+ edge->getEdgeKind() == SVFStmt::Call ||
114
+ edge->getEdgeKind() == SVFStmt::Ret ||
115
+ edge->getEdgeKind() == SVFStmt::Gep ||
116
+ edge->getEdgeKind() == SVFStmt::Phi ||
117
+ edge->getEdgeKind() == SVFStmt::Select ||
118
+ edge->getEdgeKind() == SVFStmt::Cmp ||
119
+ edge->getEdgeKind() == SVFStmt::BinaryOp ||
120
+ edge->getEdgeKind() == SVFStmt::UnaryOp ||
121
+ edge->getEdgeKind() == SVFStmt::Branch ||
122
+ edge->getEdgeKind() == SVFStmt::ThreadFork ||
123
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
124
124
  }
125
125
  ///@}
126
126
 
@@ -264,26 +264,26 @@ public:
264
264
  static inline bool classof(const SVFStmt* edge)
265
265
  {
266
266
  return edge->getEdgeKind() == SVFStmt::Addr ||
267
- edge->getEdgeKind() == SVFStmt::Copy ||
268
- edge->getEdgeKind() == SVFStmt::Store ||
269
- edge->getEdgeKind() == SVFStmt::Load ||
270
- edge->getEdgeKind() == SVFStmt::Call ||
271
- edge->getEdgeKind() == SVFStmt::Ret ||
272
- edge->getEdgeKind() == SVFStmt::Gep ||
273
- edge->getEdgeKind() == SVFStmt::ThreadFork ||
274
- edge->getEdgeKind() == SVFStmt::ThreadJoin;
267
+ edge->getEdgeKind() == SVFStmt::Copy ||
268
+ edge->getEdgeKind() == SVFStmt::Store ||
269
+ edge->getEdgeKind() == SVFStmt::Load ||
270
+ edge->getEdgeKind() == SVFStmt::Call ||
271
+ edge->getEdgeKind() == SVFStmt::Ret ||
272
+ edge->getEdgeKind() == SVFStmt::Gep ||
273
+ edge->getEdgeKind() == SVFStmt::ThreadFork ||
274
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
275
275
  }
276
276
  static inline bool classof(const GenericPAGEdgeTy* edge)
277
277
  {
278
278
  return edge->getEdgeKind() == SVFStmt::Addr ||
279
- edge->getEdgeKind() == SVFStmt::Copy ||
280
- edge->getEdgeKind() == SVFStmt::Store ||
281
- edge->getEdgeKind() == SVFStmt::Load ||
282
- edge->getEdgeKind() == SVFStmt::Call ||
283
- edge->getEdgeKind() == SVFStmt::Ret ||
284
- edge->getEdgeKind() == SVFStmt::Gep ||
285
- edge->getEdgeKind() == SVFStmt::ThreadFork ||
286
- edge->getEdgeKind() == SVFStmt::ThreadJoin;
279
+ edge->getEdgeKind() == SVFStmt::Copy ||
280
+ edge->getEdgeKind() == SVFStmt::Store ||
281
+ edge->getEdgeKind() == SVFStmt::Load ||
282
+ edge->getEdgeKind() == SVFStmt::Call ||
283
+ edge->getEdgeKind() == SVFStmt::Ret ||
284
+ edge->getEdgeKind() == SVFStmt::Gep ||
285
+ edge->getEdgeKind() == SVFStmt::ThreadFork ||
286
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
287
287
  }
288
288
  //@}
289
289
 
@@ -633,12 +633,12 @@ public:
633
633
  static inline bool classof(const SVFStmt* edge)
634
634
  {
635
635
  return edge->getEdgeKind() == SVFStmt::Call ||
636
- edge->getEdgeKind() == SVFStmt::ThreadFork;
636
+ edge->getEdgeKind() == SVFStmt::ThreadFork;
637
637
  }
638
638
  static inline bool classof(const GenericPAGEdgeTy* edge)
639
639
  {
640
640
  return edge->getEdgeKind() == SVFStmt::Call ||
641
- edge->getEdgeKind() == SVFStmt::ThreadFork;
641
+ edge->getEdgeKind() == SVFStmt::ThreadFork;
642
642
  }
643
643
  //@}
644
644
 
@@ -694,12 +694,12 @@ public:
694
694
  static inline bool classof(const SVFStmt* edge)
695
695
  {
696
696
  return edge->getEdgeKind() == SVFStmt::Ret ||
697
- edge->getEdgeKind() == SVFStmt::ThreadJoin;
697
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
698
698
  }
699
699
  static inline bool classof(const GenericPAGEdgeTy* edge)
700
700
  {
701
701
  return edge->getEdgeKind() == SVFStmt::Ret ||
702
- edge->getEdgeKind() == SVFStmt::ThreadJoin;
702
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
703
703
  }
704
704
  //@}
705
705
 
@@ -763,12 +763,12 @@ public:
763
763
  static inline bool classof(const SVFStmt* node)
764
764
  {
765
765
  return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
766
- node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
766
+ node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
767
767
  }
768
768
  static inline bool classof(const GenericPAGEdgeTy* node)
769
769
  {
770
770
  return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
771
- node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
771
+ node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
772
772
  }
773
773
  //@}
774
774
  /// Operands and result at a BinaryNode e.g., p = q + r, `p` is resVar and
@@ -853,14 +853,14 @@ public:
853
853
  : MultiOpndStmt(s, opnds, SVFStmt::Phi), opICFGNodes(icfgNodes)
854
854
  {
855
855
  assert(opnds.size() == icfgNodes.size() &&
856
- "Numbers of operands and their ICFGNodes are not consistent?");
856
+ "Numbers of operands and their ICFGNodes are not consistent?");
857
857
  }
858
858
  void addOpVar(SVFVar* op, const ICFGNode* inode)
859
859
  {
860
860
  opVars.push_back(op);
861
861
  opICFGNodes.push_back(inode);
862
862
  assert(opVars.size() == opICFGNodes.size() &&
863
- "Numbers of operands and their ICFGNodes are not consistent?");
863
+ "Numbers of operands and their ICFGNodes are not consistent?");
864
864
  }
865
865
 
866
866
  /// Return the corresponding ICFGNode of this operand
@@ -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
 
@@ -551,7 +551,7 @@ protected:
551
551
  inline void addICFGNode(const ICFGNode* icfgNode)
552
552
  {
553
553
  assert(std::find(getICFGNodeList().begin(), getICFGNodeList().end(),
554
- icfgNode) == getICFGNodeList().end() && "duplicated icfgnode");
554
+ icfgNode) == getICFGNodeList().end() && "duplicated icfgnode");
555
555
  allICFGNodes.push_back(icfgNode);
556
556
  }
557
557
 
@@ -652,8 +652,8 @@ public:
652
652
  static inline bool classof(const SVFValue *node)
653
653
  {
654
654
  return node->getKind() == SVFInst ||
655
- node->getKind() == SVFCall ||
656
- node->getKind() == SVFVCall;
655
+ node->getKind() == SVFCall ||
656
+ node->getKind() == SVFVCall;
657
657
  }
658
658
 
659
659
  inline const SVFBasicBlock* getParent() const
@@ -759,12 +759,12 @@ public:
759
759
  static inline bool classof(const SVFValue *node)
760
760
  {
761
761
  return node->getKind() == SVFConst ||
762
- node->getKind() == SVFGlob ||
763
- node->getKind() == SVFConstData ||
764
- node->getKind() == SVFConstInt ||
765
- node->getKind() == SVFConstFP ||
766
- node->getKind() == SVFNullPtr ||
767
- node->getKind() == SVFBlackHole;
762
+ node->getKind() == SVFGlob ||
763
+ node->getKind() == SVFConstData ||
764
+ node->getKind() == SVFConstInt ||
765
+ node->getKind() == SVFConstFP ||
766
+ node->getKind() == SVFNullPtr ||
767
+ node->getKind() == SVFBlackHole;
768
768
  }
769
769
 
770
770
  };
@@ -864,18 +864,18 @@ public:
864
864
  static inline bool classof(const SVFValue *node)
865
865
  {
866
866
  return node->getKind() == SVFConstData ||
867
- node->getKind() == SVFConstInt ||
868
- node->getKind() == SVFConstFP ||
869
- node->getKind() == SVFNullPtr ||
870
- node->getKind() == SVFBlackHole;
867
+ node->getKind() == SVFConstInt ||
868
+ node->getKind() == SVFConstFP ||
869
+ node->getKind() == SVFNullPtr ||
870
+ node->getKind() == SVFBlackHole;
871
871
  }
872
872
  static inline bool classof(const SVFConstantData *node)
873
873
  {
874
874
  return node->getKind() == SVFConstData ||
875
- node->getKind() == SVFConstInt ||
876
- node->getKind() == SVFConstFP ||
877
- node->getKind() == SVFNullPtr ||
878
- node->getKind() == SVFBlackHole;
875
+ node->getKind() == SVFConstInt ||
876
+ node->getKind() == SVFConstFP ||
877
+ node->getKind() == SVFNullPtr ||
878
+ node->getKind() == SVFBlackHole;
879
879
  }
880
880
  };
881
881
 
@@ -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 && "value is null (GepObjNode whose basenode is a DummyObj?)");
@@ -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
  }
@@ -338,8 +338,8 @@ const SVFFunction* getProgEntryFunction();
338
338
  inline bool isProgExitFunction (const SVFFunction * fun)
339
339
  {
340
340
  return fun && (fun->getName() == "exit" ||
341
- fun->getName() == "__assert_rtn" ||
342
- fun->getName() == "__assert_fail" );
341
+ fun->getName() == "__assert_rtn" ||
342
+ fun->getName() == "__assert_fail" );
343
343
  }
344
344
 
345
345
  /// Return true if this argument belongs to an uncalled function
@@ -464,7 +464,7 @@ template <typename... Ts> using void_t = typename make_void<Ts...>::type;
464
464
  template <typename T, typename = void> struct is_iterable : std::false_type {};
465
465
  template <typename T>
466
466
  struct is_iterable<T, void_t<decltype(std::begin(std::declval<T&>()) !=
467
- std::end(std::declval<T&>()))>>
467
+ std::end(std::declval<T&>()))>>
468
468
  : std::true_type {};
469
469
  template <typename T> constexpr bool is_iterable_v = is_iterable<T>::value;
470
470
  ///@}
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2158",
3
+ "version": "1.0.2159",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {