svf-lib 1.0.918 → 1.0.919

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.
Binary file
@@ -43,13 +43,13 @@ public:
43
43
 
44
44
  NodeBS _StrongUpdateStores;
45
45
 
46
- void performStatPerQuery(NodeID ptr);
46
+ void performStatPerQuery(NodeID ptr) override;
47
47
 
48
- void performStat();
48
+ void performStat() override;
49
49
 
50
- void printStat();
50
+ void printStat(std::string str = "") override;
51
51
 
52
- void printStatPerQuery(NodeID ptr, const PointsTo& pts);
52
+ void printStatPerQuery(NodeID ptr, const PointsTo& pts) override;
53
53
 
54
54
  void getNumOfOOBQuery();
55
55
 
@@ -347,16 +347,14 @@ class IntraMSSAPHISVFGNode : public MSSAPHISVFGNode
347
347
  {
348
348
 
349
349
  public:
350
- const MRVer* resVer;
351
350
  /// Constructor
352
351
  IntraMSSAPHISVFGNode(NodeID id, const MRVer* resVer): MSSAPHISVFGNode(id, resVer, MIntraPhi)
353
352
  {
354
- resVer = resVer;
355
353
  }
356
354
 
357
- inline const MRVer* getMRVer() const
355
+ inline const MRVer* getMRVer() const
358
356
  {
359
- return resVer;
357
+ return getResVer();
360
358
  }
361
359
 
362
360
  inline OPVers::const_iterator opVerBegin() const
@@ -80,9 +80,9 @@ public:
80
80
  {
81
81
 
82
82
  }
83
- virtual void performStat();
83
+ virtual void performStat() override;
84
84
 
85
- virtual void printStat();
85
+ virtual void printStat(std::string str = "") override;
86
86
 
87
87
  private:
88
88
  MemSSA* mssa;
@@ -100,9 +100,9 @@ public:
100
100
 
101
101
  virtual ~SVFGStat() {}
102
102
 
103
- virtual void performStat();
103
+ virtual void performStat() override;
104
104
 
105
- virtual void printStat();
105
+ virtual void printStat(std::string str = "") override;
106
106
 
107
107
  virtual void performSCCStat(SVFGEdgeSet insensitiveCalRetEdges);
108
108
 
@@ -205,13 +205,13 @@ private:
205
205
 
206
206
  int avgInDegree; ///< average in degrees of SVFG nodes.
207
207
  int avgOutDegree; ///< average out degrees of SVFG nodes.
208
- unsigned maxInDegree; ///< max in degrees of SVFG nodes.
209
- unsigned maxOutDegree; ///< max out degrees of SVFG nodes.
208
+ u32_t maxInDegree; ///< max in degrees of SVFG nodes.
209
+ u32_t maxOutDegree; ///< max out degrees of SVFG nodes.
210
210
 
211
211
  int avgIndInDegree; ///< average indirect in degrees of SVFG nodes.
212
212
  int avgIndOutDegree; ///< average indirect out degrees of SVFG nodes.
213
- int maxIndInDegree; ///< max indirect in degrees of SVFG nodes.
214
- int maxIndOutDegree; ///< max indirect out degrees of SVFG nodes.
213
+ u32_t maxIndInDegree; ///< max indirect in degrees of SVFG nodes.
214
+ u32_t maxIndOutDegree; ///< max indirect out degrees of SVFG nodes.
215
215
 
216
216
  double addTopLevelNodeTimeStart;
217
217
  double addTopLevelNodeTimeEnd;
@@ -217,6 +217,7 @@ private:
217
217
  static FSMPTA* mfspta;
218
218
  MHP* mhp;
219
219
  LockAnalysis* lockana;
220
+ using FlowSensitive::initialize;
220
221
  };
221
222
 
222
223
  } // End namespace SVF
@@ -273,7 +273,7 @@ protected:
273
273
  {
274
274
  // Collect call sites of all RC_ACCESS function calls.
275
275
  std::vector<const CallInst*> csInsts;
276
- const Function *F;
276
+ const Function *F = nullptr;
277
277
  for(auto it = M->llvmFunBegin(); it != M->llvmFunEnd(); it++){
278
278
  const std::string fName = (*it)->getName().str();
279
279
  if(fName.find(RC_ACCESS) != std::string::npos) {
@@ -268,6 +268,12 @@ public:
268
268
  || ptd->getPTDTY() == PTDataTy::MutVersioned
269
269
  || ptd->getPTDTY() == PTDataTy::PersVersioned;
270
270
  }
271
+ private:
272
+ using BasePTData::getPts;
273
+ using BasePTData::addPts;
274
+ using BasePTData::unionPts;
275
+ using BasePTData::clearPts;
276
+ using BasePTData::clearFullPts;
271
277
  ///@}
272
278
  };
273
279
 
@@ -257,11 +257,6 @@ public:
257
257
  /// Similar to getPts, this also needs to be implemented in child classes.
258
258
  virtual const NodeSet& getRevPts(NodeID nodeId) = 0;
259
259
 
260
- /// Clear points-to data
261
- virtual void clearPts()
262
- {
263
- }
264
-
265
260
  /// Print targets of a function pointer
266
261
  void printIndCSTargets(const CallICFGNode* cs, const FunctionSet& targets);
267
262
 
@@ -411,13 +411,13 @@ private:
411
411
  const Value *refVal;
412
412
  /// The unique id to represent this symbol
413
413
  SymID symId;
414
- public:
415
414
 
415
+ public:
416
416
  /// Constructor
417
417
  MemObj(SymID id, ObjTypeInfo* ti, const Value *val = nullptr);
418
418
 
419
419
  /// Destructor
420
- ~MemObj()
420
+ virtual ~MemObj()
421
421
  {
422
422
  destroy();
423
423
  }
@@ -85,7 +85,7 @@ private:
85
85
  {
86
86
  std::string label = it->getName().str();
87
87
  std::string toErase = "gepnode-";
88
- SVF::s32_t pos = label.find(toErase);
88
+ std::size_t pos = label.find(toErase);
89
89
  if (pos == std::string::npos)
90
90
  {
91
91
  continue;
@@ -128,7 +128,7 @@ private:
128
128
  {
129
129
  processBasicBlockNode(basicBlock, nodeId, writeFlag);
130
130
  }
131
- else if (auto constant = const_cast<Constant *>(SVFUtil::dyn_cast<Constant>(value)))
131
+ else if (SVFUtil::isa<Constant>(value))
132
132
  {
133
133
  processConstantNode(nodeId, writeFlag);
134
134
  }
@@ -534,7 +534,7 @@ protected:
534
534
  // Solve constraints of each nodes
535
535
  virtual void handleCopyGep(ConstraintNode* node);
536
536
  // Collapse nodes and fields based on 'lcdCandidates'
537
- virtual void mergeSCC();
537
+ void mergeSCC();
538
538
  // AndersenLCD specified SCC detector, need to input a nodeStack 'lcdCandidate'
539
539
  NodeStack& SCCDetect();
540
540
  bool mergeSrcToTgt(NodeID nodeId, NodeID newRepId);
@@ -150,7 +150,7 @@ protected:
150
150
  void initialize();
151
151
  void PWCDetect();
152
152
  void fieldExpand(NodeSet& initials, s32_t offset, NodeBS& strides, PointsTo& expandPts);
153
- bool processGepPts(PointsTo& pts, const GepCGEdge* edge);
153
+ bool processGepPts(const PointsTo& pts, const GepCGEdge* edge);
154
154
  bool mergeSrcToTgt(NodeID nodeId, NodeID newRepId);
155
155
 
156
156
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.918",
3
+ "version": "1.0.919",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {