svf-lib 1.0.2012 → 1.0.2014

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
@@ -41,8 +41,8 @@ namespace SVF
41
41
  {
42
42
 
43
43
  typedef WTOComponent<ICFG> ICFGWTOComp;
44
- typedef WTONode<ICFG> ICFGWTONode;
45
- typedef WTOCycle<ICFG> ICFGWTOCycle;
44
+ typedef WTONode<ICFG> ICFGSingletonWTO;
45
+ typedef WTOCycle<ICFG> ICFGCycleWTO;
46
46
 
47
47
  class ICFGWTO : public WTO<ICFG>
48
48
  {
@@ -157,11 +157,11 @@ protected:
157
157
  bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState& as);
158
158
 
159
159
  /**
160
- * handle instructions in ICFGNode
160
+ * handle instructions in ICFGSingletonWTO
161
161
  *
162
- * @param block basic block that has a series of instructions
162
+ * @param block basic block that has one instruction or a series of instructions
163
163
  */
164
- virtual void handleWTONode(const ICFGNode* node);
164
+ virtual void handleWTONode(const ICFGSingletonWTO *icfgSingletonWto);
165
165
 
166
166
  /**
167
167
  * handle one instruction in ICFGNode
@@ -182,7 +182,7 @@ protected:
182
182
  *
183
183
  * @param cycle WTOCycle which has weak topo order of basic blocks and nested cycles
184
184
  */
185
- virtual void handleCycle(const ICFGWTOCycle* cycle);
185
+ virtual void handleCycle(const ICFGCycleWTO* cycle);
186
186
 
187
187
  /**
188
188
  * handle user defined function, ext function is not included.
@@ -395,21 +395,21 @@ public:
395
395
 
396
396
  private:
397
397
  /// Head of the cycle
398
- const NodeT* _head;
398
+ const WTONode<GraphT>* _head;
399
399
 
400
400
  /// List of components
401
401
  WTOComponentRefList _components;
402
402
 
403
403
  public:
404
404
  /// Constructor
405
- WTOCycle(const NodeT* head, WTOComponentRefList components)
405
+ WTOCycle(const WTONode<GraphT>* head, WTOComponentRefList components)
406
406
  : WTOComponent<GraphT>(WTOComponent<GraphT>::Cycle), _head(head),
407
407
  _components(std::move(components))
408
408
  {
409
409
  }
410
410
 
411
411
  /// Return the head of the cycle
412
- const NodeT* head() const
412
+ const WTONode<GraphT>* head() const
413
413
  {
414
414
  return _head;
415
415
  }
@@ -451,7 +451,7 @@ public:
451
451
  std::string str;
452
452
  std::stringstream rawstr(str);
453
453
  rawstr << "(";
454
- rawstr << _head->getId() << ", ";
454
+ rawstr << _head->node()->getId() << ", ";
455
455
  for (auto it = begin(), et = end(); it != et;)
456
456
  {
457
457
  rawstr << (*it)->toString();
@@ -687,7 +687,7 @@ protected:
687
687
 
688
688
  void visit(const WTOCycleT& cycle) override
689
689
  {
690
- const NodeT* head = cycle.head();
690
+ const NodeT* head = cycle.head()->node();
691
691
  WTOCycleDepthPtr previous_cycleDepth = _wtoCycleDepth;
692
692
  _nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
693
693
  _wtoCycleDepth =
@@ -765,7 +765,7 @@ protected:
765
765
  return ptr;
766
766
  }
767
767
 
768
- const WTOCycleT* newCycle(const NodeT* node,
768
+ const WTOCycleT* newCycle(const WTONodeT* node,
769
769
  const WTOComponentRefList& partition)
770
770
  {
771
771
  const WTOCycleT* ptr = new WTOCycleT(node, std::move(partition));
@@ -784,7 +784,8 @@ protected:
784
784
  visit(succ, partition);
785
785
  }
786
786
  });
787
- const WTOCycleT* ptr = newCycle(node, partition);
787
+ const WTONodeT* head = newNode(node);
788
+ const WTOCycleT* ptr = newCycle(head, partition);
788
789
  headRefToCycle.emplace(node, ptr);
789
790
  return ptr;
790
791
  }
Binary file
@@ -205,14 +205,14 @@ public:
205
205
  /// Return the lower bound
206
206
  const BoundedInt &lb() const
207
207
  {
208
- assert(!this->isBottom());
208
+ assert(!this->isBottom() && "bottom interval does not have lower bound");
209
209
  return this->_lb;
210
210
  }
211
211
 
212
212
  /// Return the upper bound
213
213
  const BoundedInt &ub() const
214
214
  {
215
- assert(!this->isBottom());
215
+ assert(!this->isBottom() && "bottom interval does not have upper bound");
216
216
  return this->_ub;
217
217
  }
218
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2012",
3
+ "version": "1.0.2014",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {