svf-lib 1.0.730 → 1.0.734

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 (98) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/DDA/ContextDDA.h +1 -1
  3. package/SVF-linux/include/DDA/DDAClient.h +8 -8
  4. package/SVF-linux/include/DDA/DDAVFSolver.h +6 -6
  5. package/SVF-linux/include/DDA/FlowDDA.h +1 -1
  6. package/SVF-linux/include/Graphs/ConsG.h +6 -6
  7. package/SVF-linux/include/Graphs/ConsGEdge.h +2 -2
  8. package/SVF-linux/include/Graphs/ConsGNode.h +1 -1
  9. package/SVF-linux/include/Graphs/ExternalPAG.h +14 -14
  10. package/SVF-linux/include/Graphs/ICFGNode.h +14 -14
  11. package/SVF-linux/include/Graphs/IRGraph.h +245 -0
  12. package/SVF-linux/include/Graphs/OfflineConsG.h +1 -1
  13. package/SVF-linux/include/Graphs/PAG.h +4 -4
  14. package/SVF-linux/include/Graphs/PAGNode.h +3 -3
  15. package/SVF-linux/include/Graphs/SVFG.h +1 -1
  16. package/SVF-linux/include/Graphs/SVFGOPT.h +3 -3
  17. package/SVF-linux/include/Graphs/VFG.h +19 -19
  18. package/SVF-linux/include/Graphs/VFGNode.h +2 -3
  19. package/SVF-linux/include/MSSA/MemRegion.h +11 -11
  20. package/SVF-linux/include/MSSA/MemSSA.h +4 -4
  21. package/SVF-linux/include/MTA/FSMPTA.h +1 -1
  22. package/SVF-linux/include/MemoryModel/PAGBuilderFromFile.h +8 -8
  23. package/SVF-linux/include/MemoryModel/PTAStat.h +31 -31
  24. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +9 -9
  25. package/SVF-linux/include/MemoryModel/PointerAnalysisImpl.h +3 -3
  26. package/SVF-linux/include/MemoryModel/SVFIR.h +591 -233
  27. package/SVF-linux/include/MemoryModel/SVFStatements.h +738 -0
  28. package/SVF-linux/include/MemoryModel/SVFSymbols.h +648 -0
  29. package/SVF-linux/include/MemoryModel/SVFVariables.h +842 -0
  30. package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +343 -40
  31. package/SVF-linux/include/SABER/SaberSVFGBuilder.h +0 -2
  32. package/SVF-linux/include/SABER/SrcSnkDDA.h +3 -3
  33. package/SVF-linux/include/SVF-FE/Graph2Json.h +1 -3
  34. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +392 -0
  35. package/SVF-linux/include/SVF-FE/SymbolTableBuilder.h +0 -1
  36. package/SVF-linux/include/Util/CFLSolver.h +1 -1
  37. package/SVF-linux/include/Util/ExtAPI.h +1 -1
  38. package/SVF-linux/include/Util/IRAnnotator.h +6 -6
  39. package/SVF-linux/include/Util/Options.h +1 -1
  40. package/SVF-linux/include/Util/TypeBasedHeapCloning.h +11 -11
  41. package/SVF-linux/include/WPA/Andersen.h +11 -11
  42. package/SVF-linux/include/WPA/AndersenSFR.h +4 -4
  43. package/SVF-linux/include/WPA/FlowSensitive.h +2 -2
  44. package/SVF-linux/include/WPA/FlowSensitiveTBHC.h +1 -1
  45. package/SVF-linux/include/WPA/Steensgaard.h +2 -2
  46. package/SVF-linux/include/WPA/TypeAnalysis.h +1 -1
  47. package/SVF-linux/include/WPA/VersionedFlowSensitive.h +2 -2
  48. package/SVF-linux/include/WPA/WPAStat.h +1 -2
  49. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
  50. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  51. package/SVF-osx/include/DDA/ContextDDA.h +1 -1
  52. package/SVF-osx/include/DDA/DDAClient.h +8 -8
  53. package/SVF-osx/include/DDA/DDAVFSolver.h +6 -6
  54. package/SVF-osx/include/DDA/FlowDDA.h +1 -1
  55. package/SVF-osx/include/Graphs/ConsG.h +6 -6
  56. package/SVF-osx/include/Graphs/ConsGEdge.h +2 -2
  57. package/SVF-osx/include/Graphs/ConsGNode.h +1 -1
  58. package/SVF-osx/include/Graphs/ExternalPAG.h +14 -14
  59. package/SVF-osx/include/Graphs/ICFGNode.h +14 -14
  60. package/SVF-osx/include/Graphs/IRGraph.h +245 -0
  61. package/SVF-osx/include/Graphs/OfflineConsG.h +1 -1
  62. package/SVF-osx/include/Graphs/PAG.h +4 -4
  63. package/SVF-osx/include/Graphs/PAGNode.h +3 -3
  64. package/SVF-osx/include/Graphs/SVFG.h +1 -1
  65. package/SVF-osx/include/Graphs/SVFGOPT.h +3 -3
  66. package/SVF-osx/include/Graphs/VFG.h +19 -19
  67. package/SVF-osx/include/Graphs/VFGNode.h +2 -3
  68. package/SVF-osx/include/MSSA/MemRegion.h +11 -11
  69. package/SVF-osx/include/MSSA/MemSSA.h +4 -4
  70. package/SVF-osx/include/MTA/FSMPTA.h +1 -1
  71. package/SVF-osx/include/MemoryModel/PAGBuilderFromFile.h +8 -8
  72. package/SVF-osx/include/MemoryModel/PTAStat.h +31 -31
  73. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +9 -9
  74. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +3 -3
  75. package/SVF-osx/include/MemoryModel/SVFIR.h +591 -233
  76. package/SVF-osx/include/MemoryModel/SVFStatements.h +738 -0
  77. package/SVF-osx/include/MemoryModel/SVFSymbols.h +648 -0
  78. package/SVF-osx/include/MemoryModel/SVFVariables.h +842 -0
  79. package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +343 -40
  80. package/SVF-osx/include/SABER/SaberSVFGBuilder.h +0 -2
  81. package/SVF-osx/include/SABER/SrcSnkDDA.h +3 -3
  82. package/SVF-osx/include/SVF-FE/Graph2Json.h +1 -3
  83. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +392 -0
  84. package/SVF-osx/include/SVF-FE/SymbolTableBuilder.h +0 -1
  85. package/SVF-osx/include/Util/CFLSolver.h +1 -1
  86. package/SVF-osx/include/Util/ExtAPI.h +1 -1
  87. package/SVF-osx/include/Util/IRAnnotator.h +6 -6
  88. package/SVF-osx/include/Util/Options.h +1 -1
  89. package/SVF-osx/include/Util/TypeBasedHeapCloning.h +11 -11
  90. package/SVF-osx/include/WPA/Andersen.h +11 -11
  91. package/SVF-osx/include/WPA/AndersenSFR.h +4 -4
  92. package/SVF-osx/include/WPA/FlowSensitive.h +2 -2
  93. package/SVF-osx/include/WPA/FlowSensitiveTBHC.h +1 -1
  94. package/SVF-osx/include/WPA/Steensgaard.h +2 -2
  95. package/SVF-osx/include/WPA/TypeAnalysis.h +1 -1
  96. package/SVF-osx/include/WPA/VersionedFlowSensitive.h +2 -2
  97. package/SVF-osx/include/WPA/WPAStat.h +1 -2
  98. package/package.json +1 -1
@@ -31,7 +31,7 @@
31
31
  #define PAGNODE_H_
32
32
 
33
33
  #include "Graphs/GenericGraph.h"
34
- #include "MemoryModel/MemModel.h"
34
+ #include "MemoryModel/SVFSymbols.h"
35
35
  #include "MemoryModel/SymbolTableInfo.h"
36
36
  #include "SVF-FE/LLVMUtil.h"
37
37
  #include "Graphs/PAGEdge.h"
@@ -483,9 +483,9 @@ public:
483
483
 
484
484
  /// Constructor
485
485
  GepObjPN(const MemObj* mem, NodeID i, const LocationSet& l, PNODEK ty = GepObjNode) :
486
- ObjPN(mem->getRefVal(), i, mem, ty), ls(l)
486
+ ObjPN(mem->getValue(), i, mem, ty), ls(l)
487
487
  {
488
- base = mem->getSymId();
488
+ base = mem->getId();
489
489
  }
490
490
 
491
491
  /// offset of the mem object
@@ -369,7 +369,7 @@ protected:
369
369
  }
370
370
  else
371
371
  {
372
- assert((it->second == node->getId()) && "a PAG node can only have unique definition ");
372
+ assert((it->second == node->getId()) && "a SVFIR node can only have unique definition ");
373
373
  }
374
374
  }
375
375
  inline NodeID getDef(const MRVer* mvar) const
@@ -259,7 +259,7 @@ private:
259
259
  inline void resetDef(const PAGNode* pagNode, const SVFGNode* node)
260
260
  {
261
261
  PAGNodeToDefMapTy::iterator it = PAGNodeToDefMap.find(pagNode);
262
- assert(it != PAGNodeToDefMap.end() && "a PAG node doesn't have definition before");
262
+ assert(it != PAGNodeToDefMap.end() && "a SVFIR node doesn't have definition before");
263
263
  PAGNodeToDefMap[pagNode] = node->getId();
264
264
  }
265
265
 
@@ -290,11 +290,11 @@ private:
290
290
  //@{
291
291
  inline bool actualInOfIndCS(const ActualINSVFGNode* ai) const
292
292
  {
293
- return (PAG::getPAG()->isIndirectCallSites(ai->getCallSite()));
293
+ return (SVFIR::getPAG()->isIndirectCallSites(ai->getCallSite()));
294
294
  }
295
295
  inline bool actualOutOfIndCS(const ActualOUTSVFGNode* ao) const
296
296
  {
297
- return (PAG::getPAG()->isIndirectCallSites(ao->getCallSite()));
297
+ return (SVFIR::getPAG()->isIndirectCallSites(ao->getCallSite()));
298
298
  }
299
299
  //@}
300
300
 
@@ -31,7 +31,7 @@
31
31
  #define INCLUDE_UTIL_VFG_H_
32
32
 
33
33
 
34
- #include "Graphs/PAG.h"
34
+ #include "MemoryModel/SVFIR.h"
35
35
  #include "Graphs/PTACallGraph.h"
36
36
  #include "Graphs/VFGNode.h"
37
37
  #include "Graphs/VFGEdge.h"
@@ -78,7 +78,7 @@ public:
78
78
  typedef VFGEdge::VFGEdgeSetTy::iterator VFGNodeIter;
79
79
  typedef VFGNodeIDToNodeMapTy::iterator iterator;
80
80
  typedef VFGNodeIDToNodeMapTy::const_iterator const_iterator;
81
- typedef PAG::PAGEdgeSet PAGEdgeSet;
81
+ typedef SVFIR::PAGEdgeSet PAGEdgeSet;
82
82
  typedef Set<const VFGNode*> GlobalVFGNodeSet;
83
83
  typedef Set<const PAGNode*> PAGNodeSet;
84
84
 
@@ -99,7 +99,7 @@ protected:
99
99
 
100
100
  GlobalVFGNodeSet globalVFGNodes; ///< set of global store VFG nodes
101
101
  PTACallGraph* callgraph;
102
- PAG* pag;
102
+ SVFIR* pag;
103
103
  VFGK kind;
104
104
 
105
105
  /// Clean up memory
@@ -127,8 +127,8 @@ public:
127
127
  return (kind == PTRONLYSVFG) || (kind == PTRONLYSVFG_OPT);
128
128
  }
129
129
 
130
- /// Return PAG
131
- inline PAG* getPAG() const
130
+ /// Return SVFIR
131
+ inline SVFIR* getPAG() const
132
132
  {
133
133
  return pag;
134
134
  }
@@ -261,12 +261,12 @@ public:
261
261
  const VFGNode* defNode = getVFGNode(getDef(pagNode));
262
262
  if (const AddrVFGNode* addr = SVFUtil::dyn_cast<AddrVFGNode>(defNode))
263
263
  {
264
- if (PAG::getPAG()->isBlkObjOrConstantObj(addr->getPAGEdge()->getSrcID()))
264
+ if (SVFIR::getPAG()->isBlkObjOrConstantObj(addr->getPAGEdge()->getSrcID()))
265
265
  return true;
266
266
  }
267
267
  else if(const CopyVFGNode* copy = SVFUtil::dyn_cast<CopyVFGNode>(defNode))
268
268
  {
269
- if (PAG::getPAG()->isNullPtr(copy->getPAGEdge()->getSrcID()))
269
+ if (SVFIR::getPAG()->isNullPtr(copy->getPAGEdge()->getSrcID()))
270
270
  return true;
271
271
  }
272
272
  }
@@ -400,13 +400,13 @@ protected:
400
400
  }
401
401
  else
402
402
  {
403
- assert((it->second == node->getId()) && "a PAG node can only have unique definition ");
403
+ assert((it->second == node->getId()) && "a SVFIR node can only have unique definition ");
404
404
  }
405
405
  }
406
406
  inline NodeID getDef(const PAGNode* pagNode) const
407
407
  {
408
408
  PAGNodeToDefMapTy::const_iterator it = PAGNodeToDefMap.find(pagNode);
409
- assert(it!=PAGNodeToDefMap.end() && "PAG node does not have a definition??");
409
+ assert(it!=PAGNodeToDefMap.end() && "SVFIR node does not have a definition??");
410
410
  return it->second;
411
411
  }
412
412
  inline bool hasDef(const PAGNode* pagNode) const
@@ -503,7 +503,7 @@ protected:
503
503
  setDef(load->getDstNode(),sNode);
504
504
  }
505
505
  /// Add a Store VFG node,
506
- /// To be noted store does not create a new pointer, we do not set def for any PAG node
506
+ /// To be noted store does not create a new pointer, we do not set def for any SVFIR node
507
507
  void addStoreVFGNode(const StorePE* store)
508
508
  {
509
509
  StoreVFGNode* sNode = new StoreVFGNode(totalVFGNode++,store);
@@ -545,7 +545,7 @@ protected:
545
545
  PAGNodeToFormalRetMap[uniqueFunRet] = sNode;
546
546
  /// if this uniqueFunRet is a phi node, which means it will receive values from multiple return instructions of fun
547
547
  /// we will set this phi node's def later
548
- /// Ideally, every function uniqueFunRet should be a PhiNode (PAGBuilder.cpp), unless it does not have ret instruction
548
+ /// Ideally, every function uniqueFunRet should be a PhiNode (SVFIRBuilder.cpp), unless it does not have ret instruction
549
549
  if (!pag->isPhiNode(uniqueFunRet)){
550
550
  std::string warn = fun->getName().str();
551
551
  SVFUtil::writeWrnMsg(warn + " does not have any ret instruction!");
@@ -561,12 +561,12 @@ protected:
561
561
  PAGNodeToActualRetMap[ret] = sNode;
562
562
  }
563
563
  /// Add an llvm PHI VFG node
564
- inline void addIntraPHIVFGNode(const PAGNode* phiResNode, PAG::CopyPEList& oplist)
564
+ inline void addIntraPHIVFGNode(const PAGNode* phiResNode, SVFIR::CopyPEList& oplist)
565
565
  {
566
566
  IntraPHIVFGNode* sNode = new IntraPHIVFGNode(totalVFGNode++,phiResNode);
567
567
  u32_t pos = 0;
568
568
  const PAGEdge* edge = nullptr;
569
- for(PAG::CopyPEList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
569
+ for(SVFIR::CopyPEList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
570
570
  {
571
571
  edge = *it;
572
572
  sNode->setOpVerAndBB(pos, edge->getSrcNode(), edge->getICFGNode());
@@ -577,12 +577,12 @@ protected:
577
577
  PAGNodeToIntraPHIVFGNodeMap[phiResNode] = sNode;
578
578
  }
579
579
  /// Add a Compare VFG node
580
- inline void addCmpVFGNode(const PAGNode* resNode, PAG::CmpPEList& oplist)
580
+ inline void addCmpVFGNode(const PAGNode* resNode, SVFIR::CmpPEList& oplist)
581
581
  {
582
582
  CmpVFGNode* sNode = new CmpVFGNode(totalVFGNode++, resNode);
583
583
  u32_t pos = 0;
584
584
  const PAGEdge* edge = nullptr;
585
- for(PAG::CmpPEList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
585
+ for(SVFIR::CmpPEList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
586
586
  {
587
587
  edge = *it;
588
588
  sNode->setOpVer(pos, edge->getSrcNode());
@@ -593,12 +593,12 @@ protected:
593
593
  PAGNodeToCmpVFGNodeMap[resNode] = sNode;
594
594
  }
595
595
  /// Add a BinaryOperator VFG node
596
- inline void addBinaryOPVFGNode(const PAGNode* resNode, PAG::BinaryOPList& oplist)
596
+ inline void addBinaryOPVFGNode(const PAGNode* resNode, SVFIR::BinaryOPList& oplist)
597
597
  {
598
598
  BinaryOPVFGNode* sNode = new BinaryOPVFGNode(totalVFGNode++, resNode);
599
599
  u32_t pos = 0;
600
600
  const PAGEdge* edge = nullptr;
601
- for(PAG::BinaryOPList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
601
+ for(SVFIR::BinaryOPList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
602
602
  {
603
603
  edge = *it;
604
604
  sNode->setOpVer(pos, (*it)->getSrcNode());
@@ -610,12 +610,12 @@ protected:
610
610
  PAGNodeToBinaryOPVFGNodeMap[resNode] = sNode;
611
611
  }
612
612
  /// Add a UnaryOperator VFG node
613
- inline void addUnaryOPVFGNode(const PAGNode* resNode, PAG::UnaryOPList& oplist)
613
+ inline void addUnaryOPVFGNode(const PAGNode* resNode, SVFIR::UnaryOPList& oplist)
614
614
  {
615
615
  UnaryOPVFGNode* sNode = new UnaryOPVFGNode(totalVFGNode++, resNode);
616
616
  u32_t pos = 0;
617
617
  const PAGEdge* edge = nullptr;
618
- for(PAG::UnaryOPList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
618
+ for(SVFIR::UnaryOPList::const_iterator it = oplist.begin(), eit=oplist.end(); it!=eit; ++it,++pos)
619
619
  {
620
620
  edge = *it;
621
621
  sNode->setOpVer(pos, (*it)->getSrcNode());
@@ -33,8 +33,7 @@
33
33
  #include "Graphs/GenericGraph.h"
34
34
  #include "Graphs/VFGEdge.h"
35
35
  #include "Graphs/ICFGNode.h"
36
- #include "Graphs/PAGNode.h"
37
- #include "Graphs/PAGEdge.h"
36
+ #include "MemoryModel/SVFIR.h"
38
37
 
39
38
  namespace SVF
40
39
  {
@@ -1092,7 +1091,7 @@ public:
1092
1091
  return node->isPointer();
1093
1092
  }
1094
1093
  /// Return corresponding PAGNode
1095
- const PAGNode* getPAGNode() const
1094
+ const PAGNode* getGNode() const
1096
1095
  {
1097
1096
  return node;
1098
1097
  }
@@ -30,7 +30,7 @@
30
30
  #ifndef MEMORYREGION_H_
31
31
  #define MEMORYREGION_H_
32
32
 
33
- #include "Graphs/PAG.h"
33
+ #include "MemoryModel/SVFIR.h"
34
34
  #include "Graphs/PTACallGraph.h"
35
35
  #include "Util/SCC.h"
36
36
  #include "Util/WorkList.h"
@@ -168,8 +168,8 @@ public:
168
168
 
169
169
  typedef Map<NodeID, NodeBS> NodeToPTSSMap;
170
170
 
171
- /// PAG edge list
172
- typedef PAG::PAGEdgeList PAGEdgeList;
171
+ /// SVFIR edge list
172
+ typedef SVFIR::PAGEdgeList PAGEdgeList;
173
173
  /// Call Graph SCC
174
174
  typedef SCCDetection<PTACallGraph*> SCC;
175
175
 
@@ -197,17 +197,17 @@ private:
197
197
 
198
198
  /// Map a function to all its memory regions
199
199
  FunToMRsMap funToMRsMap;
200
- /// Map a load PAG Edge to its memory regions sets in order for inserting mus in Memory SSA
200
+ /// Map a load SVFIR Edge to its memory regions sets in order for inserting mus in Memory SSA
201
201
  LoadsToMRsMap loadsToMRsMap;
202
- /// Map a store PAG Edge to its memory regions sets in order for inserting chis in Memory SSA
202
+ /// Map a store SVFIR Edge to its memory regions sets in order for inserting chis in Memory SSA
203
203
  StoresToMRsMap storesToMRsMap;
204
204
  /// Map a callsite to its refs regions
205
205
  CallSiteToMRsMap callsiteToRefMRsMap;
206
206
  /// Map a callsite to its mods regions
207
207
  CallSiteToMRsMap callsiteToModMRsMap;
208
- /// Map a load PAG Edge to its CPts set map
208
+ /// Map a load SVFIR Edge to its CPts set map
209
209
  LoadsToPointsToMap loadsToPointsToMap;
210
- /// Map a store PAG Edge to its CPts set map
210
+ /// Map a store SVFIR Edge to its CPts set map
211
211
  StoresToPointsToMap storesToPointsToMap;
212
212
  /// Map a callsite to it refs cpts set
213
213
  CallSiteToPointsToMap callsiteToRefPointsToMap;
@@ -235,7 +235,7 @@ private:
235
235
  /// Map a pointer to its cached points-to chain;
236
236
  NodeToPTSSMap cachedPtsChainMap;
237
237
 
238
- /// All global variable PAG node ids
238
+ /// All global variable SVFIR node ids
239
239
  NodeBS allGlobals;
240
240
 
241
241
  /// Clean up memory
@@ -427,11 +427,11 @@ public:
427
427
  /// Start generating memory regions
428
428
  virtual void generateMRs();
429
429
 
430
- /// Get the function which PAG Edge located
430
+ /// Get the function which SVFIR Edge located
431
431
  const SVFFunction* getFunction(const PAGEdge* pagEdge) const
432
432
  {
433
433
  PAGEdgeToFunMap::const_iterator it = pagEdgeToFunMap.find(pagEdge);
434
- assert(it!=pagEdgeToFunMap.end() && "can not find its function, it is a global PAG edge");
434
+ assert(it!=pagEdgeToFunMap.end() && "can not find its function, it is a global SVFIR edge");
435
435
  return it->second;
436
436
  }
437
437
  /// Get Memory Region set
@@ -465,7 +465,7 @@ public:
465
465
  return callsiteToModMRsMap[cs];
466
466
  }
467
467
  //@}
468
- /// Whether this instruction has PAG Edge
468
+ /// Whether this instruction has SVFIR Edge
469
469
  bool hasPAGEdgeList(const Instruction* inst);
470
470
  /// Given an instruction, get all its the PAGEdge (statement) in sequence
471
471
  PAGEdgeList& getPAGEdgesFromInst(const Instruction* inst);
@@ -93,8 +93,8 @@ public:
93
93
  typedef Map<const MemRegion*, std::vector<MRVer*> > MemRegToVerStackMap;
94
94
  typedef Map<const MemRegion*, MRVERSION> MemRegToCounterMap;
95
95
 
96
- /// PAG edge list
97
- typedef PAG::PAGEdgeList PAGEdgeList;
96
+ /// SVFIR edge list
97
+ typedef SVFIR::PAGEdgeList PAGEdgeList;
98
98
 
99
99
  /// Statistics
100
100
  //@{
@@ -309,8 +309,8 @@ public:
309
309
  {
310
310
  destroy();
311
311
  }
312
- /// Return PAG
313
- inline PAG* getPAG();
312
+ /// Return SVFIR
313
+ inline SVFIR* getPAG();
314
314
  /// Return PTA
315
315
  inline BVDataPTAImpl* getPTA() const
316
316
  {
@@ -184,7 +184,7 @@ public:
184
184
  /// Initialize analysis
185
185
  void initialize(SVFModule* module);
186
186
 
187
- inline PAG* getPAG() {
187
+ inline SVFIR* getPAG() {
188
188
  return mhp->getTCT()->getPTA()->getPAG();
189
189
  }
190
190
 
@@ -1,4 +1,4 @@
1
- //===- PAGBuilderFromFile.h -- Building PAG from File--------------------------------//
1
+ //===- PAGBuilderFromFile.h -- Building SVFIR from File--------------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -30,24 +30,24 @@
30
30
  #ifndef INCLUDE_MEMORYMODEL_PAGBUILDERFROMFILE_H_
31
31
  #define INCLUDE_MEMORYMODEL_PAGBUILDERFROMFILE_H_
32
32
 
33
- #include "Graphs/PAG.h"
33
+ #include "MemoryModel/SVFIR.h"
34
34
 
35
35
  namespace SVF
36
36
  {
37
37
 
38
38
  /*!
39
- * Build PAG from a user specified file (for debugging purpose)
39
+ * Build SVFIR from a user specified file (for debugging purpose)
40
40
  */
41
41
  class PAGBuilderFromFile
42
42
  {
43
43
 
44
44
  private:
45
- PAG* pag;
45
+ SVFIR* pag;
46
46
  std::string file;
47
47
  public:
48
48
  /// Constructor
49
49
  PAGBuilderFromFile(std::string f) :
50
- pag(PAG::getPAG(true)), file(f)
50
+ pag(SVFIR::getPAG(true)), file(f)
51
51
  {
52
52
  }
53
53
  /// Destructor
@@ -55,8 +55,8 @@ public:
55
55
  {
56
56
  }
57
57
 
58
- /// Return PAG
59
- PAG* getPAG() const
58
+ /// Return SVFIR
59
+ SVFIR* getPAG() const
60
60
  {
61
61
  return pag;
62
62
  }
@@ -68,7 +68,7 @@ public:
68
68
  }
69
69
 
70
70
  /// Start building
71
- PAG* build();
71
+ SVFIR* build();
72
72
 
73
73
  // Add edges
74
74
  void addEdge(NodeID nodeSrc, NodeID nodeDst, Size_t offset,
@@ -57,49 +57,49 @@ public:
57
57
  static const char* ProcessCopyGepTime; ///< time of processing copys and geps
58
58
  static const char* UpdateCallGraphTime; ///< time of updating call graph
59
59
 
60
- static const char* TotalNumOfPointers; ///< Total PAG value node
61
- static const char* TotalNumOfObjects; ///< Total PAG object node
62
- static const char* TotalNumOfFieldObjects; ///< Total PAG field object node
60
+ static const char* TotalNumOfPointers; ///< Total SVFIR value node
61
+ static const char* TotalNumOfObjects; ///< Total SVFIR object node
62
+ static const char* TotalNumOfFieldObjects; ///< Total SVFIR field object node
63
63
  static const char* MaxStructSize; ///< Max struct size
64
- static const char* TotalNumOfEdges; ///< Total PAG edge number
65
-
66
- static const char* NumOfAddrs; ///< PAG addr edge
67
- static const char* NumOfLoads; ///< PAG load edge
68
- static const char* NumOfStores; ///< PAG store edge
69
- static const char* NumOfCopys; ///< PAG copy edge
70
- static const char* NumOfGeps; ///< PAG gep edge
71
- static const char* NumOfCalls; ///< PAG call edge
72
- static const char* NumOfReturns; ///< PAG return edge
73
-
74
- static const char* NumOfProcessedAddrs; ///< PAG processed addr edge
75
- static const char* NumOfProcessedLoads; ///< PAG processed load edge
76
- static const char* NumOfProcessedStores; ///< PAG processed store edge
77
- static const char* NumOfProcessedCopys; ///< PAG processed copy edge
78
- static const char* NumOfProcessedGeps; ///< PAG processed gep edge
64
+ static const char* TotalNumOfEdges; ///< Total SVFIR edge number
65
+
66
+ static const char* NumOfAddrs; ///< SVFIR addr edge
67
+ static const char* NumOfLoads; ///< SVFIR load edge
68
+ static const char* NumOfStores; ///< SVFIR store edge
69
+ static const char* NumOfCopys; ///< SVFIR copy edge
70
+ static const char* NumOfGeps; ///< SVFIR gep edge
71
+ static const char* NumOfCalls; ///< SVFIR call edge
72
+ static const char* NumOfReturns; ///< SVFIR return edge
73
+
74
+ static const char* NumOfProcessedAddrs; ///< SVFIR processed addr edge
75
+ static const char* NumOfProcessedLoads; ///< SVFIR processed load edge
76
+ static const char* NumOfProcessedStores; ///< SVFIR processed store edge
77
+ static const char* NumOfProcessedCopys; ///< SVFIR processed copy edge
78
+ static const char* NumOfProcessedGeps; ///< SVFIR processed gep edge
79
79
 
80
80
  static const char* NumOfSfr; ///< num of field representatives
81
81
  static const char* NumOfFieldExpand;
82
82
 
83
83
  static const char* NumOfFunctionObjs; ///< Function numbers
84
- static const char* NumOfGlobalObjs; ///< PAG global object node
85
- static const char* NumOfHeapObjs; ///< PAG heap object node
86
- static const char* NumOfStackObjs; ///< PAG stack object node
84
+ static const char* NumOfGlobalObjs; ///< SVFIR global object node
85
+ static const char* NumOfHeapObjs; ///< SVFIR heap object node
86
+ static const char* NumOfStackObjs; ///< SVFIR stack object node
87
87
 
88
- static const char* NumOfObjsHasVarStruct; ///< PAG object node has var struct (maybe nested with array)
89
- static const char* NumOfObjsHasVarArray; ///< PAG object node has var array (maybe nested with struct)
90
- static const char* NumOfObjsHasConstStruct; ///< PAG object node has const struct (maybe nested with array)
91
- static const char* NumOfObjsHasConstArray; ///< PAG object node has const array (maybe nested with struct)
92
- static const char* NumOfNonPtrObjs; ///< PAG object node which is non pointer type object (do not have pts)
93
- static const char* NumOfConstantObjs; ///< PAG object node which is purely constant
88
+ static const char* NumOfObjsHasVarStruct; ///< SVFIR object node has var struct (maybe nested with array)
89
+ static const char* NumOfObjsHasVarArray; ///< SVFIR object node has var array (maybe nested with struct)
90
+ static const char* NumOfObjsHasConstStruct; ///< SVFIR object node has const struct (maybe nested with array)
91
+ static const char* NumOfObjsHasConstArray; ///< SVFIR object node has const array (maybe nested with struct)
92
+ static const char* NumOfNonPtrObjs; ///< SVFIR object node which is non pointer type object (do not have pts)
93
+ static const char* NumOfConstantObjs; ///< SVFIR object node which is purely constant
94
94
 
95
95
  static const char* NumberOfFieldInsensitiveObj;
96
96
  static const char* NumberOfFieldSensitiveObj;
97
97
 
98
- static const char* NumOfPointers; ///< PAG value node, each of them maps to a llvm value
99
- static const char* NumOfGepFieldPointers; ///< PAG gep value node (field value, dynamically created dummy node)
98
+ static const char* NumOfPointers; ///< SVFIR value node, each of them maps to a llvm value
99
+ static const char* NumOfGepFieldPointers; ///< SVFIR gep value node (field value, dynamically created dummy node)
100
100
 
101
- static const char* NumOfMemObjects; ///< PAG object node, each of them maps to a llvm value
102
- static const char* NumOfGepFieldObjects; ///< PAG gep object node (field obj, dynamically created dummy node)
101
+ static const char* NumOfMemObjects; ///< SVFIR object node, each of them maps to a llvm value
102
+ static const char* NumOfGepFieldObjects; ///< SVFIR gep object node (field obj, dynamically created dummy node)
103
103
 
104
104
  static const char* AveragePointsToSetSize; ///< Average points-to size of all variables
105
105
  static const char* AverageTopLevPointsToSetSize; ///< Average points-to size of top-level variables
@@ -33,7 +33,7 @@
33
33
  #include <unistd.h>
34
34
  #include <signal.h>
35
35
 
36
- #include "Graphs/PAG.h"
36
+ #include "MemoryModel/SVFIR.h"
37
37
  #include "MemoryModel/ConditionalPT.h"
38
38
  #include "MemoryModel/AbstractPointsToDS.h"
39
39
  #include "MemoryModel/MutablePointsToDS.h"
@@ -106,7 +106,7 @@ public:
106
106
  //@{
107
107
  typedef llvm::AliasAnalysis AliasAnalysis;
108
108
  typedef Set<const CallBlockNode*> CallSiteSet;
109
- typedef PAG::CallSiteToFunPtrMap CallSiteToFunPtrMap;
109
+ typedef SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap;
110
110
  typedef Set<const SVFFunction*> FunctionSet;
111
111
  typedef OrderedMap<const CallBlockNode*, FunctionSet> CallEdgeMap;
112
112
  typedef SCCDetection<PTACallGraph*> CallGraphSCC;
@@ -143,8 +143,8 @@ protected:
143
143
  u32_t OnTheFlyIterBudgetForStat;
144
144
  //@}
145
145
 
146
- /// PAG
147
- static PAG* pag;
146
+ /// SVFIR
147
+ static SVFIR* pag;
148
148
  /// Module
149
149
  SVFModule* svfMod;
150
150
  /// Pointer analysis Type
@@ -186,7 +186,7 @@ public:
186
186
  }
187
187
 
188
188
  /// Constructor
189
- PointerAnalysis(PAG* pag, PTATY ty = Default_PTA, bool alias_check = true);
189
+ PointerAnalysis(SVFIR* pag, PTATY ty = Default_PTA, bool alias_check = true);
190
190
 
191
191
  /// Type of pointer analysis
192
192
  inline PTATY getAnalysisTy() const
@@ -200,9 +200,9 @@ public:
200
200
  return ptaImplTy;
201
201
  }
202
202
 
203
- /// Get/set PAG
203
+ /// Get/set SVFIR
204
204
  ///@{
205
- inline PAG* getPAG() const
205
+ inline SVFIR* getPAG() const
206
206
  {
207
207
  return pag;
208
208
  }
@@ -227,7 +227,7 @@ public:
227
227
  /// Destructor
228
228
  virtual ~PointerAnalysis();
229
229
 
230
- /// Initialization of a pointer analysis, including building symbol table and PAG etc.
230
+ /// Initialization of a pointer analysis, including building symbol table and SVFIR etc.
231
231
  virtual void initialize();
232
232
 
233
233
  /// Finalization of a pointer analysis, including checking alias correctness
@@ -344,7 +344,7 @@ public:
344
344
  ///@{
345
345
  inline bool isFIObjNode(NodeID id) const
346
346
  {
347
- return (SVFUtil::isa<FIObjPN>(pag->getPAGNode(id)));
347
+ return (SVFUtil::isa<FIObjPN>(pag->getGNode(id)));
348
348
  }
349
349
  inline NodeID getBaseObjNode(NodeID id)
350
350
  {
@@ -68,7 +68,7 @@ public:
68
68
  };
69
69
 
70
70
  /// Constructor
71
- BVDataPTAImpl(PAG* pag, PointerAnalysis::PTATY type, bool alias_check = true);
71
+ BVDataPTAImpl(SVFIR* pag, PointerAnalysis::PTATY type, bool alias_check = true);
72
72
 
73
73
  /// Destructor
74
74
  virtual ~BVDataPTAImpl()
@@ -261,7 +261,7 @@ public:
261
261
  typedef Map<NodeID,CPtSet> PtrToCPtsMap; /// map a pointer to its conditional points-to set
262
262
 
263
263
  /// Constructor
264
- CondPTAImpl(PAG* pag, PointerAnalysis::PTATY type) : PointerAnalysis(pag, type), normalized(false)
264
+ CondPTAImpl(SVFIR* pag, PointerAnalysis::PTATY type) : PointerAnalysis(pag, type), normalized(false)
265
265
  {
266
266
  if (type == PathS_DDA || type == Cxt_DDA)
267
267
  ptD = new MutPTDataTy();
@@ -574,7 +574,7 @@ public:
574
574
  {
575
575
  for (OrderedNodeSet::iterator nIter = this->getAllValidPtrs().begin(); nIter != this->getAllValidPtrs().end(); ++nIter)
576
576
  {
577
- const PAGNode* node = this->getPAG()->getPAGNode(*nIter);
577
+ const PAGNode* node = this->getPAG()->getGNode(*nIter);
578
578
  if (this->getPAG()->isValidTopLevelPtr(node))
579
579
  {
580
580
  if (SVFUtil::isa<DummyObjPN>(node))