svf-tools 1.0.582 → 1.0.583

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 (111) hide show
  1. package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +10 -9
  2. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +13 -13
  3. package/SVF-doxygen/html/html/CFLBase_8cpp_source.html +9 -9
  4. package/SVF-doxygen/html/html/CFLBase_8h_source.html +10 -8
  5. package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +2 -2
  6. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +1 -1
  7. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +1 -1
  8. package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +7 -7
  9. package/SVF-doxygen/html/html/CFLGraph_8h_source.html +23 -19
  10. package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +10 -7
  11. package/SVF-doxygen/html/html/CFLSolver_8h_source.html +17 -14
  12. package/SVF-doxygen/html/html/CFLStat_8cpp_source.html +10 -8
  13. package/SVF-doxygen/html/html/CFLStat_8h_source.html +8 -10
  14. package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
  15. package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
  16. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +1 -1
  17. package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
  18. package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
  19. package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
  20. package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
  21. package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
  22. package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +1 -1
  23. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
  24. package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
  25. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
  26. package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
  27. package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
  28. package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
  29. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
  30. package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
  31. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  32. package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
  33. package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
  34. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  35. package/SVF-doxygen/html/html/cfl_8cpp_source.html +1 -1
  36. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +4 -2
  37. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +44 -39
  38. package/SVF-doxygen/html/html/classSVF_1_1CFLBase-members.html +4 -2
  39. package/SVF-doxygen/html/html/classSVF_1_1CFLBase.html +77 -24
  40. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +15 -15
  41. package/SVF-doxygen/html/html/classSVF_1_1CFLNode-members.html +47 -46
  42. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +109 -47
  43. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver-members.html +12 -9
  44. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +144 -53
  45. package/SVF-doxygen/html/html/classSVF_1_1CFLStat-members.html +6 -6
  46. package/SVF-doxygen/html/html/classSVF_1_1CFLStat.html +67 -69
  47. package/SVF-doxygen/html/html/classSVF_1_1CFLVF-members.html +2 -0
  48. package/SVF-doxygen/html/html/classSVF_1_1CFLVF.html +12 -8
  49. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  50. package/SVF-doxygen/html/html/functions.html +0 -3
  51. package/SVF-doxygen/html/html/functions_a.html +12 -8
  52. package/SVF-doxygen/html/html/functions_c.html +31 -26
  53. package/SVF-doxygen/html/html/functions_func.html +17 -13
  54. package/SVF-doxygen/html/html/functions_func_c.html +29 -26
  55. package/SVF-doxygen/html/html/functions_func_g.html +2 -2
  56. package/SVF-doxygen/html/html/functions_func_i.html +5 -4
  57. package/SVF-doxygen/html/html/functions_func_p.html +4 -1
  58. package/SVF-doxygen/html/html/functions_func_s.html +1 -1
  59. package/SVF-doxygen/html/html/functions_g.html +2 -2
  60. package/SVF-doxygen/html/html/functions_i.html +11 -10
  61. package/SVF-doxygen/html/html/functions_n.html +12 -7
  62. package/SVF-doxygen/html/html/functions_o.html +6 -6
  63. package/SVF-doxygen/html/html/functions_p.html +13 -14
  64. package/SVF-doxygen/html/html/functions_r.html +1 -1
  65. package/SVF-doxygen/html/html/functions_s.html +5 -5
  66. package/SVF-doxygen/html/html/functions_t.html +7 -7
  67. package/SVF-doxygen/html/html/functions_type_c.html +1 -1
  68. package/SVF-doxygen/html/html/functions_v.html +6 -6
  69. package/SVF-doxygen/html/html/functions_vars.html +0 -3
  70. package/SVF-doxygen/html/html/functions_vars_n.html +6 -1
  71. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  72. package/SVF-doxygen/html/html/namespaceSVF.html +1 -1
  73. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  74. package/SVF-doxygen/html/html/search/all_0.js +0 -1
  75. package/SVF-doxygen/html/html/search/all_1.js +4 -3
  76. package/SVF-doxygen/html/html/search/all_10.js +4 -3
  77. package/SVF-doxygen/html/html/search/all_11.js +1 -1
  78. package/SVF-doxygen/html/html/search/all_12.js +6 -6
  79. package/SVF-doxygen/html/html/search/all_13.js +6 -6
  80. package/SVF-doxygen/html/html/search/all_15.js +3 -3
  81. package/SVF-doxygen/html/html/search/all_16.js +1 -1
  82. package/SVF-doxygen/html/html/search/all_3.js +3 -2
  83. package/SVF-doxygen/html/html/search/all_7.js +2 -2
  84. package/SVF-doxygen/html/html/search/all_9.js +3 -3
  85. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  86. package/SVF-doxygen/html/html/search/all_e.js +6 -5
  87. package/SVF-doxygen/html/html/search/all_f.js +2 -2
  88. package/SVF-doxygen/html/html/search/functions_0.js +4 -3
  89. package/SVF-doxygen/html/html/search/functions_11.js +1 -1
  90. package/SVF-doxygen/html/html/search/functions_2.js +2 -1
  91. package/SVF-doxygen/html/html/search/functions_6.js +2 -2
  92. package/SVF-doxygen/html/html/search/functions_8.js +2 -2
  93. package/SVF-doxygen/html/html/search/functions_f.js +1 -0
  94. package/SVF-doxygen/html/html/search/typedefs_2.js +1 -1
  95. package/SVF-doxygen/html/html/search/variables_0.js +0 -1
  96. package/SVF-doxygen/html/html/search/variables_13.js +3 -3
  97. package/SVF-doxygen/html/html/search/variables_9.js +1 -1
  98. package/SVF-doxygen/html/html/search/variables_e.js +3 -2
  99. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
  100. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
  101. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
  102. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  103. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  104. package/include/CFL/CFLBase.h +2 -0
  105. package/include/CFL/CFLSolver.h +8 -0
  106. package/include/CFL/CFLStat.h +3 -11
  107. package/include/Graphs/CFLGraph.h +25 -15
  108. package/lib/CFL/CFLAlias.cpp +5 -0
  109. package/lib/CFL/CFLSolver.cpp +58 -45
  110. package/lib/CFL/CFLStat.cpp +16 -7
  111. package/package.json +1 -1
@@ -66,7 +66,7 @@ $(function() {
66
66
  <div class="title">wpa.cpp</div> </div>
67
67
  </div><!--header-->
68
68
  <div class="contents">
69
- <a href="wpa_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- wpa.cpp -- Whole program analysis -------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-2017&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===-----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> // Whole Program Pointer Analysis</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> //</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="WPAPass_8h.html">WPA/WPAPass.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Options_8h.html">Util/Options.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">static</span> llvm::cl::opt&lt;std::string&gt; <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; llvm::cl::desc(<span class="stringliteral">&quot;&lt;input bitcode&gt;&quot;</span>), llvm::cl::init(<span class="stringliteral">&quot;-&quot;</span>));</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; std::vector&lt;std::string&gt; moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="stringliteral">&quot;Whole Program Points-to Analysis\n&quot;</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">&quot;ir_annotator&quot;</span>)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; LLVMModuleSet::getLLVMModuleSet()-&gt;preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()-&gt;buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; svfModule-&gt;<a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; wpa-&gt;<a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;}</div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00182">CFLGraph.h:182</a></div></div>
69
+ <a href="wpa_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- wpa.cpp -- Whole program analysis -------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-2017&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===-----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> // Whole Program Pointer Analysis</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> //</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="WPAPass_8h.html">WPA/WPAPass.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Options_8h.html">Util/Options.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">static</span> llvm::cl::opt&lt;std::string&gt; <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; llvm::cl::desc(<span class="stringliteral">&quot;&lt;input bitcode&gt;&quot;</span>), llvm::cl::init(<span class="stringliteral">&quot;-&quot;</span>));</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; std::vector&lt;std::string&gt; moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="stringliteral">&quot;Whole Program Points-to Analysis\n&quot;</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">&quot;ir_annotator&quot;</span>)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; LLVMModuleSet::getLLVMModuleSet()-&gt;preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()-&gt;buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; svfModule-&gt;<a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; wpa-&gt;<a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;}</div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00192">CFLGraph.h:192</a></div></div>
70
70
  <div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
71
71
  <div class="ttc" id="wpa_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="wpa_8cpp_source.html#l00040">wpa.cpp:40</a></div></div>
72
72
  <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>
@@ -94,6 +94,8 @@ public:
94
94
  static double numOfNonterminalEdges; // Number of nonterminal labeled edges
95
95
  static double numOfStartEdges; // Number of start nonterminal labeled edges
96
96
  // Solver
97
+ static double numOfIteration; // Number solving Iteration
98
+ static double numOfChecks; // Number of checks
97
99
  static double timeOfSolving; // time of solving CFL Reachability
98
100
  //@}
99
101
 
@@ -47,6 +47,8 @@ public:
47
47
  typedef CFLGrammar::Production Production;
48
48
  typedef CFLGrammar::Symbol Symbol;
49
49
 
50
+ static double numOfChecks;
51
+
50
52
  CFLSolver(CFLGraph* _graph, CFLGrammar* _grammar): graph(_graph), grammar(_grammar)
51
53
  {
52
54
  }
@@ -57,6 +59,12 @@ public:
57
59
  delete grammar;
58
60
  }
59
61
 
62
+ /// Initialize worklist
63
+ void initialize();
64
+
65
+ /// Process CFLEdge
66
+ void processCFLEdge(const CFLEdge* Y_edge);
67
+
60
68
  /// Start solving
61
69
  void solve();
62
70
 
@@ -38,36 +38,28 @@
38
38
  namespace SVF
39
39
  {
40
40
 
41
- class CFLAlias;
42
- class CFLVF;
43
- class SVFIR;
44
- class ConstraintGraph;
45
-
46
41
  /*!
47
42
  * Statistics of CFL's analysis
48
43
  */
49
44
  class CFLStat : public PTAStat
50
45
  {
51
-
52
46
  private:
53
47
  CFLBase* pta;
54
48
 
55
49
  public:
56
- /// CFL Stat
57
- u32_t _NumofCFLGraphNode;
58
-
59
50
  CFLStat(CFLBase* p);
60
51
 
61
52
  virtual ~CFLStat()
62
53
  {
63
-
64
54
  }
65
55
 
66
56
  virtual void performStat();
67
57
 
68
- void collectCFLInfo(CFLGraph* CFLGraph);
58
+ void CFLGraphStat();
69
59
 
70
60
  void CFLGrammarStat();
61
+
62
+ void CFLSolverStat();
71
63
  };
72
64
 
73
65
  } // End namespace SVF
@@ -84,47 +84,57 @@ public:
84
84
  ~CFLNode() override = default;
85
85
 
86
86
  /// Different Kind(label) associated edges set
87
- typedef std::map <CFLEdge::GEdgeKind, CFLEdge::CFLEdgeSetTy> CFLEdgeDataTy;
87
+ typedef std::map <GrammarBase::Symbol, CFLEdge::CFLEdgeSetTy> CFLEdgeDataTy;
88
88
 
89
89
  private:
90
90
  CFLEdgeDataTy inCFLEdges;
91
91
  CFLEdgeDataTy outCFLEdges;
92
92
 
93
93
  public:
94
- inline const CFLEdge::CFLEdgeSetTy& getInEdgeWithTy(CFLEdge::GEdgeKind k)
94
+ inline const CFLEdge::CFLEdgeSetTy& getInEdgeWithTy(GrammarBase::Symbol s)
95
95
  {
96
- return inCFLEdges[k];
96
+ return inCFLEdges[s];
97
97
  }
98
98
 
99
- inline const CFLEdge::CFLEdgeSetTy& getOutEdgeWithTy(CFLEdge::GEdgeKind k)
99
+ inline const CFLEdge::CFLEdgeSetTy& getOutEdgeWithTy(GrammarBase::Symbol s)
100
100
  {
101
- return outCFLEdges[k];
101
+ return outCFLEdges[s];
102
102
  }
103
103
 
104
- inline bool addInEdgeWithKind(CFLEdge* inEdge, CFLEdge::GEdgeKind k)
104
+ inline bool addInEdgeWithKind(CFLEdge* inEdge, GrammarBase::Symbol s)
105
105
  {
106
106
  assert(inEdge->getDstID() == this->getId());
107
- bool added1 = addIncomingEdge(inEdge);
108
- bool added2 = inCFLEdges[k].insert(inEdge).second;
107
+ bool added1 = GenericNode::addIncomingEdge(inEdge);
108
+ bool added2 = inCFLEdges[s].insert(inEdge).second;
109
109
 
110
110
  return added1 && added2;
111
111
  }
112
112
 
113
- inline bool addOutEdgeWithKind(CFLEdge* outEdge, CFLEdge::GEdgeKind k)
113
+ inline bool addIngoingEdge(CFLEdge* inEdge)
114
+ {
115
+ return addInEdgeWithKind(inEdge, inEdge->getEdgeKind());
116
+ }
117
+
118
+ inline bool addOutEdgeWithKind(CFLEdge* outEdge, GrammarBase::Symbol s)
114
119
  {
115
120
  assert(outEdge->getSrcID() == this->getId());
116
- bool added1 = addOutgoingEdge(outEdge);
117
- bool added2 = outCFLEdges[k].insert(outEdge).second;
121
+ bool added1 = GenericNode::addOutgoingEdge(outEdge);
122
+ bool added2 = outCFLEdges[s].insert(outEdge).second;
118
123
 
119
124
  return added1 && added2;
120
125
  }
121
126
 
127
+ inline bool addOutgoingEdge(CFLEdge* OutEdge)
128
+ {
129
+ return addOutEdgeWithKind(OutEdge, OutEdge->getEdgeKind());
130
+ }
131
+
122
132
  inline bool removeCFLInEdge(CFLEdge* inEdge)
123
133
  {
124
134
  u32_t num1 = removeIncomingEdge(inEdge);
125
135
 
126
- CFLEdge::GEdgeKind k = inEdge->getEdgeKind();
127
- u32_t num2 = inCFLEdges[k].erase(inEdge);
136
+ GrammarBase::Symbol s = inEdge->getEdgeKind();
137
+ u32_t num2 = inCFLEdges[s].erase(inEdge);
128
138
 
129
139
  return num1 && num2;
130
140
  }
@@ -133,8 +143,8 @@ public:
133
143
  {
134
144
  u32_t num1 = removeOutgoingEdge(outEdge);
135
145
 
136
- CFLEdge::GEdgeKind k = outEdge->getEdgeKind();
137
- u32_t num2 = outCFLEdges[k].erase(outEdge);
146
+ GrammarBase::Symbol s = outEdge->getEdgeKind();
147
+ u32_t num2 = outCFLEdges[s].erase(outEdge);
138
148
 
139
149
  return num1 && num2;
140
150
  }
@@ -33,6 +33,8 @@ using namespace SVF;
33
33
  using namespace cppUtil;
34
34
  using namespace SVFUtil;
35
35
 
36
+ double CFLBase::numOfIteration = 1;
37
+
36
38
  /*!
37
39
  * On the fly call graph construction
38
40
  * callsites is candidate indirect callsites need to be analyzed based on points-to results
@@ -226,7 +228,10 @@ void CFLAlias::solve()
226
228
  if (Options::CFLGraph.empty())
227
229
  {
228
230
  while (updateCallGraph(svfir->getIndirectCallsites()))
231
+ {
232
+ numOfIteration++;
229
233
  solver->solve();
234
+ }
230
235
  } // Only cflgraph built from bc could reanlyze by update call graph
231
236
 
232
237
  double end = stat->getClk(true);
@@ -31,9 +31,10 @@
31
31
 
32
32
  using namespace SVF;
33
33
 
34
- void CFLSolver::solve()
34
+ double CFLSolver::numOfChecks = 0;
35
+
36
+ void CFLSolver::initialize()
35
37
  {
36
- /// initial worklist
37
38
  for(auto it = graph->begin(); it!= graph->end(); it++)
38
39
  {
39
40
  for(const CFLEdge* edge : (*it).second->getOutEdges())
@@ -56,65 +57,77 @@ void CFLSolver::solve()
56
57
  }
57
58
  }
58
59
  }
60
+ }
59
61
 
60
- while(!isWorklistEmpty())
61
- {
62
- /// Select and remove an edge Y(i,j) from worklist
63
- const CFLEdge* Y_edge = popFromWorklist();
64
- CFLNode* i = Y_edge->getSrcNode();
65
- CFLNode* j = Y_edge->getDstNode();
66
-
67
- /// For each production X -> Y
68
- /// add X(i,j) if not exist to E and to worklist
69
- Symbol Y = Y_edge->getEdgeKind();
70
- if (grammar->hasProdsFromSingleRHS(Y))
71
- for(const Production& prod : grammar->getProdsFromSingleRHS(Y))
62
+ void CFLSolver::processCFLEdge(const CFLEdge* Y_edge)
63
+ {
64
+ CFLNode* i = Y_edge->getSrcNode();
65
+ CFLNode* j = Y_edge->getDstNode();
66
+
67
+ /// For each production X -> Y
68
+ /// add X(i,j) if not exist to E and to worklist
69
+ Symbol Y = Y_edge->getEdgeKind();
70
+ if (grammar->hasProdsFromSingleRHS(Y))
71
+ for(const Production& prod : grammar->getProdsFromSingleRHS(Y))
72
+ {
73
+ Symbol X = grammar->getLHSSymbol(prod);
74
+ if(const CFLEdge* newEdge = graph->addCFLEdge(i, j, X))
72
75
  {
73
- Symbol X = grammar->getLHSSymbol(prod);
74
- if(const CFLEdge* newEdge = graph->addCFLEdge(i, j, X))
75
- {
76
- pushIntoWorklist(newEdge);
77
- }
76
+ pushIntoWorklist(newEdge);
78
77
  }
78
+ }
79
79
 
80
- /// For each production X -> Y Z
81
- /// Foreach outgoing edge Z(j,k) from node j do
82
- /// add X(i,k) if not exist to E and to worklist
83
- if (grammar->hasProdsFromFirstRHS(Y))
84
- for(const Production& prod : grammar->getProdsFromFirstRHS(Y))
80
+ /// For each production X -> Y Z
81
+ /// Foreach outgoing edge Z(j,k) from node j do
82
+ /// add X(i,k) if not exist to E and to worklist
83
+ if (grammar->hasProdsFromFirstRHS(Y))
84
+ for(const Production& prod : grammar->getProdsFromFirstRHS(Y))
85
+ {
86
+ Symbol X = grammar->getLHSSymbol(prod);
87
+ for(const CFLEdge* Z_edge : j->getOutEdges())
85
88
  {
86
- Symbol X = grammar->getLHSSymbol(prod);
87
- for(const CFLEdge* Z_edge : j->getOutEdges())
89
+ if (Z_edge->getEdgeKind() == grammar->getSecondRHSSymbol(prod))
88
90
  {
89
- if (Z_edge->getEdgeKind() == grammar->getSecondRHSSymbol(prod))
91
+ CFLNode* k = Z_edge->getDstNode();
92
+ if(const CFLEdge* newEdge = graph->addCFLEdge(i, k, X))
90
93
  {
91
- CFLNode* k = Z_edge->getDstNode();
92
- if(const CFLEdge* newEdge = graph->addCFLEdge(i, k, X))
93
- {
94
- pushIntoWorklist(newEdge);
95
- }
94
+ pushIntoWorklist(newEdge);
96
95
  }
97
96
  }
98
97
  }
98
+ }
99
99
 
100
- /// For each production X -> Z Y
101
- /// Foreach incoming edge Z(k,i) to node i do
102
- /// add X(k,j) if not exist to E and to worklist
103
- if(grammar->hasProdsFromSecondRHS(Y))
104
- for(const Production& prod : grammar->getProdsFromSecondRHS(Y))
100
+ /// For each production X -> Z Y
101
+ /// Foreach incoming edge Z(k,i) to node i do
102
+ /// add X(k,j) if not exist to E and to worklist
103
+ if(grammar->hasProdsFromSecondRHS(Y))
104
+ for(const Production& prod : grammar->getProdsFromSecondRHS(Y))
105
+ {
106
+ Symbol X = grammar->getLHSSymbol(prod);
107
+ for(const CFLEdge* Z_edge : i->getInEdges())
105
108
  {
106
- Symbol X = grammar->getLHSSymbol(prod);
107
- for(const CFLEdge* Z_edge : i->getInEdges())
109
+ if(Z_edge->getEdgeKind() == grammar->getFirstRHSSymbol(prod))
108
110
  {
109
- if(Z_edge->getEdgeKind() == grammar->getFirstRHSSymbol(prod))
111
+ CFLNode* k = Z_edge->getSrcNode();
112
+ if(const CFLEdge* newEdge = graph->addCFLEdge(k, j, X))
110
113
  {
111
- CFLNode* k = Z_edge->getSrcNode();
112
- if(const CFLEdge* newEdge = graph->addCFLEdge(k, j, X))
113
- {
114
- pushIntoWorklist(newEdge);
115
- }
114
+ pushIntoWorklist(newEdge);
116
115
  }
117
116
  }
118
117
  }
118
+ }
119
+ }
120
+
121
+
122
+ void CFLSolver::solve()
123
+ {
124
+ /// initial worklist
125
+ initialize();
126
+
127
+ while(!isWorklistEmpty())
128
+ {
129
+ /// Select and remove an edge Y(i,j) from worklist
130
+ const CFLEdge* Y_edge = popFromWorklist();
131
+ processCFLEdge(Y_edge);
119
132
  }
120
133
  }
@@ -44,8 +44,11 @@ CFLStat::CFLStat(CFLBase* p): PTAStat(p),pta(p)
44
44
  /*!
45
45
  * Collect CFLGraph information
46
46
  */
47
- void CFLStat::collectCFLInfo(CFLGraph* CFLGraph)
47
+ void CFLStat::CFLGraphStat()
48
48
  {
49
+ pta->countSumEdges();
50
+ CFLGraph* CFLGraph = pta->getCFLGraph();
51
+
49
52
  timeStatMap["BuildingTime"] = pta->timeOfBuildCFLGraph;
50
53
  PTNumStatMap["NumOfNodes"] = CFLGraph->getTotalNodeNum();
51
54
  PTNumStatMap["NumOfEdges"] = CFLGraph->getCFLEdges().size();
@@ -57,9 +60,19 @@ void CFLStat::CFLGrammarStat()
57
60
  {
58
61
  timeStatMap["BuildingTime"] = pta->timeOfBuildCFLGrammar;
59
62
  timeStatMap["NormalizationTime"] = pta->timeOfNormalizeGrammar;
63
+
60
64
  PTAStat::printStat("CFLGrammar Stats");
61
65
  }
62
66
 
67
+ void CFLStat::CFLSolverStat()
68
+ {
69
+ timeStatMap["AnalysisTime"] = pta->timeOfSolving;
70
+ PTNumStatMap["numOfIteration"] = pta->numOfIteration;
71
+ PTNumStatMap["SumEdges"] = pta->numOfStartEdges;
72
+
73
+ PTAStat::printStat("CFL-reachability Solver Stats");
74
+ }
75
+
63
76
  /*!
64
77
  * Start here
65
78
  */
@@ -72,14 +85,10 @@ void CFLStat::performStat()
72
85
  CFLGrammarStat();
73
86
 
74
87
  // CFLGraph stat
75
- pta->countSumEdges();
76
- CFLGraph* CFLGraph = pta->getCFLGraph();
77
- collectCFLInfo(CFLGraph);
88
+ CFLGraphStat();
78
89
 
79
90
  // Solver stat
80
- timeStatMap["AnalysisTime"] = pta->timeOfSolving;
81
- PTNumStatMap["SumEdges"] = pta->numOfStartEdges;
82
- PTAStat::printStat("CFL-reachability analysis Stats");
91
+ CFLSolverStat();
83
92
 
84
93
  // Stat about Call graph and General stat
85
94
  PTAStat::performStat();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.582",
3
+ "version": "1.0.583",
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": {