svf-lib 1.0.2073 → 1.0.2074

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
@@ -143,10 +143,10 @@ protected:
143
143
  /**
144
144
  * Check if execution state exist by merging states of predecessor nodes
145
145
  *
146
- * @param curNode The ICFGNode to analyse
146
+ * @param icfgNode The icfg node to analyse
147
147
  * @return if this node has preceding execution state
148
148
  */
149
- bool mergeStatesFromPredecessors(const ICFGNode* curNode);
149
+ bool mergeStatesFromPredecessors(const ICFGNode * icfgNode);
150
150
 
151
151
  /**
152
152
  * Check if execution state exist at the branch edge
@@ -179,6 +179,8 @@ protected:
179
179
 
180
180
  void handleWTOComponents(const std::list<const ICFGWTOComp*>& wtoComps);
181
181
 
182
+ void handleWTOComponent(const ICFGWTOComp* wtoComp);
183
+
182
184
 
183
185
  /**
184
186
  * handle SVF Statement like CmpStmt, CallStmt, GepStmt, LoadStmt, StoreStmt, etc.
@@ -378,20 +380,20 @@ protected:
378
380
  AbstractState& getAbsStateFromTrace(const ICFGNode* node)
379
381
  {
380
382
  const ICFGNode* repNode = _icfg->getRepNode(node);
381
- if (_postAbsTrace.count(repNode) == 0)
383
+ if (_abstractTrace.count(repNode) == 0)
382
384
  {
383
385
  assert(0 && "No preAbsTrace for this node");
384
386
  }
385
387
  else
386
388
  {
387
- return _postAbsTrace[repNode];
389
+ return _abstractTrace[repNode];
388
390
  }
389
391
  }
390
392
 
391
393
  bool hasAbsStateFromTrace(const ICFGNode* node)
392
394
  {
393
395
  const ICFGNode* repNode = _icfg->getRepNode(node);
394
- return _postAbsTrace.count(repNode) != 0;
396
+ return _abstractTrace.count(repNode) != 0;
395
397
  }
396
398
 
397
399
  protected:
@@ -399,8 +401,7 @@ protected:
399
401
  Map<std::string, std::function<void(const CallSite &)>> _func_map;
400
402
  Set<const CallICFGNode*> _checkpoints;
401
403
  Set<std::string> _checkpoint_names;
402
- Map<const ICFGNode*, AbstractState> _preAbsTrace;
403
- Map<const ICFGNode*, AbstractState> _postAbsTrace;
404
+ Map<const ICFGNode*, AbstractState> _abstractTrace; // abstract states immediately after nodes
404
405
  std::string _moduleName;
405
406
  };
406
407
  }
@@ -178,12 +178,12 @@ private:
178
178
  virtual void handleSingletonWTO(const ICFGSingletonWTO *icfgSingletonWto) override
179
179
  {
180
180
  AbstractInterpretation::handleSingletonWTO(icfgSingletonWto);
181
- const ICFGNode* repNode = _icfg->getRepNode(icfgSingletonWto->node());
182
- if (_postAbsTrace.count(repNode) == 0)
181
+ const ICFGNode* repNode = _icfg->getRepNode(icfgSingletonWto->getICFGNode());
182
+ if (_abstractTrace.count(repNode) == 0)
183
183
  {
184
184
  return;
185
185
  }
186
- const std::vector<const ICFGNode*>& worklist_vec = _icfg->getSubNodes(icfgSingletonWto->node());
186
+ const std::vector<const ICFGNode*>& worklist_vec = _icfg->getSubNodes(icfgSingletonWto->getICFGNode());
187
187
 
188
188
  for (auto it = worklist_vec.begin(); it != worklist_vec.end(); ++it)
189
189
  {
@@ -341,7 +341,7 @@ public:
341
341
  }
342
342
 
343
343
  /// Return the graph node
344
- const NodeT* node() const
344
+ const NodeT* getICFGNode() const
345
345
  {
346
346
  return _node;
347
347
  }
@@ -457,7 +457,7 @@ public:
457
457
  std::string str;
458
458
  std::stringstream rawstr(str);
459
459
  rawstr << "(";
460
- rawstr << _head->node()->getId() << ", ";
460
+ rawstr << _head->getICFGNode()->getId() << ", ";
461
461
  for (auto it = begin(), et = end(); it != et;)
462
462
  {
463
463
  rawstr << (*it)->toString();
@@ -698,7 +698,7 @@ protected:
698
698
 
699
699
  void visit(const WTOCycleT& cycle) override
700
700
  {
701
- const NodeT* head = cycle.head()->node();
701
+ const NodeT* head = cycle.head()->getICFGNode();
702
702
  WTOCycleDepthPtr previous_cycleDepth = _wtoCycleDepth;
703
703
  _nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
704
704
  _wtoCycleDepth =
@@ -714,7 +714,7 @@ protected:
714
714
  void visit(const WTONodeT& node) override
715
715
  {
716
716
  _nodeToWTOCycleDepth.insert(
717
- std::make_pair(node.node(), _wtoCycleDepth));
717
+ std::make_pair(node.getICFGNode(), _wtoCycleDepth));
718
718
  }
719
719
 
720
720
  }; // end class WTOCycleDepthBuilder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2073",
3
+ "version": "1.0.2074",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {