svf-tools 1.0.975 → 1.0.976

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 (49) hide show
  1. package/package.json +1 -1
  2. package/svf/include/AE/Svfexe/AbstractInterpretation.h +1 -1
  3. package/svf/include/DDA/ContextDDA.h +2 -2
  4. package/svf/include/DDA/DDAVFSolver.h +5 -5
  5. package/svf/include/DDA/FlowDDA.h +1 -1
  6. package/svf/include/Graphs/{PTACallGraph.h → CallGraph.h} +41 -41
  7. package/svf/include/Graphs/ICFG.h +2 -2
  8. package/svf/include/Graphs/ThreadCallGraph.h +24 -24
  9. package/svf/include/Graphs/VFG.h +4 -4
  10. package/svf/include/MSSA/MemRegion.h +4 -4
  11. package/svf/include/MTA/LockAnalysis.h +1 -1
  12. package/svf/include/MTA/MHP.h +2 -2
  13. package/svf/include/MTA/PCG.h +3 -3
  14. package/svf/include/MTA/TCT.h +7 -7
  15. package/svf/include/MemoryModel/PointerAnalysis.h +13 -13
  16. package/svf/include/SABER/SaberSVFGBuilder.h +1 -1
  17. package/svf/include/SABER/SrcSnkDDA.h +7 -7
  18. package/svf/include/Util/CallGraphBuilder.h +5 -5
  19. package/svf/lib/AE/Svfexe/AbstractInterpretation.cpp +1 -1
  20. package/svf/lib/CFL/CFLSVFGBuilder.cpp +1 -1
  21. package/svf/lib/DDA/ContextDDA.cpp +9 -9
  22. package/svf/lib/DDA/DDAClient.cpp +3 -3
  23. package/svf/lib/DDA/DDAPass.cpp +4 -4
  24. package/svf/lib/DDA/FlowDDA.cpp +2 -2
  25. package/svf/lib/Graphs/{PTACallGraph.cpp → CallGraph.cpp} +66 -66
  26. package/svf/lib/Graphs/ICFG.cpp +6 -6
  27. package/svf/lib/Graphs/SVFG.cpp +7 -7
  28. package/svf/lib/Graphs/SVFGReadWrite.cpp +6 -6
  29. package/svf/lib/Graphs/SVFGStat.cpp +1 -1
  30. package/svf/lib/Graphs/ThreadCallGraph.cpp +17 -17
  31. package/svf/lib/Graphs/VFG.cpp +1 -1
  32. package/svf/lib/MSSA/MemRegion.cpp +7 -7
  33. package/svf/lib/MTA/LockAnalysis.cpp +18 -18
  34. package/svf/lib/MTA/MHP.cpp +19 -19
  35. package/svf/lib/MTA/MTA.cpp +1 -1
  36. package/svf/lib/MTA/PCG.cpp +12 -12
  37. package/svf/lib/MTA/TCT.cpp +23 -23
  38. package/svf/lib/MemoryModel/PointerAnalysis.cpp +12 -12
  39. package/svf/lib/SABER/LeakChecker.cpp +4 -4
  40. package/svf/lib/SABER/SaberSVFGBuilder.cpp +4 -4
  41. package/svf/lib/SABER/SrcSnkDDA.cpp +1 -1
  42. package/svf/lib/Util/CallGraphBuilder.cpp +2 -2
  43. package/svf/lib/Util/PTAStat.cpp +7 -7
  44. package/svf/lib/WPA/VersionedFlowSensitive.cpp +2 -2
  45. package/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -1
  46. package/svf-llvm/lib/SVFIRBuilder.cpp +5 -5
  47. package/svf-llvm/tools/AE/ae.cpp +1 -1
  48. package/svf-llvm/tools/Example/svf-ex.cpp +1 -1
  49. package/svf-llvm/tools/MTA/LockResultValidator.cpp +2 -2
@@ -28,7 +28,7 @@
28
28
  */
29
29
 
30
30
  #include <iomanip>
31
- #include "Graphs/PTACallGraph.h"
31
+ #include "Graphs/CallGraph.h"
32
32
  #include "Util/PTAStat.h"
33
33
  #include "MemoryModel/PointerAnalysisImpl.h"
34
34
  #include "SVFIR/SVFIR.h"
@@ -81,7 +81,7 @@ void PTAStat::performStat()
81
81
  void PTAStat::callgraphStat()
82
82
  {
83
83
 
84
- PTACallGraph* graph = pta->getPTACallGraph();
84
+ CallGraph* graph = pta->getCallGraph();
85
85
  PointerAnalysis::CallGraphSCC* callgraphSCC = new PointerAnalysis::CallGraphSCC(graph);
86
86
  callgraphSCC->find();
87
87
 
@@ -93,8 +93,8 @@ void PTAStat::callgraphStat()
93
93
  unsigned edgeInCycle = 0;
94
94
 
95
95
  NodeSet sccRepNodeSet;
96
- PTACallGraph::iterator it = graph->begin();
97
- PTACallGraph::iterator eit = graph->end();
96
+ CallGraph::iterator it = graph->begin();
97
+ CallGraph::iterator eit = graph->end();
98
98
  for (; it != eit; ++it)
99
99
  {
100
100
  totalNode++;
@@ -107,11 +107,11 @@ void PTAStat::callgraphStat()
107
107
  maxNodeInCycle = subNodes.count();
108
108
  }
109
109
 
110
- PTACallGraphNode::const_iterator edgeIt = it->second->InEdgeBegin();
111
- PTACallGraphNode::const_iterator edgeEit = it->second->InEdgeEnd();
110
+ CallGraphNode::const_iterator edgeIt = it->second->InEdgeBegin();
111
+ CallGraphNode::const_iterator edgeEit = it->second->InEdgeEnd();
112
112
  for (; edgeIt != edgeEit; ++edgeIt)
113
113
  {
114
- PTACallGraphEdge *edge = *edgeIt;
114
+ CallGraphEdge *edge = *edgeIt;
115
115
  totalEdge+= edge->getDirectCalls().size() + edge->getIndirectCalls().size();
116
116
  if(callgraphSCC->repNode(edge->getSrcID()) == callgraphSCC->repNode(edge->getDstID()))
117
117
  {
@@ -483,9 +483,9 @@ void VersionedFlowSensitive::buildDeltaMaps(void)
483
483
  bool isDelta = false;
484
484
  if (const SVFFunction *fn = svfg->isFunEntrySVFGNode(s))
485
485
  {
486
- PTACallGraphEdge::CallInstSet callsites;
486
+ CallGraphEdge::CallInstSet callsites;
487
487
  /// use pre-analysis call graph to approximate all potential callsites
488
- ander->getPTACallGraph()->getIndCallSitesInvokingCallee(fn, callsites);
488
+ ander->getCallGraph()->getIndCallSitesInvokingCallee(fn, callsites);
489
489
  isDelta = !callsites.empty();
490
490
 
491
491
  if (isDelta)
@@ -201,7 +201,7 @@ public:
201
201
  //}@
202
202
 
203
203
  /// connect PAG edges based on callgraph
204
- void updateCallGraph(PTACallGraph* callgraph);
204
+ void updateCallGraph(CallGraph* callgraph);
205
205
 
206
206
  protected:
207
207
  /// Handle globals including (global variable and functions)
@@ -1146,17 +1146,17 @@ void SVFIRBuilder::handleIndCall(CallBase* cs)
1146
1146
  pag->addIndirectCallsites(cbn,pag->getValueNode(svfcalledval));
1147
1147
  }
1148
1148
 
1149
- void SVFIRBuilder::updateCallGraph(PTACallGraph* callgraph)
1149
+ void SVFIRBuilder::updateCallGraph(CallGraph* callgraph)
1150
1150
  {
1151
- PTACallGraph::CallEdgeMap::const_iterator iter = callgraph->getIndCallMap().begin();
1152
- PTACallGraph::CallEdgeMap::const_iterator eiter = callgraph->getIndCallMap().end();
1151
+ CallGraph::CallEdgeMap::const_iterator iter = callgraph->getIndCallMap().begin();
1152
+ CallGraph::CallEdgeMap::const_iterator eiter = callgraph->getIndCallMap().end();
1153
1153
  for (; iter != eiter; iter++)
1154
1154
  {
1155
1155
  const CallICFGNode* callBlock = iter->first;
1156
1156
  const CallBase* callbase = SVFUtil::cast<CallBase>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(callBlock->getCallSite()));
1157
1157
  assert(callBlock->isIndirectCall() && "this is not an indirect call?");
1158
- const PTACallGraph::FunctionSet& functions = iter->second;
1159
- for (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
1158
+ const CallGraph::FunctionSet& functions = iter->second;
1159
+ for (CallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
1160
1160
  {
1161
1161
  const Function* callee = SVFUtil::cast<Function>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(*func_iter));
1162
1162
 
@@ -880,7 +880,7 @@ int main(int argc, char** argv)
880
880
  SVFIRBuilder builder(svfModule);
881
881
  SVFIR* pag = builder.build();
882
882
  AndersenWaveDiff* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
883
- PTACallGraph* callgraph = ander->getPTACallGraph();
883
+ CallGraph* callgraph = ander->getCallGraph();
884
884
  builder.updateCallGraph(callgraph);
885
885
  pag->getICFG()->updateCallGraph(callgraph);
886
886
  if (Options::ICFGMergeAdjacentNodes())
@@ -168,7 +168,7 @@ int main(int argc, char ** argv)
168
168
 
169
169
 
170
170
  /// Call Graph
171
- PTACallGraph* callgraph = ander->getPTACallGraph();
171
+ CallGraph* callgraph = ander->getCallGraph();
172
172
 
173
173
  /// ICFG
174
174
  ICFG* icfg = pag->getICFG();
@@ -224,11 +224,11 @@ const Instruction* LockResultValidator::getPreviousMemoryAccessInst( const Instr
224
224
 
225
225
  if(LLVMUtil::isCallSite(I))
226
226
  {
227
- PTACallGraph::FunctionSet callees;
227
+ CallGraph::FunctionSet callees;
228
228
  const SVFInstruction* svfInst = LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(I);
229
229
  _la->getTCT()->getThreadCallGraph()->getCallees(getCBN(svfInst), callees);
230
230
 
231
- for(PTACallGraph::FunctionSet::const_iterator cit = callees.begin(),
231
+ for(CallGraph::FunctionSet::const_iterator cit = callees.begin(),
232
232
  ecit = callees.end(); cit!=ecit; cit++)
233
233
  {
234
234
  if(*cit != nullptr)