svf-lib 1.0.1620 → 1.0.1621

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 (52) hide show
  1. package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
  2. package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  3. package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +1 -1
  4. package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +1 -1
  5. package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +1 -1
  6. package/SVF-osx/svf/include/AbstractExecution/SymState.h +1 -1
  7. package/SVF-osx/svf/include/CFL/CFGrammar.h +1 -1
  8. package/SVF-osx/svf/include/CFL/GrammarBuilder.h +3 -3
  9. package/SVF-osx/svf/include/FastCluster/fastcluster.h +4 -4
  10. package/SVF-osx/svf/include/Graphs/CHG.h +1 -1
  11. package/SVF-osx/svf/include/Graphs/ConsG.h +3 -3
  12. package/SVF-osx/svf/include/Graphs/GenericGraph.h +2 -2
  13. package/SVF-osx/svf/include/Graphs/GraphTraits.h +1 -1
  14. package/SVF-osx/svf/include/Graphs/GraphWriter.h +1 -1
  15. package/SVF-osx/svf/include/Graphs/IRGraph.h +1 -1
  16. package/SVF-osx/svf/include/Graphs/PTACallGraph.h +1 -1
  17. package/SVF-osx/svf/include/Graphs/VFGNode.h +2 -2
  18. package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +2 -2
  19. package/SVF-osx/svf/include/MSSA/MemRegion.h +1 -1
  20. package/SVF-osx/svf/include/MSSA/MemSSA.h +1 -1
  21. package/SVF-osx/svf/include/MTA/FSMPTA.h +1 -1
  22. package/SVF-osx/svf/include/MTA/MHP.h +1 -1
  23. package/SVF-osx/svf/include/MTA/TCT.h +1 -1
  24. package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +1 -1
  25. package/SVF-osx/svf/include/MemoryModel/MutablePointsToDS.h +2 -2
  26. package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +1 -1
  27. package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +1 -1
  28. package/SVF-osx/svf/include/MemoryModel/PointsTo.h +1 -1
  29. package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +1 -1
  30. package/SVF-osx/svf/include/SABER/SrcSnkDDA.h +1 -1
  31. package/SVF-osx/svf/include/SVFIR/SVFFileSystem.h +3 -3
  32. package/SVF-osx/svf/include/SVFIR/SVFIR.h +1 -1
  33. package/SVF-osx/svf/include/SVFIR/SVFStatements.h +19 -19
  34. package/SVF-osx/svf/include/SVFIR/SVFType.h +5 -5
  35. package/SVF-osx/svf/include/SVFIR/SVFValue.h +1 -1
  36. package/SVF-osx/svf/include/SVFIR/SVFVariables.h +3 -3
  37. package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +3 -3
  38. package/SVF-osx/svf/include/Util/Casting.h +1 -1
  39. package/SVF-osx/svf/include/Util/CoreBitVector.h +2 -2
  40. package/SVF-osx/svf/include/Util/DPItem.h +1 -1
  41. package/SVF-osx/svf/include/Util/NodeIDAllocator.h +1 -1
  42. package/SVF-osx/svf/include/Util/Options.h +1 -1
  43. package/SVF-osx/svf/include/Util/SVFBugReport.h +1 -1
  44. package/SVF-osx/svf/include/Util/SVFUtil.h +4 -4
  45. package/SVF-osx/svf/include/Util/WorkList.h +1 -1
  46. package/SVF-osx/svf/include/Util/cJSON.h +1 -1
  47. package/SVF-osx/svf/include/WPA/Andersen.h +1 -1
  48. package/SVF-osx/svf/include/WPA/FlowSensitive.h +1 -1
  49. package/SVF-osx/svf/include/WPA/WPASolver.h +1 -1
  50. package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +1 -1
  51. package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +1 -1
  52. package/package.json +1 -1
@@ -42,7 +42,7 @@ namespace SVF
42
42
  * / / | \ \ \
43
43
  * true ... c0 c1 ... false constant
44
44
  * \ \ \ | | |
45
- * ⊥ not contant
45
+ * ⊥ not constant
46
46
  */
47
47
  class ConsExeState final : public ExeState
48
48
  {
@@ -261,7 +261,7 @@ public:
261
261
  return (s32_t) e.lb().getNumeral();
262
262
  }
263
263
 
264
- ///TODO: Create new inteval value
264
+ ///TODO: Create new interval value
265
265
  IntervalValue createIntervalValue(double lb, double ub, NodeID id)
266
266
  {
267
267
  _varToItvVal[id] = IntervalValue(lb, ub);
@@ -471,7 +471,7 @@ inline IntervalValue operator+(const IntervalValue &lhs,
471
471
  }
472
472
  }
473
473
 
474
- /// Substract IntervalValues
474
+ /// Subtract IntervalValues
475
475
  inline IntervalValue operator-(const IntervalValue &lhs,
476
476
  const IntervalValue &rhs)
477
477
  {
@@ -60,7 +60,7 @@ public:
60
60
  /// Constructor
61
61
  SymState(ConsExeState _es, TypeState _as);
62
62
 
63
- /// Desstructor
63
+ /// Destructor
64
64
  virtual ~SymState() = default;
65
65
 
66
66
  /// Copy Constructor
@@ -48,7 +48,7 @@ public:
48
48
  /// Default Value for Symbol is 0.
49
49
  Symbol() : kind(0), attribute(0), variableAttribute(0) {}
50
50
 
51
- /// Contruct from u32_t move the bit to right field
51
+ /// Construct from u32_t move the bit to right field
52
52
  Symbol(const u32_t& num) : kind(num & 0xFF), attribute((num >> 8 ) & 0xFFFF), variableAttribute((num >> 24)) {}
53
53
 
54
54
  /// Conversion of u32_t
@@ -49,7 +49,7 @@ namespace SVF
49
49
  *
50
50
  * Production Format:
51
51
  * <symbol> -> <symbol> *;
52
- * LHS and RHS, Seperate by '->', symbol seperate by ' ', end by ';'
52
+ * LHS and RHS, Separate by '->', symbol separate by ' ', end by ';'
53
53
  * support '*', '?', '(', ')'
54
54
  *
55
55
  * Input Format:
@@ -57,10 +57,10 @@ namespace SVF
57
57
  * M // Specify Start Symbol in Second Line
58
58
  * Terminal:
59
59
  * Addr Copy Store Load Gep Vgep // Specify the order of terminal Addr->0, Copy->1 ..
60
- * Productions: // Each Symbol seperate by 'Space', production end with ';'
60
+ * Productions: // Each Symbol separate by 'Space', production end with ';'
61
61
  * M -> V d; // Terminal in NonCapital
62
62
  * M -> dbar V d; // NonTerminal in Capital
63
- * V -> M abar M a M; // LHS and RHS, Seperate by '->'
63
+ * V -> M abar M a M; // LHS and RHS, Separate by '->'
64
64
  * V -> ( M ? abar ) * M ? ( a M ? ) *; // Support '(' ')' '?' '*' four regular expression sign
65
65
  * Gep_j -> Gep_i F vgep; // Support variable attribute with variable attribute
66
66
  * Gep_1 -> Gep_2; // Support fix number attribute
@@ -1,5 +1,5 @@
1
1
  //
2
- // C++ standalone verion of fastcluster by Daniel Muellner
2
+ // C++ standalone version of fastcluster by Daniel Muellner
3
3
  //
4
4
  // Copyright: Daniel Muellner, 2011
5
5
  // Christoph Dalitz, 2020
@@ -25,7 +25,7 @@ void cutree_k(int n, const int* merge, int nclust, int* labels);
25
25
 
26
26
  //
27
27
  // Assigns cluster labels (0, ..., nclust-1) to the n points such
28
- // that the hierarchical clsutering is stopped at cluster distance cdist
28
+ // that the hierarchical clustering is stopped at cluster distance cdist
29
29
  //
30
30
  // Input arguments:
31
31
  // n = number of observables
@@ -53,7 +53,7 @@ void cutree_cdist(int n, const int* merge, double* height, double cdist, int* la
53
53
  // Output arguments:
54
54
  // merge = allocated (n-1)x2 matrix (2*(n-1) array) for storing result.
55
55
  // Result follows R hclust convention:
56
- // - observabe indices start with one
56
+ // - observable indices start with one
57
57
  // - merge[i][] contains the merged nodes in step i
58
58
  // - merge[i][j] is negative when the node is an atom
59
59
  // height = allocated (n-1) array with distances at each merge step
@@ -68,7 +68,7 @@ enum hclust_fast_methods
68
68
  HCLUST_METHOD_SINGLE = 0,
69
69
  // complete link with the nearest-neighbor-chain algorithm (Murtagh, 1984)
70
70
  HCLUST_METHOD_COMPLETE = 1,
71
- // omplete link with the nearest-neighbor-chain algorithm (Murtagh, 1984)
71
+ // complete link with the nearest-neighbor-chain algorithm (Murtagh, 1984)
72
72
  HCLUST_METHOD_AVERAGE = 2,
73
73
  // median link with the generic algorithm (Müllner, 2011)
74
74
  HCLUST_METHOD_MEDIAN = 3,
@@ -1,4 +1,4 @@
1
- //===----- CHG.h -- Class hirachary graph ---------------------------//
1
+ //===----- CHG.h -- Class hierarchy graph ---------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -72,7 +72,7 @@ protected:
72
72
  return pag->getPTASVFStmtSet(kind);
73
73
  }
74
74
 
75
- /// Wappers used internally, not expose to Andernsen Pass
75
+ /// Wrappers used internally, not expose to Andersen Pass
76
76
  //@{
77
77
  inline NodeID getValueNode(const SVFValue* value) const
78
78
  {
@@ -214,9 +214,9 @@ public:
214
214
 
215
215
  /// Used for cycle elimination
216
216
  //@{
217
- /// Remove edge from old dst target, change edge dst id and add modifed edge into new dst
217
+ /// Remove edge from old dst target, change edge dst id and add modified edge into new dst
218
218
  void reTargetDstOfEdge(ConstraintEdge* edge, ConstraintNode* newDstNode);
219
- /// Remove edge from old src target, change edge dst id and add modifed edge into new src
219
+ /// Remove edge from old src target, change edge dst id and add modified edge into new src
220
220
  void reTargetSrcOfEdge(ConstraintEdge* edge, ConstraintNode* newSrcNode);
221
221
  /// Remove addr edge from their src and dst edge sets
222
222
  void removeAddrEdge(AddrCGEdge* edge);
@@ -247,7 +247,7 @@ public:
247
247
  }
248
248
  //@}
249
249
 
250
- /// Iterators used for SCC detection, overwrite it in child class if necessory
250
+ /// Iterators used for SCC detection, overwrite it in child class if necessary
251
251
  //@{
252
252
  virtual inline iterator directOutEdgeBegin()
253
253
  {
@@ -459,7 +459,7 @@ public:
459
459
 
460
460
  /* !
461
461
  * GenericGraphTraits specializations for generic graph algorithms.
462
- * Provide graph traits for tranversing from a node using standard graph traversals.
462
+ * Provide graph traits for traversing from a node using standard graph traversals.
463
463
  */
464
464
  namespace SVF
465
465
  {
@@ -7,7 +7,7 @@
7
7
  //===----------------------------------------------------------------------===//
8
8
  //
9
9
  // This file defines the little GenericGraphTraits<X> template class that should be
10
- // specialized by classes that want to be iteratable by generic graph iterators.
10
+ // specialized by classes that want to be iterable by generic graph iterators.
11
11
  //
12
12
  // This file also defines the marker class Inverse that is used to iterate over
13
13
  // graphs in a graph defined, inverse ordering...
@@ -301,7 +301,7 @@ public:
301
301
  const void *DestNodeID, int DestNodePort,
302
302
  const std::string &Attrs)
303
303
  {
304
- if (SrcNodePort > 64) return; // Eminating from truncated part?
304
+ if (SrcNodePort > 64) return; // Emanating from truncated part?
305
305
  if (DestNodePort > 64) DestNodePort = 64; // Targeting the truncated part?
306
306
 
307
307
  O << "\tNode" << SrcNodeID;
@@ -232,7 +232,7 @@ namespace SVF
232
232
 
233
233
  /* !
234
234
  * GenericGraphTraits specializations of SVFIR to be used for the generic graph algorithms.
235
- * Provide graph traits for tranversing from a SVFIR node using standard graph traversals.
235
+ * Provide graph traits for traversing from a SVFIR node using standard graph traversals.
236
236
  */
237
237
  template<> struct GenericGraphTraits<SVF::SVFVar*> : public GenericGraphTraits<SVF::GenericNode<SVF::SVFVar,SVF::SVFStmt>* >
238
238
  {
@@ -370,7 +370,7 @@ public:
370
370
  return getCallSitePair(id).second;
371
371
  }
372
372
  //@}
373
- /// Whether we have aleady created this call graph edge
373
+ /// Whether we have already created this call graph edge
374
374
  PTACallGraphEdge* hasGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId) const;
375
375
  /// Get call graph edge via nodes
376
376
  PTACallGraphEdge* getGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId);
@@ -836,7 +836,7 @@ public:
836
836
  };
837
837
 
838
838
  /*
839
- * ICFG Node stands for acutal parameter node (top level pointers)
839
+ * ICFG Node stands for actual parameter node (top level pointers)
840
840
  */
841
841
  class ActualParmVFGNode : public ArgumentVFGNode
842
842
  {
@@ -956,7 +956,7 @@ public:
956
956
  };
957
957
 
958
958
  /*!
959
- * Callsite receive paramter
959
+ * Callsite receive parameter
960
960
  */
961
961
  class ActualRetVFGNode: public ArgumentVFGNode
962
962
  {
@@ -338,7 +338,7 @@ protected:
338
338
  MRVer* resVer;
339
339
 
340
340
  public:
341
- /// Constructor/Destructer for MSSADEF
341
+ /// Constructor/Destructor for MSSADEF
342
342
  //@{
343
343
  MSSADEF(DEFTYPE t, const MemRegion* m): type(t), mr(m), resVer(nullptr)
344
344
  {
@@ -398,7 +398,7 @@ private:
398
398
  Cond cond;
399
399
  public:
400
400
  typedef typename MSSADEF::DEFTYPE CHITYPE;
401
- /// Constructor/Destructer for MSSACHI
401
+ /// Constructor/Destructor for MSSACHI
402
402
  //@{
403
403
  MSSACHI(CHITYPE t, const MemRegion* m, Cond c): MSSADEF(t,m), opVer(nullptr), cond(c)
404
404
  {
@@ -107,7 +107,7 @@ public:
107
107
  }
108
108
 
109
109
  /// add the hash function here to sort elements and remove
110
- /// and remove duplicated element in the set (binary tree comparision)
110
+ /// and remove duplicated element in the set (binary tree comparison)
111
111
  //@{
112
112
  typedef struct equalMemRegion
113
113
  {
@@ -123,7 +123,7 @@ protected:
123
123
 
124
124
  /// Create mu chi for candidate regions in a function
125
125
  virtual void createMUCHI(const SVFFunction& fun);
126
- /// Insert phi for candidate regions in a fucntion
126
+ /// Insert phi for candidate regions in a function
127
127
  virtual void insertPHI(const SVFFunction& fun);
128
128
  /// SSA rename for a function
129
129
  virtual void SSARename(const SVFFunction& fun);
@@ -217,7 +217,7 @@ public:
217
217
  return mhp->getTCT()->getPTA()->getPAG();
218
218
  }
219
219
 
220
- /// Create signle instance of flow-sensitive pointer analysis
220
+ /// Create single instance of flow-sensitive pointer analysis
221
221
  static FSMPTA* createFSMPTA(SVFModule* module, MHP* m, LockAnalysis* la)
222
222
  {
223
223
  if (mfspta == nullptr)
@@ -207,7 +207,7 @@ private:
207
207
  void updateSiblingThreads(NodeID tid);
208
208
  //@}
209
209
 
210
- /// Thread curTid can be fully joined by parentTid recurively
210
+ /// Thread curTid can be fully joined by parentTid recursively
211
211
  bool isRecurFullJoin(NodeID parentTid, NodeID curTid);
212
212
 
213
213
  /// Whether a join site must join a thread t
@@ -192,7 +192,7 @@ public:
192
192
  {
193
193
  return getGNode(id);
194
194
  }
195
- /// Whether we have aleady created this call graph edge
195
+ /// Whether we have already created this call graph edge
196
196
  TCTEdge* hasGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind) const;
197
197
  /// Get call graph edge via nodes
198
198
  TCTEdge* getGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind);
@@ -324,7 +324,7 @@ public:
324
324
  _condPts = cptsSet.pointsTo();
325
325
  }
326
326
 
327
- /// Get Conditional PointsTo and starndard points-to
327
+ /// Get Conditional PointsTo and standard points-to
328
328
  //@{
329
329
  inline CondPts &pointsTo(void)
330
330
  {
@@ -848,7 +848,7 @@ private:
848
848
  return it->second.test(var);
849
849
  return false;
850
850
  }
851
- /// Get all var which have new pts informationin loc's IN set
851
+ /// Get all var which have new pts information in loc's IN set
852
852
  inline const DataSet& getDFInUpdatedVar(LocID loc)
853
853
  {
854
854
  return inUpdatedVarMap[loc];
@@ -877,7 +877,7 @@ private:
877
877
  return it->second.test(var);
878
878
  return false;
879
879
  }
880
- /// Get all var which have new pts informationin loc's OUT set
880
+ /// Get all var which have new pts information in loc's OUT set
881
881
  inline const DataSet& getDFOutUpdatedVar(LocID loc)
882
882
  {
883
883
  return outUpdatedVarMap[loc];
@@ -754,7 +754,7 @@ private:
754
754
  return false;
755
755
  }
756
756
 
757
- /// Get all variables which have new pts informationin loc's IN set
757
+ /// Get all variables which have new pts information in loc's IN set
758
758
  inline const KeySet& getDFInUpdatedVar(LocID loc)
759
759
  {
760
760
  return inUpdatedVarMap[loc];
@@ -76,7 +76,7 @@ public:
76
76
  VFS_WPA, ///< Versioned sparse flow-sensitive WPA
77
77
  FSCS_WPA, ///< Flow-, context- sensitive WPA
78
78
  CFLFICI_WPA, ///< Flow-, context-, insensitive CFL-reachability-based analysis
79
- CFLFSCI_WPA, ///< Flow-insensitive, context-sensitive CFL-reachability-based analysis
79
+ CFLFSCI_WPA, ///< Flow-insensitive, context-sensitive CFL-reachability-based analysis
80
80
  CFLFSCS_WPA, ///< Flow-, context-, CFL-reachability-based analysis
81
81
  TypeCPP_WPA, ///< Type-based analysis for C++
82
82
 
@@ -112,7 +112,7 @@ public:
112
112
  /// Returns true if this set changed.
113
113
  bool intersectWithComplement(const PointsTo &rhs);
114
114
 
115
- /// Put intersection of lhs with complemenet of rhs into this set (overwrites).
115
+ /// Put intersection of lhs with complement of rhs into this set (overwrites).
116
116
  void intersectWithComplement(const PointsTo &lhs, const PointsTo &rhs);
117
117
 
118
118
  /// Returns this points-to set as a NodeBS.
@@ -252,7 +252,7 @@ private:
252
252
  //@}
253
253
  /// Evaluate branch conditions
254
254
  //@{
255
- /// Evaluate the branch condtion
255
+ /// Evaluate the branch condition
256
256
  Condition evaluateBranchCond(const SVFBasicBlock* bb, const SVFBasicBlock* succ) ;
257
257
  /// Evaluate loop exit branch
258
258
  Condition evaluateLoopExitBranch(const SVFBasicBlock* bb, const SVFBasicBlock* succ);
@@ -313,7 +313,7 @@ protected:
313
313
  {
314
314
  return _curSlice->isPartialReachable();
315
315
  }
316
- /// Dump SVFG with annotated slice informaiton
316
+ /// Dump SVFG with annotated slice information
317
317
  //@{
318
318
  void dumpSlices();
319
319
  void annotateSlice(ProgSlice* slice);
@@ -586,7 +586,7 @@ private:
586
586
  }
587
587
 
588
588
  /** The following 2 functions are intended to convert SparseBitVectors
589
- * to JSON. But they're buggy. Commentting them out would enable the
589
+ * to JSON. But they're buggy. Commenting them out would enable the
590
590
  * toJson(T) where is_iterable_v<T> is true. But that implementation is less
591
591
  * space-efficient if the bitvector contains many elements.
592
592
  * It is observed that upon construction, SVF IR bitvectors contain at most
@@ -1147,7 +1147,7 @@ private:
1147
1147
  if (!basePtr)
1148
1148
  return; // ptr is nullptr when read
1149
1149
  ptr = SVFUtil::dyn_cast<T>(basePtr);
1150
- ABORT_IFNOT(ptr, "Cast: " << obj->string << " shoudn't have kind "
1150
+ ABORT_IFNOT(ptr, "Cast: " << obj->string << " shouldn't have kind "
1151
1151
  << KindBaseHelper<T>::getKind(ptr));
1152
1152
  }
1153
1153
 
@@ -1201,7 +1201,7 @@ private:
1201
1201
  std::enable_if_t<SVFUtil::is_map_v<C>> readJson(const cJSON* obj, C& map)
1202
1202
  {
1203
1203
  assert(map.empty() && "map should be empty");
1204
- ABORT_IFNOT(jsonIsMap(obj), "expects an map (represted by array)");
1204
+ ABORT_IFNOT(jsonIsMap(obj), "expects an map (represented by array)");
1205
1205
  jsonForEach(elemJson, obj)
1206
1206
  {
1207
1207
  auto jpair = jsonUnpackPair(elemJson);
@@ -327,7 +327,7 @@ public:
327
327
  }
328
328
  //@}
329
329
 
330
- /// Due to constaint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar.
330
+ /// Due to constraint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar.
331
331
  NodeID getGepValVar(const SVFValue* curInst, NodeID base,
332
332
  const AccessPath& ap) const;
333
333
 
@@ -231,7 +231,7 @@ private:
231
231
  /*
232
232
  Parent class of Addr, Copy, Store, Load, Call, Ret, NormalGep, VariantGep, ThreadFork, ThreadJoin
233
233
  connecting RHS expression and LHS expression with an assignment (e.g., LHSExpr = RHSExpr)
234
- Only one operand on the right handside of an assignment
234
+ Only one operand on the right hand side of an assignment
235
235
  */
236
236
  class AssignStmt : public SVFStmt
237
237
  {
@@ -250,7 +250,7 @@ private:
250
250
  protected:
251
251
  /// constructor
252
252
  AssignStmt(SVFVar* s, SVFVar* d, GEdgeFlag k) : SVFStmt(s, d, k) {}
253
- /// Constructor to create empty AssignStmt (for SVFIRReader/serilization)
253
+ /// Constructor to create empty AssignStmt (for SVFIRReader/serialization)
254
254
  AssignStmt(GEdgeFlag k) : SVFStmt(k) {}
255
255
 
256
256
  public:
@@ -315,7 +315,7 @@ class AddrStmt: public AssignStmt
315
315
  friend class SVFIRReader;
316
316
 
317
317
  private:
318
- /// Constructs empty AddrStmt (for SVFIRReader/serilization)
318
+ /// Constructs empty AddrStmt (for SVFIRReader/serialization)
319
319
  AddrStmt() : AssignStmt(SVFStmt::Addr) {}
320
320
  AddrStmt(const AddrStmt&); ///< place holder
321
321
  void operator=(const AddrStmt&); ///< place holder
@@ -352,7 +352,7 @@ class CopyStmt: public AssignStmt
352
352
  friend class SVFIRReader;
353
353
 
354
354
  private:
355
- /// Constructs empty CopyStmt (for SVFIRReader/serilization)
355
+ /// Constructs empty CopyStmt (for SVFIRReader/serialization)
356
356
  CopyStmt() : AssignStmt(SVFStmt::Copy) {}
357
357
  CopyStmt(const CopyStmt&); ///< place holder
358
358
  void operator=(const CopyStmt&); ///< place holder
@@ -388,7 +388,7 @@ class StoreStmt: public AssignStmt
388
388
  friend class SVFIRReader;
389
389
 
390
390
  private:
391
- /// Constructs empty StoreStmt (for SVFIRReader/serilization)
391
+ /// Constructs empty StoreStmt (for SVFIRReader/serialization)
392
392
  StoreStmt() : AssignStmt(SVFStmt::Store) {}
393
393
  StoreStmt(const StoreStmt&); ///< place holder
394
394
  void operator=(const StoreStmt&); ///< place holder
@@ -425,7 +425,7 @@ class LoadStmt: public AssignStmt
425
425
  friend class SVFIRReader;
426
426
 
427
427
  private:
428
- /// Constructs empty LoadStmt (for SVFIRReader/serilization)
428
+ /// Constructs empty LoadStmt (for SVFIRReader/serialization)
429
429
  LoadStmt(): AssignStmt(SVFStmt::Load) {}
430
430
  LoadStmt(const LoadStmt&); ///< place holder
431
431
  void operator=(const LoadStmt&); ///< place holder
@@ -462,7 +462,7 @@ class GepStmt: public AssignStmt
462
462
  friend class SVFIRReader;
463
463
 
464
464
  private:
465
- /// Constructs empty GepStmt (for SVFIRReader/serilization)
465
+ /// Constructs empty GepStmt (for SVFIRReader/serialization)
466
466
  GepStmt() : AssignStmt(SVFStmt::Gep) {}
467
467
  GepStmt(const GepStmt &); ///< place holder
468
468
  void operator=(const GepStmt &); ///< place holder
@@ -541,7 +541,7 @@ private:
541
541
  const CallICFGNode* call; /// the callsite statement calling from
542
542
  const FunEntryICFGNode* entry; /// the function exit statement calling to
543
543
  protected:
544
- /// Constructs empty CallPE (for SVFIRReader/serilization)
544
+ /// Constructs empty CallPE (for SVFIRReader/serialization)
545
545
  CallPE(GEdgeFlag k = SVFStmt::Call) : AssignStmt(k), call{}, entry{} {}
546
546
 
547
547
  public:
@@ -602,7 +602,7 @@ private:
602
602
  const FunExitICFGNode* exit; /// the function exit statement returned from
603
603
 
604
604
  protected:
605
- /// Constructs empty RetPE (for SVFIRReader/serilization)
605
+ /// Constructs empty RetPE (for SVFIRReader/serialization)
606
606
  RetPE(GEdgeFlag k = SVFStmt::Ret) : AssignStmt(k), call{}, exit{} {}
607
607
 
608
608
  public:
@@ -669,9 +669,9 @@ private:
669
669
 
670
670
  protected:
671
671
  OPVars opVars;
672
- /// Constructor, only used by subclassess but not external users
672
+ /// Constructor, only used by subclasses but not external users
673
673
  MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k);
674
- /// Constructs empty MultiOpndStmt (for SVFIRReader/serilization)
674
+ /// Constructs empty MultiOpndStmt (for SVFIRReader/serialization)
675
675
  MultiOpndStmt(GEdgeFlag k) : SVFStmt(k) {}
676
676
 
677
677
  public:
@@ -741,7 +741,7 @@ public:
741
741
  typedef std::vector<const ICFGNode*> OpICFGNodeVec;
742
742
 
743
743
  private:
744
- /// Constructs empty PhiStmt (for SVFIRReader/serilization)
744
+ /// Constructs empty PhiStmt (for SVFIRReader/serialization)
745
745
  PhiStmt() : MultiOpndStmt(SVFStmt::Phi) {}
746
746
  PhiStmt(const PhiStmt&); ///< place holder
747
747
  void operator=(const PhiStmt&); ///< place holder
@@ -806,7 +806,7 @@ class SelectStmt: public MultiOpndStmt
806
806
  friend class SVFIRReader;
807
807
 
808
808
  private:
809
- /// Constructs empty SelectStmt (for SVFIRReader/serilization)
809
+ /// Constructs empty SelectStmt (for SVFIRReader/serialization)
810
810
  SelectStmt() : MultiOpndStmt(SVFStmt::Select), condition{} {}
811
811
  SelectStmt(const SelectStmt&); ///< place holder
812
812
  void operator=(const SelectStmt&); ///< place holder
@@ -861,7 +861,7 @@ class CmpStmt: public MultiOpndStmt
861
861
  friend class SVFIRReader;
862
862
 
863
863
  private:
864
- /// Constructs empty CmpStmt (for SVFIRReader/serilization)
864
+ /// Constructs empty CmpStmt (for SVFIRReader/serialization)
865
865
  CmpStmt() : MultiOpndStmt(SVFStmt::Cmp) {}
866
866
  CmpStmt(const CmpStmt&); ///< place holder
867
867
  void operator=(const CmpStmt&); ///< place holder
@@ -947,7 +947,7 @@ class BinaryOPStmt: public MultiOpndStmt
947
947
  friend class SVFIRReader;
948
948
 
949
949
  private:
950
- /// Constructs empty BinaryOPStmt (for SVFIRReader/serilization)
950
+ /// Constructs empty BinaryOPStmt (for SVFIRReader/serialization)
951
951
  BinaryOPStmt() : MultiOpndStmt(SVFStmt::BinaryOp) {}
952
952
  BinaryOPStmt(const BinaryOPStmt&); ///< place holder
953
953
  void operator=(const BinaryOPStmt&); ///< place holder
@@ -1017,7 +1017,7 @@ class UnaryOPStmt: public SVFStmt
1017
1017
  friend class SVFIRReader;
1018
1018
 
1019
1019
  private:
1020
- /// Constructs empty UnaryOPStmt (for SVFIRReader/serilization)
1020
+ /// Constructs empty UnaryOPStmt (for SVFIRReader/serialization)
1021
1021
  UnaryOPStmt() : SVFStmt(SVFStmt::UnaryOp) {}
1022
1022
  UnaryOPStmt(const UnaryOPStmt&); ///< place holder
1023
1023
  void operator=(const UnaryOPStmt&); ///< place holder
@@ -1087,7 +1087,7 @@ public:
1087
1087
  typedef std::vector<std::pair<const ICFGNode*, s32_t>> SuccAndCondPairVec;
1088
1088
 
1089
1089
  private:
1090
- /// Constructs empty BranchStmt (for SVFIRReader/serilization)
1090
+ /// Constructs empty BranchStmt (for SVFIRReader/serialization)
1091
1091
  BranchStmt() : SVFStmt(SVFStmt::Branch), cond{}, brInst{} {}
1092
1092
  BranchStmt(const BranchStmt&); ///< place holder
1093
1093
  void operator=(const BranchStmt&); ///< place holder
@@ -1174,7 +1174,7 @@ class TDForkPE: public CallPE
1174
1174
  friend class SVFIRReader;
1175
1175
 
1176
1176
  private:
1177
- /// Constructs empty TDForkPE (for SVFIRReader/serilization)
1177
+ /// Constructs empty TDForkPE (for SVFIRReader/serialization)
1178
1178
  TDForkPE() : CallPE(SVFStmt::ThreadFork) {}
1179
1179
  TDForkPE(const TDForkPE&); ///< place holder
1180
1180
  void operator=(const TDForkPE&); ///< place holder
@@ -1215,7 +1215,7 @@ class TDJoinPE: public RetPE
1215
1215
  friend class SVFIRReader;
1216
1216
 
1217
1217
  private:
1218
- /// Constructs empty TDJoinPE (for SVFIRReader/serilization)
1218
+ /// Constructs empty TDJoinPE (for SVFIRReader/serialization)
1219
1219
  TDJoinPE() : RetPE(SVFStmt::ThreadJoin) {}
1220
1220
  TDJoinPE(const TDJoinPE&); ///< place holder
1221
1221
  void operator=(const TDJoinPE&); ///< place holder
@@ -147,9 +147,9 @@ private:
147
147
  /// stride represents the number of repetitive elements if this StInfo
148
148
  /// represent an ArrayType. stride is 1 by default.
149
149
  u32_t stride;
150
- /// number of elements after flattenning (including array elements)
150
+ /// number of elements after flattening (including array elements)
151
151
  u32_t numOfFlattenElements;
152
- /// number of fields after flattenning (ignoring array elements)
152
+ /// number of fields after flattening (ignoring array elements)
153
153
  u32_t numOfFlattenFields;
154
154
  /// Type vector of fields
155
155
  std::vector<const SVFType*> flattenElementTypes;
@@ -214,20 +214,20 @@ public:
214
214
  /// Add field index and element index and their corresponding type
215
215
  void addFldWithType(u32_t fldIdx, const SVFType* type, u32_t elemIdx);
216
216
 
217
- /// Set number of fields and elements of an aggrate
217
+ /// Set number of fields and elements of an aggregate
218
218
  inline void setNumOfFieldsAndElems(u32_t nf, u32_t ne)
219
219
  {
220
220
  numOfFlattenFields = nf;
221
221
  numOfFlattenElements = ne;
222
222
  }
223
223
 
224
- /// Return number of elements after flattenning (including array elements)
224
+ /// Return number of elements after flattening (including array elements)
225
225
  inline u32_t getNumOfFlattenElements() const
226
226
  {
227
227
  return numOfFlattenElements;
228
228
  }
229
229
 
230
- /// Return the number of fields after flattenning (ignoring array elements)
230
+ /// Return the number of fields after flattening (ignoring array elements)
231
231
  inline u32_t getNumOfFlattenFields() const
232
232
  {
233
233
  return numOfFlattenFields;
@@ -945,7 +945,7 @@ public:
945
945
  {
946
946
  return zval;
947
947
  }
948
- // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constan
948
+ // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constant
949
949
  inline s64_t getSExtValue () const
950
950
  {
951
951
  return sval;
@@ -56,8 +56,8 @@ public:
56
56
  /// ObjNode: memory object
57
57
  /// RetNode: unique return node
58
58
  /// Vararg: unique node for vararg parameter
59
- /// GepValNode: tempory gep value node for field sensitivity
60
- /// GepValNode: tempory gep obj node for field sensitivity
59
+ /// GepValNode: temporary gep value node for field sensitivity
60
+ /// GepValNode: temporary gep obj node for field sensitivity
61
61
  /// FIObjNode: for field insensitive analysis
62
62
  /// DummyValNode and DummyObjNode: for non-llvm-value node
63
63
  enum PNODEK
@@ -121,7 +121,7 @@ public:
121
121
  /// or llvm's metadata, i.e., metadata !4087
122
122
  bool isConstDataOrAggDataButNotNullPtr() const;
123
123
 
124
- /// Whether this is an isoloated node on the SVFIR graph
124
+ /// Whether this is an isolated node on the SVFIR graph
125
125
  bool isIsolatedNode() const;
126
126
 
127
127
  /// Get name of the LLVM value
@@ -199,7 +199,7 @@ public:
199
199
  return BlackHole;
200
200
  }
201
201
 
202
- /// Can only be invoked by SVFIR::addDummyNode() when creaing SVFIR from file.
202
+ /// Can only be invoked by SVFIR::addDummyNode() when creating SVFIR from file.
203
203
  const MemObj* createDummyObj(SymID symId, const SVFType* type);
204
204
  // @}
205
205
 
@@ -310,9 +310,9 @@ public:
310
310
  }
311
311
 
312
312
  ///Get a reference to the components of struct_info.
313
- /// Number of flattenned elements of an array or struct
313
+ /// Number of flattened elements of an array or struct
314
314
  u32_t getNumOfFlattenElements(const SVFType* T);
315
- /// Flatterned element idx of an array or struct by considering stride
315
+ /// Flattened element idx of an array or struct by considering stride
316
316
  u32_t getFlattenedElemIdx(const SVFType* T, u32_t origId);
317
317
  /// Return the type of a flattened element given a flattened index
318
318
  const SVFType* getFlatternedElemType(const SVFType* baseType, u32_t flatten_idx);
@@ -61,7 +61,7 @@ namespace SVF
61
61
  namespace SVFUtil
62
62
  {
63
63
 
64
- //===- Part of llvm/Support/type_traits.h - Simplfied type traits -------*- C++ -*-===//
64
+ //===- Part of llvm/Support/type_traits.h - Simplified type traits -------*- C++ -*-===//
65
65
 
66
66
  /// If T is a pointer to X, return a pointer to const X. If it is not,
67
67
  /// return const T.
@@ -102,11 +102,11 @@ public:
102
102
  /// Returns true if CBV changed.
103
103
  bool operator-=(const CoreBitVector &rhs);
104
104
 
105
- /// Put intersection of this CBV with complemenet of rhs into this CBV.
105
+ /// Put intersection of this CBV with complement of rhs into this CBV.
106
106
  /// Returns true if this CBV changed.
107
107
  bool intersectWithComplement(const CoreBitVector &rhs);
108
108
 
109
- /// Put intersection of lhs with complemenet of rhs into this CBV.
109
+ /// Put intersection of lhs with complement of rhs into this CBV.
110
110
  void intersectWithComplement(const CoreBitVector &lhs, const CoreBitVector &rhs);
111
111
 
112
112
  /// Hash for this CBV.
@@ -37,7 +37,7 @@ namespace SVF
37
37
  {
38
38
 
39
39
  /*!
40
- * Dynamic programming item for CFL researchability search
40
+ * Dynamic programming item for CFL reachability search
41
41
  * This serves as a base class for CFL-reachability formulation by matching parentheses.
42
42
  * Extend this class for further sophisticated CFL-reachability items (e.g. field, flow, path)
43
43
  */
@@ -184,7 +184,7 @@ public:
184
184
  /// x in pt(p) and y in pt(p) -> x is reachable from y.
185
185
  static inline std::vector<unsigned> regionObjects(const Map<NodeID, Set<NodeID>> &graph, size_t numObjects, size_t &numLabels);
186
186
 
187
- // From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurences).
187
+ // From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences).
188
188
  static inline std::pair<hclust_fast_methods, std::vector<NodeID>> determineBestMapping(
189
189
  const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
190
190
  Map<PointsTo, unsigned> pointsToSets, const std::string &evalSubtitle, double &evalTime);
@@ -61,7 +61,7 @@ public:
61
61
  /// Align identifiers in each region to a word.
62
62
  static const Option<bool> RegionAlign;
63
63
 
64
- /// Predict occurences of points-to sets in the staged points-to set to
64
+ /// Predict occurrences of points-to sets in the staged points-to set to
65
65
  /// weigh more common points-to sets as more important.
66
66
  static const Option<bool> PredictPtOcc;
67
67
 
@@ -386,7 +386,7 @@ public:
386
386
  }
387
387
  default:
388
388
  {
389
- assert(false && "Abstract Execution does NOT hava his bug type!");
389
+ assert(false && "Abstract Execution does NOT have this bug type!");
390
390
  break;
391
391
  }
392
392
  }
@@ -202,7 +202,7 @@ inline CallSite getSVFCallSite(const SVFInstruction* inst)
202
202
 
203
203
  /// Match arguments for callsite at caller and callee
204
204
  /// if the arg size does not match then we do not need to connect this parameter
205
- /// unless the callee is a variadic function (the first parameter of variadic function is its paramter number)
205
+ /// unless the callee is a variadic function (the first parameter of variadic function is its parameter number)
206
206
  bool matchArgs(const SVFInstruction* cs, const SVFFunction* callee);
207
207
 
208
208
  /// Return LLVM callsite given a value
@@ -304,7 +304,7 @@ bool startAnalysisLimitTimer(unsigned timeLimit);
304
304
  void stopAnalysisLimitTimer(bool limitTimerSet);
305
305
 
306
306
  /// Return true if the call is an external call (external library in function summary table)
307
- /// If the libary function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
307
+ /// If the library function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
308
308
  //@{
309
309
  inline bool isExtCall(const SVFFunction* fun)
310
310
  {
@@ -643,7 +643,7 @@ inline const SVFValue* getTaskFuncAtHareParForSite(const SVFInstruction *inst)
643
643
  }
644
644
  //@}
645
645
 
646
- /// Return the task data argument of the parallel_for rountine
646
+ /// Return the task data argument of the parallel_for routine
647
647
  //@{
648
648
  inline const SVFValue* getTaskDataAtHareParForSite(const CallSite cs)
649
649
  {
@@ -672,7 +672,7 @@ move(T &&t) noexcept
672
672
  return std::move(t);
673
673
  }
674
674
 
675
- /// void_t is not avaiable until C++17. We define it here for C++11/14.
675
+ /// void_t is not available until C++17. We define it here for C++11/14.
676
676
  template <typename... Ts> struct make_void
677
677
  {
678
678
  typedef void type;
@@ -220,7 +220,7 @@ private:
220
220
  };
221
221
 
222
222
  /**
223
- * Worlist with "first in last out" order.
223
+ * Worklist with "first in last out" order.
224
224
  * New nodes will be pushed at back and popped from back.
225
225
  * Elements in the list are unique as they're recorded by Set.
226
226
  */
@@ -111,7 +111,7 @@ typedef struct cJSON
111
111
  /* The type of the item, as above. */
112
112
  int type;
113
113
 
114
- /* The item's string, if type==cJSON_String and type == cJSON_Raw */
114
+ /* The item's string, if type==cJSON_String and type == cJSON_Raw */
115
115
  char *valuestring;
116
116
  /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */
117
117
  int valueint;
@@ -325,7 +325,7 @@ protected:
325
325
  void mergeSccNodes(NodeID repNodeId, const NodeBS& subNodes);
326
326
  void mergeSccCycle();
327
327
  //@}
328
- /// Collapse a field object into its base for field insensitive anlaysis
328
+ /// Collapse a field object into its base for field insensitive analysis
329
329
  //@{
330
330
  virtual void collapsePWCNode(NodeID nodeId);
331
331
  void collapseFields();
@@ -75,7 +75,7 @@ public:
75
75
  /// Destructor
76
76
  ~FlowSensitive() override = default;
77
77
 
78
- /// Create signle instance of flow-sensitive pointer analysis
78
+ /// Create single instance of flow-sensitive pointer analysis
79
79
  static FlowSensitive* createFSWPA(SVFIR* _pag)
80
80
  {
81
81
  if (fspta == nullptr)
@@ -194,7 +194,7 @@ protected:
194
194
  WorkList worklist;
195
195
 
196
196
  public:
197
- /// num of iterations during constaint solving
197
+ /// num of iterations during constraint solving
198
198
  u32_t numOfIteration;
199
199
  };
200
200
 
@@ -89,7 +89,7 @@ public:
89
89
  }
90
90
 
91
91
  // non-standard operators, these may not need be bridged but seems it's
92
- // predunt to do so...
92
+ // prudent to do so...
93
93
  Type* operator->() const
94
94
  {
95
95
  return operator*();
@@ -94,7 +94,7 @@ protected:
94
94
  void analyzeStaticObjType(ObjTypeInfo* typeinfo, const Value* val);
95
95
 
96
96
  ///Get a reference to the components of struct_info.
97
- /// Number of flattenned elements of an array or struct
97
+ /// Number of flattened elements of an array or struct
98
98
  u32_t getNumOfFlattenElements(const Type* T);
99
99
 
100
100
  ///Get a reference to StructInfo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1620",
3
+ "version": "1.0.1621",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {