svf-lib 1.0.745 → 1.0.749

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 (32) 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/FlowDDA.h +1 -1
  4. package/SVF-linux/include/Graphs/ConsG.h +10 -10
  5. package/SVF-linux/include/Graphs/ICFGNode.h +3 -3
  6. package/SVF-linux/include/Graphs/IRGraph.h +7 -7
  7. package/SVF-linux/include/Graphs/VFG.h +4 -4
  8. package/SVF-linux/include/MSSA/MemRegion.h +3 -3
  9. package/SVF-linux/include/MSSA/MemSSA.h +1 -1
  10. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +8 -8
  11. package/SVF-linux/include/MemoryModel/PointerAnalysisImpl.h +2 -2
  12. package/SVF-linux/include/MemoryModel/SVFIR.h +66 -67
  13. package/SVF-linux/include/MemoryModel/SVFStatements.h +30 -25
  14. package/SVF-linux/include/MemoryModel/SVFVariables.h +32 -32
  15. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +15 -15
  16. package/SVF-linux/include/Util/IRAnnotator.h +1 -1
  17. package/SVF-linux/include/Util/Options.h +3 -1
  18. package/SVF-linux/include/Util/TypeBasedHeapCloning.h +2 -2
  19. package/SVF-linux/include/WPA/Andersen.h +1 -1
  20. package/SVF-linux/include/WPA/FlowSensitiveTBHC.h +1 -1
  21. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
  22. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  23. package/SVF-osx/include/Graphs/ConsG.h +2 -2
  24. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +2 -2
  25. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +1 -1
  26. package/SVF-osx/include/MemoryModel/SVFIR.h +12 -12
  27. package/SVF-osx/include/MemoryModel/SVFStatements.h +26 -22
  28. package/SVF-osx/include/MemoryModel/SVFVariables.h +17 -17
  29. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +2 -2
  30. package/SVF-osx/include/WPA/Andersen.h +1 -1
  31. package/SVF-osx/include/WPA/FlowSensitiveTBHC.h +1 -1
  32. package/package.json +1 -1
@@ -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 ");
@@ -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
@@ -310,13 +310,13 @@ public:
310
310
  {
311
311
  return pag->isBlkObjOrConstantObj(id);
312
312
  }
313
- inline NodeBS& getAllFieldsObjNode(NodeID id)
313
+ inline NodeBS& getAllFieldsObjVars(NodeID id)
314
314
  {
315
- return pag->getAllFieldsObjNode(id);
315
+ return pag->getAllFieldsObjVars(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);
@@ -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
@@ -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
 
@@ -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
  //@{
@@ -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
  //@{
@@ -346,21 +346,21 @@ public:
346
346
  {
347
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
- virtual inline const NodeBS& getAllFieldsObjNode(NodeID id)
361
+ virtual inline const NodeBS& getAllFieldsObjVars(NodeID id)
362
362
  {
363
- return pag->getAllFieldsObjNode(id);
363
+ return pag->getAllFieldsObjVars(id);
364
364
  }
365
365
  inline void setObjFieldInsensitive(NodeID id)
366
366
  {
@@ -352,9 +352,9 @@ public:
352
352
  expandedCpts = cpts;;
353
353
  for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
354
354
  {
355
- if(pag->getBaseObjNode(cit->get_id())==cit->get_id())
355
+ if(pag->getBaseObjVar(cit->get_id())==cit->get_id())
356
356
  {
357
- NodeBS& fields = pag->getAllFieldsObjNode(cit->get_id());
357
+ NodeBS& fields = pag->getAllFieldsObjVars(cit->get_id());
358
358
  for(NodeBS::iterator it = fields.begin(), eit = fields.end(); it!=eit; ++it)
359
359
  {
360
360
  CVar cvar(cit->get_cond(),*it);
@@ -53,33 +53,32 @@ public:
53
53
  typedef OrderedMap<const CallBlockNode*,NodeID> CallSiteToFunPtrMap;
54
54
  typedef Map<NodeID,CallSiteSet> FunPtrToCallSitesMap;
55
55
  typedef Map<NodeID,NodeBS> MemObjToFieldsMap;
56
- typedef std::vector<const SVFStmt*> PAGEdgeList;
57
- typedef std::vector<const SVFVar*> PAGNodeList;
58
- typedef std::vector<const CopyStmt*> CopyPEList;
56
+ typedef std::vector<const SVFStmt*> SVFStmtList;
57
+ typedef std::vector<const SVFVar*> SVFVarList;
59
58
  typedef Map<const SVFVar*,PhiStmt*> PHINodeMap;
60
- typedef Map<const SVFFunction*,PAGNodeList> FunToArgsListMap;
61
- typedef Map<const CallBlockNode*,PAGNodeList> CSToArgsListMap;
59
+ typedef Map<const SVFFunction*,SVFVarList> FunToArgsListMap;
60
+ typedef Map<const CallBlockNode*,SVFVarList> CSToArgsListMap;
62
61
  typedef Map<const RetBlockNode*,const SVFVar*> CSToRetMap;
63
62
  typedef Map<const SVFFunction*,const SVFVar*> FunToRetMap;
64
- typedef Map<const SVFFunction*,PAGEdgeSet> FunToPAGEdgeSetMap;
65
- typedef Map<const ICFGNode*,PAGEdgeList> Inst2PAGEdgesMap;
63
+ typedef Map<const SVFFunction*,SVFStmtSet> FunToPAGEdgeSetMap;
64
+ typedef Map<const ICFGNode*,SVFStmtList> ICFGNode2SVFStmtsMap;
66
65
  typedef Map<NodeID, NodeID> NodeToNodeMap;
67
66
  typedef std::pair<NodeID, Size_t> NodeOffset;
68
67
  typedef std::pair<NodeID, LocationSet> NodeLocationSet;
69
68
  typedef Map<NodeOffset,NodeID> NodeOffsetMap;
70
69
  typedef Map<NodeLocationSet,NodeID> NodeLocationSetMap;
71
- typedef Map<const Value*, NodeLocationSetMap> GepValPNMap;
70
+ typedef Map<const Value*, NodeLocationSetMap> GepValueVarMap;
72
71
  typedef Map<NodePair,NodeID> NodePairSetMap;
73
72
 
74
73
  private:
75
74
  /// ValueNodes - This map indicates the Node that a particular Value* is
76
75
  /// represented by. This contains entries for all pointers.
77
- Inst2PAGEdgesMap inst2PAGEdgesMap; ///< Map a instruction to its PAGEdges
78
- Inst2PAGEdgesMap inst2PTAPAGEdgesMap; ///< Map a instruction to its PointerAnalysis related PAGEdges
79
- GepValPNMap GepValNodeMap; ///< Map a pair<base,off> to a gep value node id
80
- NodeLocationSetMap GepObjNodeMap; ///< Map a pair<base,off> to a gep obj node id
76
+ ICFGNode2SVFStmtsMap icfgNode2SVFStmtsMap; ///< Map an ICFGNode to its SVFStmts
77
+ ICFGNode2SVFStmtsMap icfgNode2PTASVFStmtsMap; ///< Map an ICFGNode to its PointerAnalysis related SVFStmts
78
+ GepValueVarMap GepValObjMap; ///< Map a pair<base,off> to a gep value node id
79
+ NodeLocationSetMap GepObjVarMap; ///< Map a pair<base,off> to a gep obj node id
81
80
  MemObjToFieldsMap memToFieldsMap; ///< Map a mem object id to all its fields
82
- PAGEdgeSet globPAGEdgesSet; ///< Global PAGEdges without control flow information
81
+ SVFStmtSet globSVFStmtSet; ///< Global PAGEdges without control flow information
83
82
  PHINodeMap phiNodeMap; ///< A set of phi copy edges
84
83
  FunToArgsListMap funArgsListMap; ///< Map a function to a list of all its formal parameters
85
84
  CSToArgsListMap callSiteArgsListMap; ///< Map a callsite to a list of all its actual parameters
@@ -124,10 +123,10 @@ public:
124
123
  {
125
124
  return memToFieldsMap;
126
125
  }
127
- /// Return GepObjNodeMap
126
+ /// Return GepObjVarMap
128
127
  inline NodeLocationSetMap& getGepObjNodeMap()
129
128
  {
130
- return GepObjNodeMap;
129
+ return GepObjVarMap;
131
130
  }
132
131
  /// Return ICFG
133
132
  inline ICFG* getICFG()
@@ -160,46 +159,46 @@ public:
160
159
  /// Get/set methods to get SVFStmts based on their kinds and ICFGNodes
161
160
  //@{
162
161
  /// Get edges set according to its kind
163
- inline SVFStmt::PAGEdgeSetTy& getEdgeSet(SVFStmt::PEDGEK kind)
162
+ inline SVFStmt::SVFStmtSetTy& getSVFStmtSet(SVFStmt::PEDGEK kind)
164
163
  {
165
- return PAGEdgeKindToSetMap[kind];
164
+ return KindToSVFStmtSetMap[kind];
166
165
  }
167
166
  /// Get PTA edges set according to its kind
168
- inline SVFStmt::PAGEdgeSetTy& getPTAEdgeSet(SVFStmt::PEDGEK kind)
167
+ inline SVFStmt::SVFStmtSetTy& getPTASVFStmtSet(SVFStmt::PEDGEK kind)
169
168
  {
170
- return PTAPAGEdgeKindToSetMap[kind];
169
+ return KindToPTASVFStmtSetMap[kind];
171
170
  }
172
171
  /// Whether this instruction has SVFIR Edge
173
- inline bool hasPAGEdgeList(const ICFGNode* inst) const
172
+ inline bool hasSVFStmtList(const ICFGNode* inst) const
174
173
  {
175
- return inst2PAGEdgesMap.find(inst)!=inst2PAGEdgesMap.end();
174
+ return icfgNode2SVFStmtsMap.find(inst)!=icfgNode2SVFStmtsMap.end();
176
175
  }
177
- inline bool hasPTAPAGEdgeList(const ICFGNode* inst) const
176
+ inline bool hasPTASVFStmtList(const ICFGNode* inst) const
178
177
  {
179
- return inst2PTAPAGEdgesMap.find(inst)!=inst2PTAPAGEdgesMap.end();
178
+ return icfgNode2PTASVFStmtsMap.find(inst)!=icfgNode2PTASVFStmtsMap.end();
180
179
  }
181
180
  /// Given an instruction, get all its PAGEdges
182
- inline PAGEdgeList& getInstPAGEdgeList(const ICFGNode* inst)
181
+ inline SVFStmtList& getSVFStmtList(const ICFGNode* inst)
183
182
  {
184
- return inst2PAGEdgesMap[inst];
183
+ return icfgNode2SVFStmtsMap[inst];
185
184
  }
186
185
  /// Given an instruction, get all its PTA PAGEdges
187
- inline PAGEdgeList& getInstPTAPAGEdgeList(const ICFGNode* inst)
186
+ inline SVFStmtList& getPTASVFStmtList(const ICFGNode* inst)
188
187
  {
189
- return inst2PTAPAGEdgesMap[inst];
188
+ return icfgNode2PTASVFStmtsMap[inst];
190
189
  }
191
190
  /// Add a SVFStmt into instruction map
192
- inline void addToInstPAGEdgeList(ICFGNode* inst, SVFStmt* edge)
191
+ inline void addToSVFStmtList(ICFGNode* inst, SVFStmt* edge)
193
192
  {
194
193
  edge->setICFGNode(inst);
195
- inst2PAGEdgesMap[inst].push_back(edge);
194
+ icfgNode2SVFStmtsMap[inst].push_back(edge);
196
195
  if (edge->isPTAEdge())
197
- inst2PTAPAGEdgesMap[inst].push_back(edge);
196
+ icfgNode2PTASVFStmtsMap[inst].push_back(edge);
198
197
  }
199
198
  /// Get global PAGEdges (not in a procedure)
200
- inline PAGEdgeSet& getGlobalPAGEdgeSet()
199
+ inline SVFStmtSet& getGlobalSVFStmtSet()
201
200
  {
202
- return globPAGEdgesSet;
201
+ return globSVFStmtSet;
203
202
  }
204
203
  /// Get all callsites
205
204
  inline const CallSiteSet& getCallSiteSet() const
@@ -223,7 +222,7 @@ public:
223
222
  return funArgsListMap;
224
223
  }
225
224
  /// Get function arguments list
226
- inline const PAGNodeList& getFunArgsList(const SVFFunction* func) const
225
+ inline const SVFVarList& getFunArgsList(const SVFFunction* func) const
227
226
  {
228
227
  FunToArgsListMap::const_iterator it = funArgsListMap.find(func);
229
228
  assert(it != funArgsListMap.end() && "this function doesn't have arguments");
@@ -240,7 +239,7 @@ public:
240
239
  return callSiteArgsListMap;
241
240
  }
242
241
  /// Get callsite argument list
243
- inline const PAGNodeList& getCallSiteArgsList(const CallBlockNode* cs) const
242
+ inline const SVFVarList& getCallSiteArgsList(const CallBlockNode* cs) const
244
243
  {
245
244
  CSToArgsListMap::const_iterator it = callSiteArgsListMap.find(cs);
246
245
  assert(it != callSiteArgsListMap.end() && "this call site doesn't have arguments");
@@ -284,19 +283,19 @@ public:
284
283
  //@{
285
284
  inline Size_t getFieldValNodeNum() const
286
285
  {
287
- return GepValNodeMap.size();
286
+ return GepValObjMap.size();
288
287
  }
289
288
  inline Size_t getFieldObjNodeNum() const
290
289
  {
291
- return GepObjNodeMap.size();
290
+ return GepObjVarMap.size();
292
291
  }
293
292
  //@}
294
293
 
295
294
  /// Due to constaint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar.
296
- inline NodeID getGepValNode(const Value* curInst, NodeID base, const LocationSet& ls) const
295
+ inline NodeID getGepValVar(const Value* curInst, NodeID base, const LocationSet& ls) const
297
296
  {
298
- GepValPNMap::const_iterator iter = GepValNodeMap.find(curInst);
299
- if(iter==GepValNodeMap.end()){
297
+ GepValueVarMap::const_iterator iter = GepValObjMap.find(curInst);
298
+ if(iter==GepValObjMap.end()){
300
299
  return UINT_MAX;
301
300
  }
302
301
  else{
@@ -344,8 +343,8 @@ public:
344
343
  inline SVFStmt* getIntraPAGEdge(SVFVar* src, SVFVar* dst, SVFStmt::PEDGEK kind)
345
344
  {
346
345
  SVFStmt edge(src,dst,kind);
347
- const SVFStmt::PAGEdgeSetTy& edgeSet = getEdgeSet(kind);
348
- SVFStmt::PAGEdgeSetTy::const_iterator it = edgeSet.find(&edge);
346
+ const SVFStmt::SVFStmtSetTy& edgeSet = getSVFStmtSet(kind);
347
+ SVFStmt::SVFStmtSetTy::const_iterator it = edgeSet.find(&edge);
349
348
  assert(it != edgeSet.end() && "can not find pag edge");
350
349
  return (*it);
351
350
  }
@@ -370,21 +369,21 @@ public:
370
369
  //@}
371
370
 
372
371
  /// Get a field SVFIR Object node according to base mem obj and offset
373
- NodeID getGepObjNode(const MemObj* obj, const LocationSet& ls);
372
+ NodeID getGepObjVar(const MemObj* obj, const LocationSet& ls);
374
373
  /// Get a field obj SVFIR node according to a mem obj and a given offset
375
- NodeID getGepObjNode(NodeID id, const LocationSet& ls) ;
374
+ NodeID getGepObjVar(NodeID id, const LocationSet& ls) ;
376
375
  /// Get a field-insensitive obj SVFIR node according to a mem obj
377
376
  //@{
378
- inline NodeID getFIObjNode(const MemObj* obj) const
377
+ inline NodeID getFIObjVar(const MemObj* obj) const
379
378
  {
380
379
  return obj->getId();
381
380
  }
382
- inline NodeID getFIObjNode(NodeID id) const
381
+ inline NodeID getFIObjVar(NodeID id) const
383
382
  {
384
383
  SVFVar* node = pag->getGNode(id);
385
384
  assert(SVFUtil::isa<ObjVar>(node) && "need an object node");
386
385
  ObjVar* obj = SVFUtil::cast<ObjVar>(node);
387
- return getFIObjNode(obj->getMemObj());
386
+ return getFIObjVar(obj->getMemObj());
388
387
  }
389
388
  //@}
390
389
 
@@ -438,9 +437,9 @@ public:
438
437
  /// Base and Offset methods for Value and Object node
439
438
  //@{
440
439
  /// Get a base pointer node given a field pointer
441
- NodeID getBaseValNode(NodeID nodeId);
440
+ NodeID getBaseValVar(NodeID nodeId);
442
441
  LocationSet getLocationSetFromBaseNode(NodeID nodeId);
443
- inline NodeID getBaseObjNode(NodeID id) const
442
+ inline NodeID getBaseObjVar(NodeID id) const
444
443
  {
445
444
  return getBaseObj(id)->getId();
446
445
  }
@@ -455,8 +454,8 @@ public:
455
454
 
456
455
  /// Get all fields of an object
457
456
  //@{
458
- NodeBS& getAllFieldsObjNode(const MemObj* obj);
459
- NodeBS& getAllFieldsObjNode(NodeID id);
457
+ NodeBS& getAllFieldsObjVars(const MemObj* obj);
458
+ NodeBS& getAllFieldsObjVars(NodeID id);
460
459
  NodeBS getFieldsAfterCollapse(NodeID id);
461
460
  //@}
462
461
  inline NodeID addDummyValNode()
@@ -481,12 +480,12 @@ private:
481
480
 
482
481
  /// Map a SVFStatement type to a set of corresponding SVF statements
483
482
  inline void addToStmt2TypeMap(SVFStmt* edge) {
484
- bool added = PAGEdgeKindToSetMap[edge->getEdgeKind()].insert(edge).second;
483
+ bool added = KindToSVFStmtSetMap[edge->getEdgeKind()].insert(edge).second;
485
484
  assert(added && "duplicated edge, not added!!!");
486
485
  if (edge->isPTAEdge())
487
486
  {
488
487
  totalPTAPAGEdge++;
489
- PTAPAGEdgeKindToSetMap[edge->getEdgeKind()].insert(edge);
488
+ KindToPTASVFStmtSetMap[edge->getEdgeKind()].insert(edge);
490
489
  }
491
490
  }
492
491
  /// Get/set method for function/callsite arguments and returns
@@ -553,9 +552,9 @@ private:
553
552
  return addNode(node,i);
554
553
  }
555
554
 
556
- /// Add a temp field value node, this method can only invoked by getGepValNode
555
+ /// Add a temp field value node, this method can only invoked by getGepValVar
557
556
  NodeID addGepValNode(const Value* curInst,const Value* val, const LocationSet& ls, NodeID i, const Type *type, u32_t fieldidx);
558
- /// Add a field obj node, this method can only invoked by getGepObjNode
557
+ /// Add a field obj node, this method can only invoked by getGepObjVar
559
558
  NodeID addGepObjNode(const MemObj* obj, const LocationSet& ls);
560
559
  /// Add a field-insensitive node, this method can only invoked by getFIGepObjNode
561
560
  NodeID addFIObjNode(const MemObj* obj);
@@ -616,7 +615,7 @@ private:
616
615
  /// Add global PAGEdges (not in a procedure)
617
616
  inline void addGlobalPAGEdge(const SVFStmt* edge)
618
617
  {
619
- globPAGEdgesSet.insert(edge);
618
+ globSVFStmtSet.insert(edge);
620
619
  }
621
620
  /// Add callsites
622
621
  inline void addCallSite(const CallBlockNode* call)
@@ -626,33 +625,33 @@ private:
626
625
  /// Add an edge into SVFIR
627
626
  //@{
628
627
  /// Add Address edge
629
- AddrStmt* addAddrPE(NodeID src, NodeID dst);
628
+ AddrStmt* addAddrStmt(NodeID src, NodeID dst);
630
629
  /// Add Copy edge
631
- CopyStmt* addCopyPE(NodeID src, NodeID dst);
630
+ CopyStmt* addCopyStmt(NodeID src, NodeID dst);
632
631
  /// Add phi node information
633
- PhiStmt* addPhiNode(NodeID res, NodeID opnd);
632
+ PhiStmt* addPhiStmt(NodeID res, NodeID opnd);
634
633
  /// Add Copy edge
635
- CmpStmt* addCmpPE(NodeID op1, NodeID op2, NodeID dst, u32_t opcode);
634
+ CmpStmt* addCmpStmt(NodeID op1, NodeID op2, NodeID dst, u32_t predict);
636
635
  /// Add Copy edge
637
- BinaryOPStmt* addBinaryOPPE(NodeID op1, NodeID op2, NodeID dst, u32_t opcode);
636
+ BinaryOPStmt* addBinaryOPStmt(NodeID op1, NodeID op2, NodeID dst, u32_t opcode);
638
637
  /// Add Unary edge
639
- UnaryOPStmt* addUnaryOPPE(NodeID src, NodeID dst, u32_t opcode);
638
+ UnaryOPStmt* addUnaryOPStmt(NodeID src, NodeID dst, u32_t opcode);
640
639
  /// Add BranchStmt
641
640
  BranchStmt* addBranchStmt(NodeID br, NodeID cond, std::vector<const ICFGNode*> succs);
642
641
  /// Add Load edge
643
- LoadStmt* addLoadPE(NodeID src, NodeID dst);
642
+ LoadStmt* addLoadStmt(NodeID src, NodeID dst);
644
643
  /// Add Store edge
645
- StoreStmt* addStorePE(NodeID src, NodeID dst, const IntraBlockNode* val);
644
+ StoreStmt* addStoreStmt(NodeID src, NodeID dst, const IntraBlockNode* val);
646
645
  /// Add Call edge
647
646
  CallPE* addCallPE(NodeID src, NodeID dst, const CallBlockNode* cs);
648
647
  /// Add Return edge
649
648
  RetPE* addRetPE(NodeID src, NodeID dst, const CallBlockNode* cs);
650
649
  /// Add Gep edge
651
- GepStmt* addGepPE(NodeID src, NodeID dst, const LocationSet& ls, bool constGep);
650
+ GepStmt* addGepStmt(NodeID src, NodeID dst, const LocationSet& ls, bool constGep);
652
651
  /// Add Offset(Gep) edge
653
- NormalGepStmt* addNormalGepPE(NodeID src, NodeID dst, const LocationSet& ls);
652
+ NormalGepStmt* addNormalGepStmt(NodeID src, NodeID dst, const LocationSet& ls);
654
653
  /// Add Variant(Gep) edge
655
- VariantGepStmt* addVariantGepPE(NodeID src, NodeID dst);
654
+ VariantGepStmt* addVariantGepStmt(NodeID src, NodeID dst);
656
655
  /// Add Thread fork edge for parameter passing
657
656
  TDForkPE* addThreadForkPE(NodeID src, NodeID dst, const CallBlockNode* cs);
658
657
  /// Add Thread join edge for parameter passing
@@ -660,7 +659,7 @@ private:
660
659
  //@}
661
660
 
662
661
  /// Set a pointer points-to black hole (e.g. int2ptr)
663
- SVFStmt* addBlackHoleAddrPE(NodeID node);
662
+ SVFStmt* addBlackHoleAddrStmt(NodeID node);
664
663
  };
665
664
 
666
665
  typedef SVFIR PAG;