svf-tools 1.0.577 → 1.0.579

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 (166) hide show
  1. package/SVF-doxygen/html/html/CFLAlias_8cpp.html +0 -1
  2. package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +10 -42
  3. package/SVF-doxygen/html/html/CFLAlias_8h.html +1 -8
  4. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +22 -49
  5. package/SVF-doxygen/html/html/CFLBase_8cpp.html +89 -0
  6. package/SVF-doxygen/html/html/CFLBase_8cpp_source.html +119 -0
  7. package/SVF-doxygen/html/html/CFLBase_8h.html +104 -0
  8. package/SVF-doxygen/html/html/CFLBase_8h_source.html +117 -0
  9. package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +2 -2
  10. package/SVF-doxygen/html/html/CFLGraph_8h_source.html +5 -4
  11. package/SVF-doxygen/html/html/CFLStat_8cpp_source.html +17 -58
  12. package/SVF-doxygen/html/html/CFLStat_8h.html +1 -0
  13. package/SVF-doxygen/html/html/CFLStat_8h_source.html +12 -22
  14. package/SVF-doxygen/html/html/CFLVF_8cpp.html +0 -2
  15. package/SVF-doxygen/html/html/CFLVF_8cpp_source.html +4 -15
  16. package/SVF-doxygen/html/html/CFLVF_8h.html +3 -8
  17. package/SVF-doxygen/html/html/CFLVF_8h_source.html +11 -26
  18. package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
  19. package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
  20. package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
  21. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +1 -1
  22. package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
  23. package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
  24. package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
  25. package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
  26. package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
  27. package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +1 -1
  28. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
  29. package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
  30. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
  31. package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
  32. package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
  33. package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
  34. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
  35. package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
  36. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  37. package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
  38. package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
  39. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  40. package/SVF-doxygen/html/html/annotated.html +271 -270
  41. package/SVF-doxygen/html/html/cfl_8cpp.html +6 -9
  42. package/SVF-doxygen/html/html/cfl_8cpp_source.html +6 -8
  43. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +9 -8
  44. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.png +0 -0
  45. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +120 -121
  46. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +212 -713
  47. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.png +0 -0
  48. package/SVF-doxygen/html/html/classSVF_1_1CFLBase-members.html +270 -0
  49. package/SVF-doxygen/html/html/classSVF_1_1CFLBase.html +1199 -0
  50. package/SVF-doxygen/html/html/classSVF_1_1CFLBase.png +0 -0
  51. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
  52. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +33 -3
  53. package/SVF-doxygen/html/html/classSVF_1_1CFLStat-members.html +21 -31
  54. package/SVF-doxygen/html/html/classSVF_1_1CFLStat.html +62 -358
  55. package/SVF-doxygen/html/html/classSVF_1_1CFLVF-members.html +94 -80
  56. package/SVF-doxygen/html/html/classSVF_1_1CFLVF.html +207 -287
  57. package/SVF-doxygen/html/html/classSVF_1_1CFLVF.png +0 -0
  58. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  59. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  60. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +21 -20
  61. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  62. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +12 -11
  63. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.png +0 -0
  64. package/SVF-doxygen/html/html/classSVF_1_1SVFStat.html +1 -1
  65. package/SVF-doxygen/html/html/classes.html +96 -95
  66. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  67. package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
  68. package/SVF-doxygen/html/html/dir_ae8aa099e368efaa962140c6624142bc.html +2 -0
  69. package/SVF-doxygen/html/html/files.html +15 -13
  70. package/SVF-doxygen/html/html/functions.html +0 -8
  71. package/SVF-doxygen/html/html/functions_0x7e.html +2 -5
  72. package/SVF-doxygen/html/html/functions_a.html +9 -11
  73. package/SVF-doxygen/html/html/functions_b.html +11 -4
  74. package/SVF-doxygen/html/html/functions_c.html +33 -32
  75. package/SVF-doxygen/html/html/functions_f.html +16 -14
  76. package/SVF-doxygen/html/html/functions_func.html +6 -7
  77. package/SVF-doxygen/html/html/functions_func_0x7e.html +2 -5
  78. package/SVF-doxygen/html/html/functions_func_b.html +7 -0
  79. package/SVF-doxygen/html/html/functions_func_c.html +31 -23
  80. package/SVF-doxygen/html/html/functions_func_f.html +3 -1
  81. package/SVF-doxygen/html/html/functions_func_g.html +14 -11
  82. package/SVF-doxygen/html/html/functions_func_i.html +9 -7
  83. package/SVF-doxygen/html/html/functions_func_n.html +3 -0
  84. package/SVF-doxygen/html/html/functions_func_p.html +1 -1
  85. package/SVF-doxygen/html/html/functions_func_s.html +14 -13
  86. package/SVF-doxygen/html/html/functions_g.html +19 -15
  87. package/SVF-doxygen/html/html/functions_i.html +16 -14
  88. package/SVF-doxygen/html/html/functions_l.html +6 -6
  89. package/SVF-doxygen/html/html/functions_m.html +1 -2
  90. package/SVF-doxygen/html/html/functions_n.html +15 -8
  91. package/SVF-doxygen/html/html/functions_p.html +10 -10
  92. package/SVF-doxygen/html/html/functions_r.html +1 -1
  93. package/SVF-doxygen/html/html/functions_s.html +22 -21
  94. package/SVF-doxygen/html/html/functions_t.html +17 -13
  95. package/SVF-doxygen/html/html/functions_type_c.html +0 -1
  96. package/SVF-doxygen/html/html/functions_v.html +3 -3
  97. package/SVF-doxygen/html/html/functions_vars.html +0 -8
  98. package/SVF-doxygen/html/html/functions_vars_a.html +0 -1
  99. package/SVF-doxygen/html/html/functions_vars_c.html +0 -2
  100. package/SVF-doxygen/html/html/functions_vars_g.html +5 -4
  101. package/SVF-doxygen/html/html/functions_vars_m.html +0 -1
  102. package/SVF-doxygen/html/html/functions_vars_n.html +12 -8
  103. package/SVF-doxygen/html/html/functions_vars_p.html +1 -1
  104. package/SVF-doxygen/html/html/functions_vars_s.html +2 -4
  105. package/SVF-doxygen/html/html/functions_vars_t.html +12 -6
  106. package/SVF-doxygen/html/html/hierarchy.html +58 -57
  107. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  108. package/SVF-doxygen/html/html/namespaceSVF.html +3 -0
  109. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  110. package/SVF-doxygen/html/html/search/all_0.js +8 -8
  111. package/SVF-doxygen/html/html/search/all_1.js +2 -2
  112. package/SVF-doxygen/html/html/search/all_10.js +6 -6
  113. package/SVF-doxygen/html/html/search/all_11.js +1 -1
  114. package/SVF-doxygen/html/html/search/all_12.js +11 -11
  115. package/SVF-doxygen/html/html/search/all_13.js +16 -12
  116. package/SVF-doxygen/html/html/search/all_15.js +3 -3
  117. package/SVF-doxygen/html/html/search/all_16.js +1 -1
  118. package/SVF-doxygen/html/html/search/all_19.js +1 -2
  119. package/SVF-doxygen/html/html/search/all_2.js +2 -0
  120. package/SVF-doxygen/html/html/search/all_3.js +12 -7
  121. package/SVF-doxygen/html/html/search/all_6.js +4 -4
  122. package/SVF-doxygen/html/html/search/all_7.js +5 -4
  123. package/SVF-doxygen/html/html/search/all_9.js +4 -4
  124. package/SVF-doxygen/html/html/search/all_b.js +1 -1
  125. package/SVF-doxygen/html/html/search/all_c.js +4 -4
  126. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  127. package/SVF-doxygen/html/html/search/all_e.js +14 -9
  128. package/SVF-doxygen/html/html/search/classes_2.js +1 -0
  129. package/SVF-doxygen/html/html/search/files_2.js +2 -0
  130. package/SVF-doxygen/html/html/search/functions_0.js +1 -1
  131. package/SVF-doxygen/html/html/search/functions_1.js +2 -0
  132. package/SVF-doxygen/html/html/search/functions_11.js +3 -3
  133. package/SVF-doxygen/html/html/search/functions_17.js +1 -2
  134. package/SVF-doxygen/html/html/search/functions_2.js +5 -2
  135. package/SVF-doxygen/html/html/search/functions_5.js +1 -1
  136. package/SVF-doxygen/html/html/search/functions_6.js +2 -1
  137. package/SVF-doxygen/html/html/search/functions_8.js +1 -1
  138. package/SVF-doxygen/html/html/search/functions_d.js +1 -0
  139. package/SVF-doxygen/html/html/search/functions_f.js +1 -1
  140. package/SVF-doxygen/html/html/search/typedefs_2.js +1 -1
  141. package/SVF-doxygen/html/html/search/variables_0.js +8 -8
  142. package/SVF-doxygen/html/html/search/variables_1.js +1 -1
  143. package/SVF-doxygen/html/html/search/variables_10.js +1 -1
  144. package/SVF-doxygen/html/html/search/variables_12.js +2 -2
  145. package/SVF-doxygen/html/html/search/variables_13.js +13 -9
  146. package/SVF-doxygen/html/html/search/variables_3.js +2 -2
  147. package/SVF-doxygen/html/html/search/variables_7.js +3 -2
  148. package/SVF-doxygen/html/html/search/variables_9.js +1 -1
  149. package/SVF-doxygen/html/html/search/variables_d.js +1 -1
  150. package/SVF-doxygen/html/html/search/variables_e.js +12 -8
  151. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
  152. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
  153. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
  154. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  155. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  156. package/include/CFL/CFLAlias.h +12 -51
  157. package/include/CFL/CFLBase.h +110 -0
  158. package/include/CFL/CFLStat.h +7 -18
  159. package/include/CFL/CFLVF.h +13 -25
  160. package/include/Graphs/CFLGraph.h +5 -0
  161. package/lib/CFL/CFLAlias.cpp +33 -66
  162. package/lib/CFL/CFLBase.cpp +133 -0
  163. package/lib/CFL/CFLStat.cpp +22 -149
  164. package/lib/CFL/CFLVF.cpp +28 -38
  165. package/package.json +1 -1
  166. package/tools/CFL/cfl.cpp +12 -25
package/lib/CFL/CFLVF.cpp CHANGED
@@ -28,62 +28,52 @@
28
28
  */
29
29
 
30
30
  #include "CFL/CFLVF.h"
31
- #include "Util/SVFBasicTypes.h"
32
- #include "WPA/Andersen.h"
33
31
 
34
32
  using namespace SVF;
35
33
  using namespace cppUtil;
36
34
  using namespace SVFUtil;
37
35
 
38
-
39
-
40
- void CFLVF::analyze()
36
+ void CFLVF::buildCFLGraph()
41
37
  {
42
- GrammarBuilder grammarBuilder = GrammarBuilder(Options::GrammarFilename);
43
- CFGNormalizer normalizer = CFGNormalizer();
38
+ // Build CFL Graph
44
39
  VFCFLGraphBuilder cflGraphBuilder = VFCFLGraphBuilder();
45
- CFLGramGraphChecker cflChecker = CFLGramGraphChecker();
46
- if (Options::CFLGraph.empty())
40
+ if (Options::CFLGraph.empty()) // built from svfir
47
41
  {
48
42
  PointerAnalysis::initialize();
49
- GrammarBase *grammarBase = grammarBuilder.build();
50
43
  AndersenWaveDiff* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
51
44
  svfg = memSSA.buildFullSVFG(ander);
52
- ConstraintGraph *consCG = new ConstraintGraph(svfir);
53
- if (Options::PEGTransfer)
54
- {
55
- graph = cflGraphBuilder.buildBiPEGgraph(consCG, grammarBase->getStartKind(), grammarBase, svfir);
56
- }
57
- else
58
- {
59
- graph = cflGraphBuilder.buildBigraph(svfg, grammarBase->getStartKind(), grammarBase);
60
- }
61
-
62
- cflChecker.check(grammarBase, &cflGraphBuilder, graph);
63
- grammar = normalizer.normalize(grammarBase);
64
- cflChecker.check(grammar, &cflGraphBuilder, graph);
65
- delete consCG;
66
- delete grammarBase;
45
+ graph = cflGraphBuilder.buildBigraph(svfg, grammarBase->getStartKind(), grammarBase);
67
46
  }
68
47
  else
69
- {
70
- GrammarBase *grammarBase = grammarBuilder.build();
71
48
  graph = cflGraphBuilder.buildFromDot(Options::CFLGraph, grammarBase);
72
- cflChecker.check(grammarBase, &cflGraphBuilder, graph);
73
- grammar = normalizer.normalize(grammarBase);
74
- cflChecker.check(grammar, &cflGraphBuilder, graph);
75
- delete grammarBase;
76
- }
49
+
50
+ // Check CFL Graph and Grammar are accordance with grammar
51
+ CFLGramGraphChecker cflChecker = CFLGramGraphChecker();
52
+ cflChecker.check(grammarBase, &cflGraphBuilder, graph);
53
+ }
54
+
55
+ void CFLVF::initialize()
56
+ {
57
+ // Build CFL Grammar
58
+ buildCFLGrammar();
59
+
60
+ // Build CFL Graph
61
+ buildCFLGraph();
62
+
63
+ // Normalize grammar
64
+ normalizeCFLGrammar();
65
+
66
+ // Initialize sovler
77
67
  solver = new CFLSolver(graph, grammar);
78
- solver->solve();
68
+ }
69
+
70
+ void CFLVF::finalize()
71
+ {
79
72
  if(Options::PrintCFL == true)
80
73
  {
81
- svfir->dump("IR");
74
+ if (Options::CFLGraph.empty())
75
+ svfir->dump("IR");
82
76
  grammar->dump("Grammar");
83
77
  graph->dump("CFLGraph");
84
78
  }
85
- if (Options::CFLGraph.empty())
86
- {
87
- PointerAnalysis::finalize();
88
- }
89
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.577",
3
+ "version": "1.0.579",
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": {
package/tools/CFL/cfl.cpp CHANGED
@@ -28,11 +28,9 @@
28
28
 
29
29
 
30
30
  #include "SVF-FE/LLVMUtil.h"
31
- #include "Util/Options.h"
31
+ #include "SVF-FE/SVFIRBuilder.h"
32
32
  #include "CFL/CFLAlias.h"
33
33
  #include "CFL/CFLVF.h"
34
- #include "SVF-FE/SVFIRBuilder.h"
35
- #include "CFL/CFGNormalizer.h"
36
34
 
37
35
  using namespace llvm;
38
36
  using namespace SVF;
@@ -57,35 +55,24 @@ int main(int argc, char ** argv)
57
55
  {
58
56
  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);
59
57
  }
58
+
59
+ SVFIR* svfir = nullptr;
60
60
  if (Options::CFLGraph.empty())
61
61
  {
62
62
  SVFModule* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);
63
63
  svfModule->buildSymbolTableInfo();
64
-
65
- /// Build Program Assignment Graph (SVFIR)
66
64
  SVFIRBuilder builder;
67
- SVFIR* svfir = builder.build(svfModule);
68
- if (Options::CFLSVFG)
69
- {
70
- CFLVF* cflvf = new CFLVF(svfir);
71
- cflvf->analyze();
72
- delete cflvf;
73
- }
74
- else
75
- {
76
- CFLAlias* cflaa = new CFLAlias(svfir);
77
- cflaa->analyze();
78
- delete cflaa;
79
- }
80
- }
65
+ svfir = builder.build(svfModule);
66
+ } // if no dot form CFLGraph is specified, we use svfir from .bc.
67
+
68
+ CFLBase* cfl;
69
+ if (Options::CFLSVFG)
70
+ cfl = new CFLVF(svfir);
81
71
  else
82
- {
83
- SVFIR* svfir = nullptr;
84
- CFLAlias* cflaa = new CFLAlias(svfir);
85
- cflaa->analyze();
86
- delete cflaa;
87
- }
72
+ cfl = new CFLAlias(svfir); // if no svfg is specified, we use CFLAlias as the default one.
73
+ cfl->analyze();
88
74
 
75
+ delete cfl;
89
76
  SVFIR::releaseSVFIR();
90
77
  SVF::LLVMModuleSet::releaseLLVMModuleSet();
91
78