svf-tools 1.0.358 → 1.0.359

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 (124) hide show
  1. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
  2. package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
  3. package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +1 -3
  4. package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +6 -6
  5. package/SVF-doxygen/html/html/ICFGNode_8h_source.html +3 -3
  6. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +17 -17
  7. package/SVF-doxygen/html/html/ICFG_8h_source.html +17 -18
  8. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +3 -3
  9. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  10. package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +2 -2
  11. package/SVF-doxygen/html/html/MHP_8h_source.html +2 -2
  12. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
  13. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +4 -4
  14. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +2 -2
  15. package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
  16. package/SVF-doxygen/html/html/PCG_8h_source.html +3 -3
  17. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +2 -2
  18. package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +3 -3
  19. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +5 -5
  20. package/SVF-doxygen/html/html/SVFG_8h_source.html +5 -5
  21. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +1 -1
  22. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +2 -2
  23. package/SVF-doxygen/html/html/SVFIR_8h_source.html +3 -3
  24. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  25. package/SVF-doxygen/html/html/TCT_8h_source.html +2 -2
  26. package/SVF-doxygen/html/html/VFG_8cpp_source.html +3 -3
  27. package/SVF-doxygen/html/html/VFG_8h_source.html +6 -6
  28. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +2 -2
  29. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +5 -5
  30. package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +2 -2
  31. package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode-members.html +1 -1
  32. package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode.html +6 -6
  33. package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +2 -2
  34. package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +22 -22
  35. package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +234 -234
  36. package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder-members.html +3 -3
  37. package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +45 -49
  38. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +11 -11
  39. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +17 -17
  40. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +3 -3
  41. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +8 -8
  42. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
  43. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +2 -2
  44. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +9 -9
  45. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +2 -2
  46. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +6 -6
  47. package/SVF-doxygen/html/html/classSVF_1_1PCG-members.html +1 -1
  48. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +9 -9
  49. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +2 -2
  50. package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode-members.html +1 -1
  51. package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode.html +5 -5
  52. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +13 -13
  53. package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +3 -3
  54. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +4 -4
  55. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +20 -20
  56. package/SVF-doxygen/html/html/classSVF_1_1TCT-members.html +1 -1
  57. package/SVF-doxygen/html/html/classSVF_1_1TCT.html +12 -12
  58. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraphBuilder.html +2 -2
  59. package/SVF-doxygen/html/html/classSVF_1_1VFG.html +14 -14
  60. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +6 -6
  61. package/SVF-doxygen/html/html/functions_a.html +12 -12
  62. package/SVF-doxygen/html/html/functions_f.html +3 -3
  63. package/SVF-doxygen/html/html/functions_func.html +12 -12
  64. package/SVF-doxygen/html/html/functions_func_g.html +34 -41
  65. package/SVF-doxygen/html/html/functions_g.html +31 -38
  66. package/SVF-doxygen/html/html/functions_l.html +8 -8
  67. package/SVF-doxygen/html/html/functions_m.html +1 -1
  68. package/SVF-doxygen/html/html/functions_n.html +3 -3
  69. package/SVF-doxygen/html/html/functions_o.html +11 -11
  70. package/SVF-doxygen/html/html/functions_p.html +1 -1
  71. package/SVF-doxygen/html/html/functions_s.html +9 -7
  72. package/SVF-doxygen/html/html/functions_t.html +4 -4
  73. package/SVF-doxygen/html/html/functions_v.html +6 -6
  74. package/SVF-doxygen/html/html/functions_w.html +9 -5
  75. package/SVF-doxygen/html/html/search/all_1.js +5 -5
  76. package/SVF-doxygen/html/html/search/all_10.js +3 -3
  77. package/SVF-doxygen/html/html/search/all_13.js +6 -6
  78. package/SVF-doxygen/html/html/search/all_14.js +4 -4
  79. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  80. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  81. package/SVF-doxygen/html/html/search/all_6.js +1 -1
  82. package/SVF-doxygen/html/html/search/all_7.js +12 -15
  83. package/SVF-doxygen/html/html/search/all_c.js +3 -3
  84. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  85. package/SVF-doxygen/html/html/search/all_e.js +3 -3
  86. package/SVF-doxygen/html/html/search/all_f.js +1 -1
  87. package/SVF-doxygen/html/html/search/functions_0.js +5 -5
  88. package/SVF-doxygen/html/html/search/functions_10.js +1 -1
  89. package/SVF-doxygen/html/html/search/functions_6.js +12 -15
  90. package/SVF-doxygen/html/html/search/functions_e.js +1 -1
  91. package/SVF-doxygen/html/html/search/variables_14.js +2 -2
  92. package/SVF-doxygen/html/html/search/variables_e.js +2 -2
  93. package/SVF-doxygen/html/html/svf-ex_8cpp.html +2 -2
  94. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +2 -2
  95. package/include/Graphs/ICFG.h +18 -18
  96. package/include/Graphs/ICFGNode.h +2 -2
  97. package/include/Graphs/SVFG.h +4 -4
  98. package/include/Graphs/SVFGOPT.h +2 -2
  99. package/include/Graphs/VFG.h +5 -5
  100. package/include/MTA/LockResultValidator.h +1 -1
  101. package/include/MTA/MHP.h +2 -2
  102. package/include/MTA/PCG.h +2 -2
  103. package/include/MTA/TCT.h +2 -2
  104. package/include/MemoryModel/SVFIR.h +2 -2
  105. package/include/SVF-FE/ICFGBuilder.h +5 -5
  106. package/include/SVF-FE/SVFIRBuilder.h +1 -1
  107. package/lib/Graphs/ICFG.cpp +23 -23
  108. package/lib/Graphs/SVFG.cpp +4 -4
  109. package/lib/Graphs/VFG.cpp +3 -3
  110. package/lib/MSSA/MemRegion.cpp +7 -7
  111. package/lib/MSSA/MemSSA.cpp +3 -3
  112. package/lib/MTA/LockAnalysis.cpp +4 -4
  113. package/lib/MTA/MTAResultValidator.cpp +1 -1
  114. package/lib/MTA/PCG.cpp +1 -1
  115. package/lib/MTA/TCT.cpp +2 -2
  116. package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
  117. package/lib/SABER/LeakChecker.cpp +3 -3
  118. package/lib/SVF-FE/CallGraphBuilder.cpp +4 -4
  119. package/lib/SVF-FE/ICFGBuilder.cpp +12 -24
  120. package/lib/SVF-FE/SVFIRBuilder.cpp +15 -15
  121. package/lib/WPA/Andersen.cpp +3 -3
  122. package/lib/WPA/WPAPass.cpp +4 -4
  123. package/package.json +1 -1
  124. package/tools/Example/svf-ex.cpp +1 -1
@@ -163,19 +163,19 @@ public:
163
163
  /// Get a basic block ICFGNode
164
164
  /// TODO:: need to fix the assertions
165
165
  //@{
166
- ICFGNode* getBlockICFGNode(const Instruction* inst);
166
+ ICFGNode* getICFGNode(const Instruction* inst);
167
167
 
168
- CallICFGNode* getCallBlockNode(const Instruction* inst);
168
+ CallICFGNode* getCallICFGNode(const Instruction* inst);
169
169
 
170
- RetICFGNode* getRetBlockNode(const Instruction* inst);
170
+ RetICFGNode* getRetICFGNode(const Instruction* inst);
171
171
 
172
- IntraICFGNode* getIntraBlockNode(const Instruction* inst);
172
+ IntraICFGNode* getIntraICFGNode(const Instruction* inst);
173
173
 
174
- FunEntryICFGNode* getFunEntryBlockNode(const SVFFunction* fun);
174
+ FunEntryICFGNode* getFunEntryICFGNode(const SVFFunction* fun);
175
175
 
176
- FunExitICFGNode* getFunExitBlockNode(const SVFFunction* fun);
176
+ FunExitICFGNode* getFunExitICFGNode(const SVFFunction* fun);
177
177
 
178
- inline GlobalICFGNode* getGlobalBlockNode() const
178
+ inline GlobalICFGNode* getGlobalICFGNode() const
179
179
  {
180
180
  return globalBlockNode;
181
181
  }
@@ -184,14 +184,14 @@ public:
184
184
  private:
185
185
 
186
186
  /// Get/Add IntraBlock ICFGNode
187
- inline IntraICFGNode* getIntraBlockICFGNode(const Instruction* inst)
187
+ inline IntraICFGNode* getIntraBlock(const Instruction* inst)
188
188
  {
189
189
  InstToBlockNodeMapTy::const_iterator it = InstToBlockNodeMap.find(inst);
190
190
  if (it == InstToBlockNodeMap.end())
191
191
  return nullptr;
192
192
  return it->second;
193
193
  }
194
- inline IntraICFGNode* addIntraBlockICFGNode(const Instruction* inst)
194
+ inline IntraICFGNode* addIntraBlock(const Instruction* inst)
195
195
  {
196
196
  IntraICFGNode* sNode = new IntraICFGNode(totalICFGNode++,inst);
197
197
  addICFGNode(sNode);
@@ -200,14 +200,14 @@ private:
200
200
  }
201
201
 
202
202
  /// Get/Add a function entry node
203
- inline FunEntryICFGNode* getFunEntryICFGNode(const SVFFunction* fun)
203
+ inline FunEntryICFGNode* getFunEntryBlock(const SVFFunction* fun)
204
204
  {
205
205
  FunToFunEntryNodeMapTy::const_iterator it = FunToFunEntryNodeMap.find(fun);
206
206
  if (it == FunToFunEntryNodeMap.end())
207
207
  return nullptr;
208
208
  return it->second;
209
209
  }
210
- inline FunEntryICFGNode* addFunEntryICFGNode(const SVFFunction* fun)
210
+ inline FunEntryICFGNode* addFunEntryBlock(const SVFFunction* fun)
211
211
  {
212
212
  FunEntryICFGNode* sNode = new FunEntryICFGNode(totalICFGNode++,fun);
213
213
  addICFGNode(sNode);
@@ -216,14 +216,14 @@ private:
216
216
  }
217
217
 
218
218
  /// Get/Add a function exit node
219
- inline FunExitICFGNode* getFunExitICFGNode(const SVFFunction* fun)
219
+ inline FunExitICFGNode* getFunExitBlock(const SVFFunction* fun)
220
220
  {
221
221
  FunToFunExitNodeMapTy::const_iterator it = FunToFunExitNodeMap.find(fun);
222
222
  if (it == FunToFunExitNodeMap.end())
223
223
  return nullptr;
224
224
  return it->second;
225
225
  }
226
- inline FunExitICFGNode* addFunExitICFGNode(const SVFFunction* fun)
226
+ inline FunExitICFGNode* addFunExitBlock(const SVFFunction* fun)
227
227
  {
228
228
  FunExitICFGNode* sNode = new FunExitICFGNode(totalICFGNode++, fun);
229
229
  addICFGNode(sNode);
@@ -232,14 +232,14 @@ private:
232
232
  }
233
233
 
234
234
  /// Get/Add a call node
235
- inline CallICFGNode* addCallICFGNode(const Instruction* cs)
235
+ inline CallICFGNode* addCallBlock(const Instruction* cs)
236
236
  {
237
237
  CallICFGNode* sNode = new CallICFGNode(totalICFGNode++, cs);
238
238
  addICFGNode(sNode);
239
239
  CSToCallNodeMap[cs] = sNode;
240
240
  return sNode;
241
241
  }
242
- inline CallICFGNode* getCallICFGNode(const Instruction* cs)
242
+ inline CallICFGNode* getCallBlock(const Instruction* cs)
243
243
  {
244
244
  CSToCallNodeMapTy::const_iterator it = CSToCallNodeMap.find(cs);
245
245
  if (it == CSToCallNodeMap.end())
@@ -248,16 +248,16 @@ private:
248
248
  }
249
249
 
250
250
  /// Get/Add a return node
251
- inline RetICFGNode* getRetICFGNode(const Instruction* cs)
251
+ inline RetICFGNode* getRetBlock(const Instruction* cs)
252
252
  {
253
253
  CSToRetNodeMapTy::const_iterator it = CSToRetNodeMap.find(cs);
254
254
  if (it == CSToRetNodeMap.end())
255
255
  return nullptr;
256
256
  return it->second;
257
257
  }
258
- inline RetICFGNode* addRetICFGNode(const Instruction* cs)
258
+ inline RetICFGNode* addRetBlock(const Instruction* cs)
259
259
  {
260
- CallICFGNode* callBlockNode = getCallBlockNode(cs);
260
+ CallICFGNode* callBlockNode = getCallICFGNode(cs);
261
261
  RetICFGNode* sNode = new RetICFGNode(totalICFGNode++, cs, callBlockNode);
262
262
  callBlockNode->setRetICFGNode(sNode);
263
263
  addICFGNode(sNode);
@@ -384,7 +384,7 @@ public:
384
384
  }
385
385
 
386
386
  /// Return callsite
387
- inline const RetICFGNode* getRetICFGNode() const
387
+ inline const RetICFGNode* getRetBlock() const
388
388
  {
389
389
  assert(ret && "RetICFGNode not set?");
390
390
  return ret;
@@ -477,7 +477,7 @@ public:
477
477
  return cs;
478
478
  }
479
479
 
480
- inline const CallICFGNode* getCallBlockNode() const
480
+ inline const CallICFGNode* getCallICFGNode() const
481
481
  {
482
482
  return callBlockNode;
483
483
  }
@@ -397,7 +397,7 @@ protected:
397
397
  inline void addFormalINSVFGNode(const FunEntryICFGNode* funEntry, const MRVer* resVer, const NodeID nodeId)
398
398
  {
399
399
  FormalINSVFGNode* sNode = new FormalINSVFGNode(nodeId, resVer, funEntry);
400
- addSVFGNode(sNode, pag->getICFG()->getFunEntryBlockNode(funEntry->getFun()));
400
+ addSVFGNode(sNode, pag->getICFG()->getFunEntryICFGNode(funEntry->getFun()));
401
401
  setDef(resVer,sNode);
402
402
  funToFormalINMap[funEntry->getFun()].set(sNode->getId());
403
403
  }
@@ -406,7 +406,7 @@ protected:
406
406
  inline void addFormalOUTSVFGNode(const FunExitICFGNode* funExit, const MRVer* ver, const NodeID nodeId)
407
407
  {
408
408
  FormalOUTSVFGNode* sNode = new FormalOUTSVFGNode(nodeId, ver, funExit);
409
- addSVFGNode(sNode,pag->getICFG()->getFunExitBlockNode(funExit->getFun()));
409
+ addSVFGNode(sNode,pag->getICFG()->getFunExitICFGNode(funExit->getFun()));
410
410
  funToFormalOUTMap[funExit->getFun()].set(sNode->getId());
411
411
  }
412
412
 
@@ -414,7 +414,7 @@ protected:
414
414
  inline void addActualINSVFGNode(const CallICFGNode* callsite, const MRVer* ver, const NodeID nodeId)
415
415
  {
416
416
  ActualINSVFGNode* sNode = new ActualINSVFGNode(nodeId, callsite, ver);
417
- addSVFGNode(sNode,pag->getICFG()->getCallBlockNode(callsite->getCallSite()));
417
+ addSVFGNode(sNode,pag->getICFG()->getCallICFGNode(callsite->getCallSite()));
418
418
  callSiteToActualINMap[callsite].set(sNode->getId());
419
419
  }
420
420
 
@@ -422,7 +422,7 @@ protected:
422
422
  inline void addActualOUTSVFGNode(const CallICFGNode* callsite, const MRVer* resVer, const NodeID nodeId)
423
423
  {
424
424
  ActualOUTSVFGNode* sNode = new ActualOUTSVFGNode(nodeId, callsite, resVer);
425
- addSVFGNode(sNode, pag->getICFG()->getRetBlockNode(callsite->getCallSite()));
425
+ addSVFGNode(sNode, pag->getICFG()->getRetICFGNode(callsite->getCallSite()));
426
426
  setDef(resVer,sNode);
427
427
  callSiteToActualOUTMap[callsite].set(sNode->getId());
428
428
  }
@@ -244,7 +244,7 @@ private:
244
244
  inline InterPHISVFGNode* addInterPHIForFP(const FormalParmSVFGNode* fp)
245
245
  {
246
246
  InterPHISVFGNode* sNode = new InterPHISVFGNode(totalVFGNode++,fp);
247
- addSVFGNode(sNode, pag->getICFG()->getFunEntryBlockNode(fp->getFun()));
247
+ addSVFGNode(sNode, pag->getICFG()->getFunEntryICFGNode(fp->getFun()));
248
248
  resetDef(fp->getParam(),sNode);
249
249
  return sNode;
250
250
  }
@@ -252,7 +252,7 @@ private:
252
252
  inline InterPHISVFGNode* addInterPHIForAR(const ActualRetSVFGNode* ar)
253
253
  {
254
254
  InterPHISVFGNode* sNode = new InterPHISVFGNode(totalVFGNode++,ar);
255
- addSVFGNode(sNode, pag->getICFG()->getRetBlockNode(ar->getCallSite()->getCallSite()));
255
+ addSVFGNode(sNode, pag->getICFG()->getRetICFGNode(ar->getCallSite()->getCallSite()));
256
256
  resetDef(ar->getRev(),sNode);
257
257
  return sNode;
258
258
  }
@@ -479,7 +479,7 @@ protected:
479
479
  inline void addNullPtrVFGNode(const PAGNode* pagNode)
480
480
  {
481
481
  NullPtrVFGNode* sNode = new NullPtrVFGNode(totalVFGNode++,pagNode);
482
- addVFGNode(sNode, pag->getICFG()->getGlobalBlockNode());
482
+ addVFGNode(sNode, pag->getICFG()->getGlobalICFGNode());
483
483
  setDef(pagNode,sNode);
484
484
  }
485
485
  /// Add an Address VFG node
@@ -524,7 +524,7 @@ protected:
524
524
  inline void addActualParmVFGNode(const PAGNode* aparm, const CallICFGNode* cs)
525
525
  {
526
526
  ActualParmVFGNode* sNode = new ActualParmVFGNode(totalVFGNode++,aparm,cs);
527
- addVFGNode(sNode, pag->getICFG()->getCallBlockNode(cs->getCallSite()));
527
+ addVFGNode(sNode, pag->getICFG()->getCallICFGNode(cs->getCallSite()));
528
528
  PAGNodeToActualParmMap[std::make_pair(aparm->getId(),cs)] = sNode;
529
529
  /// do not set def here, this node is not a variable definition
530
530
  }
@@ -532,7 +532,7 @@ protected:
532
532
  inline void addFormalParmVFGNode(const PAGNode* fparm, const SVFFunction* fun, CallPESet& callPEs)
533
533
  {
534
534
  FormalParmVFGNode* sNode = new FormalParmVFGNode(totalVFGNode++,fparm,fun);
535
- addVFGNode(sNode, pag->getICFG()->getFunEntryBlockNode(fun));
535
+ addVFGNode(sNode, pag->getICFG()->getFunEntryICFGNode(fun));
536
536
  for(CallPESet::const_iterator it = callPEs.begin(), eit=callPEs.end();
537
537
  it!=eit; ++it)
538
538
  sNode->addCallPE(*it);
@@ -546,7 +546,7 @@ protected:
546
546
  inline void addFormalRetVFGNode(const PAGNode* uniqueFunRet, const SVFFunction* fun, RetPESet& retPEs)
547
547
  {
548
548
  FormalRetVFGNode *sNode = new FormalRetVFGNode(totalVFGNode++, uniqueFunRet, fun);
549
- addVFGNode(sNode, pag->getICFG()->getFunExitBlockNode(fun));
549
+ addVFGNode(sNode, pag->getICFG()->getFunExitICFGNode(fun));
550
550
  for (RetPESet::const_iterator it = retPEs.begin(), eit = retPEs.end(); it != eit; ++it)
551
551
  sNode->addRetPE(*it);
552
552
 
@@ -564,7 +564,7 @@ protected:
564
564
  inline void addActualRetVFGNode(const PAGNode* ret,const CallICFGNode* cs)
565
565
  {
566
566
  ActualRetVFGNode* sNode = new ActualRetVFGNode(totalVFGNode++,ret,cs);
567
- addVFGNode(sNode, pag->getICFG()->getRetBlockNode(cs->getCallSite()));
567
+ addVFGNode(sNode, pag->getICFG()->getRetICFGNode(cs->getCallSite()));
568
568
  setDef(ret,sNode);
569
569
  PAGNodeToActualRetMap[ret] = sNode;
570
570
  }
@@ -35,7 +35,7 @@ public:
35
35
  private:
36
36
  // Get CallICFGNode
37
37
  inline CallICFGNode* getCBN(const Instruction* inst) {
38
- return _la->getTCT()->getCallBlockNode(inst);
38
+ return _la->getTCT()->getCallICFGNode(inst);
39
39
  }
40
40
  const Instruction *getPreviousMemoryAccessInst( const Instruction *I) {
41
41
  I = I->getPrevNode();
package/include/MTA/MHP.h CHANGED
@@ -63,7 +63,7 @@ public:
63
63
 
64
64
  // Get CallICFGNode
65
65
  inline CallICFGNode* getCBN(const Instruction* inst) {
66
- return tct->getCallBlockNode(inst);
66
+ return tct->getCallICFGNode(inst);
67
67
  }
68
68
 
69
69
  /// Whether the function is connected from main function in thread call graph
@@ -381,7 +381,7 @@ private:
381
381
  }
382
382
  // Get CallICFGNode
383
383
  inline CallICFGNode* getCBN(const Instruction* inst) {
384
- return tct->getCallBlockNode(inst);
384
+ return tct->getCallICFGNode(inst);
385
385
  }
386
386
  /// Mark thread flags for cxtStmt
387
387
  //@{
package/include/MTA/PCG.h CHANGED
@@ -123,8 +123,8 @@ public:
123
123
  {
124
124
  }
125
125
 
126
- CallICFGNode* getCallBlockNode(const Instruction* inst) {
127
- return pta->getICFG()->getCallBlockNode(inst);
126
+ CallICFGNode* getCallICFGNode(const Instruction* inst) {
127
+ return pta->getICFG()->getCallICFGNode(inst);
128
128
  }
129
129
  const SVFFunction* getSVFFun(const Function* fun) const {
130
130
  return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(fun);
package/include/MTA/TCT.h CHANGED
@@ -148,8 +148,8 @@ public:
148
148
  destroy();
149
149
  }
150
150
  /// Get CallICFGNode given inst
151
- CallICFGNode* getCallBlockNode(const Instruction* inst) {
152
- return pta->getICFG()->getCallBlockNode(inst);
151
+ CallICFGNode* getCallICFGNode(const Instruction* inst) {
152
+ return pta->getICFG()->getCallICFGNode(inst);
153
153
  }
154
154
  /// Get SVFFuntion given Function
155
155
  const SVFFunction* getSVFFun(const Function* fun) const {
@@ -493,14 +493,14 @@ private:
493
493
  /// Add function arguments
494
494
  inline void addFunArgs(const SVFFunction* fun, const SVFVar* arg)
495
495
  {
496
- FunEntryICFGNode* funEntryBlockNode = icfg->getFunEntryBlockNode(fun);
496
+ FunEntryICFGNode* funEntryBlockNode = icfg->getFunEntryICFGNode(fun);
497
497
  funEntryBlockNode->addFormalParms(arg);
498
498
  funArgsListMap[fun].push_back(arg);
499
499
  }
500
500
  /// Add function returns
501
501
  inline void addFunRet(const SVFFunction* fun, const SVFVar* ret)
502
502
  {
503
- FunExitICFGNode* funExitBlockNode = icfg->getFunExitBlockNode(fun);
503
+ FunExitICFGNode* funExitBlockNode = icfg->getFunExitICFGNode(fun);
504
504
  funExitBlockNode->addFormalRet(ret);
505
505
  funRetMap[fun] = ret;
506
506
  }
@@ -84,20 +84,20 @@ private:
84
84
  void addICFGInterEdges(const Instruction* cs, const SVFFunction* callee);
85
85
 
86
86
  /// Add a call node
87
- inline CallICFGNode* getOrAddCallICFGNode(const Instruction* cs)
87
+ inline CallICFGNode* getCallICFGNode(const Instruction* cs)
88
88
  {
89
- return icfg->getCallBlockNode(cs);
89
+ return icfg->getCallICFGNode(cs);
90
90
  }
91
91
  /// Add a return node
92
- inline RetICFGNode* getOrAddRetICFGNode(const Instruction* cs)
92
+ inline RetICFGNode* getRetICFGNode(const Instruction* cs)
93
93
  {
94
- return icfg->getRetBlockNode(cs);
94
+ return icfg->getRetICFGNode(cs);
95
95
  }
96
96
 
97
97
  /// Add and get IntraBlock ICFGNode
98
98
  IntraICFGNode* getOrAddIntraBlockICFGNode(const Instruction* inst)
99
99
  {
100
- return icfg->getIntraBlockNode(inst);
100
+ return icfg->getIntraICFGNode(inst);
101
101
  }
102
102
  };
103
103
 
@@ -348,7 +348,7 @@ public:
348
348
  {
349
349
  IntraICFGNode* node;
350
350
  if(const Instruction* inst = SVFUtil::dyn_cast<Instruction>(curVal))
351
- node = pag->getICFG()->getIntraBlockNode(inst);
351
+ node = pag->getICFG()->getIntraICFGNode(inst);
352
352
  else
353
353
  node = nullptr;
354
354
  StoreStmt *edge = pag->addStoreStmt(src, dst, node);
@@ -190,69 +190,69 @@ ICFG::ICFG(): totalICFGNode(0)
190
190
 
191
191
 
192
192
  /// Get a basic block ICFGNode
193
- ICFGNode* ICFG::getBlockICFGNode(const Instruction* inst)
193
+ ICFGNode* ICFG::getICFGNode(const Instruction* inst)
194
194
  {
195
195
  ICFGNode* node;
196
196
  if(SVFUtil::isNonInstricCallSite(inst))
197
- node = getCallBlockNode(inst);
197
+ node = getCallICFGNode(inst);
198
198
  else if(SVFUtil::isIntrinsicInst(inst))
199
- node = getIntraBlockNode(inst);
199
+ node = getIntraICFGNode(inst);
200
200
  // assert (false && "associating an intrinsic instruction with an ICFGNode!");
201
201
  else
202
- node = getIntraBlockNode(inst);
202
+ node = getIntraICFGNode(inst);
203
203
 
204
204
  assert (node!=nullptr && "no ICFGNode for this instruction?");
205
205
  return node;
206
206
  }
207
207
 
208
208
 
209
- CallICFGNode* ICFG::getCallBlockNode(const Instruction* inst)
209
+ CallICFGNode* ICFG::getCallICFGNode(const Instruction* inst)
210
210
  {
211
211
  if(SVFUtil::isCallSite(inst) ==false)
212
212
  outs() << *inst << "\n";
213
213
  assert(SVFUtil::isCallSite(inst) && "not a call instruction?");
214
214
  assert(SVFUtil::isNonInstricCallSite(inst) && "associating an intrinsic debug instruction with an ICFGNode!");
215
- CallICFGNode* node = getCallICFGNode(inst);
215
+ CallICFGNode* node = getCallBlock(inst);
216
216
  if(node==nullptr)
217
- node = addCallICFGNode(inst);
217
+ node = addCallBlock(inst);
218
218
  assert (node!=nullptr && "no CallICFGNode for this instruction?");
219
219
  return node;
220
220
  }
221
221
 
222
- RetICFGNode* ICFG::getRetBlockNode(const Instruction* inst)
222
+ RetICFGNode* ICFG::getRetICFGNode(const Instruction* inst)
223
223
  {
224
224
  assert(SVFUtil::isCallSite(inst) && "not a call instruction?");
225
225
  assert(SVFUtil::isNonInstricCallSite(inst) && "associating an intrinsic debug instruction with an ICFGNode!");
226
- RetICFGNode* node = getRetICFGNode(inst);
226
+ RetICFGNode* node = getRetBlock(inst);
227
227
  if(node==nullptr)
228
- node = addRetICFGNode(inst);
228
+ node = addRetBlock(inst);
229
229
  assert (node!=nullptr && "no RetICFGNode for this instruction?");
230
230
  return node;
231
231
  }
232
232
 
233
- IntraICFGNode* ICFG::getIntraBlockNode(const Instruction* inst)
233
+ IntraICFGNode* ICFG::getIntraICFGNode(const Instruction* inst)
234
234
  {
235
- IntraICFGNode* node = getIntraBlockICFGNode(inst);
235
+ IntraICFGNode* node = getIntraBlock(inst);
236
236
  if(node==nullptr)
237
- node = addIntraBlockICFGNode(inst);
237
+ node = addIntraBlock(inst);
238
238
  return node;
239
239
  }
240
240
 
241
241
  /// Add a function entry node
242
- FunEntryICFGNode* ICFG::getFunEntryBlockNode(const SVFFunction* fun)
242
+ FunEntryICFGNode* ICFG::getFunEntryICFGNode(const SVFFunction* fun)
243
243
  {
244
- FunEntryICFGNode* b = getFunEntryICFGNode(fun);
244
+ FunEntryICFGNode* b = getFunEntryBlock(fun);
245
245
  if (b == nullptr)
246
- return addFunEntryICFGNode(fun);
246
+ return addFunEntryBlock(fun);
247
247
  else
248
248
  return b;
249
249
  }
250
250
  /// Add a function exit node
251
- FunExitICFGNode* ICFG::getFunExitBlockNode(const SVFFunction* fun)
251
+ FunExitICFGNode* ICFG::getFunExitICFGNode(const SVFFunction* fun)
252
252
  {
253
- FunExitICFGNode* b = getFunExitICFGNode(fun);
253
+ FunExitICFGNode* b = getFunExitBlock(fun);
254
254
  if (b == nullptr)
255
- return addFunExitICFGNode(fun);
255
+ return addFunExitBlock(fun);
256
256
  else
257
257
  return b;
258
258
  }
@@ -436,10 +436,10 @@ void ICFG::updateCallGraph(PTACallGraph* callgraph)
436
436
  for (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
437
437
  {
438
438
  const SVFFunction* callee = *func_iter;
439
- CallICFGNode* callBlockNode = getCallBlockNode(cs);
440
- RetICFGNode* retBlockNode = getRetBlockNode(cs);
441
- FunEntryICFGNode* calleeEntryNode = getFunEntryICFGNode(callee);
442
- FunExitICFGNode* calleeExitNode = getFunExitICFGNode(callee);
439
+ CallICFGNode* callBlockNode = getCallICFGNode(cs);
440
+ RetICFGNode* retBlockNode = getRetICFGNode(cs);
441
+ FunEntryICFGNode* calleeEntryNode = getFunEntryBlock(callee);
442
+ FunExitICFGNode* calleeExitNode = getFunExitBlock(callee);
443
443
  addCallEdge(callBlockNode, calleeEntryNode, cs);
444
444
  addRetEdge(calleeExitNode, retBlockNode, cs);
445
445
 
@@ -242,7 +242,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
242
242
  {
243
243
  for(PHISet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
244
244
  MemSSA::PHI* phi = *pi;
245
- addIntraMSSAPHISVFGNode(pag->getICFG()->getBlockICFGNode(&(phi->getBasicBlock()->front())), phi->opVerBegin(), phi->opVerEnd(),phi->getResVer(), totalVFGNode++);
245
+ addIntraMSSAPHISVFGNode(pag->getICFG()->getICFGNode(&(phi->getBasicBlock()->front())), phi->opVerBegin(), phi->opVerEnd(),phi->getResVer(), totalVFGNode++);
246
246
  }
247
247
  }
248
248
  /// initialize memory SSA entry chi nodes
@@ -251,7 +251,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
251
251
  {
252
252
  for(CHISet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
253
253
  const MemSSA::ENTRYCHI* chi = SVFUtil::cast<ENTRYCHI>(*pi);
254
- addFormalINSVFGNode(pag->getICFG()->getFunEntryBlockNode(chi->getFunction()), chi->getResVer(), totalVFGNode++);
254
+ addFormalINSVFGNode(pag->getICFG()->getFunEntryICFGNode(chi->getFunction()), chi->getResVer(), totalVFGNode++);
255
255
  }
256
256
  }
257
257
  /// initialize memory SSA return mu nodes
@@ -260,7 +260,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
260
260
  {
261
261
  for(MUSet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
262
262
  const MemSSA::RETMU* mu = SVFUtil::cast<RETMU>(*pi);
263
- addFormalOUTSVFGNode(pag->getICFG()->getFunExitBlockNode(mu->getFunction()), mu->getMRVer(), totalVFGNode++);
263
+ addFormalOUTSVFGNode(pag->getICFG()->getFunExitICFGNode(mu->getFunction()), mu->getMRVer(), totalVFGNode++);
264
264
  }
265
265
  }
266
266
  /// initialize memory SSA callsite mu nodes
@@ -567,7 +567,7 @@ std::set<const SVFGNode*> SVFG::fromValue(const llvm::Value* value) const
567
567
  void SVFG::getInterVFEdgesForIndirectCallSite(const CallICFGNode* callBlockNode, const SVFFunction* callee, SVFGEdgeSetTy& edges)
568
568
  {
569
569
  CallSiteID csId = getCallSiteID(callBlockNode, callee);
570
- RetICFGNode* retBlockNode = pag->getICFG()->getRetBlockNode(callBlockNode->getCallSite());
570
+ RetICFGNode* retBlockNode = pag->getICFG()->getRetICFGNode(callBlockNode->getCallSite());
571
571
 
572
572
  // Find inter direct call edges between actual param and formal param.
573
573
  if (pag->hasCallSiteArgsMap(callBlockNode) && pag->hasFunArgsList(callee))
@@ -407,7 +407,7 @@ void VFG::addVFGNodes()
407
407
  if(isInterestedPAGNode(it->second) == false || hasDef(it->second))
408
408
  continue;
409
409
 
410
- addActualRetVFGNode(it->second,it->first->getCallBlockNode());
410
+ addActualRetVFGNode(it->second,it->first->getCallICFGNode());
411
411
  }
412
412
 
413
413
  // initialize formal parameter nodes
@@ -674,7 +674,7 @@ void VFG::connectDirectVFGEdges()
674
674
  {
675
675
  ActualRetVFGNode* callsiteRev = getActualRetVFGNode((*it)->getLHSVar());
676
676
  const CallICFGNode* retBlockNode = (*it)->getCallSite();
677
- CallICFGNode* callBlockNode = pag->getICFG()->getCallBlockNode(retBlockNode->getCallSite());
677
+ CallICFGNode* callBlockNode = pag->getICFG()->getCallICFGNode(retBlockNode->getCallSite());
678
678
  addInterEdgeFromFRToAR(calleeRet,callsiteRev, getCallSiteID(callBlockNode, calleeRet->getFun()));
679
679
  }
680
680
  }
@@ -813,7 +813,7 @@ void VFG::connectCallerAndCallee(const CallICFGNode* callBlockNode, const SVFFun
813
813
  SVFIR * pag = SVFIR::getPAG();
814
814
  ICFG * icfg = pag->getICFG();
815
815
  CallSiteID csId = getCallSiteID(callBlockNode, callee);
816
- RetICFGNode* retBlockNode = icfg->getRetBlockNode(callBlockNode->getCallSite());
816
+ RetICFGNode* retBlockNode = icfg->getRetICFGNode(callBlockNode->getCallSite());
817
817
  // connect actual and formal param
818
818
  if (pag->hasCallSiteArgsMap(callBlockNode) && pag->hasFunArgsList(callee))
819
819
  {
@@ -152,18 +152,18 @@ bool MRGenerator::hasSVFStmtList(const Instruction* inst)
152
152
  {
153
153
  SVFIR* pag = pta->getPAG();
154
154
  if (ptrOnlyMSSA)
155
- return pag->hasPTASVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
155
+ return pag->hasPTASVFStmtList(pag->getICFG()->getICFGNode(inst));
156
156
  else
157
- return pag->hasSVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
157
+ return pag->hasSVFStmtList(pag->getICFG()->getICFGNode(inst));
158
158
  }
159
159
 
160
160
  SVFIR::SVFStmtList& MRGenerator::getPAGEdgesFromInst(const Instruction* inst)
161
161
  {
162
162
  SVFIR* pag = pta->getPAG();
163
163
  if (ptrOnlyMSSA)
164
- return pag->getPTASVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
164
+ return pag->getPTASVFStmtList(pag->getICFG()->getICFGNode(inst));
165
165
  else
166
- return pag->getSVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
166
+ return pag->getSVFStmtList(pag->getICFG()->getICFGNode(inst));
167
167
  }
168
168
 
169
169
  /*!
@@ -259,7 +259,7 @@ void MRGenerator::collectModRefForCall()
259
259
 
260
260
  for (CallSite cs : SymbolTableInfo::SymbolInfo()->getCallSiteSet())
261
261
  {
262
- const CallICFGNode* callBlockNode = pta->getPAG()->getICFG()->getCallBlockNode(cs.getInstruction());
262
+ const CallICFGNode* callBlockNode = pta->getPAG()->getICFG()->getCallICFGNode(cs.getInstruction());
263
263
  if(hasRefSideEffectOfCallSite(callBlockNode))
264
264
  {
265
265
  NodeBS refs = getRefSideEffectOfCallSite(callBlockNode);
@@ -481,8 +481,8 @@ void MRGenerator::collectCallSitePts(const CallICFGNode* cs)
481
481
  /// collect the pts chain of the callsite arguments
482
482
  NodeBS& argsPts = csToCallSiteArgsPtsMap[cs];
483
483
  SVFIR* pag = pta->getPAG();
484
- CallICFGNode* callBlockNode = pag->getICFG()->getCallBlockNode(cs->getCallSite());
485
- RetICFGNode* retBlockNode = pag->getICFG()->getRetBlockNode(cs->getCallSite());
484
+ CallICFGNode* callBlockNode = pag->getICFG()->getCallICFGNode(cs->getCallSite());
485
+ RetICFGNode* retBlockNode = pag->getICFG()->getRetICFGNode(cs->getCallSite());
486
486
 
487
487
  WorkList worklist;
488
488
  if (pag->hasCallSiteArgsMap(callBlockNode))
@@ -174,7 +174,7 @@ void MemSSA::createMUCHI(const SVFFunction& fun)
174
174
  }
175
175
  if (isNonInstricCallSite(inst))
176
176
  {
177
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(inst);
177
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(inst);
178
178
  if(mrGen->hasRefMRSet(cs))
179
179
  AddCallSiteMU(cs,mrGen->getCallSiteRefMRSet(cs));
180
180
 
@@ -318,7 +318,7 @@ void MemSSA::SSARenameBB(const BasicBlock& bb)
318
318
  }
319
319
  if (isNonInstricCallSite(inst))
320
320
  {
321
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(inst);
321
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(inst);
322
322
  if(mrGen->hasRefMRSet(cs))
323
323
  RenameMuSet(getMUSet(cs));
324
324
 
@@ -634,7 +634,7 @@ void MemSSA::dumpMSSA(raw_ostream& Out)
634
634
  bool isAppCall = isNonInstricCallSite(&inst) && !isExtCall(&inst);
635
635
  if (isAppCall || isHeapAllocExtCall(&inst))
636
636
  {
637
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(&inst);
637
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(&inst);
638
638
  if(hasMU(cs))
639
639
  {
640
640
  if (!last_is_chi)
@@ -406,7 +406,7 @@ void LockAnalysis::handleFork(const CxtStmt& cts)
406
406
  {
407
407
  const CallInst* call = SVFUtil::cast<CallInst>(cts.getStmt());
408
408
  const CallStrCxt& curCxt = cts.getContext();
409
- CallICFGNode* cbn = tct->getCallBlockNode(call);
409
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
410
410
  if(getTCG()->hasThreadForkEdge(cbn))
411
411
  {
412
412
  for (ThreadCallGraph::ForkEdgeSet::const_iterator cgIt = getTCG()->getForkEdgeBegin(cbn),
@@ -429,7 +429,7 @@ void LockAnalysis::handleCall(const CxtStmt& cts)
429
429
 
430
430
  const CallInst* call = SVFUtil::cast<CallInst>(cts.getStmt());
431
431
  const CallStrCxt& curCxt = cts.getContext();
432
- CallICFGNode* cbn = tct->getCallBlockNode(call);
432
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
433
433
  if (getTCG()->hasCallGraphEdge(cbn))
434
434
  {
435
435
  for (PTACallGraph::CallGraphEdgeSet::const_iterator cgIt = getTCG()->getCallEdgeBegin(cbn), ecgIt = getTCG()->getCallEdgeEnd(cbn);
@@ -518,7 +518,7 @@ void LockAnalysis::pushCxt(CallStrCxt& cxt, const Instruction* call, const Funct
518
518
  const Function* caller = call->getParent()->getParent();
519
519
  const SVFFunction* svfcallee = tct->getSVFFun(callee);
520
520
  const SVFFunction* svfcaller = tct->getSVFFun(caller);
521
- CallICFGNode* cbn = tct->getCallBlockNode(call);
521
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
522
522
  CallSiteID csId = getTCG()->getCallSiteID(cbn, svfcallee);
523
523
 
524
524
  // /// handle calling context for candidate functions only
@@ -537,7 +537,7 @@ bool LockAnalysis::matchCxt(CallStrCxt& cxt, const Instruction* call, const Func
537
537
  const Function* caller = call->getParent()->getParent();
538
538
  const SVFFunction* svfcallee = tct->getSVFFun(callee);
539
539
  const SVFFunction* svfcaller = tct->getSVFFun(caller);
540
- CallICFGNode* cbn = tct->getCallBlockNode(call);
540
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
541
541
  CallSiteID csId = getTCG()->getCallSiteID(cbn, svfcallee);
542
542
 
543
543
  // /// handle calling context for candidate functions only
@@ -96,7 +96,7 @@ CallStrCxt MTAResultValidator::getCxtArg(const Instruction* inst, unsigned int a
96
96
  const SVFFunction* callee = SVFUtil::getFunction(y[1]);
97
97
  CallSite cs = SVFUtil::getLLVMCallSite(csnumToInstMap[atoi(y[0].c_str())]);
98
98
  assert(callee && "callee error");
99
- CallICFGNode* cbn = mhp->getTCT()->getCallBlockNode(cs.getInstruction());
99
+ CallICFGNode* cbn = mhp->getTCT()->getCallICFGNode(cs.getInstruction());
100
100
  CallSiteID csId = tcg->getCallSiteID(cbn, callee);
101
101
  cxt.push_back(csId);
102
102
  }
package/lib/MTA/PCG.cpp CHANGED
@@ -206,7 +206,7 @@ void PCG::identifyFollowers()
206
206
  // if this is an call/invoke instruction but not a spawn site
207
207
  if ((SVFUtil::isa<CallInst>(inst) || SVFUtil::isa<InvokeInst>(inst)) && !isSpawnsite(inst))
208
208
  {
209
- CallICFGNode* cbn = getCallBlockNode(inst);
209
+ CallICFGNode* cbn = getCallICFGNode(inst);
210
210
  if (callgraph->hasCallGraphEdge(cbn))
211
211
  {
212
212
  for (PTACallGraph::CallGraphEdgeSet::const_iterator cgIt = callgraph->getCallEdgeBegin(cbn),