svf-tools 1.0.478 → 1.0.481

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 (322) hide show
  1. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
  2. package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
  3. package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +1 -1
  4. package/SVF-doxygen/html/html/CFGNormalizer_8cpp.html +5 -4
  5. package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +50 -40
  6. package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +20 -18
  7. package/SVF-doxygen/html/html/CFLAlias_8cpp.html +80 -0
  8. package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +107 -0
  9. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +14 -35
  10. package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +10 -10
  11. package/SVF-doxygen/html/html/CFLGrammar_8cpp.html +1 -0
  12. package/SVF-doxygen/html/html/CFLGrammar_8cpp_source.html +34 -23
  13. package/SVF-doxygen/html/html/CFLGrammar_8h.html +9 -1
  14. package/SVF-doxygen/html/html/CFLGrammar_8h_source.html +106 -62
  15. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +58 -151
  16. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +24 -11
  17. package/SVF-doxygen/html/html/CFLGraphBuilder_8h.html +2 -0
  18. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +18 -19
  19. package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +27 -16
  20. package/SVF-doxygen/html/html/CFLGraph_8h_source.html +20 -16
  21. package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +14 -14
  22. package/SVF-doxygen/html/html/CFLSolver_8h_source.html +5 -5
  23. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
  24. package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -1
  25. package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
  26. package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
  27. package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +1 -1
  28. package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
  29. package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
  30. package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
  31. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +7 -7
  32. package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
  33. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +4 -4
  34. package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
  35. package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
  36. package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
  37. package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +36 -32
  38. package/SVF-doxygen/html/html/ExtAPI_8h.html +36 -0
  39. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +66 -64
  40. package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
  41. package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
  42. package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +14 -17
  43. package/SVF-doxygen/html/html/GrammarBuilder_8h.html +0 -1
  44. package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +9 -11
  45. package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +5 -3
  46. package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +2 -2
  47. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
  48. package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
  49. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
  50. package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
  51. package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
  52. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  53. package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
  54. package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
  55. package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
  56. package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
  57. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
  58. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
  59. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
  60. package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
  61. package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
  62. package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
  63. package/SVF-doxygen/html/html/OfflineConsG_8h_source.html +1 -1
  64. package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
  65. package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
  66. package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
  67. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
  68. package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +1 -1
  69. package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +1 -1
  70. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
  71. package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
  72. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +3 -3
  73. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
  74. package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +1 -1
  75. package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
  76. package/SVF-doxygen/html/html/SVFUtil_8h_source.html +8 -8
  77. package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
  78. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +17 -17
  79. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +15 -15
  80. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  81. package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
  82. package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
  83. package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
  84. package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
  85. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  86. package/SVF-doxygen/html/html/annotated.html +298 -293
  87. package/SVF-doxygen/html/html/cfl_8cpp.html +2 -2
  88. package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
  89. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +96 -0
  90. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +197 -0
  91. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.png +0 -0
  92. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
  93. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +1 -1
  94. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +1 -1
  95. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +1 -1
  96. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
  97. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
  98. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +1 -1
  99. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
  100. package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
  101. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +3 -3
  102. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +108 -99
  103. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +1 -1
  104. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -39
  105. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +3 -1
  106. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +62 -0
  107. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList-members.html +91 -0
  108. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList.html +459 -0
  109. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +47 -38
  110. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +180 -137
  111. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
  112. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +44 -22
  113. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder-members.html +8 -8
  114. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +53 -43
  115. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.png +0 -0
  116. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +3 -3
  117. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +14 -14
  118. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
  119. package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
  120. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +4 -4
  121. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  122. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  123. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
  124. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +158 -125
  125. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +20 -21
  126. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  127. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +29 -21
  128. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +397 -179
  129. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash-members.html +81 -0
  130. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash.html +124 -0
  131. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +6 -7
  132. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +73 -91
  133. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
  134. package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
  135. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
  136. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +1 -1
  137. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
  138. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +1 -1
  139. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
  140. package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
  141. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +3 -3
  142. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +1 -1
  143. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
  144. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
  145. package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +1 -1
  146. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
  147. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +14 -14
  148. package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +2 -2
  149. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +54 -53
  150. package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +2 -2
  151. package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +11 -11
  152. package/SVF-doxygen/html/html/classes.html +105 -106
  153. package/SVF-doxygen/html/html/classllvm_1_1GraphPrinter.html +1 -1
  154. package/SVF-doxygen/html/html/cuddInt_8c.html +17 -17
  155. package/SVF-doxygen/html/html/cuddInt_8c_source.html +3 -3
  156. package/SVF-doxygen/html/html/cuddInt_8h.html +5 -5
  157. package/SVF-doxygen/html/html/cudd_8h.html +9 -9
  158. package/SVF-doxygen/html/html/cudd_8h_source.html +1 -1
  159. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  160. package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
  161. package/SVF-doxygen/html/html/files.html +5 -4
  162. package/SVF-doxygen/html/html/functions_0x7e.html +3 -0
  163. package/SVF-doxygen/html/html/functions_a.html +14 -8
  164. package/SVF-doxygen/html/html/functions_b.html +4 -3
  165. package/SVF-doxygen/html/html/functions_c.html +37 -35
  166. package/SVF-doxygen/html/html/functions_d.html +8 -4
  167. package/SVF-doxygen/html/html/functions_e.html +15 -8
  168. package/SVF-doxygen/html/html/functions_f.html +16 -17
  169. package/SVF-doxygen/html/html/functions_func.html +1 -1
  170. package/SVF-doxygen/html/html/functions_func_0x7e.html +3 -0
  171. package/SVF-doxygen/html/html/functions_func_b.html +3 -2
  172. package/SVF-doxygen/html/html/functions_func_c.html +32 -28
  173. package/SVF-doxygen/html/html/functions_func_e.html +14 -7
  174. package/SVF-doxygen/html/html/functions_func_f.html +3 -2
  175. package/SVF-doxygen/html/html/functions_func_g.html +22 -18
  176. package/SVF-doxygen/html/html/functions_func_i.html +18 -9
  177. package/SVF-doxygen/html/html/functions_func_l.html +2 -5
  178. package/SVF-doxygen/html/html/functions_func_o.html +20 -5
  179. package/SVF-doxygen/html/html/functions_func_p.html +9 -7
  180. package/SVF-doxygen/html/html/functions_func_s.html +12 -6
  181. package/SVF-doxygen/html/html/functions_g.html +25 -21
  182. package/SVF-doxygen/html/html/functions_i.html +29 -20
  183. package/SVF-doxygen/html/html/functions_k.html +2 -1
  184. package/SVF-doxygen/html/html/functions_l.html +1 -4
  185. package/SVF-doxygen/html/html/functions_n.html +1 -1
  186. package/SVF-doxygen/html/html/functions_o.html +24 -15
  187. package/SVF-doxygen/html/html/functions_p.html +18 -18
  188. package/SVF-doxygen/html/html/functions_r.html +5 -5
  189. package/SVF-doxygen/html/html/functions_s.html +24 -16
  190. package/SVF-doxygen/html/html/functions_t.html +5 -7
  191. package/SVF-doxygen/html/html/functions_type_d.html +4 -2
  192. package/SVF-doxygen/html/html/functions_type_p.html +1 -1
  193. package/SVF-doxygen/html/html/functions_type_s.html +7 -1
  194. package/SVF-doxygen/html/html/functions_type_v.html +3 -0
  195. package/SVF-doxygen/html/html/functions_v.html +7 -1
  196. package/SVF-doxygen/html/html/functions_vars_a.html +6 -0
  197. package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
  198. package/SVF-doxygen/html/html/functions_vars_d.html +4 -2
  199. package/SVF-doxygen/html/html/functions_vars_e.html +1 -1
  200. package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
  201. package/SVF-doxygen/html/html/functions_vars_k.html +1 -0
  202. package/SVF-doxygen/html/html/functions_vars_n.html +1 -1
  203. package/SVF-doxygen/html/html/functions_vars_r.html +1 -1
  204. package/SVF-doxygen/html/html/functions_vars_s.html +2 -2
  205. package/SVF-doxygen/html/html/functions_vars_t.html +1 -1
  206. package/SVF-doxygen/html/html/functions_vars_v.html +3 -0
  207. package/SVF-doxygen/html/html/functions_w.html +6 -10
  208. package/SVF-doxygen/html/html/globals.html +1 -2
  209. package/SVF-doxygen/html/html/globals_a.html +1 -6
  210. package/SVF-doxygen/html/html/globals_c.html +129 -126
  211. package/SVF-doxygen/html/html/globals_defs_j.html +6 -0
  212. package/SVF-doxygen/html/html/globals_e.html +7 -8
  213. package/SVF-doxygen/html/html/globals_f.html +6 -12
  214. package/SVF-doxygen/html/html/globals_func.html +0 -6
  215. package/SVF-doxygen/html/html/globals_func_f.html +0 -8
  216. package/SVF-doxygen/html/html/globals_g.html +4 -2
  217. package/SVF-doxygen/html/html/globals_j.html +6 -0
  218. package/SVF-doxygen/html/html/globals_l.html +3 -0
  219. package/SVF-doxygen/html/html/globals_s.html +7 -9
  220. package/SVF-doxygen/html/html/globals_v.html +3 -0
  221. package/SVF-doxygen/html/html/globals_vars.html +17 -13
  222. package/SVF-doxygen/html/html/hierarchy.html +449 -444
  223. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  224. package/SVF-doxygen/html/html/namespaceSVF.html +8 -4
  225. package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +2 -2
  226. package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +8 -8
  227. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  228. package/SVF-doxygen/html/html/search/all_0.js +1 -1
  229. package/SVF-doxygen/html/html/search/all_1.js +5 -4
  230. package/SVF-doxygen/html/html/search/all_10.js +12 -12
  231. package/SVF-doxygen/html/html/search/all_12.js +3 -3
  232. package/SVF-doxygen/html/html/search/all_13.js +22 -17
  233. package/SVF-doxygen/html/html/search/all_14.js +5 -5
  234. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  235. package/SVF-doxygen/html/html/search/all_16.js +2 -0
  236. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  237. package/SVF-doxygen/html/html/search/all_1b.js +1 -0
  238. package/SVF-doxygen/html/html/search/all_2.js +2 -2
  239. package/SVF-doxygen/html/html/search/all_3.js +7 -6
  240. package/SVF-doxygen/html/html/search/all_4.js +5 -5
  241. package/SVF-doxygen/html/html/search/all_5.js +7 -5
  242. package/SVF-doxygen/html/html/search/all_6.js +4 -4
  243. package/SVF-doxygen/html/html/search/all_7.js +11 -9
  244. package/SVF-doxygen/html/html/search/all_9.js +8 -5
  245. package/SVF-doxygen/html/html/search/all_a.js +2 -0
  246. package/SVF-doxygen/html/html/search/all_b.js +1 -1
  247. package/SVF-doxygen/html/html/search/all_c.js +1 -2
  248. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  249. package/SVF-doxygen/html/html/search/all_e.js +4 -4
  250. package/SVF-doxygen/html/html/search/all_f.js +9 -6
  251. package/SVF-doxygen/html/html/search/classes_0.js +1 -0
  252. package/SVF-doxygen/html/html/search/classes_2.js +1 -0
  253. package/SVF-doxygen/html/html/search/classes_f.js +3 -0
  254. package/SVF-doxygen/html/html/search/defines_8.js +2 -0
  255. package/SVF-doxygen/html/html/search/files_2.js +1 -1
  256. package/SVF-doxygen/html/html/search/functions_0.js +1 -3
  257. package/SVF-doxygen/html/html/search/functions_1.js +2 -2
  258. package/SVF-doxygen/html/html/search/functions_11.js +4 -2
  259. package/SVF-doxygen/html/html/search/functions_17.js +1 -0
  260. package/SVF-doxygen/html/html/search/functions_2.js +3 -2
  261. package/SVF-doxygen/html/html/search/functions_3.js +1 -1
  262. package/SVF-doxygen/html/html/search/functions_4.js +5 -3
  263. package/SVF-doxygen/html/html/search/functions_5.js +1 -3
  264. package/SVF-doxygen/html/html/search/functions_6.js +9 -8
  265. package/SVF-doxygen/html/html/search/functions_8.js +4 -1
  266. package/SVF-doxygen/html/html/search/functions_b.js +0 -1
  267. package/SVF-doxygen/html/html/search/functions_e.js +8 -5
  268. package/SVF-doxygen/html/html/search/functions_f.js +4 -4
  269. package/SVF-doxygen/html/html/search/typedefs_11.js +3 -1
  270. package/SVF-doxygen/html/html/search/typedefs_14.js +1 -0
  271. package/SVF-doxygen/html/html/search/typedefs_3.js +2 -2
  272. package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
  273. package/SVF-doxygen/html/html/search/variables_0.js +1 -1
  274. package/SVF-doxygen/html/html/search/variables_1.js +3 -2
  275. package/SVF-doxygen/html/html/search/variables_12.js +1 -1
  276. package/SVF-doxygen/html/html/search/variables_13.js +2 -2
  277. package/SVF-doxygen/html/html/search/variables_14.js +2 -2
  278. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  279. package/SVF-doxygen/html/html/search/variables_16.js +2 -0
  280. package/SVF-doxygen/html/html/search/variables_3.js +2 -2
  281. package/SVF-doxygen/html/html/search/variables_4.js +2 -2
  282. package/SVF-doxygen/html/html/search/variables_5.js +2 -2
  283. package/SVF-doxygen/html/html/search/variables_6.js +3 -3
  284. package/SVF-doxygen/html/html/search/variables_7.js +2 -1
  285. package/SVF-doxygen/html/html/search/variables_b.js +1 -1
  286. package/SVF-doxygen/html/html/search/variables_c.js +1 -0
  287. package/SVF-doxygen/html/html/search/variables_e.js +3 -3
  288. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol-members.html +98 -0
  289. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol.html +652 -0
  290. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash-members.html +81 -0
  291. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash.html +124 -0
  292. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +22 -15
  293. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +4 -2
  294. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +4 -2
  295. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
  296. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
  297. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
  298. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  299. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  300. package/include/CFL/CFGNormalizer.h +14 -9
  301. package/include/CFL/CFLAlias.h +1 -40
  302. package/include/CFL/CFLGrammar.h +246 -31
  303. package/include/CFL/CFLGrammar.txt +13 -15
  304. package/include/CFL/CFLGraphBuilder.h +27 -29
  305. package/include/CFL/GrammarBuilder.h +34 -14
  306. package/include/Graphs/CFLGraph.h +12 -0
  307. package/include/Graphs/ConsGEdge.h +1 -0
  308. package/include/SVF-FE/CallGraphBuilder.h +2 -2
  309. package/include/Util/ExtAPI.h +59 -42
  310. package/lib/CFL/CFGNormalizer.cpp +138 -86
  311. package/lib/CFL/CFLAlias.cpp +73 -0
  312. package/lib/CFL/CFLGrammar.cpp +115 -16
  313. package/lib/CFL/CFLGraphBuilder.cpp +64 -1
  314. package/lib/CFL/GrammarBuilder.cpp +42 -60
  315. package/lib/Graphs/CFLGraph.cpp +41 -1
  316. package/lib/MemoryModel/LocationSet.cpp +1 -1
  317. package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
  318. package/lib/SVF-FE/SymbolTableBuilder.cpp +4 -0
  319. package/lib/Util/ExtAPI.cpp +34 -2
  320. package/lib/Util/ExtAPI.json +3268 -2585
  321. package/package.json +1 -1
  322. package/include/CFL/CFLGrammarDev.txt +0 -16
@@ -40,54 +40,66 @@
40
40
  #include <map>
41
41
 
42
42
  #define EXTAPI_JSON_PATH "/lib/Util/ExtAPI.json"
43
+ #define JSON_OPT_OVERWRITE "overwrite_app_function"
44
+ #define JSON_OPT_FUNCTIONTYPE "type"
43
45
 
44
46
  namespace SVF
45
47
  {
46
48
 
47
49
  /*
48
50
 
49
- Specifications in ExtAPI.json
50
-
51
- Specification language: The specification language of external function includes:
52
- 1. the name of the function,
53
- 2. the type of the function,
54
- 3. the operations of the function.
55
-
56
- Funtion type: Funtion type represents some property of the function.
57
- For example,
58
- ”EFT_ALLOC“, represents if this external function allocates a new object and assigns it to one of its arguments,
59
- For the selection of Function type and a more detailed explanation, please refer to enum extf_t in ExtAPI.h.
60
-
61
- Function operations: Function operations indicates the relationship between input and output,
62
- mainly the relationship between function parameters, or between parameters and return values after function is executed.
63
- For example,
64
- "copy": ["A2", "L"], indicates that after this external function is executed, the value of the 2th parameter is copied into the return value.
65
- For the selection of Function type and a more detailed explanation, please refer to enum extType in ExtAPI.h.
66
-
67
- For operands of function operation, e.g., "A2", "L", there are the following options:
68
- "A": represents an parameter;
69
- "N": represents a number;
70
- "R": represents a reference;
71
- "L": represents a return value;
72
- "V": represents a dummy node;
73
-
74
- Among them, parameter may have multiple forms, because there may be multiple parameters, and parameter may be a reference or complex structure,
75
-
76
- Here we use regular expressions "(AN)(R|RN)^*" to represent parameter, for example,
77
- "A0": represents the 1th parameter;
78
- "A2R": represents that the 3th parameter is a reference;
79
- "A1R2": represents the 3th substructure of 2th parameter "A1R", where "A1R" is a complex structure;
80
- "A2R3R": represents the 4th substructure of 3th parameter "A2R" is a reference, where "A2R" is a complex structure;
81
-
82
-
83
- Specification format:
84
- "functionName": {
85
- "type": "functional type",
86
- "function operation_1": [ operand_1, operand_2, ... , operand_n],
87
- "function operation_2": [ operand_1, operand_2, ... , operand_n],
88
- ...
89
- "function operation_n": [ operand_1, operand_2, ... , operand_n]
90
- }
51
+ ** Specifications in ExtAPI.json
52
+
53
+ *** [1] Overview of the Specification Language
54
+ The specification language of external functions is based on the JSON format. And every function defined by the Specification Language is an object that represents the specification rules. These Specification Language objects for functions contain four parts:
55
+ 1. the name of the function,
56
+ 2. the switch that controls whether the specification rules defined in the ExtAPI.json overwrite the functions defined in the user code,
57
+ 3. the type of the function,
58
+ 4. the operations conducted by the function.
59
+
60
+ *** [2] Overwriting the user-defined functions
61
+ The switch *overwrite_app_function* controls whether the specification rules defined in the ExtAPI.json overwrite the functions defined in the user code (e.g., CPP files). When the switch *overwrite_app_function* is set to a value of 1, SVF will use the specification rules in ExtAPI.json to conduct the analysis and ignore the user-defined functions in the input CPP/bc files.
62
+ overwrite_app_function = 0: Analyze the user-defined functions.
63
+ overwrite_app_function = 1: Use specifications in ExtAPI.json to overwrite the user-defined functions.
64
+
65
+ *** [3] Function types
66
+ Function type represents the properties of the function.
67
+ For example,
68
+ "EFT_ALLOC" represents if this external function allocates a new object and assigns it to one of its arguments,
69
+ For the selection of function type and a more detailed explanation, please refer to the definition of enum *extf_t* in ExtAPI.h.
70
+
71
+ *** [4] Function operations
72
+ Function operations indicate the relationships between input and output,
73
+ mainly between function parameters or between parameters and return values after the execution.
74
+ For example,
75
+ "copy": ["A2", "L"] indicates that after this external function is executed, the value of the 2nd parameter is copied into the return value.
76
+ For the selection of function type and a more detailed explanation, please refer to the definition of enum *extType* in ExtAPI.h.
77
+
78
+ For operands of function operation, e.g., "A2", "L", there are the following options:
79
+ "A": represents a parameter;
80
+ "N": represents a number;
81
+ "R": represents a reference;
82
+ "L": represents a return value;
83
+ "V": represents a dummy node;
84
+
85
+ Among them, a parameter may have multiple forms because there may be various parameters, and the parameter may be a reference or complex structure,
86
+
87
+ Here we use regular expressions "(AN)(R|RN)^*" to represent parameters, for example,
88
+ "A0": represents the 1st parameter;
89
+ "A2R": represents that the 3rd parameter is a reference;
90
+ "A1R2": represents the 3rd substructure of the 2nd parameter "A1R", where "A1R" is a complex structure;
91
+ "A2R3R": represents the 4th substructure of the 3rd parameter "A2R" is a reference, where "A2R" is a complex structure;
92
+
93
+
94
+ ** Specification format:
95
+ "functionName": {
96
+ "type": "functional type",
97
+ "overwrite_app_function:" 0/1,
98
+ "function operation_1": [ operand_1, operand_2, ... , operand_n],
99
+ "function operation_2": [ operand_1, operand_2, ... , operand_n],
100
+ ...
101
+ "function operation_n": [ operand_1, operand_2, ... , operand_n]
102
+ }
91
103
  */
92
104
 
93
105
 
@@ -233,6 +245,11 @@ public:
233
245
  // Get property of the operation, e.g. "EFT_A1R_A0R"
234
246
  extType get_type(const SVF::SVFFunction *callee);
235
247
 
248
+ // Get priority of he function, return value
249
+ // 0: Apply user-defined functions
250
+ // 1: Apply function specification in ExtAPI.json
251
+ u32_t isOverwrittenAppFunction(const SVF::SVFFunction *callee);
252
+
236
253
  // Does (F) have a static var X (unavailable to us) that its return points to?
237
254
  bool has_static(const SVFFunction *F);
238
255
 
@@ -27,14 +27,15 @@
27
27
  * Author: Pei Xu
28
28
  */
29
29
 
30
+ #include "CFL/CFGNormalizer.h"
31
+ #include "Util/SVFUtil.h"
32
+ #include "Util/WorkList.h"
33
+ #include "Util/BasicTypes.h"
30
34
  #include <string>
31
35
  #include <regex>
32
36
  #include <fstream>
33
37
  #include <sstream>
34
38
  #include <iostream>
35
- #include "Util/BasicTypes.h"
36
- #include "CFL/CFGNormalizer.h"
37
- #include "Util/SVFUtil.h"
38
39
 
39
40
  using namespace SVF;
40
41
 
@@ -48,21 +49,9 @@ CFLGrammar* CFGNormalizer::normalize(GrammarBase *generalGrammar)
48
49
  grammar->setAttributeKinds(generalGrammar->getAttrSyms());
49
50
  grammar->setKind2AttrsMap(generalGrammar->getKind2AttrsMap());
50
51
  grammar->setRawProductions(generalGrammar->getRawProductions());
51
- ebnf_sign_replace('*', grammar);
52
- ebnf_sign_replace('?', grammar);
52
+ ebnfSignReplace('*', grammar);
53
+ ebnfSignReplace('?', grammar);
53
54
  ebnf_bin(grammar);
54
-
55
- for(auto symProdsPair: grammar->getRawProductions())
56
- {
57
- for(auto prod: symProdsPair.second)
58
- {
59
- /// rawProductions production does not include lhs
60
- /// so append to the begin of the production
61
- GrammarBase::Production tempP = prod;
62
- tempP.insert(tempP.begin(), symProdsPair.first);
63
- insertToCFLGrammar(grammar, tempP);
64
- }
65
- }
66
55
  fillAttribute(grammar, grammar->getKind2AttrsMap());
67
56
  return grammar;
68
57
  }
@@ -91,7 +80,7 @@ CFLGrammar* CFGNormalizer::fillAttribute(CFLGrammar *grammar, const Map<CFLGramm
91
80
 
92
81
  void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
93
82
  {
94
- Map<GrammarBase::Symbol, GrammarBase::Productions> new_grammar = {};
83
+ GrammarBase::SymbolMap<GrammarBase::Symbol, GrammarBase::Productions> new_grammar = {};
95
84
  std::string tempStr = "";
96
85
 
97
86
  for(auto head : grammar->getRawProductions())
@@ -107,7 +96,9 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
107
96
  }
108
97
  }
109
98
 
110
- for(auto head : grammar->getRawProductions())
99
+ auto &rawProductions = grammar->getRawProductions();
100
+
101
+ for(auto head : rawProductions)
111
102
  {
112
103
  for(auto rule: head.second)
113
104
  {
@@ -122,11 +113,11 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
122
113
  grammar->getRawProductions()[head.first].insert(rule);
123
114
 
124
115
  GrammarBase::Symbol X = check_head(new_grammar, long_run);
125
- if (int(X) == -1)
116
+ if (X == -1)
126
117
  {
127
118
  X = check_head(grammar->getRawProductions(), long_run);
128
119
  }
129
- if (int(X) != -1)
120
+ if ((X == -1) == false)
130
121
  {
131
122
  it = grammar->getRawProductions()[head.first].find(rule);
132
123
  grammar->getRawProductions()[head.first].erase(it);
@@ -139,15 +130,25 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
139
130
  std::ostringstream ss;
140
131
  ss << grammar->num_generator();
141
132
  tempStr.append(ss.str());
142
- for (int i = 0; i < int(rule.size()); i++)
133
+ /// Assign _attribute
134
+ /// if target portion of the production contain more than 1 variable then
135
+ /// X add no variable attribute
136
+ /// if target only contain one variable attribute X share the same variable attribute
137
+ Set<GrammarBase::VariableAttribute> variableAttributeSet = {};
138
+ for (unsigned i = 0; i < long_run.size(); i++)
143
139
  {
144
- if (grammar->getAttrSyms().find(rule[i]) != grammar->getAttrSyms().end())
140
+ GrammarBase::VariableAttribute variableAttribute = long_run[i].variableAttribute;
141
+ if ( variableAttribute != 0)
145
142
  {
146
- tempStr.append("_i");
147
- break;
143
+ variableAttributeSet.insert(variableAttribute);
148
144
  }
149
145
  }
150
- GrammarBase::Symbol tempSym = grammar->insertNonTerminalKind(tempStr);
146
+ if ( variableAttributeSet.size() == 1)
147
+ {
148
+ tempStr += "_";
149
+ tempStr += char(*variableAttributeSet.begin());
150
+ }
151
+ GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
151
152
  it = grammar->getRawProductions()[head.first].find(rule);
152
153
  grammar->getRawProductions()[head.first].erase(it);
153
154
  rule.push_back(tempSym);
@@ -177,17 +178,31 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
177
178
  temp_p = long_run;
178
179
 
179
180
  RHX = check_head(new_grammar, long_run);
180
- if (int(RHX) == -1)
181
+ if (RHX == -1)
181
182
  {
182
183
  RHX = check_head(grammar->getRawProductions(), long_run);
183
184
  }
184
- if(int(RHX) == -1)
185
+ if(RHX == -1)
185
186
  {
186
187
  tempStr = "X";
187
188
  std::ostringstream ss;
188
189
  ss << grammar->num_generator();
189
190
  tempStr.append(ss.str());
190
- GrammarBase::Symbol tempSym = grammar->insertNonTerminalKind(tempStr);
191
+ Set<GrammarBase::VariableAttribute> variableAttributeSet = {};
192
+ for (unsigned i = 0; i < long_run.size(); i++)
193
+ {
194
+ GrammarBase::VariableAttribute variableAttribute = long_run[i].variableAttribute;
195
+ if ( variableAttribute != 0)
196
+ {
197
+ variableAttributeSet.insert(variableAttribute);
198
+ }
199
+ }
200
+ if ( variableAttributeSet.size() == 1)
201
+ {
202
+ tempStr += "_";
203
+ tempStr += char(*variableAttributeSet.begin());
204
+ }
205
+ GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
191
206
  auto it = new_grammar[X].find(prev_rule);
192
207
  new_grammar[X].erase(it);
193
208
  new_grammar[X].insert({first, tempSym});
@@ -218,9 +233,9 @@ GrammarBase::Production CFGNormalizer::getFilledProd(GrammarBase::Production &pr
218
233
  GrammarBase::Production tempP = prod;
219
234
  for (int i = 0; i < int(prod.size()); i++)
220
235
  {
221
- if (grammar->getAttrSyms().find(prod[i]) != grammar->getAttrSyms().end())
236
+ if (grammar->getAttrSyms().find(prod[i].kind) != grammar->getAttrSyms().end())
222
237
  {
223
- tempP[i] = CFLGrammar::getAttributedKind(attribute, prod[i]);
238
+ tempP[i] = prod[i].kind;
224
239
  }
225
240
  }
226
241
  return tempP;
@@ -233,31 +248,67 @@ GrammarBase::Production CFGNormalizer::getFilledProd(GrammarBase::Production &pr
233
248
  GrammarBase::Productions CFGNormalizer::getFilledProductions(GrammarBase::Production &prod, const Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& kind2AttriMap, CFLGrammar *grammar)
234
249
  {
235
250
  GrammarBase::Productions filledProductioins{};
236
- filledProductioins.insert(prod);
237
- for(GrammarBase::Symbol variable : prod)
251
+ CFLFIFOWorkList<GrammarBase::Production> worklist;
252
+ worklist.push(prod);
253
+ while( worklist.empty() == false )
238
254
  {
239
- if (kind2AttriMap.find(variable) != kind2AttriMap.end())
255
+ GrammarBase::Production currentProduction = worklist.pop();
256
+ /// Get the first encounter variable attribute to expand
257
+ GrammarBase::VariableAttribute currentVariableAttribute = 0;
258
+ // GrammarBase::Kind baseKind;
259
+ for ( GrammarBase::Symbol &symbol : currentProduction )
260
+ {
261
+ if ( currentVariableAttribute == 0 )
262
+ {
263
+ currentVariableAttribute = symbol.variableAttribute;
264
+ // baseKind = symbol.kind;
265
+ }
266
+ }
267
+ if ( currentVariableAttribute == 0)
268
+ {
269
+ filledProductioins.insert(currentProduction);
270
+ continue;
271
+ }
272
+ auto nodeSet = {0, 1, 2, 7}; //*(kind2AttriMap.find(baseKind));
273
+ //for (auto attribute : nodeSet.second)
274
+ for (auto attribute : nodeSet)
240
275
  {
241
- auto nodeSet = *(kind2AttriMap.find(variable));
242
- for (auto attribute : nodeSet.second)
276
+ GrammarBase::Production fillingProduction = currentProduction;
277
+ for ( GrammarBase::Symbol &symbol : fillingProduction )
278
+ {
279
+ if ( symbol.variableAttribute == currentVariableAttribute)
280
+ {
281
+ symbol.attribute = attribute;
282
+ }
283
+ }
284
+ /// Check whether all symbol expanded
285
+ bool continueToFill = false;
286
+ for ( GrammarBase::Symbol &symbol : fillingProduction )
243
287
  {
244
- GrammarBase::Production filledProd = getFilledProd(prod, attribute, grammar);
245
- if (filledProductioins.find(filledProd) == filledProductioins.end())
288
+ if ( symbol.variableAttribute != 0 )
246
289
  {
247
- filledProductioins.insert(filledProd);
290
+ continueToFill = true;
248
291
  }
249
292
  }
293
+ if ( continueToFill == false)
294
+ {
295
+ filledProductioins.insert(fillingProduction);
296
+ }
297
+ else
298
+ {
299
+ worklist.push(fillingProduction);
300
+ }
250
301
  }
251
302
  }
252
303
  return filledProductioins;
253
304
  }
254
305
 
255
- int CFGNormalizer::ebnf_bracket_match(GrammarBase::Production &prod, int i, CFLGrammar *grammar)
306
+ int CFGNormalizer::ebnfBracketMatch(GrammarBase::Production &prod, int i, CFLGrammar *grammar)
256
307
  {
257
308
  int index = i;
258
309
  while (index >= 0)
259
310
  {
260
- if (grammar->kind2Str(prod[index]) == "(")
311
+ if (grammar->kind2Str(prod[index].kind) == "(")
261
312
  {
262
313
  return index;
263
314
  }
@@ -266,78 +317,78 @@ int CFGNormalizer::ebnf_bracket_match(GrammarBase::Production &prod, int i, CFLG
266
317
  return 0;
267
318
  }
268
319
 
269
- void CFGNormalizer::ebnf_sign_replace(char sign, CFLGrammar *grammar)
320
+ void CFGNormalizer::ebnfSignReplace(char sign, CFLGrammar *grammar)
270
321
  {
271
- SVF::Map<std::string, std::string> new_rule_checker;
272
- std::string X = "X";
322
+ /// Replace Sign Group With tempNonterminal 'X'
323
+ /// And load the replace in newProductions
324
+ SVF::Map<std::string, std::string> newProductions;
325
+ std::string tempNonterminal = "X";
273
326
 
274
- /// replace Sign Group With Temp Varibale
275
- /// and load the replace in new_rule_checker
276
- for (auto &ebnfPair : grammar->getRawProductions())
327
+ for (auto &symbolToProductionsPair : grammar->getRawProductions())
277
328
  {
278
- GrammarBase::Productions tempProds = ebnfPair.second;
279
- for (auto ebnfProd : ebnfPair.second)
329
+ GrammarBase::Productions productions = symbolToProductionsPair.second;
330
+ for (auto ebnfProduction : symbolToProductionsPair.second)
280
331
  {
281
332
  size_t i = 1;
282
- while (i < ebnfProd.size())
333
+ while (i < ebnfProduction.size())
283
334
  {
284
- int repetition_start = -1;
285
- if (grammar->kind2Str(ebnfProd[i]) == std::string(1, sign))
335
+ s32_t signGroupStart = -1;
336
+ if (grammar->kind2Str(ebnfProduction[i].kind) == std::string(1, sign))
286
337
  {
287
- assert(i != 1 && "sign in grammar associate with no symble");
288
338
  /// If sign assoicate wihout group e.i with single symble
289
- if (grammar->kind2Str(ebnfProd[i - 1]) != std::string(1, ')'))
339
+ assert(i != 1 && "sign in grammar associate with no symbol");
340
+ if (grammar->kind2Str(ebnfProduction[i - 1].kind) != std::string(1, ')'))
290
341
  {
291
- repetition_start = i - 1;
342
+ signGroupStart = i - 1;
292
343
  }
293
344
  /// sign associate with group of symble by brace pair
294
345
  else
295
346
  {
296
- repetition_start = ebnf_bracket_match(ebnfProd, i, grammar);
347
+ signGroupStart = ebnfBracketMatch(ebnfProduction, i, grammar);
297
348
  }
298
- std::string repetition = "";
299
- for (size_t j = repetition_start; j < i; j++)
349
+ std::string groupString = "";
350
+ for (size_t j = signGroupStart; j < i; j++)
300
351
  {
301
- repetition.append(grammar->kind2Str(ebnfProd[j]));
302
- repetition.append(" ");
352
+ groupString.append(grammar->kind2Str(ebnfProduction[j].kind));
353
+ groupString.append(" ");
303
354
  }
304
- repetition.append(grammar->kind2Str(ebnfProd[i]));
305
- if (new_rule_checker.find(repetition) != new_rule_checker.end())
355
+ groupString.append(grammar->kind2Str(ebnfProduction[i].kind));
356
+ if (newProductions.find(groupString) != newProductions.end())
306
357
  {
307
- tempProds.erase(ebnfProd);
308
- ebnfProd.erase(ebnfProd.begin() + repetition_start, ebnfProd.begin() + i + 1);
309
- ebnfProd.insert(ebnfProd.begin() + repetition_start, grammar->str2Kind(new_rule_checker[repetition]));
310
- tempProds.insert(ebnfProd);
358
+ productions.erase(ebnfProduction);
359
+ ebnfProduction.erase(ebnfProduction.begin() + signGroupStart, ebnfProduction.begin() + i + 1);
360
+ ebnfProduction.insert(ebnfProduction.begin() + signGroupStart, grammar->str2Symbol(newProductions[groupString]));
361
+ productions.insert(ebnfProduction);
311
362
  }
312
363
  else
313
364
  {
314
- X = "X";
365
+ tempNonterminal = "X";
315
366
  std::ostringstream ss;
316
367
  ss << grammar->num_generator();
317
- X.append(ss.str());
318
- GrammarBase::Symbol tempSym = grammar->insertNonTerminalKind(X);
319
- tempProds.erase(ebnfProd);
320
- ebnfProd.erase(ebnfProd.begin() + repetition_start, ebnfProd.begin() + i + 1);
321
- ebnfProd.insert(ebnfProd.begin() + repetition_start, tempSym);
322
- new_rule_checker[repetition] = X;
323
- tempProds.insert(ebnfProd);
368
+ tempNonterminal.append(ss.str());
369
+ GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempNonterminal);
370
+ productions.erase(ebnfProduction);
371
+ ebnfProduction.erase(ebnfProduction.begin() + signGroupStart, ebnfProduction.begin() + i + 1);
372
+ ebnfProduction.insert(ebnfProduction.begin() + signGroupStart, tempSym);
373
+ newProductions[groupString] = tempNonterminal;
374
+ productions.insert(ebnfProduction);
324
375
  }
325
376
 
326
- i = repetition_start;
377
+ i = signGroupStart;
327
378
  }
328
379
  i++;
329
380
  }
330
381
  }
331
- ebnfPair.second = tempProds;
382
+ symbolToProductionsPair.second = productions;
332
383
  }
333
- for(auto rep: new_rule_checker)
384
+ for(auto rep: newProductions)
334
385
  {
335
386
  /// For Both * and ? need to insert epsilon rule
336
387
  std::string new_nonterminal = rep.second;
337
- GrammarBase::Production temp_list = {grammar->str2Kind(new_nonterminal), grammar->str2Kind("epsilon")};
338
- grammar->getRawProductions()[grammar->str2Kind(new_nonterminal)].insert(temp_list);
388
+ GrammarBase::Production temp_list = {grammar->str2Symbol(new_nonterminal), grammar->str2Symbol("epsilon")};
389
+ grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
339
390
  /// insert second rule for '*' X -> X E for '+' X -> X
340
- temp_list = {grammar->str2Kind(new_nonterminal)};
391
+ temp_list = {grammar->str2Symbol(new_nonterminal)};
341
392
  if (sign == '*')
342
393
  {
343
394
  /// Insert Back the Group
@@ -345,14 +396,14 @@ void CFGNormalizer::ebnf_sign_replace(char sign, CFLGrammar *grammar)
345
396
  GrammarBase::Production withoutSign = {};
346
397
  for (auto &word : E)
347
398
  {
348
- if (word != grammar->str2Kind("*") && word != grammar->str2Kind("(") && word != grammar->str2Kind(")"))
399
+ if (word != grammar->str2Symbol("*") && word != grammar->str2Symbol("(") && word != grammar->str2Symbol(")"))
349
400
  {
350
401
  withoutSign.push_back(word);
351
402
  }
352
403
  }
353
404
  temp_list.insert(temp_list.end(), withoutSign.begin(), withoutSign.end());
354
405
  }
355
- grammar->getRawProductions()[grammar->str2Kind(new_nonterminal)].insert(temp_list);
406
+ grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
356
407
  }
357
408
 
358
409
  }
@@ -372,13 +423,13 @@ GrammarBase::Production CFGNormalizer::strTrans(std::string LHS, CFLGrammar *gra
372
423
  {
373
424
  word = LHS.substr(0, pos);
374
425
  LHS.erase(0, pos + delimiter.length());
375
- prod.push_back(grammar->str2Kind(word));
426
+ prod.push_back(grammar->str2Symbol(word));
376
427
  }
377
- prod.push_back(grammar->str2Kind(LHS));
428
+ prod.push_back(grammar->str2Symbol(LHS));
378
429
  return prod;
379
430
  }
380
431
 
381
- int CFGNormalizer::check_head(Map<GrammarBase::Symbol, GrammarBase::Productions> &grammar, GrammarBase::Production &rule)
432
+ GrammarBase::Symbol CFGNormalizer::check_head(GrammarBase::SymbolMap<GrammarBase::Symbol, GrammarBase::Productions> &grammar, GrammarBase::Production &rule)
382
433
  {
383
434
  for(auto symProdPair: grammar)
384
435
  {
@@ -390,7 +441,8 @@ int CFGNormalizer::check_head(Map<GrammarBase::Symbol, GrammarBase::Productions>
390
441
  }
391
442
  }
392
443
  }
393
- return -1;
444
+ GrammarBase::Symbol symbol = u32_t(-1);
445
+ return symbol;
394
446
  }
395
447
 
396
448
  /// Based on prod size to add on suitable member field of grammar
@@ -0,0 +1,73 @@
1
+ //===----- CFLAlias.cpp -- CFL Alias Analysis Client--------------//
2
+ //
3
+ // SVF: Static Value-Flow Analysis
4
+ //
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
+ //
7
+
8
+ // This program is free software: you can redistribute it and/or modify
9
+ // it under the terms of the GNU General Public License as published by
10
+ // the Free Software Foundation, either version 3 of the License, or
11
+ // (at your option) any later version.
12
+
13
+ // This program is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU General Public License for more details.
17
+
18
+ // You should have received a copy of the GNU General Public License
19
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ //
21
+ //===----------------------------------------------------------------------===//
22
+
23
+ /*
24
+ * CFLAlias.cpp
25
+ *
26
+ * Created on: June 27 , 2022
27
+ * Author: Pei Xu
28
+ */
29
+
30
+ #include "CFL/CFLAlias.h"
31
+
32
+ using namespace SVF;
33
+
34
+ void CFLAlias::analyze()
35
+ {
36
+ GrammarBuilder grammarBuilder = GrammarBuilder(Options::GrammarFilename);
37
+ CFGNormalizer normalizer = CFGNormalizer();
38
+ AliasCFLGraphBuilder cflGraphBuilder = AliasCFLGraphBuilder();
39
+ CFLGramGraphChecker cflChecker = CFLGramGraphChecker();
40
+ if (Options::GraphIsFromDot == false)
41
+ {
42
+ PointerAnalysis::initialize();
43
+ GrammarBase *grammarBase = grammarBuilder.build();
44
+ ConstraintGraph *consCG = new ConstraintGraph(svfir);
45
+ graph = cflGraphBuilder.buildBigraph(consCG, grammarBase->getStartKind(), grammarBase);
46
+ cflChecker.check(grammarBase, &cflGraphBuilder, graph);
47
+ grammar = normalizer.normalize(grammarBase);
48
+ cflChecker.check(grammar, &cflGraphBuilder, graph);
49
+ std::string svfirName = Options::InputFilename.c_str();
50
+ svfir->dump(svfirName.append("_IR"));
51
+ std::string grammarName = Options::InputFilename.c_str();
52
+ grammar->dump(grammarName.append("_Grammar"));
53
+ delete consCG;
54
+ delete grammarBase;
55
+ }
56
+ else
57
+ {
58
+ GrammarBase *grammarBase = grammarBuilder.build();
59
+ graph = cflGraphBuilder.buildFromDot(Options::InputFilename, grammarBase);
60
+ cflChecker.check(grammarBase, &cflGraphBuilder, graph);
61
+ grammar = normalizer.normalize(grammarBase);
62
+ cflChecker.check(grammar, &cflGraphBuilder, graph);
63
+ delete grammarBase;
64
+ }
65
+ solver = new CFLSolver(graph, grammar);
66
+ solver->solve();
67
+ std::string CFLGraphFileName = Options::InputFilename.c_str();
68
+ graph->dump(CFLGraphFileName.append("_CFL"));
69
+ if (Options::GraphIsFromDot == false)
70
+ {
71
+ PointerAnalysis::finalize();
72
+ }
73
+ }