svf-tools 1.0.537 → 1.0.540

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 (232) hide show
  1. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +1 -1
  2. package/SVF-doxygen/html/html/AndersenSFR_8h_source.html +1 -1
  3. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +2 -2
  4. package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +2 -2
  5. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +16 -16
  6. package/SVF-doxygen/html/html/Andersen_8h_source.html +6 -9
  7. package/SVF-doxygen/html/html/BreakConstantExpr_8h_source.html +2 -1
  8. package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +1 -1
  9. package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +5 -4
  10. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +15 -15
  11. package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +4 -4
  12. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +39 -39
  13. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +20 -8
  14. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +16 -15
  15. package/SVF-doxygen/html/html/CHGBuilder_8cpp.html +1 -1
  16. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +2 -1
  17. package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +2 -1
  18. package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
  19. package/SVF-doxygen/html/html/ConsG_8h_source.html +3 -3
  20. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +2 -2
  21. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +2 -2
  22. package/SVF-doxygen/html/html/DDAStat_8h.html +1 -1
  23. package/SVF-doxygen/html/html/DDAStat_8h_source.html +1 -1
  24. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +4 -4
  25. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +1 -1
  26. package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +2 -2
  27. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  28. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +1 -1
  29. package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +1 -1
  30. package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +4 -4
  31. package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +3 -3
  32. package/SVF-doxygen/html/html/ICFGStat_8h.html +1 -1
  33. package/SVF-doxygen/html/html/ICFGStat_8h_source.html +1 -1
  34. package/SVF-doxygen/html/html/LLVMLoopAnalysis_8cpp_source.html +1 -1
  35. package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +2 -1
  36. package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +1 -1
  37. package/SVF-doxygen/html/html/LockAnalysis_8cpp.html +1 -1
  38. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  39. package/SVF-doxygen/html/html/MHP_8cpp.html +1 -1
  40. package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
  41. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +2 -1
  42. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
  43. package/SVF-doxygen/html/html/MTAStat_8h.html +1 -1
  44. package/SVF-doxygen/html/html/MTAStat_8h_source.html +1 -1
  45. package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
  46. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +1 -1
  47. package/SVF-doxygen/html/html/NodeIDAllocator_8cpp.html +1 -1
  48. package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +1 -1
  49. package/SVF-doxygen/html/html/Options_8cpp_source.html +5 -3
  50. package/SVF-doxygen/html/html/Options_8h.html +1 -1
  51. package/SVF-doxygen/html/html/Options_8h_source.html +5 -3
  52. package/SVF-doxygen/html/html/PEGGrammar_8txt.html +314 -0
  53. package/SVF-doxygen/html/html/PTAStat_8cpp.html +1 -1
  54. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +5 -5
  55. package/SVF-doxygen/html/html/PTAStat_8h.html +2 -2
  56. package/SVF-doxygen/html/html/PTAStat_8h_source.html +2 -2
  57. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
  58. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
  59. package/SVF-doxygen/html/html/PointerAnalysis_8cpp.html +1 -1
  60. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +2 -2
  61. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +3 -3
  62. package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +1 -1
  63. package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +1 -1
  64. package/SVF-doxygen/html/html/SVFGStat_8h.html +1 -1
  65. package/SVF-doxygen/html/html/SVFGStat_8h_source.html +1 -1
  66. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
  67. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +3 -3
  68. package/SVF-doxygen/html/html/SVFIR_8h_source.html +33 -33
  69. package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
  70. package/SVF-doxygen/html/html/SaberCondAllocator_8cpp_source.html +2 -1
  71. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +2 -2
  72. package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +2 -2
  73. package/SVF-doxygen/html/html/TypeAnalysis_8cpp.html +1 -1
  74. package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +1 -1
  75. package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
  76. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  77. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
  78. package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +1 -1
  79. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
  80. package/SVF-doxygen/html/html/WPAStat_8h.html +1 -1
  81. package/SVF-doxygen/html/html/WPAStat_8h_source.html +1 -1
  82. package/SVF-doxygen/html/html/cfl_8cpp.html +1 -1
  83. package/SVF-doxygen/html/html/cfl_8cpp_source.html +1 -1
  84. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +12 -11
  85. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +73 -4
  86. package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +150 -152
  87. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +46 -141
  88. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +1 -1
  89. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +149 -151
  90. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +5 -11
  91. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +161 -163
  92. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +4 -10
  93. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +3 -3
  94. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +156 -158
  95. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +14 -20
  96. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +4 -4
  97. package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
  98. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -51
  99. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +26 -26
  100. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +10 -7
  101. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +1 -1
  102. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +3 -3
  103. package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +2 -2
  104. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +3 -3
  105. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +11 -11
  106. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +2 -2
  107. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +4 -4
  108. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
  109. package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +2 -2
  110. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +10 -10
  111. package/SVF-doxygen/html/html/classSVF_1_1LLVMLoopAnalysis.html +1 -1
  112. package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +2 -1
  113. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +1 -1
  114. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +2 -2
  115. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +4 -4
  116. package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +1 -1
  117. package/SVF-doxygen/html/html/classSVF_1_1MergeFunctionRets.html +3 -2
  118. package/SVF-doxygen/html/html/classSVF_1_1Options-members.html +8 -6
  119. package/SVF-doxygen/html/html/classSVF_1_1Options.html +54 -2
  120. package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +2 -2
  121. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +16 -16
  122. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +5 -5
  123. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
  124. package/SVF-doxygen/html/html/classSVF_1_1SVFGStat.html +2 -2
  125. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +86 -88
  126. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +22 -22
  127. package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +1 -1
  128. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +2 -2
  129. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +2 -2
  130. package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +1 -1
  131. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +1 -1
  132. package/SVF-doxygen/html/html/classSVF_1_1VFG.html +1 -1
  133. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +2 -2
  134. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +3 -3
  135. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +1 -1
  136. package/SVF-doxygen/html/html/dir_95e22971b5dbae2382075a3453e365b4.html +2 -0
  137. package/SVF-doxygen/html/html/dir_eef3a4ca6ca2cab0eb5fbea30ec32c1a.html +0 -2
  138. package/SVF-doxygen/html/html/files.html +15 -15
  139. package/SVF-doxygen/html/html/functions_a.html +3 -6
  140. package/SVF-doxygen/html/html/functions_b.html +3 -0
  141. package/SVF-doxygen/html/html/functions_c.html +22 -20
  142. package/SVF-doxygen/html/html/functions_f.html +10 -12
  143. package/SVF-doxygen/html/html/functions_func.html +5 -8
  144. package/SVF-doxygen/html/html/functions_func_b.html +3 -0
  145. package/SVF-doxygen/html/html/functions_func_m.html +1 -4
  146. package/SVF-doxygen/html/html/functions_func_p.html +2 -2
  147. package/SVF-doxygen/html/html/functions_i.html +6 -6
  148. package/SVF-doxygen/html/html/functions_m.html +0 -3
  149. package/SVF-doxygen/html/html/functions_n.html +3 -0
  150. package/SVF-doxygen/html/html/functions_o.html +6 -6
  151. package/SVF-doxygen/html/html/functions_p.html +15 -16
  152. package/SVF-doxygen/html/html/functions_r.html +2 -2
  153. package/SVF-doxygen/html/html/functions_s.html +8 -6
  154. package/SVF-doxygen/html/html/functions_t.html +3 -3
  155. package/SVF-doxygen/html/html/functions_v.html +3 -3
  156. package/SVF-doxygen/html/html/functions_vars_n.html +3 -0
  157. package/SVF-doxygen/html/html/functions_vars_p.html +3 -0
  158. package/SVF-doxygen/html/html/globals.html +1 -0
  159. package/SVF-doxygen/html/html/globals_a.html +3 -1
  160. package/SVF-doxygen/html/html/globals_c.html +6 -5
  161. package/SVF-doxygen/html/html/globals_e.html +1 -0
  162. package/SVF-doxygen/html/html/globals_f.html +7 -5
  163. package/SVF-doxygen/html/html/globals_g.html +7 -3
  164. package/SVF-doxygen/html/html/globals_m.html +6 -3
  165. package/SVF-doxygen/html/html/globals_v.html +2 -1
  166. package/SVF-doxygen/html/html/globals_vars.html +22 -7
  167. package/SVF-doxygen/html/html/namespaceSVF.html +3 -3
  168. package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +1 -1
  169. package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +4 -4
  170. package/SVF-doxygen/html/html/search/all_0.js +1 -1
  171. package/SVF-doxygen/html/html/search/all_1.js +2 -3
  172. package/SVF-doxygen/html/html/search/all_10.js +11 -9
  173. package/SVF-doxygen/html/html/search/all_11.js +1 -1
  174. package/SVF-doxygen/html/html/search/all_12.js +8 -8
  175. package/SVF-doxygen/html/html/search/all_13.js +4 -4
  176. package/SVF-doxygen/html/html/search/all_15.js +3 -3
  177. package/SVF-doxygen/html/html/search/all_2.js +1 -0
  178. package/SVF-doxygen/html/html/search/all_3.js +4 -4
  179. package/SVF-doxygen/html/html/search/all_5.js +1 -1
  180. package/SVF-doxygen/html/html/search/all_6.js +6 -6
  181. package/SVF-doxygen/html/html/search/all_7.js +4 -4
  182. package/SVF-doxygen/html/html/search/all_9.js +2 -2
  183. package/SVF-doxygen/html/html/search/all_b.js +1 -1
  184. package/SVF-doxygen/html/html/search/all_c.js +2 -2
  185. package/SVF-doxygen/html/html/search/all_d.js +2 -3
  186. package/SVF-doxygen/html/html/search/all_e.js +4 -3
  187. package/SVF-doxygen/html/html/search/all_f.js +2 -2
  188. package/SVF-doxygen/html/html/search/files_c.js +1 -0
  189. package/SVF-doxygen/html/html/search/functions_0.js +0 -1
  190. package/SVF-doxygen/html/html/search/functions_1.js +1 -0
  191. package/SVF-doxygen/html/html/search/functions_c.js +0 -1
  192. package/SVF-doxygen/html/html/search/functions_f.js +2 -2
  193. package/SVF-doxygen/html/html/search/variables_0.js +1 -1
  194. package/SVF-doxygen/html/html/search/variables_1.js +2 -2
  195. package/SVF-doxygen/html/html/search/variables_10.js +2 -1
  196. package/SVF-doxygen/html/html/search/variables_13.js +2 -2
  197. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  198. package/SVF-doxygen/html/html/search/variables_3.js +1 -1
  199. package/SVF-doxygen/html/html/search/variables_5.js +1 -1
  200. package/SVF-doxygen/html/html/search/variables_6.js +2 -2
  201. package/SVF-doxygen/html/html/search/variables_7.js +4 -4
  202. package/SVF-doxygen/html/html/search/variables_d.js +1 -1
  203. package/SVF-doxygen/html/html/search/variables_e.js +3 -2
  204. package/include/CFL/CFGNormalizer.h +3 -3
  205. package/include/CFL/CFLAlias.h +5 -1
  206. package/include/CFL/CFLGraphBuilder.h +11 -1
  207. package/include/CFL/PEGGrammar.txt +28 -0
  208. package/include/DDA/DDAStat.h +1 -1
  209. package/include/Graphs/ICFGStat.h +1 -1
  210. package/include/Graphs/SVFGStat.h +1 -1
  211. package/include/MTA/MTAStat.h +1 -1
  212. package/include/MemoryModel/SVFIR.h +1 -4
  213. package/include/SVF-FE/LLVMUtil.h +2 -2
  214. package/include/Util/ExtAPI.h +2 -2
  215. package/include/Util/Options.h +3 -1
  216. package/include/{MemoryModel → Util}/PTAStat.h +0 -0
  217. package/include/WPA/Andersen.h +3 -14
  218. package/include/WPA/WPAStat.h +1 -1
  219. package/lib/CFL/CFLAlias.cpp +12 -7
  220. package/lib/CFL/CFLGraphBuilder.cpp +135 -0
  221. package/lib/CFL/GrammarBuilder.cpp +12 -8
  222. package/lib/Graphs/SVFGReadWrite.cpp +3 -3
  223. package/lib/MTA/LockAnalysis.cpp +1 -1
  224. package/lib/MTA/MHP.cpp +1 -1
  225. package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
  226. package/lib/SVF-FE/CHGBuilder.cpp +1 -1
  227. package/lib/Util/NodeIDAllocator.cpp +1 -1
  228. package/lib/Util/Options.cpp +16 -4
  229. package/lib/Util/PTAStat.cpp +4 -3
  230. package/lib/WPA/Andersen.cpp +0 -3
  231. package/lib/WPA/TypeAnalysis.cpp +1 -1
  232. package/package.json +1 -1
@@ -81,7 +81,7 @@ var searchData=
81
81
  ['context',['context',['../classSVF_1_1ContextCond.html#ac431eae00244cc7792b6e7e00634d535',1,'SVF::ContextCond::context()'],['../classSVF_1_1CxtStmtDPItem.html#a96f1d7c309e3b69af66200e2cfb5a466',1,'SVF::CxtStmtDPItem::context()'],['../classSVF_1_1CxtDPItem.html#ab89e9f588054ad8a99d9af8e756c951b',1,'SVF::CxtDPItem::context()']]],
82
82
  ['contextdda',['contextDDA',['../classSVF_1_1DDAStat.html#ac3fb8b15c5308c926209a941c7cf62e1',1,'SVF::DDAStat']]],
83
83
  ['contextinsensitive',['ContextInsensitive',['../classSVF_1_1Options.html#ac3ad7d0cf734e867b91a081aad1faff2',1,'SVF::Options']]],
84
- ['copy',['Copy',['../CFLGrammar_8txt.html#a36f63c7a581bf6d351f835c6127a2519',1,'Copy(): CFLGrammar.txt'],['../cJSON_8cpp.html#a7669ee67a0563250c1efaa24d130e1ac',1,'copy(): cJSON.cpp']]],
84
+ ['copy',['Copy',['../CFLGrammar_8txt.html#a36f63c7a581bf6d351f835c6127a2519',1,'Copy(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#a36f63c7a581bf6d351f835c6127a2519',1,'Copy(): PEGGrammar.txt'],['../cJSON_8cpp.html#a7669ee67a0563250c1efaa24d130e1ac',1,'copy(): cJSON.cpp']]],
85
85
  ['copyinedges',['copyInEdges',['../classSVF_1_1ConstraintNode.html#a4d413d64bf554ecdc72709afeeb85775',1,'SVF::ConstraintNode']]],
86
86
  ['copyoutedges',['copyOutEdges',['../classSVF_1_1ConstraintNode.html#a12df688fd9b5b7617daadc7bee0fff40',1,'SVF::ConstraintNode']]],
87
87
  ['copytime',['copyTime',['../classSVF_1_1FlowSensitive.html#a888d6334e5e226c634680e4c0674dcfb',1,'SVF::FlowSensitive']]],
@@ -21,7 +21,7 @@ var searchData=
21
21
  ['entry',['entry',['../classSVF_1_1CallPE.html#a88e420e259b8d7d34c9850ddde53d372',1,'SVF::CallPE']]],
22
22
  ['entryfuncset',['entryFuncSet',['../classSVF_1_1TCT.html#a140eaf9440ae9d52dbfb659967aa449a',1,'SVF::TCT']]],
23
23
  ['entryicfgedges',['entryICFGEdges',['../classSVF_1_1SVFLoop.html#a681d712db88d105c8a2f758de3d7e72e',1,'SVF::SVFLoop']]],
24
- ['epsilon',['epsilon',['../CFLGrammar_8txt.html#a114c2e5cd44b3ea4720e9191ed819f3b',1,'CFLGrammar.txt']]],
24
+ ['epsilon',['epsilon',['../CFLGrammar_8txt.html#a114c2e5cd44b3ea4720e9191ed819f3b',1,'epsilon(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#a114c2e5cd44b3ea4720e9191ed819f3b',1,'epsilon(): PEGGrammar.txt']]],
25
25
  ['epsilonprods',['epsilonProds',['../classSVF_1_1CFLGrammar.html#a4d9770a2b935bcad74ae551389925f74',1,'SVF::CFLGrammar']]],
26
26
  ['equivalentobject',['equivalentObject',['../classSVF_1_1VersionedFlowSensitive.html#a2d451d89f99a4bff828b682723df477f',1,'SVF::VersionedFlowSensitive']]],
27
27
  ['evaltime',['EvalTime',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#a1d98862e19affdd08740f85490d0d856',1,'SVF::NodeIDAllocator::Clusterer']]],
@@ -1,8 +1,8 @@
1
1
  var searchData=
2
2
  [
3
- ['f',['F',['../CFLGrammar_8txt.html#a00967427d1c110ffcc82ea2a966f4564',1,'CFLGrammar.txt']]],
3
+ ['f',['F',['../CFLGrammar_8txt.html#a00967427d1c110ffcc82ea2a966f4564',1,'F(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2',1,'F(): PEGGrammar.txt']]],
4
4
  ['fastclustertime',['FastClusterTime',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#ae78d2b60035350c634f6f58d7a043c22',1,'SVF::NodeIDAllocator::Clusterer']]],
5
- ['fbar',['Fbar',['../CFLGrammar_8txt.html#afb129e761aae1ddaa005123832b88cd2',1,'CFLGrammar.txt']]],
5
+ ['fbar',['Fbar',['../CFLGrammar_8txt.html#aa92a4b37b902f3a59efef16528e4f905',1,'Fbar(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#aa92a4b37b902f3a59efef16528e4f905',1,'Fbar(): PEGGrammar.txt']]],
6
6
  ['fieldreps',['fieldReps',['../classSVF_1_1AndersenSFR.html#a99337c429aebe9046c65068b44eff7cc',1,'SVF::AndersenSFR']]],
7
7
  ['fieldtypes',['fieldTypes',['../classSVF_1_1DCHGraph.html#a574ec14099f1112b394b00a79f3fdf1a',1,'SVF::DCHGraph']]],
8
8
  ['file',['file',['../classSVF_1_1PAGBuilderFromFile.html#a9ce304b448de65fbde586655dce885a4',1,'SVF::PAGBuilderFromFile']]],
@@ -1,11 +1,11 @@
1
1
  var searchData=
2
2
  [
3
3
  ['generalnummap',['generalNumMap',['../classSVF_1_1PTAStat.html#afa718535839a939e51afc0f8c1fbdac6',1,'SVF::PTAStat']]],
4
- ['gep_5f0',['Gep_0',['../CFLGrammar_8txt.html#ace8178aa913f2a15d4b3f12778dfc6f1',1,'CFLGrammar.txt']]],
4
+ ['gep_5f0',['Gep_0',['../CFLGrammar_8txt.html#ace8178aa913f2a15d4b3f12778dfc6f1',1,'Gep_0(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#ace8178aa913f2a15d4b3f12778dfc6f1',1,'Gep_0(): PEGGrammar.txt']]],
5
5
  ['gep_5f1',['Gep_1',['../CFLGrammar_8txt.html#a92c75ced313339aea5e3e0c9f0726e5a',1,'CFLGrammar.txt']]],
6
- ['gep_5fi',['Gep_i',['../CFLGrammar_8txt.html#a653086130f70f043218d296d00529455',1,'CFLGrammar.txt']]],
7
- ['gepbar_5f0',['Gepbar_0',['../CFLGrammar_8txt.html#a38750813346a2f7d4d2f74101bf1be37',1,'CFLGrammar.txt']]],
8
- ['gepbar_5fi',['Gepbar_i',['../CFLGrammar_8txt.html#a1e1e10a9f0c4b902df72da76a308ae21',1,'CFLGrammar.txt']]],
6
+ ['gep_5fi',['Gep_i',['../CFLGrammar_8txt.html#af184db68cfa45428afdc186dd62e32a3',1,'Gep_i(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#af184db68cfa45428afdc186dd62e32a3',1,'Gep_i(): PEGGrammar.txt']]],
7
+ ['gepbar_5f0',['Gepbar_0',['../CFLGrammar_8txt.html#a74e2e5aac99754fa661689592e053e27',1,'Gepbar_0(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#a74e2e5aac99754fa661689592e053e27',1,'Gepbar_0(): PEGGrammar.txt']]],
8
+ ['gepbar_5fi',['Gepbar_i',['../CFLGrammar_8txt.html#aa3f2c8659adb9738e29e47d3a607ff1e',1,'Gepbar_i(): CFLGrammar.txt'],['../PEGGrammar_8txt.html#aa3f2c8659adb9738e29e47d3a607ff1e',1,'Gepbar_i(): PEGGrammar.txt']]],
9
9
  ['gepinedges',['gepInEdges',['../classSVF_1_1ConstraintNode.html#a4d0113f2af3a61892acee1fb21f0b938',1,'SVF::ConstraintNode']]],
10
10
  ['gepnodenumindex',['gepNodeNumIndex',['../PAGBuilderFromFile_8cpp.html#a1af3947dbaf1ad4364bc4818f70ead40',1,'PAGBuilderFromFile.cpp']]],
11
11
  ['gepobjvarmap',['GepObjVarMap',['../classSVF_1_1SVFIR.html#a148b51118eeba8117e033fea84b56be8',1,'SVF::SVFIR']]],
@@ -1,6 +1,6 @@
1
1
  var searchData=
2
2
  [
3
- ['m',['M',['../classSVF_1_1RaceResultValidator.html#abd3ad42a71357dfd1483e6e0d18d5ebd',1,'SVF::RaceResultValidator']]],
3
+ ['m',['M',['../classSVF_1_1RaceResultValidator.html#abd3ad42a71357dfd1483e6e0d18d5ebd',1,'SVF::RaceResultValidator::M()'],['../PEGGrammar_8txt.html#abd600039647a1e73c88e7161fa6eb989',1,'M(): PEGGrammar.txt']]],
4
4
  ['m_5fcond',['m_cond',['../classSVF_1_1CondVar.html#a90b13685d2126f8c10dde4a504bb28df',1,'SVF::CondVar']]],
5
5
  ['m_5fid',['m_id',['../classSVF_1_1CondVar.html#a26fd04b3f2d45f0c230e1823f3eea49a',1,'SVF::CondVar']]],
6
6
  ['mainmodule',['mainModule',['../classSVF_1_1IRAnnotator.html#a01462e9ee84f490514598c68e8c9557b',1,'SVF::IRAnnotator']]],
@@ -28,6 +28,7 @@ var searchData=
28
28
  ['nonterminals',['nonterminals',['../classSVF_1_1GrammarBase.html#ac0e54c6a5e87f9d91a5296504914849b',1,'SVF::GrammarBase']]],
29
29
  ['normalized',['normalized',['../classSVF_1_1CondPTAImpl.html#ab4115f25e2e477bfd73d01f069f47241',1,'SVF::CondPTAImpl']]],
30
30
  ['null',['NULL',['../cJSON_8cpp.html#a1a05ede2ad100bf5de5dfa7ccdfa4397',1,'cJSON.cpp']]],
31
+ ['nulldummynode',['NullDummyNode',['../classSVF_1_1Options.html#a59afe4356aae2133beb4819c013d3fbf',1,'SVF::Options']]],
31
32
  ['nullpointerid',['nullPointerId',['../classSVF_1_1NodeIDAllocator.html#a1e3a98be74d5dfd3b4c1b5f9c0941353',1,'SVF::NodeIDAllocator']]],
32
33
  ['nullptrsyms',['nullPtrSyms',['../classSVF_1_1SVFModule.html#a54f4857ba920d4d7c36d5258616d5dae',1,'SVF::SVFModule']]],
33
34
  ['number',['number',['../cJSON_8h.html#a6288dae99eabb0a393b1d4974e01cde7',1,'number(): cJSON.h'],['../cJSON_8cpp.html#a0b3e94800c28aaf801bbbf0b9b69fee4',1,'number(): cJSON.cpp']]],
@@ -36,7 +37,7 @@ var searchData=
36
37
  ['numgtintregions',['NumGtIntRegions',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#ad7cb36a1f0f67864fb8290e9dfd7b639',1,'SVF::NodeIDAllocator::Clusterer']]],
37
38
  ['numnodes',['numNodes',['../classSVF_1_1NodeIDAllocator.html#a8e76e0da58f0a5bdbd8118ac419cfa62',1,'SVF::NodeIDAllocator']]],
38
39
  ['numnontrivialregionobjects',['NumNonTrivialRegionObjects',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#a1bf9461c717e8dabaee6a57f3d76d61f',1,'SVF::NodeIDAllocator::Clusterer']]],
39
- ['numobjects',['numObjects',['../classSVF_1_1NodeIDAllocator.html#a190c729a3f3f622f82cee4917946b50f',1,'SVF::NodeIDAllocator::numObjects()'],['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#afa74c5ccd22bebe0b76db33066d8b498',1,'SVF::NodeIDAllocator::Clusterer::NumObjects()']]],
40
+ ['numobjects',['NumObjects',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#afa74c5ccd22bebe0b76db33066d8b498',1,'SVF::NodeIDAllocator::Clusterer::NumObjects()'],['../classSVF_1_1NodeIDAllocator.html#a190c729a3f3f622f82cee4917946b50f',1,'SVF::NodeIDAllocator::numObjects()']]],
40
41
  ['numofactualin',['numOfActualIn',['../classSVF_1_1SVFGStat.html#a5365744d2ec3594e2255d274f7256569',1,'SVF::SVFGStat']]],
41
42
  ['numofactualout',['numOfActualOut',['../classSVF_1_1SVFGStat.html#a122555f5c4b9746cc2b7f38c7cd6b505',1,'SVF::SVFGStat']]],
42
43
  ['numofactualparam',['numOfActualParam',['../classSVF_1_1SVFGStat.html#a0494c59483520b57acdca95952c93d76',1,'SVF::SVFGStat']]],
@@ -66,7 +67,7 @@ var searchData=
66
67
  ['numofentrychi',['NumOfEntryChi',['../classSVF_1_1MemSSAStat.html#ad96437d0c28f8088c711a718d2f2730e',1,'SVF::MemSSAStat']]],
67
68
  ['numofentrynodes',['numOfEntryNodes',['../classSVF_1_1ICFGStat.html#ad37793e64fe58a8faba201c18d876685',1,'SVF::ICFGStat']]],
68
69
  ['numofexitnodes',['numOfExitNodes',['../classSVF_1_1ICFGStat.html#ad7e00680fb8ca31afbd166f9a4adc5ec',1,'SVF::ICFGStat']]],
69
- ['numoffieldexpand',['numOfFieldExpand',['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase::numOfFieldExpand()'],['../classSVF_1_1PTAStat.html#a1745e5c3c026a130a70954da9c0074b1',1,'SVF::PTAStat::NumOfFieldExpand()']]],
70
+ ['numoffieldexpand',['NumOfFieldExpand',['../classSVF_1_1PTAStat.html#a1745e5c3c026a130a70954da9c0074b1',1,'SVF::PTAStat::NumOfFieldExpand()'],['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase::numOfFieldExpand()']]],
70
71
  ['numofflattenelements',['numOfFlattenElements',['../classSVF_1_1StInfo.html#a7aa5b5018b4dec4913eb6aecf25568a4',1,'SVF::StInfo']]],
71
72
  ['numofflattenfields',['numOfFlattenFields',['../classSVF_1_1StInfo.html#aa9b4e659f4a4421aadf736a3de24ca50',1,'SVF::StInfo']]],
72
73
  ['numofformalin',['numOfFormalIn',['../classSVF_1_1SVFGStat.html#abc5e079242666bb55ec7dbc7f258b3db',1,'SVF::SVFGStat']]],
@@ -27,8 +27,8 @@
27
27
  * Author: Pei Xu
28
28
  */
29
29
 
30
- #ifndef INCLUDE_CFL_CFGNormalizer_H_
31
- #define INCLUDE_CFL_CFGNormalizer_H_
30
+ #ifndef INCLUDE_CFL_CFGNORMALIZER_H_
31
+ #define INCLUDE_CFL_CFGNORMALIZER_H_
32
32
 
33
33
  #include "CFLGrammar.h"
34
34
 
@@ -79,4 +79,4 @@ private:
79
79
 
80
80
  } // End namespace SVF
81
81
 
82
- #endif /* INCLUDE_CFL_CFGNormalizer_H_*/
82
+ #endif /* INCLUDE_CFL_CFGNORMALIZER_H_*/
@@ -27,6 +27,8 @@
27
27
  * Author: Yulei Sui
28
28
  */
29
29
 
30
+ #ifndef INCLUDE_CFL_CFLALIAS_H_
31
+ #define INCLUDE_CFL_CFLALIAS_H_
30
32
 
31
33
  #include "CFL/CFLSolver.h"
32
34
  #include "CFL/CFGNormalizer.h"
@@ -144,4 +146,6 @@ private:
144
146
  CFLSolver *solver;
145
147
  };
146
148
 
147
- }
149
+ } // End namespace SVF
150
+
151
+ #endif /* INCLUDE_CFL_CFLALIAS_H_*/
@@ -27,6 +27,9 @@
27
27
  * Author: Pei Xu
28
28
  */
29
29
 
30
+ #ifndef INCLUDE_CFL_CFLGRAPHBUILDER_H_
31
+ #define INCLUDE_CFL_CFLGRAPHBUILDER_H_
32
+
30
33
  #include "CFL/CFLGrammar.h"
31
34
  #include "Graphs/CFLGraph.h"
32
35
  namespace SVF
@@ -118,6 +121,7 @@ public:
118
121
  }
119
122
  return cflGraph;
120
123
  }
124
+
121
125
  /// Build graph from file
122
126
  void build(std::string filename, CFLGraph* cflGraph);
123
127
 
@@ -138,6 +142,8 @@ public:
138
142
  {
139
143
  return this->kind2AttrsMap;
140
144
  }
145
+
146
+
141
147
  };
142
148
 
143
149
  class AliasCFLGraphBuilder : public CFLGraphBuilder
@@ -145,8 +151,12 @@ class AliasCFLGraphBuilder : public CFLGraphBuilder
145
151
  public:
146
152
  /// Build Bidirectional graph by copying nodes and edges from const graph inherited from GenericGraph
147
153
  CFLGraph* buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar);
154
+
155
+ /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
156
+ /// And transfer Load Store to copy edge and address edge to construct PEG style CFG
157
+ CFLGraph* buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag);
148
158
  };
149
159
 
150
160
  }// SVF
151
161
 
152
-
162
+ #endif /* INCLUDE_CFL_CFLGRAPHBUILDER_H_*/
@@ -0,0 +1,28 @@
1
+ Start:
2
+ V
3
+ Terminal:
4
+ Addr Copy Store Load Gep Vgep
5
+ Productions:
6
+ F -> epsilon;
7
+ M -> Addr V Addrbar;
8
+ V -> Fbar V F;
9
+ V -> Gepbar_i V Gep_i;
10
+ V -> M;
11
+ V -> epsilon;
12
+ F -> F Copy;
13
+ F -> F Copy M;
14
+ Fbar -> epsilon;
15
+ Fbar -> Copybar Fbar;
16
+ Fbar -> M Copybar Fbar;
17
+ Gep_1 -> Gep_0 F Vgep;
18
+ Gepbar_1 -> Vgepbar Fbar Gepbar_0;
19
+ Gepbarpath -> Gepbar_0 Gepbar_0;
20
+ Gepbarpath -> Gepbarpath Gepbar_0;
21
+ Gep_3 -> Gep_0;
22
+ Gepbar_3 -> Gepbar_0;
23
+ Memcpy -> Addrbar V Addr;
24
+ Memcpy -> Gep_i Memcpy Gepbar_i;
25
+ Memcpy -> F Memcpy Fbar;
26
+ V -> Gepbar_i Memcpy Gep_i;
27
+ V -> Gep_i Memcpy Gepbar_i;
28
+ V -> Gepbarpath V Gep_0;
@@ -8,7 +8,7 @@
8
8
  #ifndef DDASTAT_H_
9
9
  #define DDASTAT_H_
10
10
 
11
- #include "MemoryModel/PTAStat.h"
11
+ #include "Util/PTAStat.h"
12
12
  #include "MemoryModel/PointsTo.h"
13
13
 
14
14
  namespace SVF
@@ -29,7 +29,7 @@
29
29
  #ifndef INCLUDE_UTIL_ICFGSTAT_H_
30
30
  #define INCLUDE_UTIL_ICFGSTAT_H_
31
31
 
32
- #include "MemoryModel/PTAStat.h"
32
+ #include "Util/PTAStat.h"
33
33
  #include "Graphs/ICFG.h"
34
34
  #include <iomanip>
35
35
 
@@ -37,7 +37,7 @@
37
37
  #define SVFGSTAT_H_
38
38
 
39
39
  #include "Graphs/SVFG.h"
40
- #include "MemoryModel/PTAStat.h"
40
+ #include "Util/PTAStat.h"
41
41
  #include "Util/SCC.h"
42
42
 
43
43
  namespace SVF
@@ -8,7 +8,7 @@
8
8
  #ifndef MTASTAT_H_
9
9
  #define MTASTAT_H_
10
10
 
11
- #include "MemoryModel/PTAStat.h"
11
+ #include "Util/PTAStat.h"
12
12
 
13
13
  namespace SVF
14
14
  {
@@ -367,10 +367,7 @@ public:
367
367
  }
368
368
  inline NodeID getFIObjVar(NodeID id) const
369
369
  {
370
- SVFVar* node = pag->getGNode(id);
371
- assert(SVFUtil::isa<ObjVar>(node) && "need an object node");
372
- ObjVar* obj = SVFUtil::cast<ObjVar>(node);
373
- return getFIObjVar(obj->getMemObj());
370
+ return getBaseObjVar(id);
374
371
  }
375
372
  //@}
376
373
 
@@ -1,4 +1,4 @@
1
- //===- SVFUtil.h -- Analysis helper functions----------------------------//
1
+ //===- LLVMUtil.h -- Analysis helper functions----------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -21,7 +21,7 @@
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
23
  /*
24
- * SVFUtil.h
24
+ * LLVMUtil.h
25
25
  *
26
26
  * Created on: Apr 11, 2013
27
27
  * Author: Yulei Sui
@@ -63,14 +63,14 @@ overwrite_app_function = 1: Use specifications in ExtAPI.json to overwrite the u
63
63
  Function type represents the properties of the function.
64
64
  For example,
65
65
  "EFT_ALLOC" represents if this external function allocates a new object and assigns it to one of its arguments,
66
- For the selection of function type and a more detailed explanation, please refer to the definition of enum *extf_t* in ExtAPI.h.
66
+ For the selection of function type and a more detailed explanation, please refer to the definition of enum *extType* in ExtAPI.h.
67
67
 
68
68
  *** [4] Function operations
69
69
  Function operations indicate the relationships between input and output,
70
70
  mainly between function parameters or between parameters and return values after the execution.
71
71
  For example,
72
72
  "copy": ["A2", "L"] indicates that after this external function is executed, the value of the 2nd parameter is copied into the return value.
73
- For the selection of function type and a more detailed explanation, please refer to the definition of enum *extType* in ExtAPI.h.
73
+ For the selection of function type and a more detailed explanation, please refer to the definition of enum *extf_t* in ExtAPI.h.
74
74
 
75
75
  For operands of function operation, e.g., "A2", "L", there are the following options:
76
76
  "A": represents a parameter;
@@ -5,7 +5,7 @@
5
5
 
6
6
  #include <sstream>
7
7
  #include "FastCluster/fastcluster.h"
8
- #include "MemoryModel/PTAStat.h"
8
+ #include "Util/PTAStat.h"
9
9
  #include "MemoryModel/PointerAnalysisImpl.h"
10
10
  #include "Util/NodeIDAllocator.h"
11
11
  #include "MSSA/MemSSA.h"
@@ -253,6 +253,8 @@ public:
253
253
  static const llvm::cl::opt<std::string> CFLGraph;
254
254
  static const llvm::cl::opt<bool> PrintCFL;
255
255
  static const llvm::cl::opt<bool> FlexSymMap;
256
+ static const llvm::cl::opt<bool> PEGTransfer;
257
+ static const llvm::cl::opt<bool> NullDummyNode;
256
258
 
257
259
  // Loop Analysis
258
260
  static const llvm::cl::opt<bool> LoopAnalysis;
File without changes
@@ -27,8 +27,8 @@
27
27
  * Author: Yulei Sui
28
28
  */
29
29
 
30
- #ifndef ANDERSENPASS_H_
31
- #define ANDERSENPASS_H_
30
+ #ifndef INCLUDE_WPA_ANDERSEN_H_
31
+ #define INCLUDE_WPA_ANDERSEN_H_
32
32
 
33
33
  #include "MemoryModel/PointerAnalysisImpl.h"
34
34
  #include "WPA/WPAStat.h"
@@ -386,17 +386,6 @@ protected:
386
386
  return "AndersenWPA";
387
387
  }
388
388
 
389
- /// match types for Gep Edges
390
- virtual bool matchType(NodeID, NodeID, const NormalGepCGEdge*)
391
- {
392
- return true;
393
- }
394
- /// add type for newly created GepObjNode
395
- virtual void addTypeForGepObjNode(NodeID, const NormalGepCGEdge*)
396
- {
397
- return;
398
- }
399
-
400
389
  /// Runs a Steensgaard analysis and performs clustering based on those
401
390
  /// results set the global best mapping.
402
391
  virtual void cluster(void) const;
@@ -444,4 +433,4 @@ public:
444
433
 
445
434
  } // End namespace SVF
446
435
 
447
- #endif /* ANDERSENPASS_H_ */
436
+ #endif /* INCLUDE_WPA_ANDERSEN_H_ */
@@ -31,7 +31,7 @@
31
31
  #ifndef FLOWSENSITIVESTAT_H_
32
32
  #define FLOWSENSITIVESTAT_H_
33
33
 
34
- #include "MemoryModel/PTAStat.h"
34
+ #include "Util/PTAStat.h"
35
35
  #include "WPA/FlowSensitive.h"
36
36
  #include "WPA/VersionedFlowSensitive.h"
37
37
 
@@ -206,7 +206,15 @@ void CFLAlias::analyze()
206
206
  PointerAnalysis::initialize();
207
207
  GrammarBase *grammarBase = grammarBuilder.build();
208
208
  ConstraintGraph *consCG = new ConstraintGraph(svfir);
209
- graph = cflGraphBuilder.buildBigraph(consCG, grammarBase->getStartKind(), grammarBase);
209
+ if (Options::PEGTransfer)
210
+ {
211
+ graph = cflGraphBuilder.buildBiPEGgraph(consCG, grammarBase->getStartKind(), grammarBase, svfir);
212
+ }
213
+ else
214
+ {
215
+ graph = cflGraphBuilder.buildBigraph(consCG, grammarBase->getStartKind(), grammarBase);
216
+ }
217
+
210
218
  cflChecker.check(grammarBase, &cflGraphBuilder, graph);
211
219
  grammar = normalizer.normalize(grammarBase);
212
220
  cflChecker.check(grammar, &cflGraphBuilder, graph);
@@ -228,12 +236,9 @@ void CFLAlias::analyze()
228
236
  solver->solve();
229
237
  if(Options::PrintCFL == true)
230
238
  {
231
- std::string svfirName = Options::CFLGraph.c_str();
232
- svfir->dump(svfirName.append("_IR"));
233
- std::string grammarName = Options::CFLGraph.c_str();
234
- grammar->dump(grammarName.append("_Grammar"));
235
- std::string CFLGraphFileName = Options::CFLGraph.c_str();
236
- graph->dump(CFLGraphFileName.append("_CFL"));
239
+ svfir->dump("IR");
240
+ grammar->dump("Grammar");
241
+ graph->dump("CFLGraph");
237
242
  }
238
243
  if (Options::CFLGraph.empty())
239
244
  {
@@ -222,4 +222,139 @@ CFLGraph* AliasCFLGraphBuilder::buildBigraph(ConstraintGraph *graph, Kind startK
222
222
  return cflGraph;
223
223
  }
224
224
 
225
+ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag)
226
+ {
227
+ CFLGraph *cflGraph = new CFLGraph(startKind);
228
+ externMap = true;
229
+ for(auto pairV : grammar->getTerminals())
230
+ {
231
+ if(label2KindMap.find(pairV.first) == label2KindMap.end())
232
+ {
233
+ label2KindMap.insert(pairV);
234
+ }
235
+ if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
236
+ {
237
+ kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
238
+ }
239
+ }
240
+ for(auto pairV : grammar->getNonterminals())
241
+ {
242
+ if(label2KindMap.find(pairV.first) == label2KindMap.end())
243
+ {
244
+ label2KindMap.insert(pairV);
245
+ }
246
+ if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
247
+ {
248
+ kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
249
+ }
250
+ }
251
+ for(auto it = graph->begin(); it!= graph->end(); it++)
252
+ {
253
+ CFLNode* node = new CFLNode((*it).first);
254
+ cflGraph->addCFLNode((*it).first, node);
255
+ }
256
+ for(auto it = graph->begin(); it!= graph->end(); it++)
257
+ {
258
+ ConstraintNode* node = (*it).second;
259
+ for(ConstraintEdge* edge : node->getOutEdges())
260
+ {
261
+ /// Process Store
262
+ if (edge->getEdgeKind() == ConstraintEdge::Store)
263
+ {
264
+ if (pag->isNullPtr(edge->getSrcID()) && (Options::NullDummyNode == false))
265
+ continue;
266
+ /// Check Dst of Store Dereference Node
267
+ ConstraintNode* Dst = edge->getDstNode();
268
+ ConstraintNode* DerefNode = nullptr;
269
+ CFLNode* CFLDerefNode = nullptr;
270
+ for (ConstraintEdge* DstInEdge : Dst->getInEdges())
271
+ {
272
+ if (DstInEdge->getEdgeKind() == ConstraintEdge::Addr)
273
+ {
274
+ DerefNode = DstInEdge->getSrcNode();
275
+ CFLDerefNode = cflGraph->getGNode(DstInEdge->getSrcID());
276
+ break;
277
+ }
278
+ }
279
+ if (DerefNode == nullptr)
280
+ {
281
+
282
+ NodeID refId = pag->addDummyValNode();
283
+ CFLDerefNode = new CFLNode(refId);
284
+ cflGraph->addCFLNode(refId, CFLDerefNode);
285
+ /// Add Addr Edge
286
+ cflGraph->addCFLEdge(CFLDerefNode, cflGraph->getGNode(edge->getDstID()), ConstraintEdge::Addr);
287
+ std::string key = kind2LabelMap[ConstraintEdge::Addr];
288
+ key.append("bar");
289
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), CFLDerefNode, label2KindMap[key]);
290
+ }
291
+ /// Add Copy Edge
292
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(CFLDerefNode->getId()), ConstraintEdge::Copy);
293
+ std::string key = kind2LabelMap[ConstraintEdge::Copy];
294
+ key.append("bar");
295
+ cflGraph->addCFLEdge(cflGraph->getGNode(CFLDerefNode->getId()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
296
+ }
297
+ /// Process Load
298
+ else if ( edge->getEdgeKind() == ConstraintEdge::Load)
299
+ {
300
+ /// Check Src of Load Dereference Node
301
+ ConstraintNode* Src = edge->getSrcNode();
302
+ ConstraintNode* DerefNode = nullptr;
303
+ CFLNode* CFLDerefNode = nullptr;
304
+ for (ConstraintEdge* SrcInEdge : Src->getInEdges())
305
+ {
306
+ if (SrcInEdge->getEdgeKind() == ConstraintEdge::Addr)
307
+ {
308
+ DerefNode = SrcInEdge->getSrcNode();
309
+ CFLDerefNode = cflGraph->getGNode(SrcInEdge->getSrcID());
310
+ }
311
+ }
312
+ if (DerefNode == nullptr)
313
+ {
314
+ NodeID refId = pag->addDummyValNode();
315
+ CFLDerefNode = new CFLNode(refId);
316
+ cflGraph->addCFLNode(refId, CFLDerefNode);
317
+ /// Add Addr Edge
318
+ cflGraph->addCFLEdge(CFLDerefNode, cflGraph->getGNode(edge->getSrcID()), ConstraintEdge::Addr);
319
+ std::string key = kind2LabelMap[ConstraintEdge::Addr];
320
+ key.append("bar");
321
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), CFLDerefNode, label2KindMap[key]);
322
+ }
323
+ /// Add Copy Edge
324
+ cflGraph->addCFLEdge(cflGraph->getGNode(CFLDerefNode->getId()), cflGraph->getGNode(edge->getDstID()), ConstraintEdge::Copy);
325
+ std::string key = kind2LabelMap[ConstraintEdge::Copy];
326
+ key.append("bar");
327
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(CFLDerefNode->getId()), label2KindMap[key]);
328
+ }
329
+ else
330
+ {
331
+ CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
332
+ // Need to get the offset from the Const Edge
333
+ // The offset present edge is only from Normal Gep CG at moment
334
+ if(NormalGepCGEdge::classof(edge))
335
+ {
336
+ NormalGepCGEdge *nGepEdge = SVFUtil::dyn_cast<NormalGepCGEdge>(edge);
337
+ CFLGrammar::Attribute attr = nGepEdge->getConstantFieldIdx();
338
+ addAttribute(edgeLabel, attr);
339
+ edgeLabel = CFLGrammar::getAttributedKind(attr, edgeLabel);
340
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
341
+ std::string key = kind2LabelMap[edge->getEdgeKind()];
342
+ key.append("bar"); // for example Gep_i should be Gepbar_i, not Gep_ibar
343
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), CFLGrammar::getAttributedKind(attr, label2KindMap[key]));
344
+ addAttribute(label2KindMap[key], attr);
345
+ }
346
+ else
347
+ {
348
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
349
+ std::string key = kind2LabelMap[edge->getEdgeKind()];
350
+ key.append("bar");
351
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
352
+ }
353
+ }
354
+ }
355
+ }
356
+ return cflGraph;
357
+ }
358
+
359
+
225
360
  } // end of SVF namespace
@@ -42,6 +42,7 @@ const inline std::string GrammarBuilder::parseProductionsString() const
42
42
  std::string lineString;
43
43
  std::string lines = "";
44
44
  std::string startString;
45
+ std::string symbolString;
45
46
  const std::string WHITESPACE = " \n\r\t\f\v";
46
47
  int lineNum = 0;
47
48
  while (getline(textFile, lineString))
@@ -50,25 +51,28 @@ const inline std::string GrammarBuilder::parseProductionsString() const
50
51
  {
51
52
  startString = stripSpace(lineString);
52
53
  }
54
+ if(lineNum == 3)
55
+ {
56
+ symbolString = lineString.substr(lineString.find_first_not_of(WHITESPACE), lineString.find_last_not_of(WHITESPACE)+1);
57
+ }
53
58
 
54
59
  lines.append(lineString.substr(lineString.find_first_not_of(WHITESPACE), lineString.find_last_not_of(WHITESPACE)+1));
55
60
  lineNum++;
56
61
  }
57
62
 
58
- std::regex reg("Start:([\\s\\S]*)Terminal:([\\s\\S]*)Productions:([\\s\\S]*)");
63
+ std::regex reg("Start:([\\s\\S]*)Terminal:(.*)Productions:([\\s\\S]*)");
59
64
  std::smatch matches;
60
65
  if (std::regex_search(lines, matches, reg))
61
66
  {
62
67
  lines = matches.str(3);
63
68
  }
64
- std::string terminalString = matches.str(2);
65
- std::string symbolString;
66
- size_t pos;
67
- while ((pos = terminalString.find(" ")) != std::string::npos)
69
+ std::string sString;
70
+ size_t pos = 0;
71
+ while ((pos = symbolString.find(" ")) != std::string::npos)
68
72
  {
69
- symbolString = stripSpace(terminalString.substr(0, pos));
70
- terminalString.erase(0, pos + 1); //Capital is Nonterminal, Otherwise is terminal
71
- grammar->insertSymbol(symbolString);
73
+ sString = stripSpace(symbolString.substr(0, pos));
74
+ symbolString.erase(0, pos + 1); //Capital is Nonterminal, Otherwise is terminal
75
+ grammar->insertSymbol(sString);
72
76
  }
73
77
  grammar->insertSymbol(symbolString);
74
78
  grammar->setStartKind(grammar->insertSymbol(startString));
@@ -124,7 +124,7 @@ void SVFG::writeToFile(const string& filename)
124
124
  if(LOADMU* mu = SVFUtil::dyn_cast<LOADMU>(*it))
125
125
  {
126
126
  NodeID def = getDef(mu->getMRVer());
127
- f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= LoadNode | MVER: {"<< *mu->getMRVer() << "}" << "\n";
127
+ f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= LoadNode | MVER: {" << *mu->getMRVer() << "}" << "\n";
128
128
  }
129
129
  }
130
130
  }
@@ -136,7 +136,7 @@ void SVFG::writeToFile(const string& filename)
136
136
  if(STORECHI* chi = SVFUtil::dyn_cast<STORECHI>(*it))
137
137
  {
138
138
  NodeID def = getDef(chi->getOpVer());
139
- f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= StoreNode | MVER: {"<< *chi->getOpVer() << "}" << "\n";
139
+ f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= StoreNode | MVER: {" << *chi->getOpVer() << "}" << "\n";
140
140
  }
141
141
  }
142
142
  }
@@ -189,7 +189,7 @@ void SVFG::writeToFile(const string& filename)
189
189
  {
190
190
  const MRVer* op = it->second;
191
191
  NodeID def = getDef(op);
192
- f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= PHISVFGNode | MVER: {"<< *op << "}" << "\n";
192
+ f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= PHISVFGNode | MVER: {" << *op << "}" << "\n";
193
193
  }
194
194
  }
195
195
  }
@@ -10,7 +10,7 @@
10
10
  #include "MTA/MTA.h"
11
11
  #include "MTA/MTAResultValidator.h"
12
12
  #include "Util/SVFUtil.h"
13
- #include "MemoryModel/PTAStat.h"
13
+ #include "Util/PTAStat.h"
14
14
  #include "MTA/LockResultValidator.h"
15
15
 
16
16
 
package/lib/MTA/MHP.cpp CHANGED
@@ -11,7 +11,7 @@
11
11
  #include "MTA/LockAnalysis.h"
12
12
  #include "MTA/MTAResultValidator.h"
13
13
  #include "Util/SVFUtil.h"
14
- #include "MemoryModel/PTAStat.h"
14
+ #include "Util/PTAStat.h"
15
15
  #include "SVF-FE/BasicTypes.h"
16
16
 
17
17
  using namespace SVF;
@@ -37,7 +37,7 @@
37
37
 
38
38
  #include "MemoryModel/PointerAnalysisImpl.h"
39
39
  #include "MemoryModel/PAGBuilderFromFile.h"
40
- #include "MemoryModel/PTAStat.h"
40
+ #include "Util/PTAStat.h"
41
41
  #include "Graphs/ThreadCallGraph.h"
42
42
  #include "Graphs/ICFG.h"
43
43
 
@@ -43,7 +43,7 @@
43
43
  #include "Util/SVFUtil.h"
44
44
  #include "SVF-FE/LLVMUtil.h"
45
45
  #include "Util/SVFModule.h"
46
- #include "MemoryModel/PTAStat.h"
46
+ #include "Util/PTAStat.h"
47
47
 
48
48
  using namespace SVF;
49
49
  using namespace SVFUtil;