svf-lib 1.0.1791 → 1.0.1793

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.
@@ -189,17 +189,23 @@ protected:
189
189
  backtraceAlongDirectVF(gepPts,dpm);
190
190
  unionDDAPts(pts, processGepPts(SVFUtil::cast<GepSVFGNode>(node),gepPts));
191
191
  }
192
- else if(SVFUtil::isa<LoadSVFGNode>(node))
192
+ else if(const LoadSVFGNode* load = SVFUtil::dyn_cast<LoadSVFGNode>(node))
193
193
  {
194
+ if(load->getPAGDstNode()->isPointer() == false)
195
+ return;
196
+
194
197
  CPtSet loadpts;
195
198
  startNewPTCompFromLoadSrc(loadpts,dpm);
196
199
  for(typename CPtSet::iterator it = loadpts.begin(), eit = loadpts.end(); it!=eit; ++it)
197
200
  {
198
- backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,node));
201
+ backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,load));
199
202
  }
200
203
  }
201
- else if(SVFUtil::isa<StoreSVFGNode>(node))
204
+ else if(const StoreSVFGNode* store = SVFUtil::dyn_cast<StoreSVFGNode>(node))
202
205
  {
206
+ if(store->getPAGSrcNode()->isPointer() == false)
207
+ return;
208
+
203
209
  if(isMustAlias(getLoadDpm(dpm),dpm))
204
210
  {
205
211
  DBOUT(DDDA, SVFUtil::outs() << "+++must alias for load and store:");
@@ -217,17 +223,17 @@ protected:
217
223
  {
218
224
  if(propagateViaObj(*it,getLoadCVar(dpm)))
219
225
  {
220
- backtraceToStoreSrc(pts,getDPImWithOldCond(dpm,*it,node));
226
+ backtraceToStoreSrc(pts,getDPImWithOldCond(dpm,*it,store));
221
227
 
222
- if(isStrongUpdate(storepts,SVFUtil::cast<StoreSVFGNode>(node)))
228
+ if(isStrongUpdate(storepts,store))
223
229
  {
224
230
  DBOUT(DDDA, SVFUtil::outs() << "backward strong update for obj " << dpm.getCurNodeID() << "\n");
225
- DOSTAT(addSUStat(dpm,node);)
231
+ DOSTAT(addSUStat(dpm,store);)
226
232
  }
227
233
  else
228
234
  {
229
- DOSTAT(rmSUStat(dpm,node);)
230
- backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,node));
235
+ DOSTAT(rmSUStat(dpm,store);)
236
+ backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,store));
231
237
  }
232
238
  }
233
239
  else
@@ -347,7 +353,7 @@ protected:
347
353
  {
348
354
  const SVFGNode* node = oldDpm.getLoc();
349
355
  NodeID obj = oldDpm.getCurNodeID();
350
- if (_pag->isConstantObj(obj) || _pag->isNonPointerObj(obj))
356
+ if (_pag->isConstantObj(obj))
351
357
  return;
352
358
  const SVFGEdgeSet edgeSet(node->getInEdges());
353
359
  for (SVFGNode::const_iterator it = edgeSet.begin(), eit = edgeSet.end(); it != eit; ++it)
@@ -301,10 +301,6 @@ public:
301
301
  {
302
302
  return pag->isBlkObjOrConstantObj(ptd);
303
303
  }
304
- inline bool isNonPointerObj(NodeID ptd) const
305
- {
306
- return pag->isNonPointerObj(ptd);
307
- }
308
304
  //@}
309
305
 
310
306
  /// Whether this object is heap or array
@@ -434,8 +434,6 @@ public:
434
434
  return SymbolTableInfo::isConstantObj(id) ||
435
435
  obj->isConstDataOrConstGlobal();
436
436
  }
437
- /// Whether an object can point to any other object or any of its fields is a pointer type.
438
- bool isNonPointerObj(NodeID id) const;
439
437
  //@}
440
438
 
441
439
  /// Base and Offset methods for Value and Object node
@@ -461,7 +461,6 @@ public:
461
461
  bool isConstDataOrConstGlobal() const;
462
462
  bool isConstDataOrAggData() const;
463
463
  bool hasPtrObj() const;
464
- bool isNonPtrFieldObj(const APOffset& apOffset) const;
465
464
  //@}
466
465
 
467
466
  /// Operator overloading
@@ -651,7 +650,6 @@ public:
651
650
  {
652
651
  return hasFlag(HASPTR_OBJ);
653
652
  }
654
- virtual bool isNonPtrFieldObj(const APOffset& apOffset);
655
653
  //@}
656
654
  };
657
655
 
@@ -189,17 +189,23 @@ protected:
189
189
  backtraceAlongDirectVF(gepPts,dpm);
190
190
  unionDDAPts(pts, processGepPts(SVFUtil::cast<GepSVFGNode>(node),gepPts));
191
191
  }
192
- else if(SVFUtil::isa<LoadSVFGNode>(node))
192
+ else if(const LoadSVFGNode* load = SVFUtil::dyn_cast<LoadSVFGNode>(node))
193
193
  {
194
+ if(load->getPAGDstNode()->isPointer() == false)
195
+ return;
196
+
194
197
  CPtSet loadpts;
195
198
  startNewPTCompFromLoadSrc(loadpts,dpm);
196
199
  for(typename CPtSet::iterator it = loadpts.begin(), eit = loadpts.end(); it!=eit; ++it)
197
200
  {
198
- backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,node));
201
+ backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,load));
199
202
  }
200
203
  }
201
- else if(SVFUtil::isa<StoreSVFGNode>(node))
204
+ else if(const StoreSVFGNode* store = SVFUtil::dyn_cast<StoreSVFGNode>(node))
202
205
  {
206
+ if(store->getPAGSrcNode()->isPointer() == false)
207
+ return;
208
+
203
209
  if(isMustAlias(getLoadDpm(dpm),dpm))
204
210
  {
205
211
  DBOUT(DDDA, SVFUtil::outs() << "+++must alias for load and store:");
@@ -217,17 +223,17 @@ protected:
217
223
  {
218
224
  if(propagateViaObj(*it,getLoadCVar(dpm)))
219
225
  {
220
- backtraceToStoreSrc(pts,getDPImWithOldCond(dpm,*it,node));
226
+ backtraceToStoreSrc(pts,getDPImWithOldCond(dpm,*it,store));
221
227
 
222
- if(isStrongUpdate(storepts,SVFUtil::cast<StoreSVFGNode>(node)))
228
+ if(isStrongUpdate(storepts,store))
223
229
  {
224
230
  DBOUT(DDDA, SVFUtil::outs() << "backward strong update for obj " << dpm.getCurNodeID() << "\n");
225
- DOSTAT(addSUStat(dpm,node);)
231
+ DOSTAT(addSUStat(dpm,store);)
226
232
  }
227
233
  else
228
234
  {
229
- DOSTAT(rmSUStat(dpm,node);)
230
- backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,node));
235
+ DOSTAT(rmSUStat(dpm,store);)
236
+ backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,store));
231
237
  }
232
238
  }
233
239
  else
@@ -347,7 +353,7 @@ protected:
347
353
  {
348
354
  const SVFGNode* node = oldDpm.getLoc();
349
355
  NodeID obj = oldDpm.getCurNodeID();
350
- if (_pag->isConstantObj(obj) || _pag->isNonPointerObj(obj))
356
+ if (_pag->isConstantObj(obj))
351
357
  return;
352
358
  const SVFGEdgeSet edgeSet(node->getInEdges());
353
359
  for (SVFGNode::const_iterator it = edgeSet.begin(), eit = edgeSet.end(); it != eit; ++it)
@@ -300,10 +300,6 @@ public:
300
300
  {
301
301
  return pag->isBlkObjOrConstantObj(ptd);
302
302
  }
303
- inline bool isNonPointerObj(NodeID ptd) const
304
- {
305
- return pag->isNonPointerObj(ptd);
306
- }
307
303
  //@}
308
304
 
309
305
  /// Whether this object is heap or array
@@ -434,8 +434,6 @@ public:
434
434
  return SymbolTableInfo::isConstantObj(id) ||
435
435
  obj->isConstDataOrConstGlobal();
436
436
  }
437
- /// Whether an object can point to any other object or any of its fields is a pointer type.
438
- bool isNonPointerObj(NodeID id) const;
439
437
  //@}
440
438
 
441
439
  /// Base and Offset methods for Value and Object node
@@ -457,7 +457,6 @@ public:
457
457
  bool isConstDataOrConstGlobal() const;
458
458
  bool isConstDataOrAggData() const;
459
459
  bool hasPtrObj() const;
460
- bool isNonPtrFieldObj(const APOffset& apOffset) const;
461
460
  //@}
462
461
 
463
462
  /// Operator overloading
@@ -647,7 +646,6 @@ public:
647
646
  {
648
647
  return hasFlag(HASPTR_OBJ);
649
648
  }
650
- virtual bool isNonPtrFieldObj(const APOffset& apOffset);
651
649
  //@}
652
650
  };
653
651
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1791",
3
+ "version": "1.0.1793",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {