svf-tools 1.0.945 → 1.0.947

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.945",
3
+ "version": "1.0.947",
4
4
  "description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
 
@@ -414,6 +414,12 @@ public:
414
414
  return _head;
415
415
  }
416
416
 
417
+ /// Get all wto components in WTO cycle
418
+ const WTOComponentRefList& getWTOComponents() const
419
+ {
420
+ return _components;
421
+ }
422
+
417
423
  /// Begin iterator over the components
418
424
  Iterator begin() const
419
425
  {
@@ -579,7 +585,12 @@ public:
579
585
  }
580
586
  }
581
587
 
582
- /// Begin iterator over the components
588
+ /// Get all wto components in WTO
589
+ const WTOComponentRefList& getWTOComponents() const
590
+ {
591
+ return _components;
592
+ }
593
+
583
594
  /// Begin iterator over the components
584
595
  Iterator begin() const
585
596
  {
@@ -218,9 +218,11 @@ IntervalValue SVFIR2AbsState::getUIntToFPValue(const AbstractState& as, const SV
218
218
 
219
219
  IntervalValue SVFIR2AbsState::getTruncValue(const AbstractState& as, const SVF::SVFVar* var, const SVFType* dstType)
220
220
  {
221
+ const IntervalValue& itv = as[var->getId()].getInterval();
222
+ if(itv.isBottom()) return itv;
221
223
  // get the value of ub and lb
222
- s64_t int_lb = as[var->getId()].getInterval().lb().getIntNumeral();
223
- s64_t int_ub = as[var->getId()].getInterval().ub().getIntNumeral();
224
+ s64_t int_lb = itv.lb().getIntNumeral();
225
+ s64_t int_ub = itv.ub().getIntNumeral();
224
226
  // get dst type
225
227
  u32_t dst_bits = dstType->getByteSize() * 8;
226
228
  if (dst_bits == 8)