svf-tools 1.0.562 → 1.0.565

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 (187) hide show
  1. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +7 -38
  2. package/SVF-doxygen/html/html/BreakConstantExpr_8h_source.html +1 -2
  3. package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +11 -10
  4. package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +10 -9
  5. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +37 -37
  6. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +2 -3
  7. package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -2
  8. package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
  9. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +3 -3
  10. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +7 -7
  11. package/SVF-doxygen/html/html/DDAStat_8h_source.html +1 -1
  12. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +2 -2
  13. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  14. package/SVF-doxygen/html/html/ICFGStat_8h_source.html +2 -2
  15. package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +2 -2
  16. package/SVF-doxygen/html/html/LLVMModule_8h_source.html +10 -10
  17. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +2 -2
  18. package/SVF-doxygen/html/html/MHP_8cpp_source.html +2 -2
  19. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -2
  20. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +4 -4
  21. package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
  22. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +1 -1
  23. package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +1 -1
  24. package/SVF-doxygen/html/html/PEGGrammar_8txt.html +37 -138
  25. package/SVF-doxygen/html/html/PTAStat_8cpp.html +0 -1
  26. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +9 -111
  27. package/SVF-doxygen/html/html/PTAStat_8h_source.html +7 -69
  28. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +1 -1
  29. package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +6 -6
  30. package/SVF-doxygen/html/html/SVFGStat_8h_source.html +1 -1
  31. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +2 -1
  32. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +37 -37
  33. package/SVF-doxygen/html/html/SVFModule_8cpp.html +1 -0
  34. package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +6 -2
  35. package/SVF-doxygen/html/html/SVFModule_8h_source.html +1 -1
  36. package/SVF-doxygen/html/html/SVFStat_8cpp_source.html +65 -3
  37. package/SVF-doxygen/html/html/SVFStat_8h_source.html +16 -11
  38. package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
  39. package/SVF-doxygen/html/html/SaberCondAllocator_8cpp_source.html +1 -2
  40. package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
  41. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
  42. package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +1 -1
  43. package/SVF-doxygen/html/html/cfl_8cpp.html +1 -1
  44. package/SVF-doxygen/html/html/cfl_8cpp_source.html +1 -1
  45. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +5 -5
  46. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +5 -5
  47. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
  48. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat-members.html +18 -68
  49. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +23 -208
  50. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +3 -3
  51. package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
  52. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +12 -11
  53. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +63 -28
  54. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +1 -1
  55. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +8 -11
  56. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
  57. package/SVF-doxygen/html/html/classSVF_1_1DDAStat-members.html +17 -67
  58. package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +22 -176
  59. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +4 -4
  60. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +12 -12
  61. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +3 -3
  62. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +13 -13
  63. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat-members.html +20 -70
  64. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +20 -188
  65. package/SVF-doxygen/html/html/classSVF_1_1ICFGStat-members.html +17 -67
  66. package/SVF-doxygen/html/html/classSVF_1_1ICFGStat.html +18 -172
  67. package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +36 -34
  68. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +5 -5
  69. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +3 -3
  70. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +2 -2
  71. package/SVF-doxygen/html/html/classSVF_1_1MTAStat-members.html +23 -73
  72. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +26 -180
  73. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +2 -2
  74. package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat-members.html +22 -72
  75. package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +18 -172
  76. package/SVF-doxygen/html/html/classSVF_1_1MergeFunctionRets.html +2 -3
  77. package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator_1_1Clusterer.html +3 -3
  78. package/SVF-doxygen/html/html/classSVF_1_1PTAStat-members.html +11 -64
  79. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +33 -1830
  80. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +1 -1
  81. package/SVF-doxygen/html/html/classSVF_1_1SVFGStat-members.html +48 -98
  82. package/SVF-doxygen/html/html/classSVF_1_1SVFGStat.html +32 -186
  83. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +125 -122
  84. package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +5 -2
  85. package/SVF-doxygen/html/html/classSVF_1_1SVFStat-members.html +22 -17
  86. package/SVF-doxygen/html/html/classSVF_1_1SVFStat.html +237 -34
  87. package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +1 -1
  88. package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +1 -1
  89. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +1 -1
  90. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +6 -6
  91. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat-members.html +17 -67
  92. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +20 -187
  93. package/SVF-doxygen/html/html/dda_8cpp.html +1 -1
  94. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  95. package/SVF-doxygen/html/html/functions_a.html +5 -9
  96. package/SVF-doxygen/html/html/functions_b.html +8 -8
  97. package/SVF-doxygen/html/html/functions_c.html +2 -2
  98. package/SVF-doxygen/html/html/functions_e.html +2 -3
  99. package/SVF-doxygen/html/html/functions_f.html +6 -6
  100. package/SVF-doxygen/html/html/functions_func_b.html +6 -6
  101. package/SVF-doxygen/html/html/functions_func_p.html +4 -5
  102. package/SVF-doxygen/html/html/functions_func_s.html +1 -1
  103. package/SVF-doxygen/html/html/functions_m.html +1 -9
  104. package/SVF-doxygen/html/html/functions_n.html +0 -114
  105. package/SVF-doxygen/html/html/functions_o.html +6 -6
  106. package/SVF-doxygen/html/html/functions_p.html +15 -24
  107. package/SVF-doxygen/html/html/functions_s.html +12 -21
  108. package/SVF-doxygen/html/html/functions_t.html +14 -22
  109. package/SVF-doxygen/html/html/functions_u.html +0 -3
  110. package/SVF-doxygen/html/html/functions_v.html +6 -6
  111. package/SVF-doxygen/html/html/functions_vars_a.html +0 -4
  112. package/SVF-doxygen/html/html/functions_vars_e.html +1 -2
  113. package/SVF-doxygen/html/html/functions_vars_m.html +1 -9
  114. package/SVF-doxygen/html/html/functions_vars_n.html +0 -114
  115. package/SVF-doxygen/html/html/functions_vars_p.html +1 -7
  116. package/SVF-doxygen/html/html/functions_vars_s.html +1 -8
  117. package/SVF-doxygen/html/html/functions_vars_t.html +9 -15
  118. package/SVF-doxygen/html/html/functions_vars_u.html +0 -3
  119. package/SVF-doxygen/html/html/functions_w.html +11 -11
  120. package/SVF-doxygen/html/html/globals_a.html +0 -1
  121. package/SVF-doxygen/html/html/globals_c.html +5 -6
  122. package/SVF-doxygen/html/html/globals_e.html +0 -1
  123. package/SVF-doxygen/html/html/globals_f.html +2 -3
  124. package/SVF-doxygen/html/html/globals_func.html +3 -0
  125. package/SVF-doxygen/html/html/globals_g.html +5 -7
  126. package/SVF-doxygen/html/html/globals_m.html +3 -6
  127. package/SVF-doxygen/html/html/globals_vars.html +10 -19
  128. package/SVF-doxygen/html/html/mta_8cpp.html +1 -1
  129. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  130. package/SVF-doxygen/html/html/namespaceSVF.html +2 -2
  131. package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +1 -1
  132. package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +4 -4
  133. package/SVF-doxygen/html/html/saber_8cpp.html +1 -1
  134. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  135. package/SVF-doxygen/html/html/search/all_1.js +2 -3
  136. package/SVF-doxygen/html/html/search/all_10.js +10 -12
  137. package/SVF-doxygen/html/html/search/all_12.js +7 -9
  138. package/SVF-doxygen/html/html/search/all_13.js +7 -9
  139. package/SVF-doxygen/html/html/search/all_14.js +1 -1
  140. package/SVF-doxygen/html/html/search/all_15.js +4 -4
  141. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  142. package/SVF-doxygen/html/html/search/all_2.js +2 -2
  143. package/SVF-doxygen/html/html/search/all_3.js +2 -2
  144. package/SVF-doxygen/html/html/search/all_5.js +3 -3
  145. package/SVF-doxygen/html/html/search/all_6.js +4 -4
  146. package/SVF-doxygen/html/html/search/all_7.js +4 -4
  147. package/SVF-doxygen/html/html/search/all_c.js +1 -1
  148. package/SVF-doxygen/html/html/search/all_d.js +3 -5
  149. package/SVF-doxygen/html/html/search/all_e.js +5 -41
  150. package/SVF-doxygen/html/html/search/all_f.js +3 -3
  151. package/SVF-doxygen/html/html/search/functions_1.js +2 -2
  152. package/SVF-doxygen/html/html/search/functions_11.js +1 -1
  153. package/SVF-doxygen/html/html/search/functions_5.js +1 -0
  154. package/SVF-doxygen/html/html/search/functions_f.js +3 -3
  155. package/SVF-doxygen/html/html/search/variables_1.js +2 -3
  156. package/SVF-doxygen/html/html/search/variables_10.js +1 -3
  157. package/SVF-doxygen/html/html/search/variables_12.js +1 -3
  158. package/SVF-doxygen/html/html/search/variables_13.js +4 -6
  159. package/SVF-doxygen/html/html/search/variables_14.js +1 -1
  160. package/SVF-doxygen/html/html/search/variables_3.js +1 -1
  161. package/SVF-doxygen/html/html/search/variables_5.js +2 -2
  162. package/SVF-doxygen/html/html/search/variables_6.js +2 -2
  163. package/SVF-doxygen/html/html/search/variables_7.js +4 -4
  164. package/SVF-doxygen/html/html/search/variables_c.js +1 -1
  165. package/SVF-doxygen/html/html/search/variables_d.js +3 -5
  166. package/SVF-doxygen/html/html/search/variables_e.js +4 -40
  167. package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
  168. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  169. package/SVF-doxygen/html/html/wpa_8cpp.html +1 -1
  170. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  171. package/include/CFL/CFGNormalizer.h +3 -1
  172. package/include/CFL/PEGGrammar.txt +5 -18
  173. package/include/DDA/DDAVFSolver.h +4 -4
  174. package/include/Util/PTAStat.h +0 -79
  175. package/include/Util/SVFStat.h +7 -2
  176. package/lib/CFL/CFGNormalizer.cpp +57 -6
  177. package/lib/MTA/LockAnalysis.cpp +4 -4
  178. package/lib/MTA/MHP.cpp +2 -2
  179. package/lib/SVF-FE/LLVMModule.cpp +5 -0
  180. package/lib/SVF-FE/SVFIRBuilder.cpp +5 -0
  181. package/lib/Util/PTAStat.cpp +7 -254
  182. package/lib/Util/SVFModule.cpp +4 -0
  183. package/lib/Util/SVFStat.cpp +202 -2
  184. package/lib/WPA/AndersenStat.cpp +31 -31
  185. package/lib/WPA/FlowSensitiveStat.cpp +14 -14
  186. package/lib/WPA/VersionedFlowSensitiveStat.cpp +13 -13
  187. package/package.json +1 -1
@@ -48,95 +48,16 @@ class PointerAnalysis;
48
48
  class PTAStat: public SVFStat
49
49
  {
50
50
  public:
51
- static const char* TotalAnalysisTime; ///< Total analysis time
52
- static const char* SCCDetectionTime; ///< Total SCC detection time
53
- static const char* SCCMergeTime; ///< Total SCC merge time
54
-
55
- static const char* ProcessLoadStoreTime;///< time of processing loads and stores
56
- static const char* ProcessCopyGepTime; ///< time of processing copys and geps
57
- static const char* UpdateCallGraphTime; ///< time of updating call graph
58
-
59
- static const char* TotalNumOfPointers; ///< Total SVFIR value node
60
- static const char* TotalNumOfObjects; ///< Total SVFIR object node
61
- static const char* TotalNumOfFieldObjects; ///< Total SVFIR field object node
62
- static const char* MaxStructSize; ///< Max struct size
63
- static const char* TotalNumOfEdges; ///< Total SVFIR edge number
64
-
65
- static const char* NumOfAddrs; ///< SVFIR addr edge
66
- static const char* NumOfLoads; ///< SVFIR load edge
67
- static const char* NumOfStores; ///< SVFIR store edge
68
- static const char* NumOfCopys; ///< SVFIR copy edge
69
- static const char* NumOfGeps; ///< SVFIR gep edge
70
- static const char* NumOfCalls; ///< SVFIR call edge
71
- static const char* NumOfReturns; ///< SVFIR return edge
72
-
73
- static const char* NumOfProcessedAddrs; ///< SVFIR processed addr edge
74
- static const char* NumOfProcessedLoads; ///< SVFIR processed load edge
75
- static const char* NumOfProcessedStores; ///< SVFIR processed store edge
76
- static const char* NumOfProcessedCopys; ///< SVFIR processed copy edge
77
- static const char* NumOfProcessedGeps; ///< SVFIR processed gep edge
78
-
79
- static const char* NumOfSfr; ///< num of field representatives
80
- static const char* NumOfFieldExpand;
81
-
82
- static const char* NumOfFunctionObjs; ///< Function numbers
83
- static const char* NumOfGlobalObjs; ///< SVFIR global object node
84
- static const char* NumOfHeapObjs; ///< SVFIR heap object node
85
- static const char* NumOfStackObjs; ///< SVFIR stack object node
86
-
87
- static const char* NumOfObjsHasVarStruct; ///< SVFIR object node has var struct (maybe nested with array)
88
- static const char* NumOfObjsHasVarArray; ///< SVFIR object node has var array (maybe nested with struct)
89
- static const char* NumOfObjsHasConstStruct; ///< SVFIR object node has const struct (maybe nested with array)
90
- static const char* NumOfObjsHasConstArray; ///< SVFIR object node has const array (maybe nested with struct)
91
- static const char* NumOfNonPtrObjs; ///< SVFIR object node which is non pointer type object (do not have pts)
92
- static const char* NumOfConstantObjs; ///< SVFIR object node which is purely constant
93
-
94
- static const char* NumberOfFieldInsensitiveObj;
95
- static const char* NumberOfFieldSensitiveObj;
96
-
97
- static const char* NumOfPointers; ///< SVFIR value node, each of them maps to a llvm value
98
- static const char* NumOfGepFieldPointers; ///< SVFIR gep value node (field value, dynamically created dummy node)
99
-
100
- static const char* NumOfMemObjects; ///< SVFIR object node, each of them maps to a llvm value
101
- static const char* NumOfGepFieldObjects; ///< SVFIR gep object node (field obj, dynamically created dummy node)
102
-
103
- static const char* AveragePointsToSetSize; ///< Average points-to size of all variables
104
- static const char* AverageTopLevPointsToSetSize; ///< Average points-to size of top-level variables
105
- static const char* MaxPointsToSetSize; ///< Max points-to size
106
-
107
- static const char* NumOfIterations; ///< Number of iterations during resolution
108
-
109
- static const char* NumOfIndirectCallSites; ///< Number of indirect callsites
110
- static const char* NumOfIndirectEdgeSolved; ///< Number of indirect calledge resolved
111
-
112
- static const char* NumOfSCCDetection; ///< Number of scc detection performed
113
- static const char* NumOfCycles; ///< Number of scc cycles detected
114
- static const char* NumOfPWCCycles; ///< Number of scc cycles detected
115
- static const char* NumOfNodesInCycles; ///< Number of nodes in cycles detected
116
- static const char* MaxNumOfNodesInSCC; ///< max Number of nodes in one scc
117
-
118
- static const char* NumOfNullPointer; ///< Number of pointers points-to null
119
-
120
51
  PTAStat(PointerAnalysis* p);
121
52
  virtual ~PTAStat() {}
122
53
 
123
- NUMStatMap PTNumStatMap;
124
54
  NodeBS localVarInRecursion;
125
55
 
126
- double startTime;
127
- double endTime;
128
-
129
56
  void performStat() override;
130
57
 
131
- virtual void printStat(std::string str = "") override;
132
-
133
58
  void callgraphStat() override;
134
59
  private:
135
- void bitcastInstStat();
136
- void branchStat();
137
-
138
60
  PointerAnalysis* pta;
139
- std::string moduleName;
140
61
  };
141
62
 
142
63
  } // End namespace SVF
@@ -71,6 +71,7 @@ public:
71
71
  static double getClk(bool mark = false);
72
72
 
73
73
  NUMStatMap generalNumMap;
74
+ NUMStatMap PTNumStatMap;
74
75
  TIMEStatMap timeStatMap;
75
76
 
76
77
  double startTime;
@@ -78,7 +79,7 @@ public:
78
79
 
79
80
  virtual void performStat() = 0;
80
81
 
81
- virtual void printStat(std::string str = "") = 0;
82
+ virtual void printStat(std::string str = "");
82
83
 
83
84
  virtual void performStatPerQuery(NodeID) {}
84
85
 
@@ -86,8 +87,12 @@ public:
86
87
 
87
88
  virtual void callgraphStat() {}
88
89
 
89
- private:
90
+ static double timeOfBuildingLLVMModule;
91
+ static double timeOfBuildingSymbolTable;
92
+ static double timeOfBuildingSVFIR;
90
93
 
94
+ private:
95
+ void branchStat();
91
96
  std::string moduleName;
92
97
  }; // End class SVFStat
93
98
 
@@ -49,6 +49,7 @@ CFLGrammar* CFGNormalizer::normalize(GrammarBase *generalGrammar)
49
49
  grammar->setAttributeKinds(generalGrammar->getAttrSyms());
50
50
  grammar->setKind2AttrsMap(generalGrammar->getKind2AttrsMap());
51
51
  grammar->setRawProductions(generalGrammar->getRawProductions());
52
+ barReplace(grammar);
52
53
  ebnfSignReplace('*', grammar);
53
54
  ebnfSignReplace('?', grammar);
54
55
  ebnf_bin(grammar);
@@ -309,6 +310,36 @@ int CFGNormalizer::ebnfBracketMatch(GrammarBase::Production &prod, int i, CFLGra
309
310
  return 0;
310
311
  }
311
312
 
313
+ void CFGNormalizer::barReplace(CFLGrammar *grammar)
314
+ {
315
+ for (auto &symbolToProductionsPair : grammar->getRawProductions())
316
+ {
317
+ GrammarBase::Productions productions;
318
+ //GrammarBase::Productions Originalproductions = symbolToProductionsPair.second;
319
+ for (auto ebnfProduction : symbolToProductionsPair.second)
320
+ {
321
+ size_t i = 1;
322
+ size_t j = 1;
323
+ while (i < ebnfProduction.size())
324
+ {
325
+ if (grammar->kind2Str(ebnfProduction[i].kind) == "|")
326
+ {
327
+ GrammarBase::Production tempPro(ebnfProduction.begin()+j, ebnfProduction.begin()+i);
328
+ tempPro.insert(tempPro.begin(), symbolToProductionsPair.first );
329
+ productions.insert(tempPro);
330
+ j = i+1;
331
+ }
332
+ i++;
333
+ }
334
+ GrammarBase::Production tempPro(ebnfProduction.begin()+j, ebnfProduction.begin()+i);
335
+ tempPro.insert(tempPro.begin(), symbolToProductionsPair.first );
336
+ productions.insert(tempPro);
337
+ }
338
+ symbolToProductionsPair.second.clear();
339
+ symbolToProductionsPair.second = productions;
340
+ }
341
+ }
342
+
312
343
  void CFGNormalizer::ebnfSignReplace(char sign, CFLGrammar *grammar)
313
344
  {
314
345
  /// Replace Sign Group With tempNonterminal 'X'
@@ -352,6 +383,13 @@ void CFGNormalizer::ebnfSignReplace(char sign, CFLGrammar *grammar)
352
383
  ebnfProduction.insert(ebnfProduction.begin() + signGroupStart, grammar->str2Symbol(newProductions[groupString]));
353
384
  productions.insert(ebnfProduction);
354
385
  }
386
+ else if ( (signGroupStart == 1) && (i == ebnfProduction.size() -1))
387
+ {
388
+ newProductions[groupString] = grammar->kind2Str(ebnfProduction[0].kind);
389
+ productions.erase(ebnfProduction);
390
+ ebnfProduction.erase(ebnfProduction.begin() + signGroupStart, ebnfProduction.begin() + i + 1);
391
+
392
+ }
355
393
  else
356
394
  {
357
395
  tempNonterminal = "X";
@@ -379,25 +417,38 @@ void CFGNormalizer::ebnfSignReplace(char sign, CFLGrammar *grammar)
379
417
  std::string new_nonterminal = rep.second;
380
418
  GrammarBase::Production temp_list = {grammar->str2Symbol(new_nonterminal), grammar->str2Symbol("epsilon")};
381
419
  grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
382
- /// insert second rule for '*' X -> X E for '+' X -> X
420
+ /// insert second rule for '*' X -> X E for '+' X -> E
383
421
  temp_list = {grammar->str2Symbol(new_nonterminal)};
384
- if (sign == '*')
422
+ if (sign == '*' || sign == '?')
385
423
  {
386
424
  /// Insert Back the Group
387
425
  GrammarBase::Production E = strTrans(rep.first, grammar);
388
426
  GrammarBase::Production withoutSign = {};
389
- for (auto &word : E)
427
+ if (sign == '*')
390
428
  {
391
- if (word != grammar->str2Symbol("*") && word != grammar->str2Symbol("(") && word != grammar->str2Symbol(")"))
429
+ for (auto &word : E)
392
430
  {
393
- withoutSign.push_back(word);
431
+ if (word != grammar->str2Symbol("*") && word != grammar->str2Symbol("(") && word != grammar->str2Symbol(")"))
432
+ {
433
+ withoutSign.push_back(word);
434
+ }
435
+ }
436
+ withoutSign.push_back(grammar->str2Symbol(rep.second));
437
+ }
438
+ if (sign == '?')
439
+ {
440
+ for (auto &word : E)
441
+ {
442
+ if (word != grammar->str2Symbol("?") && word != grammar->str2Symbol("(") && word != grammar->str2Symbol(")"))
443
+ {
444
+ withoutSign.push_back(word);
445
+ }
394
446
  }
395
447
  }
396
448
  temp_list.insert(temp_list.end(), withoutSign.begin(), withoutSign.end());
397
449
  }
398
450
  grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
399
451
  }
400
-
401
452
  }
402
453
 
403
454
  GrammarBase::Production CFGNormalizer::strTrans(std::string LHS, CFLGrammar *grammar)
@@ -591,12 +591,12 @@ bool LockAnalysis::isProtectedByCommonLock(const Instruction *i1, const Instruct
591
591
  {
592
592
  numOfTotalQueries++;
593
593
  bool commonlock = false;
594
- DOTIMESTAT(double queryStart = PTAStat::getClk());
594
+ DOTIMESTAT(double queryStart = PTAStat::getClk(true));
595
595
  if (isInsideIntraLock(i1) && isInsideIntraLock(i2))
596
596
  commonlock = isProtectedByCommonCILock(i1,i2) ;
597
597
  else
598
598
  commonlock = isProtectedByCommonCxtLock(i1,i2);
599
- DOTIMESTAT(double queryEnd = PTAStat::getClk());
599
+ DOTIMESTAT(double queryEnd = PTAStat::getClk(true));
600
600
  DOTIMESTAT(lockQueriesTime += (queryEnd - queryStart) / TIMEINTERVAL);
601
601
  return commonlock;
602
602
  }
@@ -667,7 +667,7 @@ bool LockAnalysis::isProtectedByCommonCxtLock(const Instruction *i1, const Instr
667
667
  */
668
668
  bool LockAnalysis::isInSameSpan(const Instruction *i1, const Instruction *i2)
669
669
  {
670
- DOTIMESTAT(double queryStart = PTAStat::getClk());
670
+ DOTIMESTAT(double queryStart = PTAStat::getClk(true));
671
671
 
672
672
  bool sameSpan = false;
673
673
  if (isInsideIntraLock(i1) && isInsideIntraLock(i2))
@@ -675,7 +675,7 @@ bool LockAnalysis::isInSameSpan(const Instruction *i1, const Instruction *i2)
675
675
  else
676
676
  sameSpan = isInSameCSSpan(i1, i2);
677
677
 
678
- DOTIMESTAT(double queryEnd = PTAStat::getClk());
678
+ DOTIMESTAT(double queryEnd = PTAStat::getClk(true));
679
679
  DOTIMESTAT(lockQueriesTime += (queryEnd - queryStart) / TIMEINTERVAL);
680
680
  return sameSpan;
681
681
  }
package/lib/MTA/MHP.cpp CHANGED
@@ -627,9 +627,9 @@ bool MHP::mayHappenInParallel(const Instruction* i1, const Instruction* i2)
627
627
  {
628
628
  numOfTotalQueries++;
629
629
 
630
- DOTIMESTAT(double queryStart = PTAStat::getClk());
630
+ DOTIMESTAT(double queryStart = PTAStat::getClk(true));
631
631
  bool mhp=mayHappenInParallelCache(i1,i2);
632
- DOTIMESTAT(double queryEnd = PTAStat::getClk());
632
+ DOTIMESTAT(double queryEnd = PTAStat::getClk(true));
633
633
  DOTIMESTAT(interleavingQueriesTime += (queryEnd - queryStart) / TIMEINTERVAL);
634
634
 
635
635
  return mhp;
@@ -83,6 +83,8 @@ SVFModule* LLVMModuleSet::buildSVFModule(Module &mod)
83
83
 
84
84
  SVFModule* LLVMModuleSet::buildSVFModule(const std::vector<std::string> &moduleNameVec)
85
85
  {
86
+ double startTime = SVFStat::getClk(true);
87
+
86
88
  assert(llvmModuleSet && "LLVM Module set needs to be created!");
87
89
 
88
90
  loadModules(moduleNameVec);
@@ -94,6 +96,9 @@ SVFModule* LLVMModuleSet::buildSVFModule(const std::vector<std::string> &moduleN
94
96
 
95
97
  build();
96
98
 
99
+ double endTime = SVFStat::getClk(true);
100
+ SVFStat::timeOfBuildingLLVMModule = (endTime - startTime)/TIMEINTERVAL;
101
+
97
102
  return svfModule;
98
103
  }
99
104
 
@@ -49,6 +49,7 @@ using namespace LLVMUtil;
49
49
  */
50
50
  SVFIR* SVFIRBuilder::build(SVFModule* svfModule)
51
51
  {
52
+ double startTime = SVFStat::getClk(true);
52
53
 
53
54
  // We read SVFIR from a user-defined txt instead of parsing SVFIR from LLVM IR
54
55
  if (SVFModule::pagReadFromTXT())
@@ -141,6 +142,10 @@ SVFIR* SVFIRBuilder::build(SVFModule* svfModule)
141
142
  LLVMLoopAnalysis loopAnalysis;
142
143
  loopAnalysis.build(pag->getICFG());
143
144
  }
145
+
146
+ double endTime = SVFStat::getClk(true);
147
+ SVFStat::timeOfBuildingSVFIR = (endTime - startTime)/TIMEINTERVAL;
148
+
144
149
  return pag;
145
150
  }
146
151
 
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -32,186 +32,33 @@
32
32
  #include "Util/PTAStat.h"
33
33
  #include "MemoryModel/PointerAnalysisImpl.h"
34
34
  #include "MemoryModel/SVFIR.h"
35
- #include "Util/Options.h"
36
35
 
37
36
  using namespace SVF;
38
37
  using namespace std;
39
38
 
40
- const char* PTAStat:: TotalAnalysisTime = "TotalTime"; ///< SVFIR value nodes ??
41
- const char* PTAStat:: SCCDetectionTime = "SCCDetectTime"; ///< Total SCC detection time
42
- const char* PTAStat:: SCCMergeTime = "SCCMergeTime"; ///< Total SCC merge time
43
-
44
- const char* PTAStat:: ProcessLoadStoreTime = "LoadStoreTime"; ///< process load and store time
45
- const char* PTAStat:: ProcessCopyGepTime = "CopyGepTime"; ///< process copy and gep time
46
- const char* PTAStat:: UpdateCallGraphTime = "UpdateCGTime"; ///< process copy and gep time ??
47
-
48
- const char* PTAStat:: TotalNumOfPointers = "TotalPointers"; ///< SVFIR value nodes
49
- const char* PTAStat:: TotalNumOfObjects = "TotalObjects"; ///< Total SVFIR object node
50
- const char* PTAStat:: TotalNumOfFieldObjects = "TotalFieldObjects"; ///< Total SVFIR field object node
51
- const char* PTAStat:: MaxStructSize = "MaxStructSize"; ///< Max struct size (bytes)
52
- const char* PTAStat:: TotalNumOfEdges = "TotalSVFStmts"; ///< Total SVFIR edge number
53
-
54
- const char* PTAStat:: NumOfFunctionObjs = "FunctionObjs"; ///< function numbers
55
- const char* PTAStat:: NumOfGlobalObjs = "GlobalObjs"; ///< SVFIR global object node
56
- const char* PTAStat:: NumOfHeapObjs = "HeapObjs"; ///< SVFIR heap object node
57
- const char* PTAStat:: NumOfStackObjs = "StackObjs"; ///< SVFIR stack object node
58
-
59
- const char* PTAStat::NumberOfFieldInsensitiveObj = "FIObjNum";
60
- const char* PTAStat::NumberOfFieldSensitiveObj = "FSObjNum";
61
-
62
- const char* PTAStat:: NumOfObjsHasVarStruct = "VarStructObj"; ///< SVFIR object node has struct (maybe nested with array)
63
- const char* PTAStat:: NumOfObjsHasVarArray = "VarArrayObj"; ///< SVFIR object node has array (maybe nested with struct)
64
- const char* PTAStat:: NumOfObjsHasConstStruct = "ConstStructObj"; ///< SVFIR object node has const struct (maybe nested with array)
65
- const char* PTAStat:: NumOfObjsHasConstArray = "ConstArrayObj"; ///< SVFIR object node has const array (maybe nested with struct)
66
- const char* PTAStat:: NumOfNonPtrObjs = "NonPtrObj"; ///< SVFIR object node which is non pointer type object (do not have pts)
67
- const char* PTAStat:: NumOfConstantObjs = "ConstantObj"; ///< SVFIR object node which is purely scalar
68
-
69
- const char* PTAStat:: NumOfAddrs = "AddrsNum"; ///< SVFIR addr edge
70
- const char* PTAStat:: NumOfLoads = "LoadsNum"; ///< SVFIR load edge
71
- const char* PTAStat:: NumOfStores = "StoresNum"; ///< SVFIR store edge
72
- const char* PTAStat:: NumOfCopys = "CopysNum"; ///< SVFIR copy edge
73
- const char* PTAStat:: NumOfGeps = "GepsNum"; ///< SVFIR gep edge
74
- const char* PTAStat:: NumOfCalls = "CallsNum"; ///< SVFIR call edge
75
- const char* PTAStat:: NumOfReturns = "ReturnsNum"; ///< SVFIR return edge
76
-
77
- const char* PTAStat:: NumOfProcessedAddrs = "AddrProcessed"; ///< SVFIR addr processed edge
78
- const char* PTAStat:: NumOfProcessedLoads = "LoadProcessed"; ///< SVFIR load processed edge
79
- const char* PTAStat:: NumOfProcessedStores = "StoreProcessed"; ///< SVFIR store processed edge
80
- const char* PTAStat:: NumOfProcessedCopys = "CopyProcessed"; ///< SVFIR copy processed edge
81
- const char* PTAStat:: NumOfProcessedGeps = "GepProcessed"; ///< SVFIR gep processed edge
82
-
83
- const char* PTAStat::NumOfSfr = "NumOfSFRs"; ///< number of field representatives
84
- const char* PTAStat::NumOfFieldExpand = "NumOfFieldExpand";
85
-
86
- const char* PTAStat:: NumOfPointers = "Pointers"; ///< SVFIR value node, each of them maps to a llvm value
87
- const char* PTAStat:: NumOfGepFieldPointers = "DYFieldPtrs"; ///< SVFIR gep value node (field value, dynamically created dummy node)
88
-
89
- const char* PTAStat:: NumOfMemObjects = "MemObjects"; ///< SVFIR object node, each of them maps to a llvm value
90
- const char* PTAStat:: NumOfGepFieldObjects = "DYFieldObjs"; ///< SVFIR gep object node (field obj, dynamically created dummy node)
91
-
92
- const char* PTAStat:: AveragePointsToSetSize = "AvgPtsSetSize"; ///< Average Points-to set size
93
- const char* PTAStat:: AverageTopLevPointsToSetSize = "AvgTopLvlPtsSize"; ///< Average Points-to set size of top level pointers
94
- const char* PTAStat:: MaxPointsToSetSize = "MaxPtsSetSize"; ///< Max Points-to set size
95
-
96
- const char* PTAStat:: NumOfIterations = "Iterations"; ///< Number of iterations during resolution
97
-
98
- const char* PTAStat:: NumOfIndirectCallSites = "IndCallSites"; ///< Number of indirect callsites
99
- const char* PTAStat:: NumOfIndirectEdgeSolved = "IndEdgeSolved"; ///< Number of indirect calledge resolved
100
-
101
- const char* PTAStat:: NumOfSCCDetection = "NumOfSCCDetect"; ///< Number of scc detection performed
102
- const char* PTAStat:: NumOfCycles = "TotalCycleNum"; ///< Number of scc cycles detected
103
- const char* PTAStat:: NumOfPWCCycles = "TotalPWCCycleNum"; ///< Number of pwc scc cycles detected
104
- const char* PTAStat:: NumOfNodesInCycles = "NodesInCycles"; ///< Number of nodes in cycles detected
105
- const char* PTAStat:: MaxNumOfNodesInSCC = "MaxNodesInSCC"; ///< max Number of nodes in one scc cycle
106
-
107
- const char* PTAStat:: NumOfNullPointer = "NullPointer"; ///< Number of pointers points-to null
108
-
109
- PTAStat::PTAStat(PointerAnalysis* p) : SVFStat(), startTime(0), endTime(0), pta(p)
39
+ PTAStat::PTAStat(PointerAnalysis* p) : SVFStat(), pta(p)
110
40
  {
111
-
112
41
  }
113
42
 
114
43
  void PTAStat::performStat()
115
44
  {
116
-
117
45
  callgraphStat();
118
46
 
47
+ SVFStat::performStat();
48
+
119
49
  SVFIR* pag = SVFIR::getPAG();
120
- u32_t numOfFunction = 0;
121
- u32_t numOfGlobal = 0;
122
- u32_t numOfStack = 0;
123
- u32_t numOfHeap = 0;
124
- u32_t numOfHasVarArray = 0;
125
- u32_t numOfHasVarStruct = 0;
126
- u32_t numOfHasConstArray = 0;
127
- u32_t numOfHasConstStruct = 0;
128
- u32_t numOfScalar = 0;
129
- u32_t numOfConstant = 0;
130
- u32_t fiObjNumber = 0;
131
- u32_t fsObjNumber = 0;
132
- Set<SymID> memObjSet;
133
50
  for(SVFIR::iterator it = pag->begin(), eit = pag->end(); it!=eit; ++it)
134
51
  {
135
52
  PAGNode* node = it->second;
136
- if(ObjVar* obj = SVFUtil::dyn_cast<ObjVar>(node))
53
+ if(SVFUtil::isa<ObjVar>(node))
137
54
  {
138
- const MemObj* mem = obj->getMemObj();
139
- if (memObjSet.insert(mem->getId()).second == false)
140
- continue;
141
- if(mem->isBlackHoleObj())
142
- continue;
143
- if(mem->isFunction())
144
- numOfFunction++;
145
- if(mem->isGlobalObj())
146
- numOfGlobal++;
147
- if(mem->isStack())
148
- numOfStack++;
149
- if(mem->isHeap())
150
- numOfHeap++;
151
- if(mem->isVarArray())
152
- numOfHasVarArray++;
153
- if(mem->isVarStruct())
154
- numOfHasVarStruct++;
155
- if(mem->isConstantArray())
156
- numOfHasConstArray++;
157
- if(mem->isConstantStruct())
158
- numOfHasConstStruct++;
159
- if(mem->hasPtrObj() == false)
160
- numOfScalar++;
161
- if(mem->isConstDataOrConstGlobal())
162
- numOfConstant++;
163
-
164
- if (mem->isFieldInsensitive())
165
- fiObjNumber++;
166
- else
167
- fsObjNumber++;
168
-
169
55
  if(pta->isLocalVarInRecursiveFun(node->getId()))
170
56
  {
171
57
  localVarInRecursion.set(node->getId());
172
58
  }
173
59
  }
174
60
  }
175
-
176
-
177
-
178
- generalNumMap[TotalNumOfPointers] = pag->getValueNodeNum() + pag->getFieldValNodeNum();
179
- generalNumMap[TotalNumOfObjects] = pag->getObjectNodeNum();
180
- generalNumMap[TotalNumOfFieldObjects] = pag->getFieldObjNodeNum();
181
- generalNumMap[MaxStructSize] = SymbolTableInfo::SymbolInfo()->getMaxStructSize();
182
- generalNumMap[TotalNumOfEdges] = pag->getPAGEdgeNum();
183
- generalNumMap["TotalPTASVFStmts"] = pag->getPTAPAGEdgeNum();
184
- generalNumMap[NumberOfFieldInsensitiveObj] = fiObjNumber;
185
- generalNumMap[NumberOfFieldSensitiveObj] = fsObjNumber;
186
-
187
- generalNumMap[NumOfAddrs] = pag->getSVFStmtSet(SVFStmt::Addr).size();
188
- generalNumMap[NumOfLoads] = pag->getSVFStmtSet(SVFStmt::Load).size();
189
- generalNumMap[NumOfStores] = pag->getSVFStmtSet(SVFStmt::Store).size();
190
- generalNumMap[NumOfCopys] = pag->getSVFStmtSet(SVFStmt::Copy).size();
191
- generalNumMap[NumOfGeps] = pag->getSVFStmtSet(SVFStmt::Gep).size();
192
- generalNumMap[NumOfCalls] = pag->getSVFStmtSet(SVFStmt::Call).size();
193
- generalNumMap[NumOfReturns] = pag->getSVFStmtSet(SVFStmt::Ret).size();
194
-
195
- generalNumMap[NumOfFunctionObjs] = numOfFunction;
196
- generalNumMap[NumOfGlobalObjs] = numOfGlobal;
197
- generalNumMap[NumOfHeapObjs] = numOfHeap;
198
- generalNumMap[NumOfStackObjs] = numOfStack;
199
-
200
- generalNumMap[NumOfObjsHasVarStruct] = numOfHasVarStruct;
201
- generalNumMap[NumOfObjsHasVarArray] = numOfHasVarArray;
202
- generalNumMap[NumOfObjsHasConstStruct] = numOfHasConstStruct;
203
- generalNumMap[NumOfObjsHasConstArray] = numOfHasConstArray;
204
- generalNumMap[NumOfNonPtrObjs] = numOfScalar;
205
- generalNumMap[NumOfConstantObjs] = numOfConstant;
206
-
207
- generalNumMap[NumOfIndirectCallSites] = pag->getIndirectCallsites().size();
208
- generalNumMap["TotalCallSite"] = pag->getCallSiteSet().size();
209
- generalNumMap["LocalVarInRecur"] = localVarInRecursion.count();
210
- // REFACTOR-TODO bitcastInstStat();
211
- branchStat();
212
-
213
- printStat("General Stats");
214
-
61
+ PTNumStatMap["LocalVarInRecur"] = localVarInRecursion.count();
215
62
  }
216
63
 
217
64
  void PTAStat::callgraphStat()
@@ -265,101 +112,7 @@ void PTAStat::callgraphStat()
265
112
  PTNumStatMap["TotalEdge"] = totalEdge;
266
113
  PTNumStatMap["CalRetPairInCycle"] = edgeInCycle;
267
114
 
268
- PTAStat::printStat("CallGraph Stats");
115
+ SVFStat::printStat("CallGraph Stats");
269
116
 
270
117
  delete callgraphSCC;
271
118
  }
272
-
273
- void PTAStat::printStat(string statname)
274
- {
275
-
276
- std::string moduleName(SymbolTableInfo::SymbolInfo()->getModule()->getModuleIdentifier());
277
- std::vector<std::string> names = SVFUtil::split(moduleName,'/');
278
- if (names.size() > 1)
279
- {
280
- moduleName = names[names.size() - 1];
281
- }
282
-
283
- SVFUtil::outs() << "\n*********" << statname << "***************\n";
284
- SVFUtil::outs() << "################ (program : " << moduleName << ")###############\n";
285
- SVFUtil::outs().flags(std::ios::left);
286
- unsigned field_width = 20;
287
- for(NUMStatMap::iterator it = generalNumMap.begin(), eit = generalNumMap.end(); it!=eit; ++it)
288
- {
289
- // format out put with width 20 space
290
- std::cout << std::setw(field_width) << it->first << it->second << "\n";
291
- }
292
- SVFUtil::outs() << "-------------------------------------------------------\n";
293
- for(TIMEStatMap::iterator it = timeStatMap.begin(), eit = timeStatMap.end(); it!=eit; ++it)
294
- {
295
- // format out put with width 20 space
296
- SVFUtil::outs() << std::setw(field_width) << it->first << it->second << "\n";
297
- }
298
- for(NUMStatMap::iterator it = PTNumStatMap.begin(), eit = PTNumStatMap.end(); it!=eit; ++it)
299
- {
300
- // format out put with width 20 space
301
- SVFUtil::outs() << std::setw(field_width) << it->first << it->second << "\n";
302
- }
303
-
304
- SVFUtil::outs() << "#######################################################" << std::endl;
305
- SVFUtil::outs().flush();
306
- generalNumMap.clear();
307
- PTNumStatMap.clear();
308
- timeStatMap.clear();
309
- }
310
-
311
-
312
- /* REFACTOR-TODO
313
- void PTAStat::bitcastInstStat()
314
- {
315
- SVFModule* module = pta->getModule();
316
- u32_t numberOfBitCast = 0;
317
- for (SVFModule::llvm_const_iterator funIter = module->llvmFunBegin(), funEiter = module->llvmFunEnd();
318
- funIter != funEiter; ++funIter)
319
- {
320
- const Function* func = *funIter;
321
- for (Function::const_iterator bbIt = func->begin(), bbEit = func->end();
322
- bbIt != bbEit; ++bbIt)
323
- {
324
- const BasicBlock& bb = *bbIt;
325
- for (BasicBlock::const_iterator instIt = bb.begin(), instEit = bb.end();
326
- instIt != instEit; ++instIt)
327
- {
328
- const Instruction& inst = *instIt;
329
- if (const BitCastInst* bitcast = SVFUtil::dyn_cast<BitCastInst>(&inst))
330
- {
331
- if (SVFUtil::isa<PointerType>(bitcast->getSrcTy()))
332
- numberOfBitCast++;
333
- }
334
- }
335
- }
336
- }
337
-
338
- generalNumMap["BitCastNumber"] = numberOfBitCast;
339
- }
340
- */
341
-
342
- void PTAStat::branchStat()
343
- {
344
- SVFModule* module = pta->getModule();
345
- u32_t numOfBB_2Succ = 0;
346
- u32_t numOfBB_3Succ = 0;
347
- for (SVFModule::llvm_const_iterator funIter = module->llvmFunBegin(), funEiter = module->llvmFunEnd();
348
- funIter != funEiter; ++funIter)
349
- {
350
- const Function* func = *funIter;
351
- for (Function::const_iterator bbIt = func->begin(), bbEit = func->end();
352
- bbIt != bbEit; ++bbIt)
353
- {
354
- const BasicBlock& bb = *bbIt;
355
- u32_t numOfSucc = bb.getTerminator()->getNumSuccessors();
356
- if (numOfSucc == 2)
357
- numOfBB_2Succ++;
358
- else if (numOfSucc > 2)
359
- numOfBB_3Succ++;
360
- }
361
- }
362
-
363
- generalNumMap["BBWith2Succ"] = numOfBB_2Succ;
364
- generalNumMap["BBWith3Succ"] = numOfBB_3Succ;
365
- }
@@ -24,11 +24,13 @@
24
24
  #include "Util/SVFModule.h"
25
25
  #include "SVF-FE/SymbolTableBuilder.h"
26
26
  #include "Util/SVFUtil.h"
27
+ #include "Util/SVFStat.h"
27
28
 
28
29
  using namespace SVF;
29
30
 
30
31
  void SVFModule::buildSymbolTableInfo()
31
32
  {
33
+ double startTime = SVFStat::getClk(true);
32
34
  if (!pagReadFromTXT())
33
35
  {
34
36
  /// building symbol table
@@ -37,4 +39,6 @@ void SVFModule::buildSymbolTableInfo()
37
39
  SymbolTableBuilder builder(symInfo);
38
40
  builder.buildMemModel(this);
39
41
  }
42
+ double endTime = SVFStat::getClk(true);
43
+ SVFStat::timeOfBuildingSymbolTable = (endTime - startTime)/TIMEINTERVAL;
40
44
  }