svf-lib 1.0.1621 → 1.0.1622

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-linux/Release-build/svf/libSvfCore.a +0 -0
  2. package/SVF-linux/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  3. package/SVF-linux/svf/include/AbstractExecution/ConsExeState.h +1 -1
  4. package/SVF-linux/svf/include/AbstractExecution/IntervalExeState.h +1 -1
  5. package/SVF-linux/svf/include/AbstractExecution/IntervalValue.h +1 -1
  6. package/SVF-linux/svf/include/AbstractExecution/SymState.h +1 -1
  7. package/SVF-linux/svf/include/CFL/CFGrammar.h +1 -1
  8. package/SVF-linux/svf/include/CFL/GrammarBuilder.h +3 -3
  9. package/SVF-linux/svf/include/FastCluster/fastcluster.h +4 -4
  10. package/SVF-linux/svf/include/Graphs/CHG.h +1 -1
  11. package/SVF-linux/svf/include/Graphs/ConsG.h +3 -3
  12. package/SVF-linux/svf/include/Graphs/GenericGraph.h +2 -2
  13. package/SVF-linux/svf/include/Graphs/GraphTraits.h +1 -1
  14. package/SVF-linux/svf/include/Graphs/GraphWriter.h +1 -1
  15. package/SVF-linux/svf/include/Graphs/IRGraph.h +1 -1
  16. package/SVF-linux/svf/include/Graphs/PTACallGraph.h +1 -1
  17. package/SVF-linux/svf/include/Graphs/VFGNode.h +2 -2
  18. package/SVF-linux/svf/include/MSSA/MSSAMuChi.h +2 -2
  19. package/SVF-linux/svf/include/MSSA/MemRegion.h +1 -1
  20. package/SVF-linux/svf/include/MSSA/MemSSA.h +1 -1
  21. package/SVF-linux/svf/include/MTA/FSMPTA.h +1 -1
  22. package/SVF-linux/svf/include/MTA/MHP.h +1 -1
  23. package/SVF-linux/svf/include/MTA/TCT.h +1 -1
  24. package/SVF-linux/svf/include/MemoryModel/ConditionalPT.h +1 -1
  25. package/SVF-linux/svf/include/MemoryModel/MutablePointsToDS.h +2 -2
  26. package/SVF-linux/svf/include/MemoryModel/PersistentPointsToDS.h +1 -1
  27. package/SVF-linux/svf/include/MemoryModel/PointerAnalysis.h +1 -1
  28. package/SVF-linux/svf/include/MemoryModel/PointsTo.h +1 -1
  29. package/SVF-linux/svf/include/SABER/SaberCondAllocator.h +1 -1
  30. package/SVF-linux/svf/include/SABER/SrcSnkDDA.h +1 -1
  31. package/SVF-linux/svf/include/SVFIR/SVFFileSystem.h +3 -3
  32. package/SVF-linux/svf/include/SVFIR/SVFIR.h +1 -1
  33. package/SVF-linux/svf/include/SVFIR/SVFStatements.h +19 -19
  34. package/SVF-linux/svf/include/SVFIR/SVFType.h +5 -5
  35. package/SVF-linux/svf/include/SVFIR/SVFValue.h +1 -1
  36. package/SVF-linux/svf/include/SVFIR/SVFVariables.h +3 -3
  37. package/SVF-linux/svf/include/SVFIR/SymbolTableInfo.h +3 -3
  38. package/SVF-linux/svf/include/Util/Casting.h +1 -1
  39. package/SVF-linux/svf/include/Util/CoreBitVector.h +2 -2
  40. package/SVF-linux/svf/include/Util/DPItem.h +1 -1
  41. package/SVF-linux/svf/include/Util/NodeIDAllocator.h +1 -1
  42. package/SVF-linux/svf/include/Util/Options.h +1 -1
  43. package/SVF-linux/svf/include/Util/SVFBugReport.h +1 -1
  44. package/SVF-linux/svf/include/Util/SVFUtil.h +4 -4
  45. package/SVF-linux/svf/include/Util/WorkList.h +1 -1
  46. package/SVF-linux/svf/include/Util/cJSON.h +1 -1
  47. package/SVF-linux/svf/include/WPA/Andersen.h +1 -1
  48. package/SVF-linux/svf/include/WPA/FlowSensitive.h +1 -1
  49. package/SVF-linux/svf/include/WPA/WPASolver.h +1 -1
  50. package/SVF-linux/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +1 -1
  51. package/SVF-linux/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
  {
@@ -264,7 +264,7 @@ public:
264
264
  return (s32_t) e.lb().getNumeral();
265
265
  }
266
266
 
267
- ///TODO: Create new inteval value
267
+ ///TODO: Create new interval value
268
268
  IntervalValue createIntervalValue(double lb, double ub, NodeID id)
269
269
  {
270
270
  _varToItvVal[id] = IntervalValue(lb, ub);
@@ -473,7 +473,7 @@ inline IntervalValue operator+(const IntervalValue &lhs,
473
473
  }
474
474
  }
475
475
 
476
- /// Substract IntervalValues
476
+ /// Subtract IntervalValues
477
477
  inline IntervalValue operator-(const IntervalValue &lhs,
478
478
  const IntervalValue &rhs)
479
479
  {
@@ -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);
@@ -248,7 +248,7 @@ public:
248
248
  }
249
249
  //@}
250
250
 
251
- /// Iterators used for SCC detection, overwrite it in child class if necessory
251
+ /// Iterators used for SCC detection, overwrite it in child class if necessary
252
252
  //@{
253
253
  virtual inline iterator directOutEdgeBegin()
254
254
  {
@@ -460,7 +460,7 @@ public:
460
460
 
461
461
  /* !
462
462
  * GenericGraphTraits specializations for generic graph algorithms.
463
- * Provide graph traits for tranversing from a node using standard graph traversals.
463
+ * Provide graph traits for traversing from a node using standard graph traversals.
464
464
  */
465
465
  namespace SVF
466
466
  {
@@ -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;
@@ -233,7 +233,7 @@ namespace SVF
233
233
 
234
234
  /* !
235
235
  * GenericGraphTraits specializations of SVFIR to be used for the generic graph algorithms.
236
- * Provide graph traits for tranversing from a SVFIR node using standard graph traversals.
236
+ * Provide graph traits for traversing from a SVFIR node using standard graph traversals.
237
237
  */
238
238
  template<> struct GenericGraphTraits<SVF::SVFVar*> : public GenericGraphTraits<SVF::GenericNode<SVF::SVFVar,SVF::SVFStmt>* >
239
239
  {
@@ -373,7 +373,7 @@ public:
373
373
  return getCallSitePair(id).second;
374
374
  }
375
375
  //@}
376
- /// Whether we have aleady created this call graph edge
376
+ /// Whether we have already created this call graph edge
377
377
  PTACallGraphEdge* hasGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId) const;
378
378
  /// Get call graph edge via nodes
379
379
  PTACallGraphEdge* getGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId);
@@ -841,7 +841,7 @@ public:
841
841
  };
842
842
 
843
843
  /*
844
- * ICFG Node stands for acutal parameter node (top level pointers)
844
+ * ICFG Node stands for actual parameter node (top level pointers)
845
845
  */
846
846
  class ActualParmVFGNode : public ArgumentVFGNode
847
847
  {
@@ -962,7 +962,7 @@ public:
962
962
  };
963
963
 
964
964
  /*!
965
- * Callsite receive paramter
965
+ * Callsite receive parameter
966
966
  */
967
967
  class ActualRetVFGNode: public ArgumentVFGNode
968
968
  {
@@ -341,7 +341,7 @@ protected:
341
341
  MRVer* resVer;
342
342
 
343
343
  public:
344
- /// Constructor/Destructer for MSSADEF
344
+ /// Constructor/Destructor for MSSADEF
345
345
  //@{
346
346
  MSSADEF(DEFTYPE t, const MemRegion* m): type(t), mr(m), resVer(nullptr)
347
347
  {
@@ -401,7 +401,7 @@ private:
401
401
  Cond cond;
402
402
  public:
403
403
  typedef typename MSSADEF::DEFTYPE CHITYPE;
404
- /// Constructor/Destructer for MSSACHI
404
+ /// Constructor/Destructor for MSSACHI
405
405
  //@{
406
406
  MSSACHI(CHITYPE t, const MemRegion* m, Cond c): MSSADEF(t,m), opVer(nullptr), cond(c)
407
407
  {
@@ -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
  {
@@ -124,7 +124,7 @@ protected:
124
124
 
125
125
  /// Create mu chi for candidate regions in a function
126
126
  virtual void createMUCHI(const SVFFunction& fun);
127
- /// Insert phi for candidate regions in a fucntion
127
+ /// Insert phi for candidate regions in a function
128
128
  virtual void insertPHI(const SVFFunction& fun);
129
129
  /// SSA rename for a function
130
130
  virtual void SSARename(const SVFFunction& fun);
@@ -223,7 +223,7 @@ public:
223
223
  return mhp->getTCT()->getPTA()->getPAG();
224
224
  }
225
225
 
226
- /// Create signle instance of flow-sensitive pointer analysis
226
+ /// Create single instance of flow-sensitive pointer analysis
227
227
  static FSMPTA* createFSMPTA(SVFModule* module, MHP* m, LockAnalysis* la)
228
228
  {
229
229
  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
@@ -193,7 +193,7 @@ public:
193
193
  {
194
194
  return getGNode(id);
195
195
  }
196
- /// Whether we have aleady created this call graph edge
196
+ /// Whether we have already created this call graph edge
197
197
  TCTEdge* hasGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind) const;
198
198
  /// Get call graph edge via nodes
199
199
  TCTEdge* getGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind);
@@ -327,7 +327,7 @@ public:
327
327
  _condPts = cptsSet.pointsTo();
328
328
  }
329
329
 
330
- /// Get Conditional PointsTo and starndard points-to
330
+ /// Get Conditional PointsTo and standard points-to
331
331
  //@{
332
332
  inline CondPts &pointsTo(void)
333
333
  {
@@ -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.
@@ -255,7 +255,7 @@ private:
255
255
  //@}
256
256
  /// Evaluate branch conditions
257
257
  //@{
258
- /// Evaluate the branch condtion
258
+ /// Evaluate the branch condition
259
259
  Condition evaluateBranchCond(const SVFBasicBlock* bb, const SVFBasicBlock* succ) ;
260
260
  /// Evaluate loop exit branch
261
261
  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
 
@@ -232,7 +232,7 @@ private:
232
232
  /*
233
233
  Parent class of Addr, Copy, Store, Load, Call, Ret, NormalGep, VariantGep, ThreadFork, ThreadJoin
234
234
  connecting RHS expression and LHS expression with an assignment (e.g., LHSExpr = RHSExpr)
235
- Only one operand on the right handside of an assignment
235
+ Only one operand on the right hand side of an assignment
236
236
  */
237
237
  class AssignStmt : public SVFStmt
238
238
  {
@@ -251,7 +251,7 @@ private:
251
251
  protected:
252
252
  /// constructor
253
253
  AssignStmt(SVFVar* s, SVFVar* d, GEdgeFlag k) : SVFStmt(s, d, k) {}
254
- /// Constructor to create empty AssignStmt (for SVFIRReader/serilization)
254
+ /// Constructor to create empty AssignStmt (for SVFIRReader/serialization)
255
255
  AssignStmt(GEdgeFlag k) : SVFStmt(k) {}
256
256
 
257
257
  public:
@@ -316,7 +316,7 @@ class AddrStmt: public AssignStmt
316
316
  friend class SVFIRReader;
317
317
 
318
318
  private:
319
- /// Constructs empty AddrStmt (for SVFIRReader/serilization)
319
+ /// Constructs empty AddrStmt (for SVFIRReader/serialization)
320
320
  AddrStmt() : AssignStmt(SVFStmt::Addr) {}
321
321
  AddrStmt(const AddrStmt&); ///< place holder
322
322
  void operator=(const AddrStmt&); ///< place holder
@@ -353,7 +353,7 @@ class CopyStmt: public AssignStmt
353
353
  friend class SVFIRReader;
354
354
 
355
355
  private:
356
- /// Constructs empty CopyStmt (for SVFIRReader/serilization)
356
+ /// Constructs empty CopyStmt (for SVFIRReader/serialization)
357
357
  CopyStmt() : AssignStmt(SVFStmt::Copy) {}
358
358
  CopyStmt(const CopyStmt&); ///< place holder
359
359
  void operator=(const CopyStmt&); ///< place holder
@@ -389,7 +389,7 @@ class StoreStmt: public AssignStmt
389
389
  friend class SVFIRReader;
390
390
 
391
391
  private:
392
- /// Constructs empty StoreStmt (for SVFIRReader/serilization)
392
+ /// Constructs empty StoreStmt (for SVFIRReader/serialization)
393
393
  StoreStmt() : AssignStmt(SVFStmt::Store) {}
394
394
  StoreStmt(const StoreStmt&); ///< place holder
395
395
  void operator=(const StoreStmt&); ///< place holder
@@ -426,7 +426,7 @@ class LoadStmt: public AssignStmt
426
426
  friend class SVFIRReader;
427
427
 
428
428
  private:
429
- /// Constructs empty LoadStmt (for SVFIRReader/serilization)
429
+ /// Constructs empty LoadStmt (for SVFIRReader/serialization)
430
430
  LoadStmt(): AssignStmt(SVFStmt::Load) {}
431
431
  LoadStmt(const LoadStmt&); ///< place holder
432
432
  void operator=(const LoadStmt&); ///< place holder
@@ -463,7 +463,7 @@ class GepStmt: public AssignStmt
463
463
  friend class SVFIRReader;
464
464
 
465
465
  private:
466
- /// Constructs empty GepStmt (for SVFIRReader/serilization)
466
+ /// Constructs empty GepStmt (for SVFIRReader/serialization)
467
467
  GepStmt() : AssignStmt(SVFStmt::Gep) {}
468
468
  GepStmt(const GepStmt &); ///< place holder
469
469
  void operator=(const GepStmt &); ///< place holder
@@ -543,7 +543,7 @@ private:
543
543
  const CallICFGNode* call; /// the callsite statement calling from
544
544
  const FunEntryICFGNode* entry; /// the function exit statement calling to
545
545
  protected:
546
- /// Constructs empty CallPE (for SVFIRReader/serilization)
546
+ /// Constructs empty CallPE (for SVFIRReader/serialization)
547
547
  CallPE(GEdgeFlag k = SVFStmt::Call) : AssignStmt(k), call{}, entry{} {}
548
548
 
549
549
  public:
@@ -604,7 +604,7 @@ private:
604
604
  const FunExitICFGNode* exit; /// the function exit statement returned from
605
605
 
606
606
  protected:
607
- /// Constructs empty RetPE (for SVFIRReader/serilization)
607
+ /// Constructs empty RetPE (for SVFIRReader/serialization)
608
608
  RetPE(GEdgeFlag k = SVFStmt::Ret) : AssignStmt(k), call{}, exit{} {}
609
609
 
610
610
  public:
@@ -671,9 +671,9 @@ private:
671
671
 
672
672
  protected:
673
673
  OPVars opVars;
674
- /// Constructor, only used by subclassess but not external users
674
+ /// Constructor, only used by subclasses but not external users
675
675
  MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k);
676
- /// Constructs empty MultiOpndStmt (for SVFIRReader/serilization)
676
+ /// Constructs empty MultiOpndStmt (for SVFIRReader/serialization)
677
677
  MultiOpndStmt(GEdgeFlag k) : SVFStmt(k) {}
678
678
 
679
679
  public:
@@ -743,7 +743,7 @@ public:
743
743
  typedef std::vector<const ICFGNode*> OpICFGNodeVec;
744
744
 
745
745
  private:
746
- /// Constructs empty PhiStmt (for SVFIRReader/serilization)
746
+ /// Constructs empty PhiStmt (for SVFIRReader/serialization)
747
747
  PhiStmt() : MultiOpndStmt(SVFStmt::Phi) {}
748
748
  PhiStmt(const PhiStmt&); ///< place holder
749
749
  void operator=(const PhiStmt&); ///< place holder
@@ -808,7 +808,7 @@ class SelectStmt: public MultiOpndStmt
808
808
  friend class SVFIRReader;
809
809
 
810
810
  private:
811
- /// Constructs empty SelectStmt (for SVFIRReader/serilization)
811
+ /// Constructs empty SelectStmt (for SVFIRReader/serialization)
812
812
  SelectStmt() : MultiOpndStmt(SVFStmt::Select), condition{} {}
813
813
  SelectStmt(const SelectStmt&); ///< place holder
814
814
  void operator=(const SelectStmt&); ///< place holder
@@ -863,7 +863,7 @@ class CmpStmt: public MultiOpndStmt
863
863
  friend class SVFIRReader;
864
864
 
865
865
  private:
866
- /// Constructs empty CmpStmt (for SVFIRReader/serilization)
866
+ /// Constructs empty CmpStmt (for SVFIRReader/serialization)
867
867
  CmpStmt() : MultiOpndStmt(SVFStmt::Cmp) {}
868
868
  CmpStmt(const CmpStmt&); ///< place holder
869
869
  void operator=(const CmpStmt&); ///< place holder
@@ -949,7 +949,7 @@ class BinaryOPStmt: public MultiOpndStmt
949
949
  friend class SVFIRReader;
950
950
 
951
951
  private:
952
- /// Constructs empty BinaryOPStmt (for SVFIRReader/serilization)
952
+ /// Constructs empty BinaryOPStmt (for SVFIRReader/serialization)
953
953
  BinaryOPStmt() : MultiOpndStmt(SVFStmt::BinaryOp) {}
954
954
  BinaryOPStmt(const BinaryOPStmt&); ///< place holder
955
955
  void operator=(const BinaryOPStmt&); ///< place holder
@@ -1019,7 +1019,7 @@ class UnaryOPStmt: public SVFStmt
1019
1019
  friend class SVFIRReader;
1020
1020
 
1021
1021
  private:
1022
- /// Constructs empty UnaryOPStmt (for SVFIRReader/serilization)
1022
+ /// Constructs empty UnaryOPStmt (for SVFIRReader/serialization)
1023
1023
  UnaryOPStmt() : SVFStmt(SVFStmt::UnaryOp) {}
1024
1024
  UnaryOPStmt(const UnaryOPStmt&); ///< place holder
1025
1025
  void operator=(const UnaryOPStmt&); ///< place holder
@@ -1089,7 +1089,7 @@ public:
1089
1089
  typedef std::vector<std::pair<const ICFGNode*, s32_t>> SuccAndCondPairVec;
1090
1090
 
1091
1091
  private:
1092
- /// Constructs empty BranchStmt (for SVFIRReader/serilization)
1092
+ /// Constructs empty BranchStmt (for SVFIRReader/serialization)
1093
1093
  BranchStmt() : SVFStmt(SVFStmt::Branch), cond{}, brInst{} {}
1094
1094
  BranchStmt(const BranchStmt&); ///< place holder
1095
1095
  void operator=(const BranchStmt&); ///< place holder
@@ -1176,7 +1176,7 @@ class TDForkPE: public CallPE
1176
1176
  friend class SVFIRReader;
1177
1177
 
1178
1178
  private:
1179
- /// Constructs empty TDForkPE (for SVFIRReader/serilization)
1179
+ /// Constructs empty TDForkPE (for SVFIRReader/serialization)
1180
1180
  TDForkPE() : CallPE(SVFStmt::ThreadFork) {}
1181
1181
  TDForkPE(const TDForkPE&); ///< place holder
1182
1182
  void operator=(const TDForkPE&); ///< place holder
@@ -1217,7 +1217,7 @@ class TDJoinPE: public RetPE
1217
1217
  friend class SVFIRReader;
1218
1218
 
1219
1219
  private:
1220
- /// Constructs empty TDJoinPE (for SVFIRReader/serilization)
1220
+ /// Constructs empty TDJoinPE (for SVFIRReader/serialization)
1221
1221
  TDJoinPE() : RetPE(SVFStmt::ThreadJoin) {}
1222
1222
  TDJoinPE(const TDJoinPE&); ///< place holder
1223
1223
  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;
@@ -946,7 +946,7 @@ public:
946
946
  {
947
947
  return zval;
948
948
  }
949
- // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constan
949
+ // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constant
950
950
  inline s64_t getSExtValue () const
951
951
  {
952
952
  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
@@ -122,7 +122,7 @@ public:
122
122
  /// or llvm's metadata, i.e., metadata !4087
123
123
  bool isConstDataOrAggDataButNotNullPtr() const;
124
124
 
125
- /// Whether this is an isoloated node on the SVFIR graph
125
+ /// Whether this is an isolated node on the SVFIR graph
126
126
  bool isIsolatedNode() const;
127
127
 
128
128
  /// Get name of the LLVM value
@@ -200,7 +200,7 @@ public:
200
200
  return BlackHole;
201
201
  }
202
202
 
203
- /// Can only be invoked by SVFIR::addDummyNode() when creaing SVFIR from file.
203
+ /// Can only be invoked by SVFIR::addDummyNode() when creating SVFIR from file.
204
204
  const MemObj* createDummyObj(SymID symId, const SVFType* type);
205
205
  // @}
206
206
 
@@ -312,9 +312,9 @@ public:
312
312
  }
313
313
 
314
314
  ///Get a reference to the components of struct_info.
315
- /// Number of flattenned elements of an array or struct
315
+ /// Number of flattened elements of an array or struct
316
316
  u32_t getNumOfFlattenElements(const SVFType* T);
317
- /// Flatterned element idx of an array or struct by considering stride
317
+ /// Flattened element idx of an array or struct by considering stride
318
318
  u32_t getFlattenedElemIdx(const SVFType* T, u32_t origId);
319
319
  /// Return the type of a flattened element given a flattened index
320
320
  const SVFType* getFlatternedElemType(const SVFType* baseType, u32_t flatten_idx);
@@ -62,7 +62,7 @@ namespace SVF
62
62
  namespace SVFUtil
63
63
  {
64
64
 
65
- //===- Part of llvm/Support/type_traits.h - Simplfied type traits -------*- C++ -*-===//
65
+ //===- Part of llvm/Support/type_traits.h - Simplified type traits -------*- C++ -*-===//
66
66
 
67
67
  /// If T is a pointer to X, return a pointer to const X. If it is not,
68
68
  /// 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
 
@@ -387,7 +387,7 @@ public:
387
387
  }
388
388
  default:
389
389
  {
390
- assert(false && "Abstract Execution does NOT hava his bug type!");
390
+ assert(false && "Abstract Execution does NOT have this bug type!");
391
391
  break;
392
392
  }
393
393
  }
@@ -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;
@@ -221,7 +221,7 @@ private:
221
221
  };
222
222
 
223
223
  /**
224
- * Worlist with "first in last out" order.
224
+ * Worklist with "first in last out" order.
225
225
  * New nodes will be pushed at back and popped from back.
226
226
  * Elements in the list are unique as they're recorded by Set.
227
227
  */
@@ -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;
@@ -327,7 +327,7 @@ protected:
327
327
  void mergeSccNodes(NodeID repNodeId, const NodeBS& subNodes);
328
328
  void mergeSccCycle();
329
329
  //@}
330
- /// Collapse a field object into its base for field insensitive anlaysis
330
+ /// Collapse a field object into its base for field insensitive analysis
331
331
  //@{
332
332
  virtual void collapsePWCNode(NodeID nodeId);
333
333
  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)
@@ -196,7 +196,7 @@ protected:
196
196
  WorkList worklist;
197
197
 
198
198
  public:
199
- /// num of iterations during constaint solving
199
+ /// num of iterations during constraint solving
200
200
  u32_t numOfIteration;
201
201
  };
202
202
 
@@ -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.1621",
3
+ "version": "1.0.1622",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {