svf-tools 1.0.477 → 1.0.480

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 (321) 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 +1 -1
  79. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  80. package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
  81. package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
  82. package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
  83. package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
  84. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  85. package/SVF-doxygen/html/html/annotated.html +298 -293
  86. package/SVF-doxygen/html/html/cfl_8cpp.html +2 -2
  87. package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
  88. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +96 -0
  89. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +197 -0
  90. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.png +0 -0
  91. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
  92. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +1 -1
  93. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +1 -1
  94. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +1 -1
  95. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
  96. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
  97. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +1 -1
  98. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
  99. package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
  100. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +3 -3
  101. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +108 -99
  102. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +1 -1
  103. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -39
  104. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +3 -1
  105. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +62 -0
  106. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList-members.html +91 -0
  107. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList.html +459 -0
  108. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +47 -38
  109. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +180 -137
  110. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
  111. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +44 -22
  112. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder-members.html +8 -8
  113. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +53 -43
  114. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.png +0 -0
  115. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +3 -3
  116. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +14 -14
  117. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
  118. package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
  119. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +4 -4
  120. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  121. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  122. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
  123. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +158 -125
  124. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +20 -21
  125. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  126. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +29 -21
  127. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +397 -179
  128. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash-members.html +81 -0
  129. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash.html +124 -0
  130. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +6 -7
  131. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +73 -91
  132. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
  133. package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
  134. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
  135. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +1 -1
  136. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
  137. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +1 -1
  138. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
  139. package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
  140. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +3 -3
  141. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +1 -1
  142. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
  143. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
  144. package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +1 -1
  145. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
  146. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +14 -14
  147. package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +2 -2
  148. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +1 -1
  149. package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +2 -2
  150. package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +11 -11
  151. package/SVF-doxygen/html/html/classes.html +105 -106
  152. package/SVF-doxygen/html/html/classllvm_1_1GraphPrinter.html +1 -1
  153. package/SVF-doxygen/html/html/cuddInt_8c.html +17 -17
  154. package/SVF-doxygen/html/html/cuddInt_8c_source.html +3 -3
  155. package/SVF-doxygen/html/html/cuddInt_8h.html +5 -5
  156. package/SVF-doxygen/html/html/cudd_8h.html +9 -9
  157. package/SVF-doxygen/html/html/cudd_8h_source.html +1 -1
  158. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  159. package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
  160. package/SVF-doxygen/html/html/files.html +5 -4
  161. package/SVF-doxygen/html/html/functions_0x7e.html +3 -0
  162. package/SVF-doxygen/html/html/functions_a.html +14 -8
  163. package/SVF-doxygen/html/html/functions_b.html +4 -3
  164. package/SVF-doxygen/html/html/functions_c.html +37 -35
  165. package/SVF-doxygen/html/html/functions_d.html +8 -4
  166. package/SVF-doxygen/html/html/functions_e.html +15 -8
  167. package/SVF-doxygen/html/html/functions_f.html +16 -17
  168. package/SVF-doxygen/html/html/functions_func.html +1 -1
  169. package/SVF-doxygen/html/html/functions_func_0x7e.html +3 -0
  170. package/SVF-doxygen/html/html/functions_func_b.html +3 -2
  171. package/SVF-doxygen/html/html/functions_func_c.html +32 -28
  172. package/SVF-doxygen/html/html/functions_func_e.html +14 -7
  173. package/SVF-doxygen/html/html/functions_func_f.html +3 -2
  174. package/SVF-doxygen/html/html/functions_func_g.html +22 -18
  175. package/SVF-doxygen/html/html/functions_func_i.html +18 -9
  176. package/SVF-doxygen/html/html/functions_func_l.html +2 -5
  177. package/SVF-doxygen/html/html/functions_func_o.html +20 -5
  178. package/SVF-doxygen/html/html/functions_func_p.html +9 -7
  179. package/SVF-doxygen/html/html/functions_func_s.html +12 -6
  180. package/SVF-doxygen/html/html/functions_g.html +25 -21
  181. package/SVF-doxygen/html/html/functions_i.html +29 -20
  182. package/SVF-doxygen/html/html/functions_k.html +2 -1
  183. package/SVF-doxygen/html/html/functions_l.html +1 -4
  184. package/SVF-doxygen/html/html/functions_n.html +1 -1
  185. package/SVF-doxygen/html/html/functions_o.html +24 -15
  186. package/SVF-doxygen/html/html/functions_p.html +18 -18
  187. package/SVF-doxygen/html/html/functions_r.html +5 -5
  188. package/SVF-doxygen/html/html/functions_s.html +24 -16
  189. package/SVF-doxygen/html/html/functions_t.html +5 -7
  190. package/SVF-doxygen/html/html/functions_type_d.html +4 -2
  191. package/SVF-doxygen/html/html/functions_type_p.html +1 -1
  192. package/SVF-doxygen/html/html/functions_type_s.html +7 -1
  193. package/SVF-doxygen/html/html/functions_type_v.html +3 -0
  194. package/SVF-doxygen/html/html/functions_v.html +7 -1
  195. package/SVF-doxygen/html/html/functions_vars_a.html +6 -0
  196. package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
  197. package/SVF-doxygen/html/html/functions_vars_d.html +4 -2
  198. package/SVF-doxygen/html/html/functions_vars_e.html +1 -1
  199. package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
  200. package/SVF-doxygen/html/html/functions_vars_k.html +1 -0
  201. package/SVF-doxygen/html/html/functions_vars_n.html +1 -1
  202. package/SVF-doxygen/html/html/functions_vars_r.html +1 -1
  203. package/SVF-doxygen/html/html/functions_vars_s.html +2 -2
  204. package/SVF-doxygen/html/html/functions_vars_t.html +1 -1
  205. package/SVF-doxygen/html/html/functions_vars_v.html +3 -0
  206. package/SVF-doxygen/html/html/functions_w.html +6 -10
  207. package/SVF-doxygen/html/html/globals.html +1 -2
  208. package/SVF-doxygen/html/html/globals_a.html +1 -6
  209. package/SVF-doxygen/html/html/globals_c.html +129 -126
  210. package/SVF-doxygen/html/html/globals_defs_j.html +6 -0
  211. package/SVF-doxygen/html/html/globals_e.html +7 -8
  212. package/SVF-doxygen/html/html/globals_f.html +6 -12
  213. package/SVF-doxygen/html/html/globals_func.html +0 -6
  214. package/SVF-doxygen/html/html/globals_func_f.html +0 -8
  215. package/SVF-doxygen/html/html/globals_g.html +4 -2
  216. package/SVF-doxygen/html/html/globals_j.html +6 -0
  217. package/SVF-doxygen/html/html/globals_l.html +3 -0
  218. package/SVF-doxygen/html/html/globals_s.html +7 -9
  219. package/SVF-doxygen/html/html/globals_v.html +3 -0
  220. package/SVF-doxygen/html/html/globals_vars.html +17 -13
  221. package/SVF-doxygen/html/html/hierarchy.html +449 -444
  222. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  223. package/SVF-doxygen/html/html/namespaceSVF.html +8 -4
  224. package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +2 -2
  225. package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +8 -8
  226. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  227. package/SVF-doxygen/html/html/search/all_0.js +1 -1
  228. package/SVF-doxygen/html/html/search/all_1.js +5 -4
  229. package/SVF-doxygen/html/html/search/all_10.js +12 -12
  230. package/SVF-doxygen/html/html/search/all_12.js +3 -3
  231. package/SVF-doxygen/html/html/search/all_13.js +22 -17
  232. package/SVF-doxygen/html/html/search/all_14.js +5 -5
  233. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  234. package/SVF-doxygen/html/html/search/all_16.js +2 -0
  235. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  236. package/SVF-doxygen/html/html/search/all_1b.js +1 -0
  237. package/SVF-doxygen/html/html/search/all_2.js +2 -2
  238. package/SVF-doxygen/html/html/search/all_3.js +7 -6
  239. package/SVF-doxygen/html/html/search/all_4.js +5 -5
  240. package/SVF-doxygen/html/html/search/all_5.js +7 -5
  241. package/SVF-doxygen/html/html/search/all_6.js +4 -4
  242. package/SVF-doxygen/html/html/search/all_7.js +11 -9
  243. package/SVF-doxygen/html/html/search/all_9.js +8 -5
  244. package/SVF-doxygen/html/html/search/all_a.js +2 -0
  245. package/SVF-doxygen/html/html/search/all_b.js +1 -1
  246. package/SVF-doxygen/html/html/search/all_c.js +1 -2
  247. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  248. package/SVF-doxygen/html/html/search/all_e.js +4 -4
  249. package/SVF-doxygen/html/html/search/all_f.js +9 -6
  250. package/SVF-doxygen/html/html/search/classes_0.js +1 -0
  251. package/SVF-doxygen/html/html/search/classes_2.js +1 -0
  252. package/SVF-doxygen/html/html/search/classes_f.js +3 -0
  253. package/SVF-doxygen/html/html/search/defines_8.js +2 -0
  254. package/SVF-doxygen/html/html/search/files_2.js +1 -1
  255. package/SVF-doxygen/html/html/search/functions_0.js +1 -3
  256. package/SVF-doxygen/html/html/search/functions_1.js +2 -2
  257. package/SVF-doxygen/html/html/search/functions_11.js +4 -2
  258. package/SVF-doxygen/html/html/search/functions_17.js +1 -0
  259. package/SVF-doxygen/html/html/search/functions_2.js +3 -2
  260. package/SVF-doxygen/html/html/search/functions_3.js +1 -1
  261. package/SVF-doxygen/html/html/search/functions_4.js +5 -3
  262. package/SVF-doxygen/html/html/search/functions_5.js +1 -3
  263. package/SVF-doxygen/html/html/search/functions_6.js +9 -8
  264. package/SVF-doxygen/html/html/search/functions_8.js +4 -1
  265. package/SVF-doxygen/html/html/search/functions_b.js +0 -1
  266. package/SVF-doxygen/html/html/search/functions_e.js +8 -5
  267. package/SVF-doxygen/html/html/search/functions_f.js +4 -4
  268. package/SVF-doxygen/html/html/search/typedefs_11.js +3 -1
  269. package/SVF-doxygen/html/html/search/typedefs_14.js +1 -0
  270. package/SVF-doxygen/html/html/search/typedefs_3.js +2 -2
  271. package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
  272. package/SVF-doxygen/html/html/search/variables_0.js +1 -1
  273. package/SVF-doxygen/html/html/search/variables_1.js +3 -2
  274. package/SVF-doxygen/html/html/search/variables_12.js +1 -1
  275. package/SVF-doxygen/html/html/search/variables_13.js +2 -2
  276. package/SVF-doxygen/html/html/search/variables_14.js +2 -2
  277. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  278. package/SVF-doxygen/html/html/search/variables_16.js +2 -0
  279. package/SVF-doxygen/html/html/search/variables_3.js +2 -2
  280. package/SVF-doxygen/html/html/search/variables_4.js +2 -2
  281. package/SVF-doxygen/html/html/search/variables_5.js +2 -2
  282. package/SVF-doxygen/html/html/search/variables_6.js +3 -3
  283. package/SVF-doxygen/html/html/search/variables_7.js +2 -1
  284. package/SVF-doxygen/html/html/search/variables_b.js +1 -1
  285. package/SVF-doxygen/html/html/search/variables_c.js +1 -0
  286. package/SVF-doxygen/html/html/search/variables_e.js +3 -3
  287. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol-members.html +98 -0
  288. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol.html +652 -0
  289. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash-members.html +81 -0
  290. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash.html +124 -0
  291. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +22 -15
  292. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +4 -2
  293. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +4 -2
  294. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
  295. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
  296. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
  297. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  298. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  299. package/include/CFL/CFGNormalizer.h +14 -9
  300. package/include/CFL/CFLAlias.h +1 -40
  301. package/include/CFL/CFLGrammar.h +246 -31
  302. package/include/CFL/CFLGrammar.txt +13 -15
  303. package/include/CFL/CFLGraphBuilder.h +27 -29
  304. package/include/CFL/GrammarBuilder.h +34 -14
  305. package/include/Graphs/CFLGraph.h +12 -0
  306. package/include/Graphs/ConsGEdge.h +1 -0
  307. package/include/SVF-FE/CallGraphBuilder.h +2 -2
  308. package/include/Util/ExtAPI.h +59 -42
  309. package/lib/CFL/CFGNormalizer.cpp +138 -86
  310. package/lib/CFL/CFLAlias.cpp +73 -0
  311. package/lib/CFL/CFLGrammar.cpp +115 -16
  312. package/lib/CFL/CFLGraphBuilder.cpp +64 -1
  313. package/lib/CFL/GrammarBuilder.cpp +42 -60
  314. package/lib/Graphs/CFLGraph.cpp +41 -1
  315. package/lib/MemoryModel/LocationSet.cpp +1 -1
  316. package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
  317. package/lib/Util/ExtAPI.cpp +34 -2
  318. package/lib/Util/ExtAPI.json +3268 -2585
  319. package/package.json +1 -1
  320. package/clean.sh +0 -10
  321. package/include/CFL/CFLGrammarDev.txt +0 -16
@@ -28,20 +28,155 @@
28
28
  */
29
29
  #ifndef CFLGrammar_H_
30
30
  #define CFLGrammar_H_
31
- #include "Util/BasicTypes.h"
31
+ #include "Util/SVFBasicTypes.h"
32
32
 
33
33
  namespace SVF
34
34
  {
35
+
35
36
  class GrammarBase
36
37
  {
37
38
  public:
38
- typedef u32_t Symbol;
39
- typedef std::vector<Symbol> Production;
40
- typedef Set<Production> Productions;
41
- typedef u32_t Attribute;
42
39
  typedef u32_t Kind;
40
+ typedef u32_t Attribute;
41
+ typedef u32_t VariableAttribute;
42
+ typedef struct Symbol
43
+ {
44
+ Kind kind: 8;
45
+ Attribute attribute: 16;
46
+ VariableAttribute variableAttribute: 8;
47
+
48
+ /// Default Value for Symbol is 0.
49
+ Symbol() : kind(0), attribute(0), variableAttribute(0) {}
50
+
51
+ /// Contruct from u32_t move the bit to right field
52
+ Symbol(const u32_t& num) : kind(num & 0xFF), attribute((num >> 8 ) & 0xFFFF), variableAttribute((num >> 24)) {}
53
+
54
+ /// Conversion of u32_t
55
+ operator u32_t()
56
+ {
57
+ u32_t num = 0;
58
+ num += this->variableAttribute << 24;
59
+ num += this->attribute << 8;
60
+ num += this->kind;
61
+ return num;
62
+ }
63
+
64
+ /// Conversion of u64_t
65
+ operator u64_t()
66
+ {
67
+ u64_t num = 0;
68
+ num += this->variableAttribute << 24;
69
+ num += this->attribute << 8;
70
+ num += this->kind;
71
+ return num;
72
+ }
73
+
74
+ operator s64_t() const
75
+ {
76
+ s64_t num = 0;
77
+ num += this->variableAttribute << 24;
78
+ num += this->attribute << 8;
79
+ num += this->kind;
80
+ return num;
81
+ }
82
+
83
+ bool operator<(const Symbol& rhs)
84
+ {
85
+ return this->kind < rhs.kind;
86
+ }
87
+
88
+ void operator=(const int& i)
89
+ {
90
+ this->kind = EdgeKindMask & i;
91
+ this->attribute = i >> EdgeKindMaskBits;
92
+ this->variableAttribute = i >> AttributedKindMaskBits;
93
+ }
94
+
95
+ void operator=(unsigned long long num)
96
+ {
97
+ this->kind = num & 0xFF;
98
+ this->attribute = (num >> 8 ) & 0xFFFF;
99
+ this->variableAttribute = num >> 24;
100
+ }
101
+
102
+ void operator=(const Kind& kind)
103
+ {
104
+ this->kind = kind;
105
+ }
106
+
107
+ bool operator==(const Symbol& s)
108
+ {
109
+ return ((this->kind == s.kind) && (this->attribute == s.attribute) && (this->variableAttribute == s.variableAttribute));
110
+ }
111
+
112
+ bool operator==(const Symbol& s) const
113
+ {
114
+ return ((kind == s.kind) && (attribute == s.attribute) && (variableAttribute == s.variableAttribute));
115
+ }
116
+
117
+ bool operator!=(const Symbol& s) const
118
+ {
119
+ return ! (*this == s) ;
120
+ }
121
+
122
+
123
+ bool operator==(const int& i)
124
+ {
125
+ return ((this->kind == (EdgeKindMask & i)) && (this->attribute == (i >> EdgeKindMaskBits)) && (this->variableAttribute == (i >> AttributedKindMaskBits)));
126
+ }
127
+
128
+ bool operator==(const Kind& k) const
129
+ {
130
+ return (this->kind == k);
131
+ }
132
+
133
+ bool operator==(const Kind& k)
134
+ {
135
+ return (this->kind == k);
136
+ }
137
+ } Symbol;
138
+
139
+ class SymbolHash
140
+ {
141
+ public:
142
+ size_t operator()(const Symbol &s) const
143
+ {
144
+ std::hash<u32_t> h;
145
+ return h(u32_t(s));
146
+ }
147
+ };
148
+
43
149
 
44
- inline Map<std::string, Kind>& getNonterminals()
150
+ struct SymbolVectorHash
151
+ {
152
+ size_t operator()(const std::vector<Symbol> &v) const
153
+ {
154
+ size_t h = v.size();
155
+
156
+ SymbolHash hf;
157
+ for (const Symbol &t : v)
158
+ {
159
+ h ^= hf(t) + 0x9e3779b9 + (h << 6) + (h >> 2);
160
+ }
161
+
162
+ return h;
163
+ }
164
+ };
165
+
166
+ template<typename Key, typename Value, typename Hash = SymbolHash,
167
+ typename KeyEqual = std::equal_to<Key>,
168
+ typename Allocator = std::allocator<std::pair<const Key, Value>>>
169
+ using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
170
+
171
+ template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
172
+ typename Allocator = std::allocator<Key>>
173
+ using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
174
+
175
+ typedef std::vector<Symbol> Production;
176
+ typedef SymbolSet<Production> Productions;
177
+
178
+
179
+ inline Map<std::string, Kind>& getNonterminals()
45
180
  {
46
181
  return this->nonterminals;
47
182
  }
@@ -61,7 +196,7 @@ public:
61
196
  this->terminals = terminals;
62
197
  }
63
198
 
64
- inline Map<Symbol, Productions>& getRawProductions()
199
+ inline SymbolMap<Symbol, Productions>& getRawProductions()
65
200
  {
66
201
  return this->rawProductions;
67
202
  }
@@ -91,7 +226,11 @@ public:
91
226
  this->totalKind = totalKind;
92
227
  }
93
228
 
94
- void setRawProductions(Map<Symbol, Productions>& rawProductions);
229
+ std::string extractKindStrFromSymbolStr(const std::string symbolStr) const;
230
+
231
+ std::string extractAttributeStrFromSymbolStr(const std::string symbolStr) const;
232
+
233
+ void setRawProductions(SymbolMap<Symbol, Productions>& rawProductions);
95
234
 
96
235
  void setKind2AttrsMap(const Map<Kind, Set<Attribute>>& kind2AttrsMap);
97
236
 
@@ -99,6 +238,8 @@ public:
99
238
 
100
239
  Kind str2Kind(std::string str) const;
101
240
 
241
+ Symbol str2Symbol(const std::string str) const;
242
+
102
243
  std::string kind2Str(Kind kind) const;
103
244
 
104
245
  std::string sym2StrDump(Symbol sym) const;
@@ -108,41 +249,46 @@ public:
108
249
  return prod.at(pos);
109
250
  }
110
251
 
111
- inline const Set<Symbol>& getAttrSyms() const
252
+ inline const Set<Kind>& getAttrSyms() const
112
253
  {
113
254
  return this->attributeKinds;
114
255
  }
115
256
 
257
+ /// Insert kind to nonterminal and return kind.
258
+ Kind insertNonterminalKind(std::string const kindStr);
259
+
260
+ /// From SymbolStr extract kind to inserted in nonterminal
261
+ /// symbolStr = <kindStr> [_] [ attributeStr | variableattributeStr ]
116
262
  Kind insertTerminalKind(std::string strLit);
117
- Kind insertNonTerminalKind(std::string strLit);
118
- void insertAttribute(Kind kind, Attribute a);
119
263
 
120
- inline static Kind getSymKind(Symbol sym)
121
- {
122
- return (EdgeKindMask & sym);
123
- }
264
+ Symbol insertSymbol(std::string strLit);
124
265
 
125
- inline static Attribute getSymAttribute(Symbol sym)
126
- {
127
- return (sym >> EdgeKindMaskBits);
128
- }
266
+ Symbol insertNonTerminalSymbol(std::string strLit);
267
+
268
+ void insertAttribute(Kind kind, Attribute a);
129
269
 
130
270
  inline static Kind getAttributedKind(Attribute attribute, Kind kind)
131
271
  {
132
272
  return ((attribute << EdgeKindMaskBits)| kind );
133
273
  }
134
274
 
275
+ inline static Kind getVariabledKind(VariableAttribute variableAttribute, Kind kind)
276
+ {
277
+ return ((variableAttribute << AttributedKindMaskBits) | kind);
278
+ }
279
+
135
280
  protected:
136
281
  static constexpr unsigned char EdgeKindMaskBits = 8; ///< We use the lower 8 bits to denote edge kind
282
+ static constexpr unsigned char AttributedKindMaskBits = 24; ///< We use the lower 24 bits to denote attributed kind
137
283
  static constexpr u64_t EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits);
138
284
  Kind startKind;
139
285
  private:
140
- Set<Kind> attributeKinds;
141
- Map<Kind, Set<Attribute>> kind2AttrsMap;
142
- Map<Symbol, Productions> rawProductions;
143
- Kind totalKind;
144
286
  Map<std::string, Kind> nonterminals;
145
287
  Map<std::string, Kind> terminals;
288
+ Set<Kind> attributeKinds;
289
+ Map<Kind, Set<Attribute>> kind2AttrsMap;
290
+ SymbolMap<Symbol, Productions> rawProductions;
291
+ u32_t totalKind;
146
292
  };
147
293
 
148
294
  class CFLGrammar : public GrammarBase
@@ -168,17 +314,17 @@ public:
168
314
  return epsilonProds;
169
315
  }
170
316
 
171
- Map<Symbol, Productions>& getSingleRHS2Prods()
317
+ SymbolMap<Symbol, Productions>& getSingleRHS2Prods()
172
318
  {
173
319
  return singleRHS2Prods;
174
320
  }
175
321
 
176
- Map<Symbol, Productions>& getFirstRHS2Prods()
322
+ SymbolMap<Symbol, Productions>& getFirstRHS2Prods()
177
323
  {
178
324
  return firstRHS2Prods;
179
325
  }
180
326
 
181
- Map<Symbol, Productions>& getSecondRHS2Prods()
327
+ SymbolMap<Symbol, Productions>& getSecondRHS2Prods()
182
328
  {
183
329
  return secondRHS2Prods;
184
330
  }
@@ -240,17 +386,86 @@ public:
240
386
 
241
387
  void dump() const;
242
388
 
389
+ void dump(std::string fileName) const;
390
+
391
+
243
392
  const inline int num_generator()
244
393
  {
245
394
  return newTerminalSubscript++;
246
395
  }
247
396
 
248
397
  private:
249
- Set<Production> epsilonProds;
250
- Map<Symbol, Productions> singleRHS2Prods;
251
- Map<Symbol, Productions> firstRHS2Prods;
252
- Map<Symbol, Productions> secondRHS2Prods;
253
- Symbol newTerminalSubscript;
398
+ SymbolSet<Production> epsilonProds;
399
+ SymbolMap<Symbol, Productions> singleRHS2Prods;
400
+ SymbolMap<Symbol, Productions> firstRHS2Prods;
401
+ SymbolMap<Symbol, Productions> secondRHS2Prods;
402
+ u32_t newTerminalSubscript;
403
+ };
404
+
405
+ /**
406
+ * Worklist with "first in first out" order.
407
+ * New nodes will be pushed at back and popped from front.
408
+ * Elements in the list are unique as they're recorded by Set.
409
+ */
410
+ template<class Data>
411
+ class CFLFIFOWorkList
412
+ {
413
+ typedef GrammarBase::SymbolSet<Data> DataSet;
414
+ typedef std::deque<Data> DataDeque;
415
+ public:
416
+ CFLFIFOWorkList() {}
417
+
418
+ ~CFLFIFOWorkList() {}
419
+
420
+ inline bool empty() const
421
+ {
422
+ return data_list.empty();
423
+ }
424
+
425
+ inline bool find(Data data) const
426
+ {
427
+ return (data_set.find(data) == data_set.end() ? false : true);
428
+ }
429
+
430
+ /**
431
+ * Push a data into the work list.
432
+ */
433
+ inline bool push(Data data)
434
+ {
435
+ if (data_set.find(data) == data_set.end())
436
+ {
437
+ data_list.push_back(data);
438
+ data_set.insert(data);
439
+ return true;
440
+ }
441
+ else
442
+ return false;
443
+ }
444
+
445
+ /**
446
+ * Pop a data from the END of work list.
447
+ */
448
+ inline Data pop()
449
+ {
450
+ assert(!empty() && "work list is empty");
451
+ Data data = data_list.front();
452
+ data_list.pop_front();
453
+ data_set.erase(data);
454
+ return data;
455
+ }
456
+
457
+ /*!
458
+ * Clear all the data
459
+ */
460
+ inline void clear()
461
+ {
462
+ data_list.clear();
463
+ data_set.clear();
464
+ }
465
+
466
+ private:
467
+ DataSet data_set; ///< store all data in the work list.
468
+ DataDeque data_list; ///< work list using std::vector.
254
469
  };
255
470
 
256
471
  }
@@ -1,19 +1,17 @@
1
1
  Start:
2
- V
2
+ V
3
+ Terminal:
4
+ Addr Copy Store Load Gep Vgep
3
5
  Productions:
4
- F -> Addr;
5
- F -> Addr ( Copy ) *;
6
- F -> Addr ( Store V Load ) *;
7
- F -> ( Copy ) *;
8
- F -> ( Store V Load ) *;
9
- Fbar -> Addrbar;
10
- Fbar -> Addrbar ( Copybar ) *;
11
- Fbar -> Addrbar ( Loadbar V Storebar ) *;
12
- Fbar -> ( Copybar ) *;
13
- Fbar -> ( Loadbar V Storebar ) *;
6
+ F -> epsilon;
7
+ F -> F Copy;
8
+ F -> F Store V Load;
9
+ Gepbar_j -> Vgepbar Fbar Gepbar_i;
10
+ Fbar -> epsilon;
11
+ Fbar -> Copybar Fbar;
12
+ Fbar -> Loadbar V Storebar Fbar;
14
13
  V -> Fbar V F;
15
- V -> Gepbar_i V Gep_i;
16
14
  V -> Addrbar Addr;
17
- V -> epsilon;
18
-
19
-
15
+ V -> Gepbar_i V Gep_i;
16
+ Gep_j -> Gep_i F Vgep;
17
+
@@ -39,14 +39,14 @@ namespace SVF
39
39
 
40
40
  class CFLGraphBuilder
41
41
  {
42
- private:
42
+ protected:
43
43
  typedef CFLGrammar::Kind Kind;
44
44
  typedef CFLGrammar::Symbol Symbol;
45
45
  Map<std::string, Kind> label2KindMap;
46
46
  Map<Kind, std::string> kind2LabelMap;
47
47
  Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>> kind2AttrsMap;
48
48
  bool externMap;
49
- Symbol current;
49
+ Kind current;
50
50
 
51
51
  public:
52
52
  /// add attribute to kind2Attribute Map
@@ -73,12 +73,22 @@ public:
73
73
 
74
74
  /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
75
75
  template<class N, class E>
76
- CFLGraph* buildBigraph(GenericGraph<N,E>* graph, Kind startKind)
76
+ CFLGraph* buildBigraph(GenericGraph<N,E>* graph, Kind startKind, GrammarBase *grammar)
77
77
  {
78
78
  CFLGraph *cflGraph = new CFLGraph(startKind);
79
- Map<std::string, SVF::CFLGraph::Symbol> ConstMap = {{"Addr",0}, {"Copy", 1},{"Store", 2},{"Load", 3},{"Gep_i", 4},{"Vgep", 5},{"Addrbar",6}, {"Copybar", 7},{"Storebar", 8},{"Loadbar", 9},{"Gepbar_i", 10},{"Vgepbar", 11}};
80
79
  externMap = true;
81
- for(auto pairV : ConstMap)
80
+ for(auto pairV : grammar->getTerminals())
81
+ {
82
+ if(label2KindMap.find(pairV.first) == label2KindMap.end())
83
+ {
84
+ label2KindMap.insert(pairV);
85
+ }
86
+ if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
87
+ {
88
+ kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
89
+ }
90
+ }
91
+ for(auto pairV : grammar->getNonterminals())
82
92
  {
83
93
  if(label2KindMap.find(pairV.first) == label2KindMap.end())
84
94
  {
@@ -100,29 +110,10 @@ public:
100
110
  for(E* edge : node->getOutEdges())
101
111
  {
102
112
  CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
103
- // Need to get the offset from the Const Edge
104
- // The offset present edge is only from Normal Gep CG at moment
105
- if(NormalGepCGEdge::classof(edge))
106
- {
107
- NormalGepCGEdge *nGepEdge = SVFUtil::dyn_cast<NormalGepCGEdge>(edge);
108
- CFLGrammar::Attribute attr = nGepEdge->getConstantFieldIdx();
109
- addAttribute(edgeLabel, attr);
110
- edgeLabel = CFLGrammar::getAttributedKind(attr, edgeLabel);
111
- cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
112
- std::string key = kind2LabelMap[edge->getEdgeKind()];
113
- key.pop_back();
114
- key.pop_back(); // _i standsfor attribute variable should place at last
115
- key.append("bar_i"); // for example Gep_i should be Gepbar_i, not Gep_ibar
116
- cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), CFLGrammar::getAttributedKind(attr, label2KindMap[key]));
117
- addAttribute(label2KindMap[key], attr);
118
- }
119
- else
120
- {
121
- cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
122
- std::string key = kind2LabelMap[edge->getEdgeKind()];
123
- key.append("bar");
124
- cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
125
- }
113
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
114
+ std::string key = kind2LabelMap[edge->getEdgeKind()];
115
+ key.append("bar");
116
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
126
117
  }
127
118
  }
128
119
  return cflGraph;
@@ -147,8 +138,15 @@ public:
147
138
  {
148
139
  return this->kind2AttrsMap;
149
140
  }
141
+ };
150
142
 
151
-
143
+ class AliasCFLGraphBuilder : public CFLGraphBuilder
144
+ {
145
+ public:
146
+ /// Build Bidirectional graph by copying nodes and edges from const graph inherited from GenericGraph
147
+ CFLGraph* buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar);
152
148
  };
149
+
153
150
  }// SVF
154
151
 
152
+
@@ -27,54 +27,74 @@
27
27
  * Author: Pei Xu
28
28
  */
29
29
 
30
+ #ifndef INCLUDE_CFL_GRAMMARBUILDER_H_
31
+ #define INCLUDE_CFL_GRAMMARBUILDER_H_
30
32
 
31
33
  #include "CFL/CFLGrammar.h"
32
- #include "Graphs/CFLGraph.h"
34
+
33
35
  namespace SVF
34
36
  {
35
37
 
36
- /*!
38
+ /**
37
39
  * Build Grammar from a user specified grammar text
40
+ *
41
+ * Symbol Format:
42
+ * <kind> [bar] [ _alpha | _number ]
43
+ * kind: any nonspace string start with alphabet, epsilon stand for empty string
44
+ * bar: stand for reverse edge
45
+ * alpha: any single alpha
46
+ * number: any number
47
+ * start with capital: nonterminal
48
+ * start with noncapital: terminal
49
+ *
50
+ * Production Format:
51
+ * <symbol> -> <symbol> *;
52
+ * LHS and RHS, Seperate by '->', symbol seperate by ' ', end by ';'
53
+ * support '*', '?', '(', ')'
54
+ *
38
55
  * Input Format:
39
- * Start: // Special string 'epsilon' for empty RHS
56
+ * Start:
40
57
  * M // Specify Start Symbol in Second Line
58
+ * Terminal:
59
+ * Addr Copy Store Load Gep Vgep // Specify the order of terminal Addr->0, Copy->1 ..
41
60
  * Productions: // Each Symbol seperate by 'Space', production end with ';'
42
61
  * M -> V d; // Terminal in NonCapital
43
62
  * M -> dbar V d; // NonTerminal in Capital
44
63
  * V -> M abar M a M; // LHS and RHS, Seperate by '->'
45
64
  * V -> ( M ? abar ) * M ? ( a M ? ) *; // Support '(' ')' '?' '*' four regular expression sign
46
- * Note:
47
- * When provide EBNF form text (i.e Last production above),
48
- * Please specify -ebnf flag, otherwise regular experssion sign will treat as NonTerminal.
65
+ * Gep_j -> Gep_i F vgep; // Support variable attribute with variable attribute
66
+ * Gep_1 -> Gep_2; // Support fix number attribute
67
+ *
49
68
  */
50
69
 
51
70
  class GrammarBuilder
52
71
  {
53
72
  private:
54
- /// Load whole file content to string
55
- const inline std::string loadFileString() const;
73
+ std::string fileName;
74
+ GrammarBase *grammar;
56
75
 
57
76
  /// Parse start symbol and production from file string
58
- const inline std::string parseProduction() const;
77
+ const inline std::string parseProductionsString() const;
59
78
 
60
79
  /// Parse whole production string to production vector
61
80
  const inline std::vector<std::string> loadWordProductions() const;
62
81
 
63
- /// Strip frond and tail space
82
+ /// Strip front and tail space
64
83
  const inline std::string stripSpace(std::string s) const;
65
84
 
66
85
  public:
67
- std::string fileName;
68
- GrammarBase *grammar;
69
-
70
86
  GrammarBuilder(std::string fileName): fileName(fileName), grammar(nullptr)
71
87
  {
72
88
  grammar = new GrammarBase();
73
89
  };
74
90
 
91
+ /// Build grammarBase from fileName
75
92
  GrammarBase* build() const;
76
93
 
77
- GrammarBase* build(Map<std::string, SVF::CFLGraph::Symbol> &preMap) const;
94
+ /// Build grammarBase from fileName with preset str2KindMap
95
+ GrammarBase* build(Map<std::string, SVF::GrammarBase::Symbol> &preMap) const;
78
96
  };
79
97
 
80
98
  } // SVF
99
+
100
+ #endif /* INCLUDE_CFL_GRAMMARBUILDER_H_ */
@@ -57,6 +57,16 @@ public:
57
57
  {
58
58
  return this->getEdgeKindWithoutMask();
59
59
  }
60
+
61
+ inline GEdgeKind getEdgeKindWithMask() const
62
+ {
63
+ return (EdgeKindMask & this->getEdgeKindWithoutMask());
64
+ }
65
+
66
+ inline GEdgeKind getEdgeAttri() const
67
+ {
68
+ return (getEdgeKind() >> this->EdgeKindMaskBits);
69
+ }
60
70
  };
61
71
 
62
72
 
@@ -87,6 +97,8 @@ public:
87
97
  }
88
98
  ~CFLGraph() override = default;
89
99
 
100
+ Kind getStartKind() const;
101
+
90
102
  virtual void addCFLNode(NodeID id, CFLNode* node);
91
103
 
92
104
  virtual const CFLEdge* addCFLEdge(CFLNode* src, CFLNode* dst, CFLEdge::GEdgeFlag label);
@@ -308,6 +308,7 @@ public:
308
308
  {
309
309
  return ls.accumulateConstantFieldIdx();
310
310
  }
311
+
311
312
  };
312
313
 
313
314
  /*!
@@ -28,8 +28,8 @@
28
28
  * Author: Yulei Sui
29
29
  */
30
30
 
31
- #ifndef INCLUDE_UTIL_CALLGRAPHBUILDER_H_
32
- #define INCLUDE_UTIL_CALLGRAPHBUILDER_H_
31
+ #ifndef INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
32
+ #define INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
33
33
 
34
34
  #include "Graphs/PTACallGraph.h"
35
35
  #include "Graphs/ThreadCallGraph.h"