svf-tools 1.0.442 → 1.0.445

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 (518) hide show
  1. package/SVF-doxygen/html/html/AbstractPointsToDS_8h_source.html +1 -1
  2. package/SVF-doxygen/html/html/AndersenHCD_8cpp_source.html +1 -1
  3. package/SVF-doxygen/html/html/AndersenHLCD_8cpp_source.html +1 -1
  4. package/SVF-doxygen/html/html/AndersenLCD_8cpp_source.html +1 -1
  5. package/SVF-doxygen/html/html/AndersenSCD_8cpp_source.html +1 -1
  6. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +1 -1
  7. package/SVF-doxygen/html/html/AndersenSFR_8h_source.html +1 -1
  8. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +1 -1
  9. package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +1 -1
  10. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
  11. package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
  12. package/SVF-doxygen/html/html/Annotator_8h_source.html +1 -1
  13. package/SVF-doxygen/html/html/BDDExpr_8cpp_source.html +1 -1
  14. package/SVF-doxygen/html/html/BDDExpr_8h_source.html +1 -1
  15. package/SVF-doxygen/html/html/BitVector_8cpp_source.html +1 -1
  16. package/SVF-doxygen/html/html/BitVector_8h_source.html +1 -1
  17. package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +1 -1
  18. package/SVF-doxygen/html/html/BreakConstantExpr_8h_source.html +1 -1
  19. package/SVF-doxygen/html/html/CFGNormalizer_8cpp.html +86 -0
  20. package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +104 -0
  21. package/SVF-doxygen/html/html/CFGNormalizer_8h.html +95 -0
  22. package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +95 -0
  23. package/SVF-doxygen/html/html/CFLAlias_8h.html +100 -0
  24. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +136 -0
  25. package/SVF-doxygen/html/html/CFLGrammar_8cpp.html +81 -0
  26. package/SVF-doxygen/html/html/CFLGrammar_8cpp_source.html +90 -0
  27. package/SVF-doxygen/html/html/CFLGrammar_8h.html +97 -0
  28. package/SVF-doxygen/html/html/CFLGrammar_8h_source.html +114 -0
  29. package/SVF-doxygen/html/html/CFLGraph_8cpp.html +96 -0
  30. package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +123 -0
  31. package/SVF-doxygen/html/html/CFLGraph_8h.html +124 -0
  32. package/SVF-doxygen/html/html/CFLGraph_8h_source.html +114 -0
  33. package/SVF-doxygen/html/html/CFLSolver_8cpp.html +80 -0
  34. package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +107 -0
  35. package/SVF-doxygen/html/html/CFLSolver_8h.html +6 -5
  36. package/SVF-doxygen/html/html/CFLSolver_8h_source.html +27 -33
  37. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
  38. package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -1
  39. package/SVF-doxygen/html/html/CHG_8cpp_source.html +2 -2
  40. package/SVF-doxygen/html/html/CHG_8h_source.html +3 -3
  41. package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +1 -1
  42. package/SVF-doxygen/html/html/CPPUtil_8h_source.html +1 -1
  43. package/SVF-doxygen/html/html/CSC_8cpp_source.html +1 -1
  44. package/SVF-doxygen/html/html/CSC_8h_source.html +1 -1
  45. package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
  46. package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
  47. package/SVF-doxygen/html/html/Casting_8h_source.html +1 -1
  48. package/SVF-doxygen/html/html/ConditionalPT_8h_source.html +1 -1
  49. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +1 -1
  50. package/SVF-doxygen/html/html/ConsGNode_8h_source.html +6 -6
  51. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +2 -2
  52. package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
  53. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +1 -1
  54. package/SVF-doxygen/html/html/ContextDDA_8h_source.html +2 -2
  55. package/SVF-doxygen/html/html/CoreBitVector_8cpp_source.html +1 -1
  56. package/SVF-doxygen/html/html/CoreBitVector_8h_source.html +1 -1
  57. package/SVF-doxygen/html/html/CxtStmt_8h_source.html +1 -1
  58. package/SVF-doxygen/html/html/DCHG_8cpp_source.html +1 -1
  59. package/SVF-doxygen/html/html/DCHG_8h_source.html +2 -2
  60. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
  61. package/SVF-doxygen/html/html/DDAClient_8h_source.html +1 -1
  62. package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +1 -1
  63. package/SVF-doxygen/html/html/DDAPass_8h_source.html +1 -1
  64. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +1 -1
  65. package/SVF-doxygen/html/html/DDAStat_8h_source.html +1 -1
  66. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +1 -1
  67. package/SVF-doxygen/html/html/DPItem_8h_source.html +1 -1
  68. package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +2 -2
  69. package/SVF-doxygen/html/html/DataFlowUtil_8h_source.html +1 -1
  70. package/SVF-doxygen/html/html/DoubleFreeChecker_8cpp_source.html +1 -1
  71. package/SVF-doxygen/html/html/DoubleFreeChecker_8h_source.html +1 -1
  72. package/SVF-doxygen/html/html/ExeState_8cpp_source.html +1 -1
  73. package/SVF-doxygen/html/html/ExeState_8h_source.html +1 -1
  74. package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +1 -1
  75. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +1 -1
  76. package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +1 -1
  77. package/SVF-doxygen/html/html/FSMPTA_8h_source.html +1 -1
  78. package/SVF-doxygen/html/html/FileChecker_8cpp_source.html +1 -1
  79. package/SVF-doxygen/html/html/FileChecker_8h_source.html +1 -1
  80. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +1 -1
  81. package/SVF-doxygen/html/html/FlowDDA_8h_source.html +1 -1
  82. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +1 -1
  83. package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +1 -1
  84. package/SVF-doxygen/html/html/FlowSensitiveTBHC_8h_source.html +1 -1
  85. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +1 -1
  86. package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +1 -1
  87. package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
  88. package/SVF-doxygen/html/html/GenericGraph_8h_source.html +2 -2
  89. package/SVF-doxygen/html/html/GrammarBuilder_8cpp.html +94 -0
  90. package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +92 -0
  91. package/SVF-doxygen/html/html/GrammarBuilder_8h.html +96 -0
  92. package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +87 -0
  93. package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +1 -1
  94. package/SVF-doxygen/html/html/Graph2Json_8h_source.html +1 -1
  95. package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +1 -1
  96. package/SVF-doxygen/html/html/GraphReachSolver_8h.html +96 -0
  97. package/SVF-doxygen/html/html/GraphReachSolver_8h_source.html +113 -0
  98. package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +1 -1
  99. package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +1 -1
  100. package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +1 -1
  101. package/SVF-doxygen/html/html/ICFGNode_8h_source.html +1 -1
  102. package/SVF-doxygen/html/html/ICFGStat_8h_source.html +1 -1
  103. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +2 -2
  104. package/SVF-doxygen/html/html/ICFG_8h_source.html +2 -2
  105. package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +1 -1
  106. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +2 -2
  107. package/SVF-doxygen/html/html/IRGraph_8h_source.html +3 -3
  108. package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
  109. package/SVF-doxygen/html/html/LLVMModule_8h_source.html +1 -1
  110. package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +1 -1
  111. package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +1 -1
  112. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +2 -2
  113. package/SVF-doxygen/html/html/LeakChecker_8h_source.html +2 -2
  114. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
  115. package/SVF-doxygen/html/html/LocationSet_8h_source.html +1 -1
  116. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  117. package/SVF-doxygen/html/html/LockAnalysis_8h_source.html +1 -1
  118. package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
  119. package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +1 -1
  120. package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
  121. package/SVF-doxygen/html/html/MHP_8h_source.html +1 -1
  122. package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +1 -1
  123. package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
  124. package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
  125. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
  126. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
  127. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
  128. package/SVF-doxygen/html/html/MTAStat_8h_source.html +1 -1
  129. package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
  130. package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
  131. package/SVF-doxygen/html/html/MemPartition_8cpp_source.html +1 -1
  132. package/SVF-doxygen/html/html/MemPartition_8h_source.html +1 -1
  133. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +1 -1
  134. package/SVF-doxygen/html/html/MemRegion_8h_source.html +1 -1
  135. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +1 -1
  136. package/SVF-doxygen/html/html/MemSSA_8h_source.html +1 -1
  137. package/SVF-doxygen/html/html/MutablePointsToDS_8h_source.html +1 -1
  138. package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +1 -1
  139. package/SVF-doxygen/html/html/NodeIDAllocator_8h_source.html +1 -1
  140. package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +2 -2
  141. package/SVF-doxygen/html/html/OfflineConsG_8h_source.html +2 -2
  142. package/SVF-doxygen/html/html/Options_8cpp_source.html +7 -2
  143. package/SVF-doxygen/html/html/Options_8h_source.html +7 -2
  144. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
  145. package/SVF-doxygen/html/html/PAGBuilderFromFile_8h_source.html +1 -1
  146. package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
  147. package/SVF-doxygen/html/html/PCG_8h_source.html +1 -1
  148. package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +2 -2
  149. package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +2 -2
  150. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +1 -1
  151. package/SVF-doxygen/html/html/PTAStat_8h_source.html +1 -1
  152. package/SVF-doxygen/html/html/PathCondAllocator_8cpp_source.html +1 -1
  153. package/SVF-doxygen/html/html/PathCondAllocator_8h_source.html +1 -1
  154. package/SVF-doxygen/html/html/PersistentPointsToCache_8h_source.html +1 -1
  155. package/SVF-doxygen/html/html/PersistentPointsToDS_8h_source.html +1 -1
  156. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
  157. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
  158. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +1 -1
  159. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +5 -5
  160. package/SVF-doxygen/html/html/PointsTo_8cpp_source.html +1 -1
  161. package/SVF-doxygen/html/html/PointsTo_8h_source.html +1 -1
  162. package/SVF-doxygen/html/html/ProgSlice_8cpp_source.html +1 -1
  163. package/SVF-doxygen/html/html/ProgSlice_8h_source.html +1 -1
  164. package/SVF-doxygen/html/html/SCC_8h_source.html +1 -1
  165. package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +2 -2
  166. package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +1 -1
  167. package/SVF-doxygen/html/html/SVFGBuilder_8h_source.html +1 -1
  168. package/SVF-doxygen/html/html/SVFGEdge_8h_source.html +1 -1
  169. package/SVF-doxygen/html/html/SVFGNode_8h_source.html +1 -1
  170. package/SVF-doxygen/html/html/SVFGOPT_8cpp_source.html +1 -1
  171. package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +1 -1
  172. package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +1 -1
  173. package/SVF-doxygen/html/html/SVFGStat_8h_source.html +1 -1
  174. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +2 -2
  175. package/SVF-doxygen/html/html/SVFG_8h_source.html +2 -2
  176. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +1 -1
  177. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
  178. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +1 -1
  179. package/SVF-doxygen/html/html/SVFIR_8h_source.html +1 -1
  180. package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +1 -1
  181. package/SVF-doxygen/html/html/SVFModule_8h_source.html +1 -1
  182. package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
  183. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +1 -1
  184. package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +1 -1
  185. package/SVF-doxygen/html/html/SVFUtil_8h_source.html +1 -1
  186. package/SVF-doxygen/html/html/SVFVariables_8cpp_source.html +1 -1
  187. package/SVF-doxygen/html/html/SVFVariables_8h_source.html +1 -1
  188. package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +1 -1
  189. package/SVF-doxygen/html/html/SaberAnnotator_8h_source.html +1 -1
  190. package/SVF-doxygen/html/html/SaberCheckerAPI_8cpp_source.html +1 -1
  191. package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
  192. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
  193. package/SVF-doxygen/html/html/SaberSVFGBuilder_8h_source.html +1 -1
  194. package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +4 -4
  195. package/SVF-doxygen/html/html/SrcSnkDDA_8h.html +3 -3
  196. package/SVF-doxygen/html/html/SrcSnkDDA_8h_source.html +61 -61
  197. package/SVF-doxygen/html/html/SrcSnkSolver_8h_source.html +1 -1
  198. package/SVF-doxygen/html/html/Steensgaard_8cpp_source.html +1 -1
  199. package/SVF-doxygen/html/html/Steensgaard_8h_source.html +1 -1
  200. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +1 -1
  201. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +1 -1
  202. package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +1 -1
  203. package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +1 -1
  204. package/SVF-doxygen/html/html/TCT_8cpp_source.html +2 -2
  205. package/SVF-doxygen/html/html/TCT_8h_source.html +2 -2
  206. package/SVF-doxygen/html/html/ThreadAPI_8cpp_source.html +1 -1
  207. package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
  208. package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +1 -1
  209. package/SVF-doxygen/html/html/ThreadCallGraph_8h_source.html +1 -1
  210. package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +1 -1
  211. package/SVF-doxygen/html/html/TypeAnalysis_8h_source.html +1 -1
  212. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +1 -1
  213. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +1 -1
  214. package/SVF-doxygen/html/html/Util_2BasicTypes_8h_source.html +1 -1
  215. package/SVF-doxygen/html/html/VFGEdge_8h_source.html +1 -1
  216. package/SVF-doxygen/html/html/VFGNode_8h_source.html +1 -1
  217. package/SVF-doxygen/html/html/VFG_8cpp_source.html +2 -2
  218. package/SVF-doxygen/html/html/VFG_8h_source.html +2 -2
  219. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +1 -1
  220. package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +3 -3
  221. package/SVF-doxygen/html/html/VersionedFlowSensitive_8h_source.html +1 -1
  222. package/SVF-doxygen/html/html/WPAFSSolver_8h_source.html +1 -1
  223. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
  224. package/SVF-doxygen/html/html/WPAPass_8h_source.html +1 -1
  225. package/SVF-doxygen/html/html/WPASolver_8h_source.html +1 -1
  226. package/SVF-doxygen/html/html/WPAStat_8h_source.html +1 -1
  227. package/SVF-doxygen/html/html/WorkList_8h_source.html +1 -1
  228. package/SVF-doxygen/html/html/Z3Expr_8h_source.html +1 -1
  229. package/SVF-doxygen/html/html/annotated.html +302 -288
  230. package/SVF-doxygen/html/html/cfl_8cpp.html +171 -0
  231. package/SVF-doxygen/html/html/cfl_8cpp_source.html +95 -0
  232. package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +51 -51
  233. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +3 -3
  234. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase-members.html +39 -39
  235. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +3 -3
  236. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD-members.html +56 -56
  237. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +3 -3
  238. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD-members.html +55 -55
  239. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +3 -3
  240. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD-members.html +51 -51
  241. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +3 -3
  242. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +52 -52
  243. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +3 -3
  244. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +59 -59
  245. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +3 -3
  246. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +53 -53
  247. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +3 -3
  248. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl-members.html +33 -33
  249. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +3 -3
  250. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +90 -0
  251. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +458 -0
  252. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +216 -0
  253. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +801 -0
  254. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.png +0 -0
  255. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +96 -0
  256. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +216 -0
  257. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.png +0 -0
  258. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +110 -0
  259. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +591 -0
  260. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.png +0 -0
  261. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +122 -0
  262. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +756 -0
  263. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.png +0 -0
  264. package/SVF-doxygen/html/html/classSVF_1_1CFLNode-members.html +118 -0
  265. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +257 -0
  266. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.png +0 -0
  267. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver-members.html +17 -28
  268. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +181 -548
  269. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl-members.html +36 -36
  270. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +3 -3
  271. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  272. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  273. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA-members.html +57 -57
  274. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
  275. package/SVF-doxygen/html/html/classSVF_1_1DoubleFreeChecker-members.html +55 -55
  276. package/SVF-doxygen/html/html/classSVF_1_1DoubleFreeChecker.html +64 -64
  277. package/SVF-doxygen/html/html/classSVF_1_1DoubleFreeChecker.png +0 -0
  278. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA-members.html +55 -55
  279. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +3 -3
  280. package/SVF-doxygen/html/html/classSVF_1_1FileChecker-members.html +57 -57
  281. package/SVF-doxygen/html/html/classSVF_1_1FileChecker.html +66 -66
  282. package/SVF-doxygen/html/html/classSVF_1_1FileChecker.png +0 -0
  283. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA-members.html +48 -48
  284. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +3 -3
  285. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive-members.html +47 -47
  286. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +3 -3
  287. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC-members.html +59 -59
  288. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +3 -3
  289. package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.html +8 -24
  290. package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.png +0 -0
  291. package/SVF-doxygen/html/html/classSVF_1_1GenericGraph.html +10 -9
  292. package/SVF-doxygen/html/html/classSVF_1_1GenericGraph.png +0 -0
  293. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +21 -20
  294. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  295. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +93 -0
  296. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +399 -0
  297. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.png +0 -0
  298. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +85 -0
  299. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +226 -0
  300. package/SVF-doxygen/html/html/classSVF_1_1GraphReachSolver-members.html +106 -0
  301. package/SVF-doxygen/html/html/classSVF_1_1GraphReachSolver.html +937 -0
  302. package/SVF-doxygen/html/html/classSVF_1_1GraphReachSolver.png +0 -0
  303. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker-members.html +55 -55
  304. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +81 -81
  305. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.png +0 -0
  306. package/SVF-doxygen/html/html/classSVF_1_1Options-members.html +80 -75
  307. package/SVF-doxygen/html/html/classSVF_1_1Options.html +130 -0
  308. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis-members.html +25 -25
  309. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +17 -16
  310. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.png +0 -0
  311. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA-members.html +51 -51
  312. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +207 -207
  313. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.png +0 -0
  314. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkSolver.html +0 -12
  315. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard-members.html +42 -42
  316. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +3 -3
  317. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis-members.html +45 -45
  318. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +3 -3
  319. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive-members.html +61 -61
  320. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +5 -5
  321. package/SVF-doxygen/html/html/classes.html +103 -101
  322. package/SVF-doxygen/html/html/cuddInt_8c.html +6 -6
  323. package/SVF-doxygen/html/html/cuddInt_8c_source.html +2 -2
  324. package/SVF-doxygen/html/html/cudd_8h.html +4 -4
  325. package/SVF-doxygen/html/html/dda_8cpp.html +2 -46
  326. package/SVF-doxygen/html/html/dda_8cpp_source.html +4 -5
  327. package/SVF-doxygen/html/html/dir_1870ebf480d659cc38d2dd7ac3aa8993.html +2 -0
  328. package/SVF-doxygen/html/html/dir_4eeb864c4eec08c7d6b9d3b0352cfdde.html +2 -0
  329. package/SVF-doxygen/html/html/dir_95e22971b5dbae2382075a3453e365b4.html +2 -0
  330. package/SVF-doxygen/html/html/dir_97aefd0d527b934f1d99a682da8fe6a9.html +2 -0
  331. package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +89 -0
  332. package/SVF-doxygen/html/html/dir_ae8aa099e368efaa962140c6624142bc.html +91 -0
  333. package/SVF-doxygen/html/html/dir_d44c64559bbebec7f509842c48db8b23.html +2 -0
  334. package/SVF-doxygen/html/html/dir_e6cca4e14eddbb730e0cbe3cab632ce5.html +83 -0
  335. package/SVF-doxygen/html/html/dir_fa02919a30fec2d2c2d591b4d920d648.html +2 -0
  336. package/SVF-doxygen/html/html/files.html +268 -252
  337. package/SVF-doxygen/html/html/functions.html +2 -1
  338. package/SVF-doxygen/html/html/functions_0x7e.html +18 -0
  339. package/SVF-doxygen/html/html/functions_a.html +16 -14
  340. package/SVF-doxygen/html/html/functions_b.html +16 -5
  341. package/SVF-doxygen/html/html/functions_c.html +69 -26
  342. package/SVF-doxygen/html/html/functions_d.html +3 -1
  343. package/SVF-doxygen/html/html/functions_e.html +19 -4
  344. package/SVF-doxygen/html/html/functions_eval.html +0 -6
  345. package/SVF-doxygen/html/html/functions_eval_c.html +9 -0
  346. package/SVF-doxygen/html/html/functions_eval_f.html +0 -3
  347. package/SVF-doxygen/html/html/functions_f.html +28 -21
  348. package/SVF-doxygen/html/html/functions_func.html +18 -10
  349. package/SVF-doxygen/html/html/functions_func_0x7e.html +18 -0
  350. package/SVF-doxygen/html/html/functions_func_b.html +19 -8
  351. package/SVF-doxygen/html/html/functions_func_c.html +42 -18
  352. package/SVF-doxygen/html/html/functions_func_d.html +4 -2
  353. package/SVF-doxygen/html/html/functions_func_e.html +10 -1
  354. package/SVF-doxygen/html/html/functions_func_f.html +6 -3
  355. package/SVF-doxygen/html/html/functions_func_g.html +56 -10
  356. package/SVF-doxygen/html/html/functions_func_h.html +12 -2
  357. package/SVF-doxygen/html/html/functions_func_i.html +19 -9
  358. package/SVF-doxygen/html/html/functions_func_n.html +7 -1
  359. package/SVF-doxygen/html/html/functions_func_p.html +8 -4
  360. package/SVF-doxygen/html/html/functions_func_s.html +20 -6
  361. package/SVF-doxygen/html/html/functions_func_v.html +3 -2
  362. package/SVF-doxygen/html/html/functions_g.html +86 -21
  363. package/SVF-doxygen/html/html/functions_h.html +15 -5
  364. package/SVF-doxygen/html/html/functions_i.html +27 -12
  365. package/SVF-doxygen/html/html/functions_l.html +5 -2
  366. package/SVF-doxygen/html/html/functions_n.html +22 -7
  367. package/SVF-doxygen/html/html/functions_o.html +6 -6
  368. package/SVF-doxygen/html/html/functions_p.html +23 -16
  369. package/SVF-doxygen/html/html/functions_r.html +11 -6
  370. package/SVF-doxygen/html/html/functions_s.html +53 -17
  371. package/SVF-doxygen/html/html/functions_t.html +11 -7
  372. package/SVF-doxygen/html/html/functions_type_c.html +5 -1
  373. package/SVF-doxygen/html/html/functions_type_g.html +6 -3
  374. package/SVF-doxygen/html/html/functions_type_i.html +4 -2
  375. package/SVF-doxygen/html/html/functions_type_n.html +6 -3
  376. package/SVF-doxygen/html/html/functions_type_p.html +9 -0
  377. package/SVF-doxygen/html/html/functions_type_s.html +6 -0
  378. package/SVF-doxygen/html/html/functions_type_w.html +3 -1
  379. package/SVF-doxygen/html/html/functions_v.html +2 -1
  380. package/SVF-doxygen/html/html/functions_vars.html +2 -1
  381. package/SVF-doxygen/html/html/functions_vars_c.html +6 -0
  382. package/SVF-doxygen/html/html/functions_vars_e.html +6 -0
  383. package/SVF-doxygen/html/html/functions_vars_f.html +9 -0
  384. package/SVF-doxygen/html/html/functions_vars_g.html +17 -1
  385. package/SVF-doxygen/html/html/functions_vars_i.html +3 -0
  386. package/SVF-doxygen/html/html/functions_vars_l.html +3 -0
  387. package/SVF-doxygen/html/html/functions_vars_n.html +6 -0
  388. package/SVF-doxygen/html/html/functions_vars_r.html +3 -0
  389. package/SVF-doxygen/html/html/functions_vars_s.html +16 -0
  390. package/SVF-doxygen/html/html/functions_vars_t.html +6 -0
  391. package/SVF-doxygen/html/html/functions_vars_w.html +3 -1
  392. package/SVF-doxygen/html/html/functions_w.html +15 -1
  393. package/SVF-doxygen/html/html/globals_func_i.html +3 -10
  394. package/SVF-doxygen/html/html/globals_func_m.html +12 -11
  395. package/SVF-doxygen/html/html/globals_func_s.html +1 -0
  396. package/SVF-doxygen/html/html/globals_i.html +3 -10
  397. package/SVF-doxygen/html/html/globals_m.html +14 -13
  398. package/SVF-doxygen/html/html/globals_s.html +8 -7
  399. package/SVF-doxygen/html/html/hierarchy.html +433 -417
  400. package/SVF-doxygen/html/html/mta_8cpp.html +2 -46
  401. package/SVF-doxygen/html/html/mta_8cpp_source.html +3 -4
  402. package/SVF-doxygen/html/html/namespaceSVF.html +83 -6
  403. package/SVF-doxygen/html/html/namespacellvm.html +9 -0
  404. package/SVF-doxygen/html/html/namespacemembers_c.html +1 -1
  405. package/SVF-doxygen/html/html/namespacemembers_g.html +11 -2
  406. package/SVF-doxygen/html/html/namespacemembers_type.html +10 -1
  407. package/SVF-doxygen/html/html/saber_8cpp.html +2 -46
  408. package/SVF-doxygen/html/html/saber_8cpp_source.html +4 -5
  409. package/SVF-doxygen/html/html/search/all_0.js +1 -1
  410. package/SVF-doxygen/html/html/search/all_1.js +4 -4
  411. package/SVF-doxygen/html/html/search/all_10.js +8 -6
  412. package/SVF-doxygen/html/html/search/all_12.js +2 -1
  413. package/SVF-doxygen/html/html/search/all_13.js +20 -11
  414. package/SVF-doxygen/html/html/search/all_14.js +5 -3
  415. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  416. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  417. package/SVF-doxygen/html/html/search/all_1b.js +6 -0
  418. package/SVF-doxygen/html/html/search/all_2.js +6 -4
  419. package/SVF-doxygen/html/html/search/all_3.js +27 -4
  420. package/SVF-doxygen/html/html/search/all_4.js +3 -2
  421. package/SVF-doxygen/html/html/search/all_5.js +5 -0
  422. package/SVF-doxygen/html/html/search/all_6.js +8 -5
  423. package/SVF-doxygen/html/html/search/all_7.js +40 -13
  424. package/SVF-doxygen/html/html/search/all_8.js +4 -1
  425. package/SVF-doxygen/html/html/search/all_9.js +9 -7
  426. package/SVF-doxygen/html/html/search/all_c.js +2 -1
  427. package/SVF-doxygen/html/html/search/all_d.js +2 -2
  428. package/SVF-doxygen/html/html/search/all_e.js +9 -5
  429. package/SVF-doxygen/html/html/search/all_f.js +4 -4
  430. package/SVF-doxygen/html/html/search/classes_2.js +7 -0
  431. package/SVF-doxygen/html/html/search/classes_3.js +1 -0
  432. package/SVF-doxygen/html/html/search/classes_5.js +1 -0
  433. package/SVF-doxygen/html/html/search/classes_6.js +7 -0
  434. package/SVF-doxygen/html/html/search/enumvalues_0.js +0 -2
  435. package/SVF-doxygen/html/html/search/enumvalues_2.js +3 -0
  436. package/SVF-doxygen/html/html/search/enumvalues_5.js +0 -1
  437. package/SVF-doxygen/html/html/search/files_2.js +11 -1
  438. package/SVF-doxygen/html/html/search/files_6.js +4 -1
  439. package/SVF-doxygen/html/html/search/functions_0.js +4 -2
  440. package/SVF-doxygen/html/html/search/functions_1.js +6 -4
  441. package/SVF-doxygen/html/html/search/functions_10.js +7 -3
  442. package/SVF-doxygen/html/html/search/functions_13.js +1 -1
  443. package/SVF-doxygen/html/html/search/functions_16.js +6 -0
  444. package/SVF-doxygen/html/html/search/functions_2.js +8 -0
  445. package/SVF-doxygen/html/html/search/functions_3.js +2 -2
  446. package/SVF-doxygen/html/html/search/functions_4.js +3 -0
  447. package/SVF-doxygen/html/html/search/functions_5.js +3 -3
  448. package/SVF-doxygen/html/html/search/functions_6.js +22 -10
  449. package/SVF-doxygen/html/html/search/functions_7.js +4 -1
  450. package/SVF-doxygen/html/html/search/functions_8.js +5 -4
  451. package/SVF-doxygen/html/html/search/functions_b.js +1 -1
  452. package/SVF-doxygen/html/html/search/functions_c.js +2 -0
  453. package/SVF-doxygen/html/html/search/functions_e.js +2 -2
  454. package/SVF-doxygen/html/html/search/typedefs_11.js +1 -0
  455. package/SVF-doxygen/html/html/search/typedefs_15.js +1 -1
  456. package/SVF-doxygen/html/html/search/typedefs_2.js +3 -2
  457. package/SVF-doxygen/html/html/search/typedefs_6.js +6 -3
  458. package/SVF-doxygen/html/html/search/typedefs_8.js +2 -2
  459. package/SVF-doxygen/html/html/search/typedefs_d.js +3 -3
  460. package/SVF-doxygen/html/html/search/typedefs_f.js +2 -0
  461. package/SVF-doxygen/html/html/search/variables_0.js +1 -1
  462. package/SVF-doxygen/html/html/search/variables_12.js +1 -0
  463. package/SVF-doxygen/html/html/search/variables_13.js +5 -0
  464. package/SVF-doxygen/html/html/search/variables_14.js +3 -1
  465. package/SVF-doxygen/html/html/search/variables_17.js +1 -1
  466. package/SVF-doxygen/html/html/search/variables_3.js +2 -0
  467. package/SVF-doxygen/html/html/search/variables_5.js +3 -1
  468. package/SVF-doxygen/html/html/search/variables_6.js +3 -0
  469. package/SVF-doxygen/html/html/search/variables_7.js +5 -1
  470. package/SVF-doxygen/html/html/search/variables_9.js +1 -0
  471. package/SVF-doxygen/html/html/search/variables_c.js +1 -0
  472. package/SVF-doxygen/html/html/search/variables_d.js +1 -1
  473. package/SVF-doxygen/html/html/search/variables_e.js +2 -0
  474. package/SVF-doxygen/html/html/st_8c.html +4 -4
  475. package/SVF-doxygen/html/html/st_8c_source.html +2 -2
  476. package/SVF-doxygen/html/html/st_8h.html +4 -4
  477. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4-members.html +87 -0
  478. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +381 -0
  479. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.png +0 -0
  480. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +100 -0
  481. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.png +0 -0
  482. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4-members.html +81 -0
  483. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +122 -0
  484. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.png +0 -0
  485. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +96 -0
  486. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.png +0 -0
  487. package/SVF-doxygen/html/html/svf-ex_8cpp.html +10 -54
  488. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +8 -9
  489. package/SVF-doxygen/html/html/tools_2CFL_2CMakeLists_8txt.html +102 -0
  490. package/SVF-doxygen/html/html/wpa_8cpp.html +2 -46
  491. package/SVF-doxygen/html/html/wpa_8cpp_source.html +3 -4
  492. package/include/CFL/CFGNormalizer.h +70 -0
  493. package/include/CFL/CFLAlias.h +124 -0
  494. package/include/CFL/CFLGrammar.h +127 -0
  495. package/include/CFL/CFLSolver.h +94 -0
  496. package/include/CFL/GrammarBuilder.h +65 -0
  497. package/include/Graphs/CFLGraph.h +175 -0
  498. package/include/Graphs/IRGraph.h +1 -1
  499. package/include/MemoryModel/PointerAnalysis.h +3 -3
  500. package/include/SABER/SrcSnkDDA.h +3 -2
  501. package/include/Util/GraphReachSolver.h +186 -0
  502. package/include/Util/Options.h +6 -0
  503. package/lib/CFL/CFGNormalizer.cpp +329 -0
  504. package/lib/CFL/CFLGrammar.cpp +101 -0
  505. package/lib/CFL/CFLSolver.cpp +106 -0
  506. package/lib/CFL/GrammarBuilder.cpp +155 -0
  507. package/lib/CMakeLists.txt +1 -0
  508. package/lib/Graphs/CFLGraph.cpp +225 -0
  509. package/lib/Util/Options.cpp +31 -0
  510. package/package.json +1 -1
  511. package/tools/CFL/CMakeLists.txt +12 -0
  512. package/tools/CFL/cfl.cpp +80 -0
  513. package/tools/CMakeLists.txt +1 -0
  514. package/tools/DDA/dda.cpp +0 -3
  515. package/tools/Example/svf-ex.cpp +0 -3
  516. package/tools/MTA/mta.cpp +0 -4
  517. package/tools/SABER/saber.cpp +0 -3
  518. package/tools/WPA/wpa.cpp +0 -4
@@ -0,0 +1,329 @@
1
+ //===----- CFGNormalizer.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
+ * CFGNormalizer.cpp
25
+ *
26
+ * Created on: April 19 , 2022
27
+ * Author: Pei Xu
28
+ */
29
+
30
+ #include <string>
31
+ #include <regex>
32
+ #include <fstream>
33
+ #include <sstream>
34
+ #include <iostream>
35
+ #include "Util/BasicTypes.h"
36
+ #include "CFL/CFGNormalizer.h"
37
+
38
+ using namespace SVF;
39
+
40
+ /*
41
+ Input: extended Backus–Naur form (EBNF)
42
+
43
+ Usage Notation
44
+ definition =
45
+ concatenation ,
46
+ termination ;
47
+ alternation |
48
+ optional [ ... ]
49
+ repetition { ... }
50
+ grouping ( ... )
51
+ terminal string " ... "
52
+ terminal string ' ... '
53
+ comment (* ... *)
54
+ special sequence ? ... ?
55
+ exception -
56
+
57
+ Output: Backus-Naur form(BNF)
58
+
59
+ <symbol> ::= __expression__
60
+
61
+ Possible Step:
62
+
63
+ Convert every repetition { E } to a fresh non-terminal X and add
64
+ X = $\epsilon$ | X E.
65
+ Convert every option [ E ] to a fresh non-terminal X and add
66
+ X = $\epsilon$ | E.
67
+ (We can convert X = A [ E ] B. to X = A E B | A B.)
68
+ Convert every group ( E ) to a fresh non-terminal X and add
69
+ X = E.
70
+ We can even do away with alternatives by having several productions with the same non-terminal.
71
+ X = E | E'. becomes X = E. X = E'.
72
+
73
+ Only Consider BIN Transformation for BNF form
74
+
75
+ And no differentiation between terminal and non-terminal
76
+ 1. Handwriting Testing for BIN Transformation Correctness
77
+
78
+ */
79
+ // BNF
80
+ // BIN Transforom
81
+
82
+ CFLGrammar* CFGNormalizer::normalize(GrammarBase *generalGrammar){
83
+ /*
84
+ ebnf_sign_replace('*');
85
+ ebnf_sign_replace('?');
86
+ */
87
+ CFLGrammar *grammar = new CFLGrammar();
88
+ grammar->startSymbol = generalGrammar->startSymbol;
89
+ grammar->terminals = generalGrammar->terminals;
90
+ grammar->nonterminals = generalGrammar->nonterminals;
91
+ grammar->totalSymbol = generalGrammar->totalSymbol;
92
+ ebnf_bin(generalGrammar, grammar);
93
+
94
+ for(auto symProdsPair: generalGrammar->rawProductions){
95
+ for(auto prod: symProdsPair.second){
96
+ Production tempP = prod;
97
+ tempP.insert(tempP.begin(), symProdsPair.first);
98
+ if (prod.size() == 1){
99
+ if ((std::find(tempP.begin(), tempP.end(), grammar->str2Sym("epsilon")) != tempP.end()))
100
+ {
101
+ if (std::find(grammar->epsilonProds.begin(), grammar->epsilonProds.end(), tempP) == grammar->epsilonProds.end())
102
+ grammar->epsilonProds.insert(tempP);
103
+ }
104
+ grammar->singleRHS2Prods[tempP[1]].insert(tempP);
105
+ }
106
+ if (prod.size() == 2){
107
+ grammar->firstRHS2Prods[tempP[1]].insert(tempP);
108
+ grammar->secondRHS2Prods[tempP[2]].insert(tempP);
109
+ }
110
+ }
111
+ }
112
+
113
+ return grammar;
114
+ }
115
+
116
+ void CFGNormalizer::ebnf_bin(GrammarBase* generalGrammar, CFLGrammar *grammar){
117
+ Map<Symbol, Productions> new_grammar = {};
118
+ std::string tempStr = "";
119
+
120
+ for(auto head : generalGrammar->rawProductions){
121
+ for(auto rule: head.second){
122
+
123
+ Production long_run = rule;
124
+ long_run.erase(long_run.begin());
125
+ auto it = generalGrammar->rawProductions[head.first].find(rule);
126
+ generalGrammar->rawProductions[head.first].erase(it);
127
+ generalGrammar->rawProductions[head.first].insert(long_run);
128
+ }
129
+ }
130
+
131
+ for(auto head : generalGrammar->rawProductions){
132
+ for(auto rule: head.second){
133
+ if (rule.size() < 3) continue;
134
+
135
+ Production long_run = rule;
136
+ Symbol first = long_run[0];
137
+ long_run.erase(long_run.begin());
138
+ auto it = generalGrammar->rawProductions[head.first].find(rule);
139
+ generalGrammar->rawProductions[head.first].erase(it);
140
+ rule = {first};
141
+ generalGrammar->rawProductions[head.first].insert(rule);
142
+
143
+ Symbol X = check_head(new_grammar, long_run);
144
+ if (int(X) == -1){
145
+ X = check_head(generalGrammar->rawProductions, long_run);
146
+ }
147
+ if (int(X) != -1){
148
+ it = generalGrammar->rawProductions[head.first].find(rule);
149
+ generalGrammar->rawProductions[head.first].erase(it);
150
+ rule.push_back(X);
151
+ generalGrammar->rawProductions[head.first].insert(rule);
152
+ } else{
153
+ tempStr = "X";
154
+ std::ostringstream ss;
155
+ ss << grammar->num_generator();
156
+ tempStr.append(ss.str());
157
+ Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
158
+ it = generalGrammar->rawProductions[head.first].find(rule);
159
+ generalGrammar->rawProductions[head.first].erase(it);
160
+ rule.push_back(tempSym);
161
+ generalGrammar->rawProductions[head.first].insert(rule);
162
+ X = tempSym;
163
+ }
164
+ new_grammar[X] = {};
165
+ Production temp_p = long_run;
166
+ Symbol RHX;
167
+ if (long_run.size() ==2){
168
+ new_grammar[X].insert(temp_p);
169
+ long_run.clear();
170
+ }
171
+ else{
172
+ new_grammar[X].insert(long_run);
173
+ RHX = X;
174
+ }
175
+ while (long_run.size() > 2)
176
+ {
177
+ first = long_run[0];
178
+ Production prev_rule = long_run;
179
+ long_run.erase(long_run.begin());
180
+
181
+ X = RHX;
182
+ temp_p = long_run;
183
+
184
+ RHX = check_head(new_grammar, long_run);
185
+ if (int(RHX) == -1){
186
+ RHX = check_head(generalGrammar->rawProductions, long_run);
187
+ }
188
+ if(int(RHX) == -1){
189
+ tempStr = "X";
190
+ std::ostringstream ss;
191
+ ss << grammar->num_generator();
192
+ tempStr.append(ss.str());
193
+ Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
194
+ auto it = new_grammar[X].find(prev_rule);
195
+ new_grammar[X].erase(it);
196
+ new_grammar[X].insert({first, tempSym});
197
+ new_grammar[tempSym].insert(long_run);
198
+ RHX = tempSym;
199
+ }
200
+ }
201
+
202
+
203
+ for (auto new_head : new_grammar){
204
+ for (auto prod : new_head.second){
205
+ auto it = generalGrammar->rawProductions[new_head.first].find(prod);
206
+ if (it == generalGrammar->rawProductions[new_head.first].end()) {
207
+ generalGrammar->rawProductions[new_head.first].insert(prod);
208
+ }
209
+ }
210
+ }
211
+
212
+ }
213
+ }
214
+ }
215
+
216
+ int CFGNormalizer::ebnf_bracket_match(Production &prod, int i, CFLGrammar *grammar)
217
+ {
218
+ int index = i;
219
+ while (index >= 0)
220
+ {
221
+ if (grammar->sym2Str(prod[index]) == "(")
222
+ {
223
+ return index;
224
+ }
225
+ index--;
226
+ }
227
+ return 0;
228
+ }
229
+
230
+ void CFGNormalizer::ebnf_sign_replace(char sign, GrammarBase* generalGrammar, CFLGrammar *grammar){
231
+ SVF::Map<std::string, std::string> new_rule_checker;
232
+ std::string X = "X";
233
+ for (auto ebnfHead : generalGrammar->rawProductions)
234
+ {
235
+ for (auto ebnfProd : ebnfHead.second)
236
+ {
237
+ size_t i = 1;
238
+ while (i < ebnfProd.size())
239
+ {
240
+ int repetition_start = -1;
241
+ if (grammar->sym2Str(ebnfProd[i]) == std::string(1, sign))
242
+ {
243
+ if (i == 1)
244
+ {
245
+ // abort("EBNF Form is not correct");
246
+ std::cout << "wr";
247
+ }
248
+ else if (grammar->sym2Str(ebnfProd[i - 1]) != std::string(1, ')'))
249
+ {
250
+ repetition_start = i - 1;
251
+ }
252
+ else
253
+ {
254
+ repetition_start = ebnf_bracket_match(ebnfProd, i, grammar);
255
+ }
256
+ std::string repetition = "";
257
+ for (size_t j = repetition_start; j < i; j++)
258
+ {
259
+ repetition.append(grammar->sym2Str(ebnfProd[j]));
260
+ repetition.append(" ");
261
+ }
262
+ repetition.append(grammar->sym2Str(ebnfProd[i]));
263
+ if (new_rule_checker.find(repetition) != new_rule_checker.end())
264
+ {
265
+
266
+ ebnfProd.erase(ebnfProd.begin() + repetition_start, ebnfProd.begin() + i + 1);
267
+ ebnfProd.insert(ebnfProd.begin() + repetition_start, grammar->str2Sym(new_rule_checker[repetition]));
268
+ }
269
+ else
270
+ {
271
+ X = "X";
272
+ std::ostringstream ss;
273
+ ss << grammar->num_generator();
274
+ X.append(ss.str());
275
+ Symbol tempSym = grammar->insertNonTerminalSymbol(X);
276
+ ebnfProd.erase(ebnfProd.begin() + repetition_start, ebnfProd.begin() + i + 1);
277
+ ebnfProd.insert(ebnfProd.begin() + repetition_start, tempSym);
278
+ new_rule_checker[repetition] = X;
279
+ }
280
+ i = repetition_start;
281
+ }
282
+ i++;
283
+ }
284
+ }
285
+ }
286
+ for(auto rep: new_rule_checker){
287
+ Production temp_list = {};
288
+ std::string new_nonterminal = rep.second;
289
+ if (sign == '*'){
290
+ temp_list.push_back(grammar->str2Sym(new_nonterminal));
291
+ }
292
+ Production temp_p = strTrans(rep.second, grammar);
293
+ temp_list.insert(temp_list.end(), temp_p.begin(),temp_p.end());
294
+ temp_list.insert(temp_list.begin(), grammar->str2Sym("epsilon"));
295
+ generalGrammar->rawProductions[grammar->str2Sym(new_nonterminal)].insert(temp_list);
296
+ }
297
+
298
+ }
299
+
300
+ CFGNormalizer::Production CFGNormalizer::strTrans(std::string LHS, CFLGrammar *grammar){
301
+ Production prod = {};
302
+ std::smatch matches;
303
+ std::regex LHSReg("\\s*(.*)");
304
+ std::string delimiter;
305
+ size_t pos;
306
+ std::string word;
307
+ std::regex_search(LHS, matches, LHSReg);
308
+ LHS = matches.str(1);
309
+ delimiter = " ";
310
+ while ((pos = LHS.find(delimiter)) != std::string::npos)
311
+ {
312
+ word = LHS.substr(0, pos);
313
+ LHS.erase(0, pos + delimiter.length());
314
+ prod.push_back(grammar->str2Sym(word));
315
+ }
316
+ prod.push_back(grammar->str2Sym(LHS));
317
+ return prod;
318
+ }
319
+
320
+ int CFGNormalizer::check_head(Map<Symbol, Productions> &grammar, Production &rule){
321
+ for(auto symProdPair: grammar){
322
+ for(auto prod: symProdPair.second){
323
+ if (rule == prod){
324
+ return symProdPair.first;
325
+ }
326
+ }
327
+ }
328
+ return -1;
329
+ }
@@ -0,0 +1,101 @@
1
+ //===----- CFLGrammar.cpp -- Context-free grammar --------------------------//
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
+ * CFLGrammar.cpp
25
+ *
26
+ * Created on: March 5, 2022
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #include "CFL/CFLGrammar.h"
31
+ #include <string>
32
+
33
+ using namespace SVF;
34
+
35
+ GrammarBase::Symbol GrammarBase::str2Sym(std::string str) const{
36
+
37
+ auto tit = terminals.find(str);
38
+ if(tit!=terminals.end())
39
+ return tit->second;
40
+
41
+ auto nit = nonterminals.find(str);
42
+ if(nit!=nonterminals.end())
43
+ return nit->second;
44
+
45
+ assert(false && "symbol not found!");
46
+ abort();
47
+ }
48
+
49
+ std::string GrammarBase::sym2Str(Symbol sym) const
50
+ {
51
+
52
+ std::string key = "";
53
+ for (auto &i : terminals)
54
+ {
55
+ if (i.second == sym)
56
+ {
57
+ key = i.first;
58
+ return key;
59
+ }
60
+ }
61
+
62
+ std::string nkey = "";
63
+ for (auto &ni : nonterminals)
64
+ {
65
+ if (ni.second == sym)
66
+ {
67
+ nkey = ni.first;
68
+ return nkey;
69
+ }
70
+ }
71
+
72
+ return "";
73
+ }
74
+
75
+ GrammarBase::Symbol GrammarBase::insertTerminalSymbol(std::string strLit){
76
+ Symbol sym;
77
+ if (terminals.find(strLit) == terminals.end()) {
78
+ sym = totalSymbol++;
79
+ terminals.insert({strLit, sym});
80
+ }
81
+ else{
82
+ sym = str2Sym(strLit);
83
+ }
84
+ return sym;
85
+ }
86
+ GrammarBase::Symbol GrammarBase::insertNonTerminalSymbol(std::string strLit){
87
+ Symbol sym;
88
+ if (nonterminals.find(strLit) == nonterminals.end()) {
89
+ sym = totalSymbol++;
90
+ nonterminals.insert({strLit, sym});
91
+ }
92
+ else{
93
+ sym = str2Sym(strLit);
94
+ }
95
+ return sym;
96
+ }
97
+
98
+ CFLGrammar::CFLGrammar(){
99
+
100
+ }
101
+
@@ -0,0 +1,106 @@
1
+ //===----- CFLSolver.cpp -- Context-free language reachability solver--------------//
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
+ * CFLSolver.cpp
25
+ *
26
+ * Created on: March 5, 2022
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #include "CFL/CFLSolver.h"
31
+
32
+ using namespace SVF;
33
+
34
+ void CFLSolver::solve(){
35
+ /// initial worklist
36
+ for(auto it = graph->begin(); it!= graph->end(); it++){
37
+ for(const CFLEdge* edge : (*it).second->getOutEdges()){
38
+ pushIntoWorklist(edge);
39
+ }
40
+ }
41
+ /// Foreach production X -> epsilon
42
+ /// add X(i,i) if not exist to E and to worklist
43
+ for(const Production& prod : grammar->getEpsilonProds()){
44
+ for(auto it = graph->begin(); it!= graph->end(); it++){
45
+ Symbol X = grammar->getLHSSymbol(prod);
46
+ CFLNode* i = (*it).second;
47
+ if(const CFLEdge* edge = graph->addCFLEdge(i, i, X))
48
+ pushIntoWorklist(edge);
49
+ }
50
+ }
51
+
52
+ while(!isWorklistEmpty()){
53
+ /// Select and remove an edge Y(i,j) from worklist
54
+ const CFLEdge* Y_edge = popFromWorklist();
55
+ CFLNode* i = Y_edge->getSrcNode();
56
+ CFLNode* j = Y_edge->getDstNode();
57
+
58
+ /// For each production X -> Y
59
+ /// add X(i,j) if not exist to E and to worklist
60
+ Symbol Y = Y_edge->getEdgeKind();
61
+ if (grammar->hasProdsFromSingleRHS(Y))
62
+ for(const Production& prod : grammar->getProdsFromSingleRHS(Y)){
63
+ Symbol X = grammar->getLHSSymbol(prod);
64
+ if(const CFLEdge* newEdge = graph->addCFLEdge(i, j, X))
65
+ {
66
+ pushIntoWorklist(newEdge);
67
+ }
68
+ }
69
+
70
+ /// For each production X -> Y Z
71
+ /// Foreach outgoing edge Z(j,k) from node j do
72
+ /// add X(i,k) if not exist to E and to worklist
73
+ if (grammar->hasProdsFromFirstRHS(Y))
74
+ for(const Production& prod : grammar->getProdsFromFirstRHS(Y)){
75
+ Symbol X = grammar->getLHSSymbol(prod);
76
+ for(const CFLEdge* Z_edge : j->getOutEdges()){
77
+ if (Z_edge->getEdgeKind() == grammar->getSecondRHSSymbol(prod))
78
+ {
79
+ CFLNode* k = Z_edge->getDstNode();
80
+ if(const CFLEdge* newEdge = graph->addCFLEdge(i, k, X))
81
+ {
82
+ pushIntoWorklist(newEdge);
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ /// For each production X -> Z Y
89
+ /// Foreach incoming edge Z(k,i) to node i do
90
+ /// add X(k,j) if not exist to E and to worklist
91
+ if(grammar->hasProdsFromSecondRHS(Y))
92
+ for(const Production& prod : grammar->getProdsFromSecondRHS(Y)){
93
+ Symbol X = grammar->getLHSSymbol(prod);
94
+ for(const CFLEdge* Z_edge : i->getInEdges()){
95
+ if(Z_edge->getEdgeKind() == grammar->getFirstRHSSymbol(prod))
96
+ {
97
+ CFLNode* k = Z_edge->getSrcNode();
98
+ if(const CFLEdge* newEdge = graph->addCFLEdge(k, j, X))
99
+ {
100
+ pushIntoWorklist(newEdge);
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,155 @@
1
+ //===----- CFGNormalizer.h -- 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
+ * GrammarBuilder.h
25
+ *
26
+ * Created on: April 27, 2022
27
+ * Author: Pei Xu
28
+ */
29
+
30
+ #include <string>
31
+ #include <fstream>
32
+ #include <regex>
33
+ #include <sstream>
34
+ #include <iostream>
35
+ #include "CFL/GrammarBuilder.h"
36
+
37
+ namespace SVF{
38
+ GrammarBase* GrammarBuilder::build(){
39
+ grammar->insertTerminalSymbol("epsilon");
40
+
41
+ std::ifstream textFile(fileName);
42
+ std::string lineString;
43
+ std::string lines = "";
44
+ std::regex reg("Start:([\\s\\S]*)Productions:([\\s\\S]*)");
45
+ std::string startS = "";
46
+ std::regex stripReg("\\s*(\\S*)\\s*");
47
+ std::vector<std::string> wordProd;
48
+
49
+ while (getline(textFile, lineString))
50
+ {
51
+ lines.append(lineString);
52
+ }
53
+ textFile.close();
54
+ std::smatch matches;
55
+ GrammarBase::Production prod;
56
+ if (std::regex_search(lines, matches, reg))
57
+ {
58
+ lines = matches.str(2);
59
+ startS = matches.str(1);
60
+ std::regex_search(startS, matches, stripReg);
61
+ startS = matches.str(1);
62
+ }
63
+ size_t pos = 0;
64
+
65
+ std::string delimiter = ";";
66
+ std::string word = "";
67
+ while ((pos = lines.find(";")) != std::string::npos)
68
+ {
69
+ word = lines.substr(0, pos);
70
+ wordProd.push_back(word);
71
+ lines.erase(0, pos + delimiter.length());
72
+ }
73
+ std::string delimiter1 = "->";
74
+
75
+ for (auto it : wordProd)
76
+ {
77
+ if ((pos = it.find(delimiter1)) != std::string::npos)
78
+ {
79
+ std::string head = it.substr(0, pos);
80
+ std::string LHS = it.substr(pos + delimiter1.size(), it.size() - 1);
81
+ std::regex_search(head, matches, stripReg);
82
+ head = matches.str(1);// Capital is Non-terminal
83
+ if (grammar->nonterminals.find(head) == grammar->nonterminals.end())
84
+ {
85
+ grammar->nonterminals.insert({head, grammar->totalSymbol});
86
+ prod.push_back(grammar->totalSymbol++);
87
+ }
88
+ else
89
+ {
90
+ prod.push_back(grammar->str2Sym(head));
91
+ }
92
+ if (grammar->rawProductions.find(grammar->str2Sym(head)) == grammar->rawProductions.end())
93
+ {
94
+ grammar->rawProductions.insert({grammar->str2Sym(head), {}});
95
+ }
96
+
97
+ std::regex LHSReg("\\s*(.*)");
98
+ std::regex_search(LHS, matches, LHSReg);
99
+ LHS = matches.str(1);
100
+ delimiter = " ";
101
+ while ((pos = LHS.find(delimiter)) != std::string::npos)
102
+ {
103
+ word = LHS.substr(0, pos);
104
+ LHS.erase(0, pos + delimiter.length());//Capital is Nonterminal, Otherwise is terminal
105
+ if (isupper(word[0])){
106
+ if (grammar->nonterminals.find(word) == grammar->nonterminals.end())
107
+ {
108
+ grammar->nonterminals.insert({word, grammar->totalSymbol});
109
+ prod.push_back(grammar->totalSymbol++);
110
+ }
111
+ else
112
+ prod.push_back(grammar->str2Sym(word));
113
+ }
114
+ else {
115
+ if (grammar->terminals.find(word) == grammar->terminals.end())
116
+ {
117
+ grammar->terminals.insert({word, grammar->totalSymbol});
118
+ prod.push_back(grammar->totalSymbol++);
119
+ }
120
+ else
121
+ prod.push_back(grammar->str2Sym(word));
122
+ }
123
+ }
124
+ if (isupper(LHS[0])){
125
+ if (grammar->nonterminals.find(LHS) == grammar->nonterminals.end())
126
+ {
127
+ grammar->nonterminals.insert({LHS, grammar->totalSymbol});
128
+ prod.push_back(grammar->totalSymbol++);
129
+ }
130
+ else
131
+ prod.push_back(grammar->str2Sym(LHS));
132
+ }
133
+ else {
134
+ if (grammar->terminals.find(LHS) == grammar->terminals.end())
135
+ {
136
+ grammar->terminals.insert({LHS, grammar->totalSymbol});
137
+ prod.push_back(grammar->totalSymbol++);
138
+ }
139
+ else
140
+ prod.push_back(grammar->str2Sym(LHS));
141
+ }
142
+ grammar->rawProductions[grammar->str2Sym(head)].insert(prod);
143
+ prod = {};
144
+ }
145
+ }
146
+ grammar->startSymbol = grammar->str2Sym(startS);
147
+ return grammar;
148
+ };
149
+
150
+ GrammarBase* GrammarBuilder::build(Map<std::string, SVF::CFLGraph::Symbol> *preMap){
151
+ grammar->nonterminals = *preMap;
152
+ grammar->totalSymbol = preMap->size();
153
+ return build();
154
+ };
155
+ }
@@ -20,6 +20,7 @@ file (GLOB SOURCES
20
20
  MTA/*.cpp
21
21
  SABER/*.cpp
22
22
  DDA/*.cpp
23
+ CFL/*.cpp
23
24
  FastCluster/*.cpp
24
25
  )
25
26