svf-lib 1.0.741 → 1.0.745

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.
Files changed (35) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/Graphs/ICFGNode.h +1 -1
  3. package/SVF-linux/include/Graphs/VFG.h +9 -9
  4. package/SVF-linux/include/Graphs/VFGNode.h +6 -6
  5. package/SVF-linux/include/MSSA/MSSAMuChi.h +6 -6
  6. package/SVF-linux/include/MSSA/MemRegion.h +8 -8
  7. package/SVF-linux/include/MSSA/MemSSA.h +10 -10
  8. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +1 -1
  9. package/SVF-linux/include/MemoryModel/PointerAnalysisImpl.h +2 -2
  10. package/SVF-linux/include/MemoryModel/SVFIR.h +28 -28
  11. package/SVF-linux/include/MemoryModel/SVFStatements.h +68 -68
  12. package/SVF-linux/include/MemoryModel/SVFVariables.h +39 -39
  13. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +22 -22
  14. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
  15. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  16. package/SVF-osx/include/DDA/ContextDDA.h +1 -1
  17. package/SVF-osx/include/DDA/FlowDDA.h +1 -1
  18. package/SVF-osx/include/Graphs/CHG.h +2 -2
  19. package/SVF-osx/include/Graphs/ConsG.h +8 -8
  20. package/SVF-osx/include/Graphs/ICFGNode.h +4 -4
  21. package/SVF-osx/include/Graphs/IRGraph.h +7 -7
  22. package/SVF-osx/include/Graphs/VFG.h +13 -13
  23. package/SVF-osx/include/Graphs/VFGNode.h +6 -6
  24. package/SVF-osx/include/MSSA/MSSAMuChi.h +6 -6
  25. package/SVF-osx/include/MSSA/MemRegion.h +11 -11
  26. package/SVF-osx/include/MSSA/MemSSA.h +11 -11
  27. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +7 -7
  28. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +3 -3
  29. package/SVF-osx/include/MemoryModel/SVFIR.h +80 -81
  30. package/SVF-osx/include/MemoryModel/SVFStatements.h +72 -71
  31. package/SVF-osx/include/MemoryModel/SVFVariables.h +54 -54
  32. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +24 -24
  33. package/SVF-osx/include/Util/IRAnnotator.h +1 -1
  34. package/SVF-osx/include/Util/TypeBasedHeapCloning.h +2 -2
  35. package/package.json +1 -1
@@ -281,44 +281,44 @@ public:
281
281
  }
282
282
 
283
283
  /// Add Address edge
284
- inline AddrPE* addAddrEdge(NodeID src, NodeID dst)
284
+ inline AddrStmt* addAddrEdge(NodeID src, NodeID dst)
285
285
  {
286
- AddrPE *edge = pag->addAddrPE(src, dst);
286
+ AddrStmt *edge = pag->addAddrPE(src, dst);
287
287
  setCurrentBBAndValueForPAGEdge(edge);
288
288
  return edge;
289
289
  }
290
290
  /// Add Copy edge
291
- inline CopyPE* addCopyEdge(NodeID src, NodeID dst)
291
+ inline CopyStmt* addCopyEdge(NodeID src, NodeID dst)
292
292
  {
293
- CopyPE *edge = pag->addCopyPE(src, dst);
293
+ CopyStmt *edge = pag->addCopyPE(src, dst);
294
294
  setCurrentBBAndValueForPAGEdge(edge);
295
295
  return edge;
296
296
  }
297
297
  /// Add Copy edge
298
- inline PhiPE* addPhiNode(NodeID res, NodeID opnd)
298
+ inline PhiStmt* addPhiNode(NodeID res, NodeID opnd)
299
299
  {
300
- PhiPE *edge = pag->addPhiNode(res,opnd);
300
+ PhiStmt *edge = pag->addPhiNode(res,opnd);
301
301
  setCurrentBBAndValueForPAGEdge(edge);
302
302
  return edge;
303
303
  }
304
304
  /// Add Copy edge
305
- inline CmpPE* addCmpEdge(NodeID op1, NodeID op2, NodeID dst, u32_t opcode)
305
+ inline CmpStmt* addCmpEdge(NodeID op1, NodeID op2, NodeID dst, u32_t opcode)
306
306
  {
307
- CmpPE *edge = pag->addCmpPE(op1, op2, dst, opcode);
307
+ CmpStmt *edge = pag->addCmpPE(op1, op2, dst, opcode);
308
308
  setCurrentBBAndValueForPAGEdge(edge);
309
309
  return edge;
310
310
  }
311
311
  /// Add Copy edge
312
- inline BinaryOPPE* addBinaryOPEdge(NodeID op1, NodeID op2, NodeID dst, u32_t opcode)
312
+ inline BinaryOPStmt* addBinaryOPEdge(NodeID op1, NodeID op2, NodeID dst, u32_t opcode)
313
313
  {
314
- BinaryOPPE *edge = pag->addBinaryOPPE(op1, op2, dst, opcode);
314
+ BinaryOPStmt *edge = pag->addBinaryOPPE(op1, op2, dst, opcode);
315
315
  setCurrentBBAndValueForPAGEdge(edge);
316
316
  return edge;
317
317
  }
318
318
  /// Add Unary edge
319
- inline UnaryOPPE* addUnaryOPEdge(NodeID src, NodeID dst, u32_t opcode)
319
+ inline UnaryOPStmt* addUnaryOPEdge(NodeID src, NodeID dst, u32_t opcode)
320
320
  {
321
- UnaryOPPE *edge = pag->addUnaryOPPE(src, dst, opcode);
321
+ UnaryOPStmt *edge = pag->addUnaryOPPE(src, dst, opcode);
322
322
  setCurrentBBAndValueForPAGEdge(edge);
323
323
  return edge;
324
324
  }
@@ -329,21 +329,21 @@ public:
329
329
  return edge;
330
330
  }
331
331
  /// Add Load edge
332
- inline LoadPE* addLoadEdge(NodeID src, NodeID dst)
332
+ inline LoadStmt* addLoadEdge(NodeID src, NodeID dst)
333
333
  {
334
- LoadPE *edge = pag->addLoadPE(src, dst);
334
+ LoadStmt *edge = pag->addLoadPE(src, dst);
335
335
  setCurrentBBAndValueForPAGEdge(edge);
336
336
  return edge;
337
337
  }
338
338
  /// Add Store edge
339
- inline StorePE* addStoreEdge(NodeID src, NodeID dst)
339
+ inline StoreStmt* addStoreEdge(NodeID src, NodeID dst)
340
340
  {
341
341
  IntraBlockNode* node;
342
342
  if(const Instruction* inst = SVFUtil::dyn_cast<Instruction>(curVal))
343
343
  node = pag->getICFG()->getIntraBlockNode(inst);
344
344
  else
345
345
  node = nullptr;
346
- StorePE *edge = pag->addStorePE(src, dst, node);
346
+ StoreStmt *edge = pag->addStorePE(src, dst, node);
347
347
  setCurrentBBAndValueForPAGEdge(edge);
348
348
  return edge;
349
349
  }
@@ -362,23 +362,23 @@ public:
362
362
  return edge;
363
363
  }
364
364
  /// Add Gep edge
365
- inline GepPE* addGepEdge(NodeID src, NodeID dst, const LocationSet& ls, bool constGep)
365
+ inline GepStmt* addGepEdge(NodeID src, NodeID dst, const LocationSet& ls, bool constGep)
366
366
  {
367
- GepPE *edge = pag->addGepPE(src, dst, ls, constGep);
367
+ GepStmt *edge = pag->addGepPE(src, dst, ls, constGep);
368
368
  setCurrentBBAndValueForPAGEdge(edge);
369
369
  return edge;
370
370
  }
371
371
  /// Add Offset(Gep) edge
372
- inline NormalGepPE* addNormalGepEdge(NodeID src, NodeID dst, const LocationSet& ls)
372
+ inline NormalGepStmt* addNormalGepEdge(NodeID src, NodeID dst, const LocationSet& ls)
373
373
  {
374
- NormalGepPE *edge = pag->addNormalGepPE(src, dst, ls);
374
+ NormalGepStmt *edge = pag->addNormalGepPE(src, dst, ls);
375
375
  setCurrentBBAndValueForPAGEdge(edge);
376
376
  return edge;
377
377
  }
378
378
  /// Add Variant(Gep) edge
379
- inline VariantGepPE* addVariantGepEdge(NodeID src, NodeID dst)
379
+ inline VariantGepStmt* addVariantGepEdge(NodeID src, NodeID dst)
380
380
  {
381
- VariantGepPE *edge = pag->addVariantGepPE(src, dst);
381
+ VariantGepStmt *edge = pag->addVariantGepPE(src, dst);
382
382
  setCurrentBBAndValueForPAGEdge(edge);
383
383
  return edge;
384
384
  }
Binary file
@@ -151,7 +151,7 @@ public:
151
151
  NodeID srcID = addr->getPAGSrcNodeID();
152
152
  /// whether this object is set field-insensitive during pre-analysis
153
153
  if (isFieldInsensitive(srcID))
154
- srcID = getFIObjNode(srcID);
154
+ srcID = getFIObjVar(srcID);
155
155
 
156
156
  CxtVar var(dpm.getCond(),srcID);
157
157
  addDDAPts(pts,var);
@@ -93,7 +93,7 @@ public:
93
93
  NodeID srcID = addr->getPAGSrcNodeID();
94
94
  /// whether this object is set field-insensitive during pre-analysis
95
95
  if (isFieldInsensitive(srcID))
96
- srcID = getFIObjNode(srcID);
96
+ srcID = getFIObjVar(srcID);
97
97
 
98
98
  addDDAPts(pts,srcID);
99
99
  DBOUT(DDDA, SVFUtil::outs() << "\t add points-to target " << srcID << " to dpm ");
@@ -1,8 +1,8 @@
1
- //===----- CHG.h -- Base class of pointer analyses ---------------------------//
1
+ //===----- CHG.h -- Class hirachary graph ---------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -67,9 +67,9 @@ protected:
67
67
 
68
68
  void destroy();
69
69
 
70
- PAGEdge::PAGEdgeSetTy& getPAGEdgeSet(PAGEdge::PEDGEK kind)
70
+ PAGEdge::SVFStmtSetTy& getPAGEdgeSet(PAGEdge::PEDGEK kind)
71
71
  {
72
- return pag->getPTAEdgeSet(kind);
72
+ return pag->getPTASVFStmtSet(kind);
73
73
  }
74
74
 
75
75
  /// Wappers used internally, not expose to Andernsen Pass
@@ -314,9 +314,9 @@ public:
314
314
  {
315
315
  return pag->getAllFieldsObjNode(id);
316
316
  }
317
- inline NodeID getBaseObjNode(NodeID id)
317
+ inline NodeID getBaseObjVar(NodeID id)
318
318
  {
319
- return pag->getBaseObjNode(id);
319
+ return pag->getBaseObjVar(id);
320
320
  }
321
321
  inline bool isSingleFieldObj(NodeID id) const
322
322
  {
@@ -324,18 +324,18 @@ public:
324
324
  return (mem->getMaxFieldOffsetLimit() == 1);
325
325
  }
326
326
  /// Get a field of a memory object
327
- inline NodeID getGepObjNode(NodeID id, const LocationSet& ls)
327
+ inline NodeID getGepObjVar(NodeID id, const LocationSet& ls)
328
328
  {
329
- NodeID gep = pag->getGepObjNode(id,ls);
329
+ NodeID gep = pag->getGepObjVar(id,ls);
330
330
  /// Create a node when it is (1) not exist on graph and (2) not merged
331
331
  if(sccRepNode(gep)==gep && hasConstraintNode(gep)==false)
332
332
  addConstraintNode(new ConstraintNode(gep),gep);
333
333
  return gep;
334
334
  }
335
335
  /// Get a field-insensitive node of a memory object
336
- inline NodeID getFIObjNode(NodeID id)
336
+ inline NodeID getFIObjVar(NodeID id)
337
337
  {
338
- NodeID fi = pag->getFIObjNode(id);
338
+ NodeID fi = pag->getFIObjVar(id);
339
339
  /// Create a node when it is (1) not exist on graph and (2) not merged
340
340
  if (sccRepNode(fi) == fi && hasConstraintNode(fi)==false)
341
341
  addConstraintNode(new ConstraintNode(fi),fi);
@@ -47,7 +47,7 @@ class VFGNode;
47
47
 
48
48
  /*!
49
49
  * Interprocedural control-flow graph node, representing different kinds of program statements
50
- * including top-level pointers (ValPN) and address-taken objects (ObjPN)
50
+ * including top-level pointers (ValVar) and address-taken objects (ObjVar)
51
51
  */
52
52
  typedef GenericNode<ICFGNode, ICFGEdge> GenericICFGNodeTy;
53
53
 
@@ -67,7 +67,7 @@ public:
67
67
  typedef Set<const CallPE *> CallPESet;
68
68
  typedef Set<const RetPE *> RetPESet;
69
69
  typedef std::list<const VFGNode*> VFGNodeList;
70
- typedef std::list<const SVFStmt*> PAGEdgeList;
70
+ typedef std::list<const SVFStmt*> SVFStmtList;
71
71
 
72
72
  public:
73
73
  /// Constructor
@@ -118,7 +118,7 @@ public:
118
118
  pagEdges.push_back(edge);
119
119
  }
120
120
 
121
- inline const PAGEdgeList& getPAGEdges() const
121
+ inline const SVFStmtList& getPAGEdges() const
122
122
  {
123
123
  return pagEdges;
124
124
  }
@@ -132,7 +132,7 @@ protected:
132
132
  const SVFFunction* fun;
133
133
  const BasicBlock* bb;
134
134
  VFGNodeList VFGNodes; //< a list of VFGNodes
135
- PAGEdgeList pagEdges; //< a list of PAGEdges
135
+ SVFStmtList pagEdges; //< a list of PAGEdges
136
136
 
137
137
  };
138
138
 
@@ -48,12 +48,12 @@ typedef SVFStmt PAGEdge;
48
48
  class IRGraph : public GenericGraph<SVFVar,SVFStmt>
49
49
  {
50
50
  public:
51
- typedef Set<const SVFStmt*> PAGEdgeSet;
52
- typedef Map<const Value*,PAGEdgeSet> ValueToEdgeMap;
51
+ typedef Set<const SVFStmt*> SVFStmtSet;
52
+ typedef Map<const Value*,SVFStmtSet> ValueToEdgeMap;
53
53
 
54
54
  protected:
55
- SVFStmt::PAGKindToEdgeSetMapTy PAGEdgeKindToSetMap; // < SVFIR edge map containing all PAGEdges
56
- SVFStmt::PAGKindToEdgeSetMapTy PTAPAGEdgeKindToSetMap; // < SVFIR edge map containing only pointer-related edges, i.e, both RHS and RHS are of pointer type
55
+ SVFStmt::KindToSVFStmtMapTy KindToSVFStmtSetMap; // < SVFIR edge map containing all PAGEdges
56
+ SVFStmt::KindToSVFStmtMapTy KindToPTASVFStmtSetMap; // < SVFIR edge map containing only pointer-related edges, i.e, both RHS and RHS are of pointer type
57
57
  bool fromFile; ///< Whether the SVFIR is built according to user specified data from a txt file
58
58
  NodeID nodeNumAfterPAGBuild; // initial node number after building SVFIR, excluding later added nodes, e.g., gepobj nodes
59
59
  u32_t totalPTAPAGEdge;
@@ -80,7 +80,7 @@ protected:
80
80
  /// Map a value to a set of edges
81
81
  inline void mapValueToEdge(const Value *V, SVFStmt *edge)
82
82
  {
83
- auto inserted = valueToEdgeMap.emplace(V, PAGEdgeSet{edge});
83
+ auto inserted = valueToEdgeMap.emplace(V, SVFStmtSet{edge});
84
84
  if (!inserted.second) {
85
85
  inserted.first->second.emplace(edge);
86
86
  }
@@ -94,7 +94,7 @@ public:
94
94
  IRGraph(bool buildFromFile): fromFile(buildFromFile), nodeNumAfterPAGBuild(0), totalPTAPAGEdge(0){
95
95
  symInfo = SymbolTableInfo::SymbolInfo();
96
96
  // insert dummy value if a correct value cannot be found
97
- valueToEdgeMap[nullptr] = PAGEdgeSet();
97
+ valueToEdgeMap[nullptr] = SVFStmtSet();
98
98
  }
99
99
 
100
100
  virtual ~IRGraph();
@@ -105,7 +105,7 @@ public:
105
105
  return fromFile;
106
106
  }
107
107
  /// Get all SVFIR Edges that corresponds to an LLVM value
108
- inline const PAGEdgeSet& getValueEdges(const Value *V)
108
+ inline const SVFStmtSet& getValueEdges(const Value *V)
109
109
  {
110
110
  auto it = valueToEdgeMap.find(V);
111
111
  if (it == valueToEdgeMap.end()) {
@@ -79,7 +79,7 @@ public:
79
79
  typedef VFGEdge::VFGEdgeSetTy::iterator VFGNodeIter;
80
80
  typedef VFGNodeIDToNodeMapTy::iterator iterator;
81
81
  typedef VFGNodeIDToNodeMapTy::const_iterator const_iterator;
82
- typedef SVFIR::PAGEdgeSet PAGEdgeSet;
82
+ typedef SVFIR::SVFStmtSet SVFStmtSet;
83
83
  typedef Set<const VFGNode*> GlobalVFGNodeSet;
84
84
  typedef Set<const PAGNode*> PAGNodeSet;
85
85
 
@@ -427,12 +427,12 @@ protected:
427
427
  void addVFGNodes();
428
428
 
429
429
  /// Get PAGEdge set
430
- virtual inline PAGEdge::PAGEdgeSetTy& getPAGEdgeSet(PAGEdge::PEDGEK kind)
430
+ virtual inline PAGEdge::SVFStmtSetTy& getPAGEdgeSet(PAGEdge::PEDGEK kind)
431
431
  {
432
432
  if (isPtrOnlySVFG())
433
- return pag->getPTAEdgeSet(kind);
433
+ return pag->getPTASVFStmtSet(kind);
434
434
  else
435
- return pag->getEdgeSet(kind);
435
+ return pag->getSVFStmtSet(kind);
436
436
  }
437
437
 
438
438
  virtual inline bool isInterestedPAGNode(const PAGNode* node) const
@@ -483,28 +483,28 @@ protected:
483
483
  setDef(pagNode,sNode);
484
484
  }
485
485
  /// Add an Address VFG node
486
- inline void addAddrVFGNode(const AddrPE* addr)
486
+ inline void addAddrVFGNode(const AddrStmt* addr)
487
487
  {
488
488
  AddrVFGNode* sNode = new AddrVFGNode(totalVFGNode++,addr);
489
489
  addStmtVFGNode(sNode, addr);
490
490
  setDef(addr->getDstNode(),sNode);
491
491
  }
492
492
  /// Add a Copy VFG node
493
- inline void addCopyVFGNode(const CopyPE* copy)
493
+ inline void addCopyVFGNode(const CopyStmt* copy)
494
494
  {
495
495
  CopyVFGNode* sNode = new CopyVFGNode(totalVFGNode++,copy);
496
496
  addStmtVFGNode(sNode, copy);
497
497
  setDef(copy->getDstNode(),sNode);
498
498
  }
499
499
  /// Add a Gep VFG node
500
- inline void addGepVFGNode(const GepPE* gep)
500
+ inline void addGepVFGNode(const GepStmt* gep)
501
501
  {
502
502
  GepVFGNode* sNode = new GepVFGNode(totalVFGNode++,gep);
503
503
  addStmtVFGNode(sNode, gep);
504
504
  setDef(gep->getDstNode(),sNode);
505
505
  }
506
506
  /// Add a Load VFG node
507
- void addLoadVFGNode(const LoadPE* load)
507
+ void addLoadVFGNode(const LoadStmt* load)
508
508
  {
509
509
  LoadVFGNode* sNode = new LoadVFGNode(totalVFGNode++,load);
510
510
  addStmtVFGNode(sNode, load);
@@ -512,7 +512,7 @@ protected:
512
512
  }
513
513
  /// Add a Store VFG node,
514
514
  /// To be noted store does not create a new pointer, we do not set def for any SVFIR node
515
- void addStoreVFGNode(const StorePE* store)
515
+ void addStoreVFGNode(const StoreStmt* store)
516
516
  {
517
517
  StoreVFGNode* sNode = new StoreVFGNode(totalVFGNode++,store);
518
518
  addStmtVFGNode(sNode, store);
@@ -569,7 +569,7 @@ protected:
569
569
  PAGNodeToActualRetMap[ret] = sNode;
570
570
  }
571
571
  /// Add an llvm PHI VFG node
572
- inline void addIntraPHIVFGNode(const PhiPE* edge)
572
+ inline void addIntraPHIVFGNode(const PhiStmt* edge)
573
573
  {
574
574
  IntraPHIVFGNode* sNode = new IntraPHIVFGNode(totalVFGNode++,edge->getRes());
575
575
  u32_t pos = 0;
@@ -583,7 +583,7 @@ protected:
583
583
  PAGNodeToIntraPHIVFGNodeMap[edge->getRes()] = sNode;
584
584
  }
585
585
  /// Add a Compare VFG node
586
- inline void addCmpVFGNode(const CmpPE* edge)
586
+ inline void addCmpVFGNode(const CmpStmt* edge)
587
587
  {
588
588
  CmpVFGNode* sNode = new CmpVFGNode(totalVFGNode++, edge->getRes());
589
589
  u32_t pos = 0;
@@ -597,7 +597,7 @@ protected:
597
597
  PAGNodeToCmpVFGNodeMap[edge->getRes()] = sNode;
598
598
  }
599
599
  /// Add a BinaryOperator VFG node
600
- inline void addBinaryOPVFGNode(const BinaryOPPE* edge)
600
+ inline void addBinaryOPVFGNode(const BinaryOPStmt* edge)
601
601
  {
602
602
  BinaryOPVFGNode* sNode = new BinaryOPVFGNode(totalVFGNode++, edge->getRes());
603
603
  u32_t pos = 0;
@@ -611,7 +611,7 @@ protected:
611
611
  PAGNodeToBinaryOPVFGNodeMap[edge->getRes()] = sNode;
612
612
  }
613
613
  /// Add a UnaryOperator VFG node
614
- inline void addUnaryOPVFGNode(const UnaryOPPE* edge)
614
+ inline void addUnaryOPVFGNode(const UnaryOPStmt* edge)
615
615
  {
616
616
  UnaryOPVFGNode* sNode = new UnaryOPVFGNode(totalVFGNode++, edge->getRes());
617
617
  sNode->setOpVer(0, edge->getOpVar());
@@ -40,7 +40,7 @@ namespace SVF
40
40
 
41
41
  /*!
42
42
  * Interprocedural control-flow graph node, representing different kinds of program statements
43
- * including top-level pointers (ValPN) and address-taken objects (ObjPN)
43
+ * including top-level pointers (ValVar) and address-taken objects (ObjVar)
44
44
  */
45
45
  typedef GenericNode<VFGNode,VFGEdge> GenericVFGNodeTy;
46
46
  class VFGNode : public GenericVFGNodeTy
@@ -202,7 +202,7 @@ private:
202
202
 
203
203
  public:
204
204
  /// Constructor
205
- LoadVFGNode(NodeID id, const LoadPE* edge): StmtVFGNode(id, edge,Load)
205
+ LoadVFGNode(NodeID id, const LoadStmt* edge): StmtVFGNode(id, edge,Load)
206
206
  {
207
207
 
208
208
  }
@@ -241,7 +241,7 @@ private:
241
241
 
242
242
  public:
243
243
  /// Constructor
244
- StoreVFGNode(NodeID id,const StorePE* edge): StmtVFGNode(id,edge,Store)
244
+ StoreVFGNode(NodeID id,const StoreStmt* edge): StmtVFGNode(id,edge,Store)
245
245
  {
246
246
 
247
247
  }
@@ -280,7 +280,7 @@ private:
280
280
 
281
281
  public:
282
282
  /// Constructor
283
- CopyVFGNode(NodeID id,const CopyPE* copy): StmtVFGNode(id,copy,Copy)
283
+ CopyVFGNode(NodeID id,const CopyStmt* copy): StmtVFGNode(id,copy,Copy)
284
284
  {
285
285
 
286
286
  }
@@ -591,7 +591,7 @@ private:
591
591
 
592
592
  public:
593
593
  /// Constructor
594
- GepVFGNode(NodeID id,const GepPE* edge): StmtVFGNode(id,edge,Gep)
594
+ GepVFGNode(NodeID id,const GepStmt* edge): StmtVFGNode(id,edge,Gep)
595
595
  {
596
596
 
597
597
  }
@@ -753,7 +753,7 @@ private:
753
753
 
754
754
  public:
755
755
  /// Constructor
756
- AddrVFGNode(NodeID id, const AddrPE* edge): StmtVFGNode(id, edge,Addr)
756
+ AddrVFGNode(NodeID id, const AddrStmt* edge): StmtVFGNode(id, edge,Addr)
757
757
  {
758
758
 
759
759
  }
@@ -166,13 +166,13 @@ class LoadMU : public MSSAMU<Cond>
166
166
  {
167
167
 
168
168
  private:
169
- const LoadPE* inst;
169
+ const LoadStmt* inst;
170
170
  const BasicBlock* bb;
171
171
 
172
172
  public:
173
173
  /// Constructor/Destructor for MU
174
174
  //@{
175
- LoadMU(const BasicBlock* b,const LoadPE* i, const MemRegion* m, Cond c = true) :
175
+ LoadMU(const BasicBlock* b,const LoadStmt* i, const MemRegion* m, Cond c = true) :
176
176
  MSSAMU<Cond>(MSSAMU<Cond>::LoadMSSAMU,m,c), inst(i), bb(b)
177
177
  {
178
178
  }
@@ -183,7 +183,7 @@ public:
183
183
  //@}
184
184
 
185
185
  /// Return load instruction
186
- inline const LoadPE* getLoadInst() const
186
+ inline const LoadStmt* getLoadInst() const
187
187
  {
188
188
  return inst;
189
189
  }
@@ -462,11 +462,11 @@ class StoreCHI : public MSSACHI<Cond>
462
462
  {
463
463
  private:
464
464
  const BasicBlock* bb;
465
- const StorePE* inst;
465
+ const StoreStmt* inst;
466
466
  public:
467
467
  /// Constructors for StoreCHI
468
468
  //@{
469
- StoreCHI(const BasicBlock* b, const StorePE* i, const MemRegion* m, Cond c = true) :
469
+ StoreCHI(const BasicBlock* b, const StoreStmt* i, const MemRegion* m, Cond c = true) :
470
470
  MSSACHI<Cond>(MSSADEF::StoreMSSACHI,m,c), bb(b), inst(i)
471
471
  {
472
472
  }
@@ -482,7 +482,7 @@ public:
482
482
  }
483
483
 
484
484
  /// Get store instruction
485
- inline const StorePE* getStoreInst() const
485
+ inline const StoreStmt* getStoreInst() const
486
486
  {
487
487
  return inst;
488
488
  }
@@ -146,15 +146,15 @@ public:
146
146
  /// Map loads/stores to its mem regions,
147
147
  /// TODO:visitAtomicCmpXchgInst, visitAtomicRMWInst??
148
148
  //@{
149
- typedef Map<const LoadPE*, MRSet> LoadsToMRsMap;
150
- typedef Map<const StorePE*, MRSet> StoresToMRsMap;
149
+ typedef Map<const LoadStmt*, MRSet> LoadsToMRsMap;
150
+ typedef Map<const StoreStmt*, MRSet> StoresToMRsMap;
151
151
  typedef Map<const CallBlockNode*, MRSet> CallSiteToMRsMap;
152
152
  //@}
153
153
 
154
154
  /// Map loads/stores/callsites to their cpts set
155
155
  //@{
156
- typedef Map<const LoadPE*, NodeBS> LoadsToPointsToMap;
157
- typedef Map<const StorePE*, NodeBS> StoresToPointsToMap;
156
+ typedef Map<const LoadStmt*, NodeBS> LoadsToPointsToMap;
157
+ typedef Map<const StoreStmt*, NodeBS> StoresToPointsToMap;
158
158
  typedef Map<const CallBlockNode*, NodeBS> CallSiteToPointsToMap;
159
159
  //@}
160
160
 
@@ -169,7 +169,7 @@ public:
169
169
  typedef Map<NodeID, NodeBS> NodeToPTSSMap;
170
170
 
171
171
  /// SVFIR edge list
172
- typedef SVFIR::PAGEdgeList PAGEdgeList;
172
+ typedef SVFIR::SVFStmtList SVFStmtList;
173
173
  /// Call Graph SCC
174
174
  typedef SCCDetection<PTACallGraph*> SCC;
175
175
 
@@ -334,13 +334,13 @@ protected:
334
334
 
335
335
  /// Add cpts to store/load
336
336
  //@{
337
- inline void addCPtsToStore(NodeBS& cpts, const StorePE *st, const SVFFunction* fun)
337
+ inline void addCPtsToStore(NodeBS& cpts, const StoreStmt *st, const SVFFunction* fun)
338
338
  {
339
339
  storesToPointsToMap[st] = cpts;
340
340
  funToPointsToMap[fun].insert(cpts);
341
341
  addModSideEffectOfFunction(fun,cpts);
342
342
  }
343
- inline void addCPtsToLoad(NodeBS& cpts, const LoadPE *ld, const SVFFunction* fun)
343
+ inline void addCPtsToLoad(NodeBS& cpts, const LoadStmt *ld, const SVFFunction* fun)
344
344
  {
345
345
  loadsToPointsToMap[ld] = cpts;
346
346
  funToPointsToMap[fun].insert(cpts);
@@ -440,11 +440,11 @@ public:
440
440
  {
441
441
  return funToMRsMap[fun];
442
442
  }
443
- inline MRSet& getLoadMRSet(const LoadPE* load)
443
+ inline MRSet& getLoadMRSet(const LoadStmt* load)
444
444
  {
445
445
  return loadsToMRsMap[load];
446
446
  }
447
- inline MRSet& getStoreMRSet(const StorePE* store)
447
+ inline MRSet& getStoreMRSet(const StoreStmt* store)
448
448
  {
449
449
  return storesToMRsMap[store];
450
450
  }
@@ -466,9 +466,9 @@ public:
466
466
  }
467
467
  //@}
468
468
  /// Whether this instruction has SVFIR Edge
469
- bool hasPAGEdgeList(const Instruction* inst);
469
+ bool hasSVFStmtList(const Instruction* inst);
470
470
  /// Given an instruction, get all its the PAGEdge (statement) in sequence
471
- PAGEdgeList& getPAGEdgesFromInst(const Instruction* inst);
471
+ SVFStmtList& getPAGEdgesFromInst(const Instruction* inst);
472
472
 
473
473
  /// getModRefInfo APIs
474
474
  //@{
@@ -71,8 +71,8 @@ public:
71
71
  /// Map loads/stores to its mem regions,
72
72
  /// TODO:visitAtomicCmpXchgInst, visitAtomicRMWInst??
73
73
  //@{
74
- typedef Map<const LoadPE*, MUSet> LoadToMUSetMap;
75
- typedef Map<const StorePE*, CHISet> StoreToChiSetMap;
74
+ typedef Map<const LoadStmt*, MUSet> LoadToMUSetMap;
75
+ typedef Map<const StoreStmt*, CHISet> StoreToChiSetMap;
76
76
  typedef Map<const CallBlockNode*, MUSet> CallSiteToMUSetMap;
77
77
  typedef Map<const CallBlockNode*, CHISet> CallSiteToCHISetMap;
78
78
  typedef Map<const BasicBlock*, PHISet> BBToPhiSetMap;
@@ -94,7 +94,7 @@ public:
94
94
  typedef Map<const MemRegion*, MRVERSION> MemRegToCounterMap;
95
95
 
96
96
  /// SVFIR edge list
97
- typedef SVFIR::PAGEdgeList PAGEdgeList;
97
+ typedef SVFIR::SVFStmtList SVFStmtList;
98
98
 
99
99
  /// Statistics
100
100
  //@{
@@ -180,12 +180,12 @@ private:
180
180
 
181
181
  /// Add methods for mus/chis/phis
182
182
  //@{
183
- inline void AddLoadMU(const BasicBlock* bb, const LoadPE* load, const MRSet& mrSet)
183
+ inline void AddLoadMU(const BasicBlock* bb, const LoadStmt* load, const MRSet& mrSet)
184
184
  {
185
185
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
186
186
  AddLoadMU(bb,load,*iter);
187
187
  }
188
- inline void AddStoreCHI(const BasicBlock* bb, const StorePE* store, const MRSet& mrSet)
188
+ inline void AddStoreCHI(const BasicBlock* bb, const StoreStmt* store, const MRSet& mrSet)
189
189
  {
190
190
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
191
191
  AddStoreCHI(bb,store,*iter);
@@ -205,13 +205,13 @@ private:
205
205
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
206
206
  AddMSSAPHI(bb,*iter);
207
207
  }
208
- inline void AddLoadMU(const BasicBlock* bb, const LoadPE* load, const MemRegion* mr)
208
+ inline void AddLoadMU(const BasicBlock* bb, const LoadStmt* load, const MemRegion* mr)
209
209
  {
210
210
  LOADMU* mu = new LOADMU(bb,load, mr);
211
211
  load2MuSetMap[load].insert(mu);
212
212
  collectRegUses(mr);
213
213
  }
214
- inline void AddStoreCHI(const BasicBlock* bb, const StorePE* store, const MemRegion* mr)
214
+ inline void AddStoreCHI(const BasicBlock* bb, const StoreStmt* store, const MemRegion* mr)
215
215
  {
216
216
  STORECHI* chi = new STORECHI(bb,store, mr);
217
217
  store2ChiSetMap[store].insert(chi);
@@ -331,7 +331,7 @@ public:
331
331
  //@{
332
332
  inline bool hasMU(const PAGEdge* inst) const
333
333
  {
334
- if (const LoadPE* load = SVFUtil::dyn_cast<LoadPE>(inst))
334
+ if (const LoadStmt* load = SVFUtil::dyn_cast<LoadStmt>(inst))
335
335
  {
336
336
  assert(0 != load2MuSetMap.count(load)
337
337
  && "not associated with mem region!");
@@ -342,7 +342,7 @@ public:
342
342
  }
343
343
  inline bool hasCHI(const PAGEdge* inst) const
344
344
  {
345
- if (const StorePE* store = SVFUtil::dyn_cast<StorePE>(
345
+ if (const StoreStmt* store = SVFUtil::dyn_cast<StoreStmt>(
346
346
  inst))
347
347
  {
348
348
  assert(0 != store2ChiSetMap.count(store)
@@ -385,11 +385,11 @@ public:
385
385
 
386
386
  /// Get methods of mu/chi/phi
387
387
  //@{
388
- inline MUSet& getMUSet(const LoadPE* ld)
388
+ inline MUSet& getMUSet(const LoadStmt* ld)
389
389
  {
390
390
  return load2MuSetMap[ld];
391
391
  }
392
- inline CHISet& getCHISet(const StorePE* st)
392
+ inline CHISet& getCHISet(const StoreStmt* st)
393
393
  {
394
394
  return store2ChiSetMap[st];
395
395
  }
@@ -344,19 +344,19 @@ public:
344
344
  ///@{
345
345
  inline bool isFIObjNode(NodeID id) const
346
346
  {
347
- return (SVFUtil::isa<FIObjPN>(pag->getGNode(id)));
347
+ return (SVFUtil::isa<FIObjVar>(pag->getGNode(id)));
348
348
  }
349
- inline NodeID getBaseObjNode(NodeID id)
349
+ inline NodeID getBaseObjVar(NodeID id)
350
350
  {
351
- return pag->getBaseObjNode(id);
351
+ return pag->getBaseObjVar(id);
352
352
  }
353
- inline NodeID getFIObjNode(NodeID id)
353
+ inline NodeID getFIObjVar(NodeID id)
354
354
  {
355
- return pag->getFIObjNode(id);
355
+ return pag->getFIObjVar(id);
356
356
  }
357
- inline NodeID getGepObjNode(NodeID id, const LocationSet& ls)
357
+ inline NodeID getGepObjVar(NodeID id, const LocationSet& ls)
358
358
  {
359
- return pag->getGepObjNode(id,ls);
359
+ return pag->getGepObjVar(id,ls);
360
360
  }
361
361
  virtual inline const NodeBS& getAllFieldsObjNode(NodeID id)
362
362
  {