svf-lib 1.0.1365 → 1.0.1367

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.
@@ -387,10 +387,8 @@ public:
387
387
  bool operator<(const IntervalExeState &rhs) const
388
388
  {
389
389
  // judge from path constraint
390
- if (lessThanVarToValMap(_varToItvVal, rhs.getVarToVal()) ||
391
- lessThanVarToValMap(_locToItvVal, rhs.getLocToVal()))
392
- return true;
393
- return false;
390
+ return (lessThanVarToValMap(_varToItvVal, rhs.getVarToVal()) ||
391
+ lessThanVarToValMap(_locToItvVal, rhs.getLocToVal()));
394
392
  }
395
393
 
396
394
 
@@ -480,9 +480,7 @@ protected:
480
480
  /// If the points-to contain the object obj, we could move forward along indirect value-flow edge
481
481
  virtual inline bool propagateViaObj(const CVar& storeObj, const CVar& loadObj)
482
482
  {
483
- if(getPtrNodeID(storeObj) == getPtrNodeID(loadObj))
484
- return true;
485
- return false;
483
+ return getPtrNodeID(storeObj) == getPtrNodeID(loadObj);
486
484
  }
487
485
  /// resolve function pointer
488
486
  void resolveFunPtr(const DPIm& dpm)
@@ -384,9 +384,7 @@ private:
384
384
  {
385
385
  tgrlockset.erase(*it);
386
386
  }
387
- if(!toBeDeleted.empty())
388
- return true;
389
- return false;
387
+ return !toBeDeleted.empty();
390
388
  }
391
389
 
392
390
  /// Clear flags
@@ -342,18 +342,14 @@ public:
342
342
  {
343
343
  bool nonhp = HBPair.find(std::make_pair(tid1,tid2))!=HBPair.end();
344
344
  bool hp = HPPair.find(std::make_pair(tid1,tid2))!=HPPair.end();
345
- if(nonhp && !hp)
346
- return true;
347
- return false;
345
+ return nonhp && !hp;
348
346
  }
349
347
  /// Whether t1 fully joins t2
350
348
  inline bool isFullJoin(NodeID tid1, NodeID tid2)
351
349
  {
352
350
  bool full = fullJoin.find(std::make_pair(tid1,tid2))!=fullJoin.end();
353
351
  bool partial = partialJoin.find(std::make_pair(tid1,tid2))!=partialJoin.end();
354
- if(full && !partial)
355
- return true;
356
- return false;
352
+ return full && !partial;
357
353
  }
358
354
 
359
355
  /// Get exit instruction of the start routine function of tid's parent thread
@@ -360,11 +360,14 @@ public:
360
360
 
361
361
  private:
362
362
  // Convert string to boolean, returning whether we succeeded.
363
- static bool fromString(const std::string s, bool &value)
363
+ static bool fromString(const std::string& s, bool& value)
364
364
  {
365
- if (s == "true") value = true;
366
- else if (s == "false") value = false;
367
- else return false;
365
+ if (s == "true")
366
+ value = true;
367
+ else if (s == "false")
368
+ value = false;
369
+ else
370
+ return false;
368
371
  return true;
369
372
  }
370
373
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1365",
3
+ "version": "1.0.1367",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {