svf-lib 1.0.1916 → 1.0.1918

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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -484,7 +484,8 @@ private:
484
484
  bool added = KindToSVFStmtSetMap[edge->getEdgeKind()].insert(edge).second;
485
485
  (void)added; // Suppress warning of unused variable under release build
486
486
  assert(added && "duplicated edge, not added!!!");
487
- if (edge->isPTAEdge())
487
+ /// this is a pointer-related SVFStmt if (1) both RHS and LHS are pointers or (2) this an int2ptr statment, i.e., LHS = int2ptr RHS
488
+ if (edge->isPTAEdge() || (SVFUtil::isa<CopyStmt>(edge) && SVFUtil::cast<CopyStmt>(edge)->isInt2Ptr()))
488
489
  {
489
490
  totalPTAPAGEdge++;
490
491
  KindToPTASVFStmtSetMap[edge->getEdgeKind()].insert(edge);
@@ -371,9 +371,21 @@ private:
371
371
  CopyStmt(const CopyStmt&); ///< place holder
372
372
  void operator=(const CopyStmt&); ///< place holder
373
373
  public:
374
- enum CopyKind {COPYVAL, ZEXT, SEXT, BITCAST, TRUNC, FPTRUNC,
375
- FPTOUI, FPTOSI, UITOFP, SITOFP, INTTOPTR, PTRTOINT
376
- };
374
+ enum CopyKind
375
+ {
376
+ COPYVAL, // Value copies (default one)
377
+ ZEXT, // Zero extend integers
378
+ SEXT, // Sign extend integers
379
+ BITCAST, // Type cast
380
+ TRUNC, // Truncate integers
381
+ FPTRUNC, // Truncate floating point
382
+ FPTOUI, // floating point -> UInt
383
+ FPTOSI, // floating point -> SInt
384
+ UITOFP, // UInt -> floating point
385
+ SITOFP, // SInt -> floating point
386
+ INTTOPTR, // Integer -> Pointer
387
+ PTRTOINT // Pointer -> Integer
388
+ };
377
389
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
378
390
  //@{
379
391
  static inline bool classof(const CopyStmt*)
@@ -396,6 +408,36 @@ public:
396
408
  return copyKind;
397
409
  }
398
410
 
411
+ inline bool isBitCast() const
412
+ {
413
+ return copyKind == BITCAST;
414
+ }
415
+
416
+ inline bool isValueCopy() const
417
+ {
418
+ return copyKind == COPYVAL;
419
+ }
420
+
421
+ inline bool isInt2Ptr() const
422
+ {
423
+ return copyKind == INTTOPTR;
424
+ }
425
+
426
+ inline bool isPtr2Int() const
427
+ {
428
+ return copyKind == PTRTOINT;
429
+ }
430
+
431
+ inline bool isZext() const
432
+ {
433
+ return copyKind == ZEXT;
434
+ }
435
+
436
+ inline bool isSext() const
437
+ {
438
+ return copyKind == SEXT;
439
+ }
440
+
399
441
  /// constructor
400
442
  CopyStmt(SVFVar* s, SVFVar* d, CopyKind k) : AssignStmt(s, d, SVFStmt::Copy), copyKind(k) {}
401
443
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -484,7 +484,8 @@ private:
484
484
  bool added = KindToSVFStmtSetMap[edge->getEdgeKind()].insert(edge).second;
485
485
  (void)added; // Suppress warning of unused variable under release build
486
486
  assert(added && "duplicated edge, not added!!!");
487
- if (edge->isPTAEdge())
487
+ /// this is a pointer-related SVFStmt if (1) both RHS and LHS are pointers or (2) this an int2ptr statment, i.e., LHS = int2ptr RHS
488
+ if (edge->isPTAEdge() || (SVFUtil::isa<CopyStmt>(edge) && SVFUtil::cast<CopyStmt>(edge)->isInt2Ptr()))
488
489
  {
489
490
  totalPTAPAGEdge++;
490
491
  KindToPTASVFStmtSetMap[edge->getEdgeKind()].insert(edge);
@@ -371,9 +371,21 @@ private:
371
371
  CopyStmt(const CopyStmt&); ///< place holder
372
372
  void operator=(const CopyStmt&); ///< place holder
373
373
  public:
374
- enum CopyKind {COPYVAL, ZEXT, SEXT, BITCAST, TRUNC, FPTRUNC,
375
- FPTOUI, FPTOSI, UITOFP, SITOFP, INTTOPTR, PTRTOINT
376
- };
374
+ enum CopyKind
375
+ {
376
+ COPYVAL, // Value copies (default one)
377
+ ZEXT, // Zero extend integers
378
+ SEXT, // Sign extend integers
379
+ BITCAST, // Type cast
380
+ TRUNC, // Truncate integers
381
+ FPTRUNC, // Truncate floating point
382
+ FPTOUI, // floating point -> UInt
383
+ FPTOSI, // floating point -> SInt
384
+ UITOFP, // UInt -> floating point
385
+ SITOFP, // SInt -> floating point
386
+ INTTOPTR, // Integer -> Pointer
387
+ PTRTOINT // Pointer -> Integer
388
+ };
377
389
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
378
390
  //@{
379
391
  static inline bool classof(const CopyStmt*)
@@ -396,6 +408,36 @@ public:
396
408
  return copyKind;
397
409
  }
398
410
 
411
+ inline bool isBitCast() const
412
+ {
413
+ return copyKind == BITCAST;
414
+ }
415
+
416
+ inline bool isValueCopy() const
417
+ {
418
+ return copyKind == COPYVAL;
419
+ }
420
+
421
+ inline bool isInt2Ptr() const
422
+ {
423
+ return copyKind == INTTOPTR;
424
+ }
425
+
426
+ inline bool isPtr2Int() const
427
+ {
428
+ return copyKind == PTRTOINT;
429
+ }
430
+
431
+ inline bool isZext() const
432
+ {
433
+ return copyKind == ZEXT;
434
+ }
435
+
436
+ inline bool isSext() const
437
+ {
438
+ return copyKind == SEXT;
439
+ }
440
+
399
441
  /// constructor
400
442
  CopyStmt(SVFVar* s, SVFVar* d, CopyKind k) : AssignStmt(s, d, SVFStmt::Copy), copyKind(k) {}
401
443
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1916",
3
+ "version": "1.0.1918",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {