svf-tools 1.0.342 → 1.0.343
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/ICFGBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +10 -9
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +8 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +17 -14
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +16 -16
- package/lib/Graphs/ICFG.cpp +14 -9
- package/lib/SVF-FE/ICFGBuilder.cpp +16 -10
- package/package.json +1 -1
|
@@ -114,7 +114,7 @@ Static Public Member Functions</h2></td></tr>
|
|
|
114
114
|
struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
117
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00463">463</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
118
118
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
119
119
|
<a id="a7ef3894da60c3e3350b8d2de3e94a562"></a>
|
|
120
120
|
<h2 class="memtitle"><span class="permalink"><a href="#a7ef3894da60c3e3350b8d2de3e94a562">◆ </a></span>NodeType</h2>
|
|
@@ -128,7 +128,7 @@ struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
|
128
128
|
</table>
|
|
129
129
|
</div><div class="memdoc">
|
|
130
130
|
|
|
131
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
131
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00466">466</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
132
132
|
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
@@ -157,8 +157,8 @@ struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
|
157
157
|
</table>
|
|
158
158
|
</div><div class="memdoc">
|
|
159
159
|
|
|
160
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
161
|
-
<div class="fragment"><div class="line"><a name="
|
|
160
|
+
<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>
|
|
161
|
+
<div class="fragment"><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  :</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  DOTGraphTraits<SVFIR*>(isSimple)</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  {</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  }</div></div><!-- fragment -->
|
|
162
162
|
</div>
|
|
163
163
|
</div>
|
|
164
164
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
@@ -204,8 +204,8 @@ template<class EdgeIter > </div>
|
|
|
204
204
|
</table>
|
|
205
205
|
</div><div class="memdoc">
|
|
206
206
|
|
|
207
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
208
|
-
<div class="fragment"><div class="line"><a name="
|
|
207
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00573">573</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
208
|
+
<div class="fragment"><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  {</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  <span class="keywordflow">if</span> (SVFUtil::isa<CallCFGEdge>(edge))</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid,color=red"</span>;</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<RetCFGEdge>(edge))</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid,color=blue"</span>;</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid"</span>;</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  }</div><div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00042">ICFGEdge.h:42</a></div></div>
|
|
209
209
|
<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>
|
|
210
210
|
</div><!-- fragment -->
|
|
211
211
|
</div>
|
|
@@ -246,8 +246,8 @@ template<class EdgeIter > </div>
|
|
|
246
246
|
</table>
|
|
247
247
|
</div><div class="memdoc">
|
|
248
248
|
|
|
249
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
250
|
-
<div class="fragment"><div class="line"><a name="
|
|
249
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00587">587</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
250
|
+
<div class="fragment"><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  {</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span> </div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  std::string str;</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1CallCFGEdge.html">CallCFGEdge</a>* dirCall = SVFUtil::dyn_cast<CallCFGEdge>(edge))</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  rawstr << dirCall->getCallSite();</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1RetCFGEdge.html">RetCFGEdge</a>* dirRet = SVFUtil::dyn_cast<RetCFGEdge>(edge))</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  rawstr << dirRet->getCallSite();</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span> </div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  }</div><div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00042">ICFGEdge.h:42</a></div></div>
|
|
251
251
|
<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>
|
|
252
252
|
<div class="ttc" id="classSVF_1_1CallCFGEdge_html"><div class="ttname"><a href="classSVF_1_1CallCFGEdge.html">SVF::CallCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00162">ICFGEdge.h:162</a></div></div>
|
|
253
253
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00100">BasicTypes.h:100</a></div></div>
|
|
@@ -281,8 +281,8 @@ template<class EdgeIter > </div>
|
|
|
281
281
|
|
|
282
282
|
<p>Return name of the graph. </p>
|
|
283
283
|
|
|
284
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
285
|
-
<div class="fragment"><div class="line"><a name="
|
|
284
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00473">473</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
285
|
+
<div class="fragment"><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  {</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">return</span> <span class="stringliteral">"ICFG"</span>;</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</div></div><!-- fragment -->
|
|
286
286
|
</div>
|
|
287
287
|
</div>
|
|
288
288
|
<a id="aef77eaa614a202f39964d0a0917b5140"></a>
|
|
@@ -319,8 +319,8 @@ template<class EdgeIter > </div>
|
|
|
319
319
|
</table>
|
|
320
320
|
</div><div class="memdoc">
|
|
321
321
|
|
|
322
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
323
|
-
<div class="fragment"><div class="line"><a name="
|
|
322
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00535">535</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
323
|
+
<div class="fragment"><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  {</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  std::string str;</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span> </div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <span class="keywordflow">if</span>(SVFUtil::isa<IntraBlockNode>(node))</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  {</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  rawstr << <span class="stringliteral">"color=black"</span>;</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  }</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<FunEntryBlockNode>(node))</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  {</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  rawstr << <span class="stringliteral">"color=yellow"</span>;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  }</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<FunExitBlockNode>(node))</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  {</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  rawstr << <span class="stringliteral">"color=green"</span>;</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  }</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<CallBlockNode>(node))</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  {</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  rawstr << <span class="stringliteral">"color=red"</span>;</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  }</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<RetBlockNode>(node))</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  {</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  rawstr << <span class="stringliteral">"color=blue"</span>;</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  }</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<GlobalBlockNode>(node))</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  {</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  rawstr << <span class="stringliteral">"color=purple"</span>;</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  }</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"no such kind of node!!"</span>);</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span> </div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  rawstr << <span class="stringliteral">""</span>;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span> </div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  }</div><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>
|
|
324
324
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00100">BasicTypes.h:100</a></div></div>
|
|
325
325
|
</div><!-- fragment -->
|
|
326
326
|
</div>
|
|
@@ -359,8 +359,8 @@ template<class EdgeIter > </div>
|
|
|
359
359
|
</table>
|
|
360
360
|
</div><div class="memdoc">
|
|
361
361
|
|
|
362
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
363
|
-
<div class="fragment"><div class="line"><a name="
|
|
362
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00478">478</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
363
|
+
<div class="fragment"><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  {</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">return</span> getSimpleNodeLabel(node, graph);</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  }</div></div><!-- fragment -->
|
|
364
364
|
</div>
|
|
365
365
|
</div>
|
|
366
366
|
<a id="a1cf0470d3e9821152416e3bf5236e553"></a>
|
|
@@ -399,8 +399,8 @@ template<class EdgeIter > </div>
|
|
|
399
399
|
|
|
400
400
|
<p>Return the label of an ICFG node. </p>
|
|
401
401
|
|
|
402
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
403
|
-
<div class="fragment"><div class="line"><a name="
|
|
402
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00484">484</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
403
|
+
<div class="fragment"><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  {</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  std::string str;</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  rawstr << <span class="stringliteral">"NodeID: "</span> << node->getId() << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</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="l00490"></a><span class="lineno"> 490</span>  {</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  rawstr << <span class="stringliteral">"IntraBlockNode ID: "</span> << bNode->getId() << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(bNode);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  <span class="keywordflow">if</span> (edges.empty()) {</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</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="l00495"></a><span class="lineno"> 495</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  {</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</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>  }</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  rawstr << <span class="stringliteral">" {fun: "</span> << bNode->getFun()->getName() << <span class="stringliteral">"}"</span>;</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  }</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</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="l00505"></a><span class="lineno"> 505</span>  {</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  rawstr << <a class="code" href="cuddInt_8c.html#a936a27e51e66afb57c2b3a12d78a238e">entry</a>->toString();</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="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="l00509"></a><span class="lineno"> 509</span>  {</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  rawstr << <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a>->toString();</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> <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="l00513"></a><span class="lineno"> 513</span>  {</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  rawstr << call->toString();</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  }</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</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="l00517"></a><span class="lineno"> 517</span>  {</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  rawstr << ret->toString();</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  }</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</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="l00521"></a><span class="lineno"> 521</span>  {</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(glob);</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  {</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  }</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  }</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00530"></a><span class="lineno"> 530</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="l00531"></a><span class="lineno"> 531</span> </div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</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>
|
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -436,15 +436,20 @@ 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
|
-
CallBlockNode*
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
439
|
+
CallBlockNode* callBlockNode = getCallBlockNode(cs);
|
|
440
|
+
RetBlockNode* retBlockNode = getRetBlockNode(cs);
|
|
441
|
+
FunEntryBlockNode* calleeEntryNode = getFunEntryICFGNode(callee);
|
|
442
|
+
FunExitBlockNode* calleeExitNode = getFunExitICFGNode(callee);
|
|
443
|
+
addCallEdge(callBlockNode, calleeEntryNode, cs);
|
|
444
|
+
addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
445
|
+
|
|
446
|
+
/// if this is an external function (no function body), connect calleeEntryNode to calleeExitNode
|
|
447
|
+
if (isExtCall(callee))
|
|
448
|
+
addIntraEdge(calleeEntryNode, calleeExitNode);
|
|
449
|
+
|
|
450
|
+
/// Remove callBlockNode to retBlockNode intraICFGEdge since we found at least one inter procedural edge
|
|
451
|
+
if(ICFGEdge* edge = hasIntraICFGEdge(callBlockNode,retBlockNode, ICFGEdge::IntraCF))
|
|
452
|
+
removeICFGEdge(edge);
|
|
448
453
|
}
|
|
449
454
|
}
|
|
450
455
|
}
|
|
@@ -106,7 +106,6 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
|
|
|
106
106
|
if (isNonInstricCallSite(inst))
|
|
107
107
|
{
|
|
108
108
|
RetBlockNode* retICFGNode = getOrAddRetICFGNode(inst);
|
|
109
|
-
icfg->addIntraEdge(srcNode, retICFGNode);
|
|
110
109
|
srcNode = retICFGNode;
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -118,8 +117,7 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
|
|
|
118
117
|
else
|
|
119
118
|
icfg->addIntraEdge(srcNode, dstNode);
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
if (const SwitchInst* si = SVFUtil::dyn_cast<SwitchInst>(inst))
|
|
120
|
+
else if (const SwitchInst* si = SVFUtil::dyn_cast<SwitchInst>(inst))
|
|
123
121
|
{
|
|
124
122
|
icfg->addConditionalIntraEdge(srcNode, dstNode, si->getCondition(),branchID);
|
|
125
123
|
}
|
|
@@ -164,8 +162,7 @@ InterBlockNode* ICFGBuilder::getOrAddInterBlockICFGNode(const Instruction* inst)
|
|
|
164
162
|
assert(SVFUtil::isCallSite(inst) && "not a call instruction?");
|
|
165
163
|
assert(SVFUtil::isNonInstricCallSite(inst) && "associating an intrinsic debug instruction with an ICFGNode!");
|
|
166
164
|
CallBlockNode* callICFGNode = getOrAddCallICFGNode(inst);
|
|
167
|
-
|
|
168
|
-
addICFGInterEdges(inst, callee); //creating interprocedural edges
|
|
165
|
+
addICFGInterEdges(inst, getCallee(inst)); //creating interprocedural edges
|
|
169
166
|
return callICFGNode;
|
|
170
167
|
}
|
|
171
168
|
|
|
@@ -175,14 +172,23 @@ InterBlockNode* ICFGBuilder::getOrAddInterBlockICFGNode(const Instruction* inst)
|
|
|
175
172
|
void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* callee)
|
|
176
173
|
{
|
|
177
174
|
CallBlockNode* CallBlockNode = getOrAddCallICFGNode(cs);
|
|
178
|
-
|
|
179
|
-
icfg->addCallEdge(CallBlockNode, calleeEntryNode, cs);
|
|
175
|
+
RetBlockNode* retBlockNode = getOrAddRetICFGNode(cs);
|
|
180
176
|
|
|
181
|
-
|
|
182
|
-
{
|
|
183
|
-
|
|
177
|
+
/// direct call
|
|
178
|
+
if(callee){
|
|
179
|
+
FunEntryBlockNode* calleeEntryNode = icfg->getFunEntryBlockNode(callee);
|
|
184
180
|
FunExitBlockNode* calleeExitNode = icfg->getFunExitBlockNode(callee);
|
|
181
|
+
icfg->addCallEdge(CallBlockNode, calleeEntryNode, cs);
|
|
185
182
|
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
183
|
+
/// if this is an external function (no function body)
|
|
184
|
+
if (isExtCall(callee))
|
|
185
|
+
{
|
|
186
|
+
icfg->addIntraEdge(calleeEntryNode, calleeExitNode);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/// indirect call (don't know callee)
|
|
190
|
+
else{
|
|
191
|
+
icfg->addIntraEdge(CallBlockNode, retBlockNode);
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
194
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.343",
|
|
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": {
|