svf-tools 1.0.336 → 1.0.337
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.
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Andersen_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +4 -4
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +3 -3
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +5 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/ICFG_8h_source.html +38 -37
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +4 -4
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +21 -24
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +42 -43
- package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp.html +1 -0
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +40 -40
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +6 -6
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +22 -21
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +47 -47
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +4 -4
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/VFG_8h_source.html +8 -8
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +187 -188
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +7 -10
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase-members.html +160 -161
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +2 -5
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD-members.html +199 -200
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD-members.html +202 -203
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD-members.html +195 -196
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +196 -197
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +205 -206
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +193 -194
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl-members.html +116 -117
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +9 -12
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +19 -19
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl-members.html +104 -105
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +5 -8
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA-members.html +182 -183
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +11 -14
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA-members.html +219 -220
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA-members.html +180 -181
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +9 -12
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive-members.html +212 -213
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +17 -20
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC-members.html +244 -245
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +5 -8
- package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +27 -26
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +183 -116
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +10 -5
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +26 -25
- package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt-members.html +37 -36
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +27 -3
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis-members.html +78 -79
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +104 -144
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +122 -115
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard-members.html +171 -172
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis-members.html +161 -162
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +3 -6
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +25 -25
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive-members.html +254 -255
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +2 -5
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +1 -1
- package/SVF-doxygen/html/html/functions_d.html +0 -3
- package/SVF-doxygen/html/html/functions_func_d.html +0 -3
- package/SVF-doxygen/html/html/functions_func_i.html +13 -10
- package/SVF-doxygen/html/html/functions_i.html +10 -6
- package/SVF-doxygen/html/html/functions_l.html +6 -6
- package/SVF-doxygen/html/html/functions_n.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +9 -9
- package/SVF-doxygen/html/html/functions_r.html +1 -1
- package/SVF-doxygen/html/html/functions_rela.html +3 -0
- package/SVF-doxygen/html/html/functions_s.html +14 -12
- package/SVF-doxygen/html/html/functions_t.html +7 -5
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/search/all_10.js +7 -7
- package/SVF-doxygen/html/html/search/all_12.js +1 -1
- package/SVF-doxygen/html/html/search/all_13.js +10 -10
- package/SVF-doxygen/html/html/search/all_14.js +3 -3
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_4.js +0 -1
- package/SVF-doxygen/html/html/search/all_9.js +2 -1
- package/SVF-doxygen/html/html/search/all_c.js +3 -3
- package/SVF-doxygen/html/html/search/all_d.js +3 -3
- package/SVF-doxygen/html/html/search/all_e.js +2 -2
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_3.js +0 -1
- package/SVF-doxygen/html/html/search/functions_8.js +1 -0
- package/SVF-doxygen/html/html/search/functions_e.js +1 -1
- package/SVF-doxygen/html/html/search/related_4.js +1 -0
- package/SVF-doxygen/html/html/search/variables_14.js +1 -1
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1ICFGNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1ICFGNode_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1ICFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/include/Graphs/ICFG.h +5 -3
- package/include/MemoryModel/PointerAnalysis.h +0 -3
- package/include/MemoryModel/SVFStatements.h +5 -0
- package/lib/Graphs/ICFG.cpp +2 -2
- package/lib/MemoryModel/PointerAnalysis.cpp +1 -21
- package/lib/MemoryModel/SVFStatements.cpp +10 -1
- package/lib/SVF-FE/ICFGBuilder.cpp +17 -2
- package/lib/SVF-FE/SVFIRBuilder.cpp +13 -0
- package/package.json +1 -1
|
@@ -400,7 +400,7 @@ template<class EdgeIter > </div>
|
|
|
400
400
|
<p>Return the label of an ICFG node. </p>
|
|
401
401
|
|
|
402
402
|
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00467">467</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
403
|
-
<div class="fragment"><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  {</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  std::string str;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  rawstr << <span class="stringliteral">"NodeID: "</span> << node->getId() << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1IntraBlockNode.html">IntraBlockNode</a>* bNode = SVFUtil::dyn_cast<IntraBlockNode>(node))</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  rawstr << <span class="stringliteral">"IntraBlockNode ID: "</span> << bNode->getId() << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->
|
|
403
|
+
<div class="fragment"><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  {</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  std::string str;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  rawstr << <span class="stringliteral">"NodeID: "</span> << node->getId() << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1IntraBlockNode.html">IntraBlockNode</a>* bNode = SVFUtil::dyn_cast<IntraBlockNode>(node))</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  rawstr << <span class="stringliteral">"IntraBlockNode ID: "</span> << bNode->getId() << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(bNode);</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keywordflow">if</span> (edges.empty()) {</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  rawstr << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">value2String</a>(bNode->getInst()) << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  {</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  }</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  }</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  rawstr << <span class="stringliteral">" {fun: "</span> << bNode->getFun()->getName() << <span class="stringliteral">"}"</span>;</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  }</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1FunEntryBlockNode.html">FunEntryBlockNode</a>* <a class="code" href="cuddInt_8c.html#a936a27e51e66afb57c2b3a12d78a238e">entry</a> = SVFUtil::dyn_cast<FunEntryBlockNode>(node))</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  {</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  rawstr << <a class="code" href="cuddInt_8c.html#a936a27e51e66afb57c2b3a12d78a238e">entry</a>->toString();</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  }</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a> = SVFUtil::dyn_cast<FunExitBlockNode>(node))</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  {</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  rawstr << <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a>->toString();</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  }</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* call = SVFUtil::dyn_cast<CallBlockNode>(node))</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  {</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  rawstr << call->toString();</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  }</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1RetBlockNode.html">RetBlockNode</a>* ret = SVFUtil::dyn_cast<RetBlockNode>(node))</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  {</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  rawstr << ret->toString();</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  }</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1GlobalBlockNode.html">GlobalBlockNode</a>* glob = SVFUtil::dyn_cast<GlobalBlockNode>(node) )</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  {</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(glob);</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  {</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  }</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  }</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"what else kinds of nodes do we have??"</span>);</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span> </div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div><div class="ttc" id="util_8h_html_a43b6ea6be735bb828bc062c70cadeff8"><div class="ttname"><a href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a></div><div class="ttdeci">VOID_OR_INT exit()</div></div>
|
|
404
404
|
<div class="ttc" id="classSVF_1_1SVFIR_html_a6bc360d2604ae4a0af74530b263b10d9"><div class="ttname"><a href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVF::SVFIR::SVFStmtList</a></div><div class="ttdeci">std::vector< const SVFStmt * > SVFStmtList</div><div class="ttdef"><b>Definition:</b> <a href="SVFIR_8h_source.html#l00056">SVFIR.h:56</a></div></div>
|
|
405
405
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
406
406
|
<div class="ttc" id="classSVF_1_1GlobalBlockNode_html"><div class="ttname"><a href="classSVF_1_1GlobalBlockNode.html">SVF::GlobalBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00142">ICFGNode.h:142</a></div></div>
|
|
@@ -85,7 +85,7 @@ struct llvm::GraphTraits< Inverse< SVF::ICFGNode * > ></h3>
|
|
|
85
85
|
|
|
86
86
|
<p>Inverse GraphTraits specializations for call graph node, it is used for inverse traversal. </p>
|
|
87
87
|
|
|
88
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#
|
|
88
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#l00284">284</a> of file <a class="el" href="ICFG_8h_source.html">ICFG.h</a>.</p>
|
|
89
89
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
90
90
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="ICFG_8h_source.html">ICFG.h</a></li>
|
|
91
91
|
</ul>
|
|
@@ -81,7 +81,7 @@ Inheritance diagram for llvm::GraphTraits< SVF::ICFGNode * >:</div>
|
|
|
81
81
|
struct llvm::GraphTraits< SVF::ICFGNode * ></h3>
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#
|
|
84
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#l00278">278</a> of file <a class="el" href="ICFG_8h_source.html">ICFG.h</a>.</p>
|
|
85
85
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
86
86
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="ICFG_8h_source.html">ICFG.h</a></li>
|
|
87
87
|
</ul>
|
|
@@ -90,7 +90,7 @@ Public Types</h2></td></tr>
|
|
|
90
90
|
struct llvm::GraphTraits< SVF::ICFG * ></h3>
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#
|
|
93
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#l00288">288</a> of file <a class="el" href="ICFG_8h_source.html">ICFG.h</a>.</p>
|
|
94
94
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
95
95
|
<a id="a56fc8804dac855c62d6d7d3842b6fff4"></a>
|
|
96
96
|
<h2 class="memtitle"><span class="permalink"><a href="#a56fc8804dac855c62d6d7d3842b6fff4">◆ </a></span>NodeRef</h2>
|
|
@@ -104,7 +104,7 @@ struct llvm::GraphTraits< SVF::ICFG * ></h3>
|
|
|
104
104
|
</table>
|
|
105
105
|
</div><div class="memdoc">
|
|
106
106
|
|
|
107
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#
|
|
107
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8h_source.html#l00290">290</a> of file <a class="el" href="ICFG_8h_source.html">ICFG.h</a>.</p>
|
|
108
108
|
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
@@ -210,7 +210,7 @@ Functions</h2></td></tr>
|
|
|
210
210
|
|
|
211
211
|
<p class="definition">Definition at line <a class="el" href="svf-ex_8cpp_source.html#l00145">145</a> of file <a class="el" href="svf-ex_8cpp_source.html">svf-ex.cpp</a>.</p>
|
|
212
212
|
<div class="fragment"><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#a62ca9a79ce7b6960e3fc42d8b183bd50">SVFUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</span>)</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1SVFIRBuilder.html">SVFIRBuilder</a> builder;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classSVF_1_1SVFIR.html">SVFIR</a>* pag = builder.<a class="code" href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">build</a>(svfModule);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classSVF_1_1Andersen.html">Andersen</a>* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classSVF_1_1PTACallGraph.html">PTACallGraph</a>* callgraph = ander-><a class="code" href="classSVF_1_1PointerAnalysis.html#a7c9b7e5fe37ae31ba84d167945ca57df">getPTACallGraph</a>();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="classSVF_1_1ICFG.html">ICFG</a>* icfg = pag-><a class="code" href="classSVF_1_1SVFIR.html#aa1943d53e75aef9b014953143c6894da">getICFG</a>();</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="code" href="classSVF_1_1VFG.html">VFG</a>* vfg = <span class="keyword">new</span> <a class="code" href="classSVF_1_1VFG.html">VFG</a>(callgraph);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="classSVF_1_1SVFGBuilder.html">SVFGBuilder</a> svfBuilder(<span class="keyword">true</span>);</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classSVF_1_1SVFG.html">SVFG</a>* svfg = svfBuilder.buildFullSVFGWithoutOPT(ander);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="comment">// clean up memory</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keyword">delete</span> vfg;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keyword">delete</span> svfg;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  AndersenWaveDiff::releaseAndersenWaveDiff();</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  SVFIR::releaseSVFIR();</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  LLVMModuleSet::getLLVMModuleSet()->dumpModulesToFile(<span class="stringliteral">".svf.bc"</span>);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="classSVF_1_1LLVMModuleSet.html#a2f8e91c075d90be66412a079fe73e936">SVF::LLVMModuleSet::releaseLLVMModuleSet</a>();</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  llvm::llvm_shutdown();</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> }</div><div class="ttc" id="classSVF_1_1VFG_html"><div class="ttname"><a href="classSVF_1_1VFG.html">SVF::VFG</a></div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00050">VFG.h:50</a></div></div>
|
|
213
|
-
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#
|
|
213
|
+
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#l00047">SVFIRBuilder.cpp:47</a></div></div>
|
|
214
214
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a62ca9a79ce7b6960e3fc42d8b183bd50"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a62ca9a79ce7b6960e3fc42d8b183bd50">SVF::SVFUtil::processArguments</a></div><div class="ttdeci">void processArguments(int argc, char **argv, int &arg_num, char **arg_value, std::vector< std::string > &moduleNameVec)</div><div class="ttdoc">Parse argument for multi-module analysis. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00369">LLVMUtil.cpp:369</a></div></div>
|
|
215
215
|
<div class="ttc" id="classSVF_1_1SVFModule_html"><div class="ttname"><a href="classSVF_1_1SVFModule.html">SVF::SVFModule</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00041">SVFModule.h:41</a></div></div>
|
|
216
216
|
<div class="ttc" id="classSVF_1_1PointerAnalysis_html_a7c9b7e5fe37ae31ba84d167945ca57df"><div class="ttname"><a href="classSVF_1_1PointerAnalysis.html#a7c9b7e5fe37ae31ba84d167945ca57df">SVF::PointerAnalysis::getPTACallGraph</a></div><div class="ttdeci">PTACallGraph * getPTACallGraph() const</div><div class="ttdoc">Return call graph. </div><div class="ttdef"><b>Definition:</b> <a href="PointerAnalysis_8h_source.html#l00178">PointerAnalysis.h:178</a></div></div>
|
|
@@ -72,7 +72,7 @@ $(function() {
|
|
|
72
72
|
<div class="ttc" id="classSVF_1_1SVFGBuilder_html_a7a43ae081645eb74fa48c136548f0809"><div class="ttname"><a href="classSVF_1_1SVFGBuilder.html#a7a43ae081645eb74fa48c136548f0809">SVF::SVFGBuilder::buildFullSVFGWithoutOPT</a></div><div class="ttdeci">SVFG * buildFullSVFGWithoutOPT(BVDataPTAImpl *pta)</div><div class="ttdef"><b>Definition:</b> <a href="SVFGBuilder_8cpp_source.html#l00059">SVFGBuilder.cpp:59</a></div></div>
|
|
73
73
|
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CHG_8h_source.html#l00328">CHG.h:328</a></div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1PointerAnalysis_html_a4dfb43679e9fa794ebad99b6584c32ec"><div class="ttname"><a href="classSVF_1_1PointerAnalysis.html#a4dfb43679e9fa794ebad99b6584c32ec">SVF::PointerAnalysis::getPts</a></div><div class="ttdeci">virtual const PointsTo & getPts(NodeID ptr)=0</div><div class="ttdoc">Get points-to targets of a pointer. It needs to be implemented in child class. </div></div>
|
|
75
|
-
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#
|
|
75
|
+
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#l00047">SVFIRBuilder.cpp:47</a></div></div>
|
|
76
76
|
<div class="ttc" id="namespaceSVF_html_a43a65e0d33af3c743294f7a1139d2301"><div class="ttname"><a href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">SVF::NodeID</a></div><div class="ttdeci">unsigned NodeID</div><div class="ttdef"><b>Definition:</b> <a href="MTAResultValidator_8h_source.html#l00018">MTAResultValidator.h:18</a></div></div>
|
|
77
77
|
<div class="ttc" id="svf-ex_8cpp_html_a2d332c504284f0bc181289ee67479845"><div class="ttname"><a href="svf-ex_8cpp.html#a2d332c504284f0bc181289ee67479845">InputFilename</a></div><div class="ttdeci">static llvm::cl::opt< std::string > InputFilename(cl::Positional, llvm::cl::desc("<input bitcode>"), llvm::cl::init("-"))</div></div>
|
|
78
78
|
<div class="ttc" id="classSVF_1_1GenericNode_html_aa4f103330118c8976bf95e4bf53416eb"><div class="ttname"><a href="classSVF_1_1GenericNode.html#aa4f103330118c8976bf95e4bf53416eb">SVF::GenericNode::OutEdgeBegin</a></div><div class="ttdeci">iterator OutEdgeBegin()</div><div class="ttdoc">iterators </div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00202">GenericGraph.h:202</a></div></div>
|
package/include/Graphs/ICFG.h
CHANGED
|
@@ -46,6 +46,8 @@ typedef GenericGraph<ICFGNode,ICFGEdge> GenericICFGTy;
|
|
|
46
46
|
class ICFG : public GenericICFGTy
|
|
47
47
|
{
|
|
48
48
|
|
|
49
|
+
friend class ICFGBuilder;
|
|
50
|
+
|
|
49
51
|
public:
|
|
50
52
|
|
|
51
53
|
typedef Map<NodeID, ICFGNode *> ICFGNodeIDToNodeMapTy;
|
|
@@ -109,7 +111,7 @@ public:
|
|
|
109
111
|
/// update ICFG for indirect calls
|
|
110
112
|
void updateCallGraph(PTACallGraph* callgraph);
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
protected:
|
|
113
115
|
/// Remove a SVFG edge
|
|
114
116
|
inline void removeICFGEdge(ICFGEdge* edge)
|
|
115
117
|
{
|
|
@@ -157,6 +159,7 @@ public:
|
|
|
157
159
|
addGNode(node->getId(),node);
|
|
158
160
|
}
|
|
159
161
|
|
|
162
|
+
public:
|
|
160
163
|
/// Get a basic block ICFGNode
|
|
161
164
|
/// TODO:: need to fix the assertions
|
|
162
165
|
//@{
|
|
@@ -172,11 +175,10 @@ public:
|
|
|
172
175
|
|
|
173
176
|
FunExitBlockNode* getFunExitBlockNode(const SVFFunction* fun);
|
|
174
177
|
|
|
175
|
-
GlobalBlockNode* getGlobalBlockNode() const
|
|
178
|
+
inline GlobalBlockNode* getGlobalBlockNode() const
|
|
176
179
|
{
|
|
177
180
|
return globalBlockNode;
|
|
178
181
|
}
|
|
179
|
-
|
|
180
182
|
//@}
|
|
181
183
|
|
|
182
184
|
private:
|
|
@@ -293,9 +293,6 @@ protected:
|
|
|
293
293
|
virtual void validateExpectedFailureTests(std::string fun);
|
|
294
294
|
//@}
|
|
295
295
|
|
|
296
|
-
/// Whether to dump the graph for debugging purpose
|
|
297
|
-
bool dumpGraph();
|
|
298
|
-
|
|
299
296
|
/// Reset all object node as field-sensitive.
|
|
300
297
|
void resetObjFieldSensitive();
|
|
301
298
|
|
|
@@ -753,6 +753,11 @@ public:
|
|
|
753
753
|
void addOpVar(SVFVar* op){
|
|
754
754
|
opVars.push_back(op);
|
|
755
755
|
}
|
|
756
|
+
|
|
757
|
+
/// Return true if this is a phi at the function exit
|
|
758
|
+
/// to receive one or multiple return values of this function
|
|
759
|
+
bool isFunctionRetPhi() const;
|
|
760
|
+
|
|
756
761
|
virtual const std::string toString() const override;
|
|
757
762
|
};
|
|
758
763
|
|
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -472,7 +472,7 @@ struct DOTGraphTraits<ICFG*> : public DOTGraphTraits<SVFIR*>
|
|
|
472
472
|
if (IntraBlockNode* bNode = SVFUtil::dyn_cast<IntraBlockNode>(node))
|
|
473
473
|
{
|
|
474
474
|
rawstr << "IntraBlockNode ID: " << bNode->getId() << " \t";
|
|
475
|
-
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->
|
|
475
|
+
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->getSVFStmtList(bNode);
|
|
476
476
|
if (edges.empty()) {
|
|
477
477
|
rawstr << value2String(bNode->getInst()) << " \t";
|
|
478
478
|
} else {
|
|
@@ -502,7 +502,7 @@ struct DOTGraphTraits<ICFG*> : public DOTGraphTraits<SVFIR*>
|
|
|
502
502
|
}
|
|
503
503
|
else if (GlobalBlockNode* glob = SVFUtil::dyn_cast<GlobalBlockNode>(node) )
|
|
504
504
|
{
|
|
505
|
-
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->
|
|
505
|
+
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->getSVFStmtList(glob);
|
|
506
506
|
for (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)
|
|
507
507
|
{
|
|
508
508
|
const PAGEdge* edge = *it;
|
|
@@ -129,18 +129,6 @@ void PointerAnalysis::initialize()
|
|
|
129
129
|
|
|
130
130
|
svfMod = pag->getModule();
|
|
131
131
|
|
|
132
|
-
// dump SVFIR
|
|
133
|
-
if (dumpGraph())
|
|
134
|
-
pag->dump("pag_initial");
|
|
135
|
-
|
|
136
|
-
// dump ICFG
|
|
137
|
-
if (Options::DumpICFG)
|
|
138
|
-
pag->getICFG()->dump("icfg_initial");
|
|
139
|
-
|
|
140
|
-
// print to command line of the SVFIR graph
|
|
141
|
-
if (Options::PAGPrint)
|
|
142
|
-
pag->print();
|
|
143
|
-
|
|
144
132
|
/// initialise pta call graph for every pointer analysis instance
|
|
145
133
|
if(Options::EnableThreadCallGraph)
|
|
146
134
|
{
|
|
@@ -192,14 +180,6 @@ void PointerAnalysis::resetObjFieldSensitive()
|
|
|
192
180
|
}
|
|
193
181
|
}
|
|
194
182
|
|
|
195
|
-
/*!
|
|
196
|
-
* Flag in order to dump graph
|
|
197
|
-
*/
|
|
198
|
-
bool PointerAnalysis::dumpGraph()
|
|
199
|
-
{
|
|
200
|
-
return Options::PAGDotGraph;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
183
|
/*
|
|
204
184
|
* Dump statistics
|
|
205
185
|
*/
|
|
@@ -225,7 +205,7 @@ void PointerAnalysis::finalize()
|
|
|
225
205
|
|
|
226
206
|
SVFIR* pag = SVFIR::getPAG();
|
|
227
207
|
// dump SVFIR
|
|
228
|
-
if (
|
|
208
|
+
if (Options::PAGDotGraph)
|
|
229
209
|
pag->dump("pag_final");
|
|
230
210
|
|
|
231
211
|
// dump ICFG
|
|
@@ -90,7 +90,10 @@ const std::string CopyStmt::toString() const{
|
|
|
90
90
|
const std::string PhiStmt::toString() const{
|
|
91
91
|
std::string str;
|
|
92
92
|
raw_string_ostream rawstr(str);
|
|
93
|
-
rawstr << "PhiStmt: [" << getResID() << "<--("
|
|
93
|
+
rawstr << "PhiStmt: [" << getResID() << "<--(";
|
|
94
|
+
for(const SVFVar* op : getOpndVars())
|
|
95
|
+
rawstr << op->getId() << ",";
|
|
96
|
+
rawstr << ")]\t";
|
|
94
97
|
if (Options::PAGDotGraphShorter) {
|
|
95
98
|
rawstr << "\n";
|
|
96
99
|
}
|
|
@@ -263,6 +266,12 @@ NodeID UnaryOPStmt::getResID() const{
|
|
|
263
266
|
return getRes()->getId();
|
|
264
267
|
}
|
|
265
268
|
|
|
269
|
+
/// Return true if this is a phi at the function exit
|
|
270
|
+
/// to receive one or multiple return values of this function
|
|
271
|
+
bool PhiStmt::isFunctionRetPhi() const{
|
|
272
|
+
return SVFUtil::isa<RetPN>(getRes());
|
|
273
|
+
}
|
|
274
|
+
|
|
266
275
|
|
|
267
276
|
/// The branch is unconditional if cond is a null value
|
|
268
277
|
bool BranchStmt::isUnconditional() const {
|
|
@@ -185,7 +185,9 @@ void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* ca
|
|
|
185
185
|
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
/*
|
|
189
|
+
* Add the global initialization statements immediately after the function entry of main
|
|
190
|
+
*/
|
|
189
191
|
void ICFGBuilder::connectGlobalToProgEntry(SVFModule* svfModule)
|
|
190
192
|
{
|
|
191
193
|
const SVFFunction* mainFunc = SVFUtil::getProgEntryFunction(svfModule);
|
|
@@ -196,7 +198,20 @@ void ICFGBuilder::connectGlobalToProgEntry(SVFModule* svfModule)
|
|
|
196
198
|
|
|
197
199
|
FunEntryBlockNode* entryNode = icfg->getFunEntryBlockNode(mainFunc);
|
|
198
200
|
GlobalBlockNode* globalNode = icfg->getGlobalBlockNode();
|
|
199
|
-
|
|
201
|
+
|
|
202
|
+
std::vector<ICFGEdge*> toBeRemovedEdges;
|
|
203
|
+
for(ICFGEdge* edge : entryNode->getOutEdges())
|
|
204
|
+
toBeRemovedEdges.push_back(edge);
|
|
205
|
+
|
|
206
|
+
for(ICFGEdge* edge : toBeRemovedEdges){
|
|
207
|
+
SVFUtil::outs() << edge->toString() << "\n";
|
|
208
|
+
assert(SVFUtil::isa<IntraCFGEdge>(edge) && "the outgoing edge of FunEntryBlockNode is not an intraCFGEdge?");
|
|
209
|
+
icfg->removeICFGEdge(edge);
|
|
210
|
+
IntraCFGEdge* intraEdge = new IntraCFGEdge(globalNode, edge->getDstNode());
|
|
211
|
+
icfg->addICFGEdge(intraEdge);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
IntraCFGEdge* intraEdge = new IntraCFGEdge(entryNode, globalNode);
|
|
200
215
|
icfg->addICFGEdge(intraEdge);
|
|
201
216
|
}
|
|
202
217
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
#include "SVF-FE/CPPUtil.h"
|
|
35
35
|
#include "Util/BasicTypes.h"
|
|
36
36
|
#include "MemoryModel/PAGBuilderFromFile.h"
|
|
37
|
+
#include "Util/Options.h"
|
|
37
38
|
|
|
38
39
|
using namespace std;
|
|
39
40
|
using namespace SVF;
|
|
@@ -119,6 +120,18 @@ SVFIR* SVFIRBuilder::build(SVFModule* svfModule)
|
|
|
119
120
|
|
|
120
121
|
pag->setNodeNumAfterPAGBuild(pag->getTotalNodeNum());
|
|
121
122
|
|
|
123
|
+
// dump SVFIR
|
|
124
|
+
if (Options::PAGDotGraph)
|
|
125
|
+
pag->dump("svfir_initial");
|
|
126
|
+
|
|
127
|
+
// print to command line of the SVFIR graph
|
|
128
|
+
if (Options::PAGPrint)
|
|
129
|
+
pag->print();
|
|
130
|
+
|
|
131
|
+
// dump ICFG
|
|
132
|
+
if (Options::DumpICFG)
|
|
133
|
+
pag->getICFG()->dump("icfg_initial");
|
|
134
|
+
|
|
122
135
|
return pag;
|
|
123
136
|
}
|
|
124
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.337",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|