svf-tools 1.0.558 → 1.0.561

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 (327) hide show
  1. package/README.md +1 -1
  2. package/SVF-doxygen/html/html/AbstractPointsToDS_8h_source.html +43 -43
  3. package/SVF-doxygen/html/html/AndersenPWC_8h_source.html +2 -2
  4. package/SVF-doxygen/html/html/AndersenSCD_8cpp_source.html +1 -1
  5. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +16 -16
  6. package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +2 -2
  7. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +18 -18
  8. package/SVF-doxygen/html/html/Andersen_8h_source.html +56 -56
  9. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +8 -8
  10. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +10 -1
  11. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +3 -1
  12. package/SVF-doxygen/html/html/ConditionalPT_8h_source.html +1 -1
  13. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +44 -44
  14. package/SVF-doxygen/html/html/ContextDDA_8h_source.html +43 -43
  15. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +12 -12
  16. package/SVF-doxygen/html/html/DDAClient_8h_source.html +36 -36
  17. package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +19 -19
  18. package/SVF-doxygen/html/html/DDAPass_8h_source.html +21 -21
  19. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +51 -51
  20. package/SVF-doxygen/html/html/DDAStat_8h_source.html +51 -51
  21. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +111 -111
  22. package/SVF-doxygen/html/html/DoubleFreeChecker_8cpp_source.html +2 -2
  23. package/SVF-doxygen/html/html/DoubleFreeChecker_8h_source.html +2 -2
  24. package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +5 -2
  25. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +3 -2
  26. package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +40 -40
  27. package/SVF-doxygen/html/html/FSMPTA_8h_source.html +52 -52
  28. package/SVF-doxygen/html/html/FileChecker_8cpp_source.html +2 -2
  29. package/SVF-doxygen/html/html/FileChecker_8h_source.html +2 -2
  30. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
  31. package/SVF-doxygen/html/html/FlowDDA_8h_source.html +42 -42
  32. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +3 -3
  33. package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +6 -6
  34. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +4 -4
  35. package/SVF-doxygen/html/html/LeakChecker_8h_source.html +3 -3
  36. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
  37. package/SVF-doxygen/html/html/LocationSet_8h_source.html +1 -1
  38. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +34 -34
  39. package/SVF-doxygen/html/html/LockAnalysis_8h_source.html +114 -114
  40. package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +2 -2
  41. package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +7 -7
  42. package/SVF-doxygen/html/html/MHP_8cpp.html +2 -2
  43. package/SVF-doxygen/html/html/MHP_8cpp_source.html +94 -94
  44. package/SVF-doxygen/html/html/MHP_8h_source.html +135 -135
  45. package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +6 -6
  46. package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +2 -2
  47. package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +2 -2
  48. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +10 -10
  49. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +6 -6
  50. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +33 -33
  51. package/SVF-doxygen/html/html/MTAStat_8h_source.html +14 -14
  52. package/SVF-doxygen/html/html/MTA_8cpp_source.html +28 -28
  53. package/SVF-doxygen/html/html/MTA_8h_source.html +24 -24
  54. package/SVF-doxygen/html/html/MemPartition_8cpp_source.html +6 -6
  55. package/SVF-doxygen/html/html/MemPartition_8h_source.html +4 -4
  56. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +50 -50
  57. package/SVF-doxygen/html/html/MemRegion_8h_source.html +93 -93
  58. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +59 -59
  59. package/SVF-doxygen/html/html/MemSSA_8h_source.html +103 -103
  60. package/SVF-doxygen/html/html/MutablePointsToDS_8h_source.html +185 -185
  61. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
  62. package/SVF-doxygen/html/html/PAGBuilderFromFile_8h_source.html +1 -1
  63. package/SVF-doxygen/html/html/PCG_8cpp_source.html +14 -14
  64. package/SVF-doxygen/html/html/PCG_8h_source.html +52 -52
  65. package/SVF-doxygen/html/html/PEGGrammar_8txt.html +14 -32
  66. package/SVF-doxygen/html/html/PersistentPointsToCache_8h_source.html +40 -40
  67. package/SVF-doxygen/html/html/PersistentPointsToDS_8h_source.html +181 -181
  68. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +15 -15
  69. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +30 -30
  70. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +1 -1
  71. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +1 -1
  72. package/SVF-doxygen/html/html/ProgSlice_8cpp_source.html +2 -2
  73. package/SVF-doxygen/html/html/ProgSlice_8h_source.html +60 -60
  74. package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +2 -2
  75. package/SVF-doxygen/html/html/SVFGBuilder_8h_source.html +2 -2
  76. package/SVF-doxygen/html/html/SVFGNode_8h_source.html +1 -1
  77. package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +1 -1
  78. package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +2 -2
  79. package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +19 -19
  80. package/SVF-doxygen/html/html/SVFGStat_8h_source.html +1 -1
  81. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +12 -12
  82. package/SVF-doxygen/html/html/SVFG_8h_source.html +5 -5
  83. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +1 -1
  84. package/SVF-doxygen/html/html/SVFUtil_8h_source.html +1 -1
  85. package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +3 -3
  86. package/SVF-doxygen/html/html/SaberAnnotator_8h_source.html +2 -2
  87. package/SVF-doxygen/html/html/SaberCheckerAPI_8cpp_source.html +1 -1
  88. package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
  89. package/SVF-doxygen/html/html/SaberCondAllocator_8cpp_source.html +1 -1
  90. package/SVF-doxygen/html/html/SaberCondAllocator_8h_source.html +1 -1
  91. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +3 -3
  92. package/SVF-doxygen/html/html/SaberSVFGBuilder_8h_source.html +1 -1
  93. package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +13 -13
  94. package/SVF-doxygen/html/html/SrcSnkDDA_8h_source.html +66 -66
  95. package/SVF-doxygen/html/html/SrcSnkSolver_8h_source.html +1 -1
  96. package/SVF-doxygen/html/html/Steensgaard_8cpp_source.html +4 -4
  97. package/SVF-doxygen/html/html/Steensgaard_8h_source.html +6 -6
  98. package/SVF-doxygen/html/html/TCT_8cpp_source.html +44 -44
  99. package/SVF-doxygen/html/html/TCT_8h_source.html +93 -93
  100. package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +1 -1
  101. package/SVF-doxygen/html/html/TypeAnalysis_8h_source.html +2 -2
  102. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +2 -2
  103. package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +25 -25
  104. package/SVF-doxygen/html/html/VersionedFlowSensitive_8h_source.html +38 -38
  105. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +5 -5
  106. package/SVF-doxygen/html/html/WPAStat_8h_source.html +2 -2
  107. package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode.html +2 -2
  108. package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode.html +2 -2
  109. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +13 -10
  110. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +190 -2
  111. package/SVF-doxygen/html/html/classSVF_1_1AliasDDAClient.html +22 -22
  112. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +102 -102
  113. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +43 -43
  114. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +20 -20
  115. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +6 -6
  116. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +16 -16
  117. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +19 -19
  118. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +39 -39
  119. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +1 -1
  120. package/SVF-doxygen/html/html/classSVF_1_1CallCHI.html +2 -2
  121. package/SVF-doxygen/html/html/classSVF_1_1CallMU.html +2 -2
  122. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +1 -1
  123. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +100 -100
  124. package/SVF-doxygen/html/html/classSVF_1_1DDAClient.html +51 -51
  125. package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +58 -58
  126. package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +165 -165
  127. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +286 -286
  128. package/SVF-doxygen/html/html/classSVF_1_1DFPTData.html +26 -26
  129. package/SVF-doxygen/html/html/classSVF_1_1DiffPTData.html +11 -11
  130. package/SVF-doxygen/html/html/classSVF_1_1DistinctMRG.html +4 -4
  131. package/SVF-doxygen/html/html/classSVF_1_1DoubleFreeChecker.html +4 -4
  132. package/SVF-doxygen/html/html/classSVF_1_1EntryCHI.html +2 -2
  133. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
  134. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +40 -5
  135. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +30 -30
  136. package/SVF-doxygen/html/html/classSVF_1_1FileChecker.html +3 -3
  137. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +71 -71
  138. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +7 -7
  139. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +1 -1
  140. package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +218 -218
  141. package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode.html +2 -2
  142. package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode.html +2 -2
  143. package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +19 -19
  144. package/SVF-doxygen/html/html/classSVF_1_1InterDisjointMRG.html +1 -1
  145. package/SVF-doxygen/html/html/classSVF_1_1IntraDisjointMRG.html +7 -7
  146. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +17 -17
  147. package/SVF-doxygen/html/html/classSVF_1_1LoadMU.html +2 -2
  148. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +334 -334
  149. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +9 -9
  150. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +246 -246
  151. package/SVF-doxygen/html/html/classSVF_1_1MHPValidator.html +7 -7
  152. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +200 -200
  153. package/SVF-doxygen/html/html/classSVF_1_1MSSACHI.html +2 -2
  154. package/SVF-doxygen/html/html/classSVF_1_1MSSADEF.html +1 -1
  155. package/SVF-doxygen/html/html/classSVF_1_1MSSAMU.html +2 -2
  156. package/SVF-doxygen/html/html/classSVF_1_1MSSAPHI.html +1 -1
  157. package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode.html +2 -2
  158. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +53 -53
  159. package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +4 -4
  160. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +22 -22
  161. package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +181 -181
  162. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +44 -44
  163. package/SVF-doxygen/html/html/classSVF_1_1MemRegion.html +23 -23
  164. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +267 -267
  165. package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +18 -18
  166. package/SVF-doxygen/html/html/classSVF_1_1MutableDFPTData.html +128 -128
  167. package/SVF-doxygen/html/html/classSVF_1_1MutableDiffPTData.html +55 -55
  168. package/SVF-doxygen/html/html/classSVF_1_1MutableIncDFPTData.html +88 -88
  169. package/SVF-doxygen/html/html/classSVF_1_1MutablePTData.html +78 -78
  170. package/SVF-doxygen/html/html/classSVF_1_1MutableVersionedPTData.html +77 -77
  171. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +131 -131
  172. package/SVF-doxygen/html/html/classSVF_1_1PTData.html +32 -32
  173. package/SVF-doxygen/html/html/classSVF_1_1PersistentDFPTData.html +107 -107
  174. package/SVF-doxygen/html/html/classSVF_1_1PersistentDiffPTData.html +66 -66
  175. package/SVF-doxygen/html/html/classSVF_1_1PersistentIncDFPTData.html +84 -84
  176. package/SVF-doxygen/html/html/classSVF_1_1PersistentPTData.html +77 -77
  177. package/SVF-doxygen/html/html/classSVF_1_1PersistentPointsToCache.html +134 -134
  178. package/SVF-doxygen/html/html/classSVF_1_1PersistentVersionedPTData.html +77 -77
  179. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
  180. package/SVF-doxygen/html/html/classSVF_1_1ProgSlice.html +161 -161
  181. package/SVF-doxygen/html/html/classSVF_1_1RaceValidator.html +7 -7
  182. package/SVF-doxygen/html/html/classSVF_1_1RetMU.html +2 -2
  183. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +22 -22
  184. package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +4 -4
  185. package/SVF-doxygen/html/html/classSVF_1_1SVFGNodeLockSpan.html +23 -23
  186. package/SVF-doxygen/html/html/classSVF_1_1SaberAnnotator.html +5 -5
  187. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +2 -2
  188. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +157 -157
  189. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +15 -15
  190. package/SVF-doxygen/html/html/classSVF_1_1StoreCHI.html +2 -2
  191. package/SVF-doxygen/html/html/classSVF_1_1TCT.html +264 -264
  192. package/SVF-doxygen/html/html/classSVF_1_1TCTEdge.html +13 -13
  193. package/SVF-doxygen/html/html/classSVF_1_1TCTNode.html +20 -20
  194. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +1 -1
  195. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +100 -100
  196. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +8 -8
  197. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive_1_1SCC.html +1 -1
  198. package/SVF-doxygen/html/html/classSVF_1_1VersionedPTData.html +11 -11
  199. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +6 -6
  200. package/SVF-doxygen/html/html/dda_8cpp.html +2 -2
  201. package/SVF-doxygen/html/html/dda_8cpp_source.html +2 -2
  202. package/SVF-doxygen/html/html/functions_a.html +11 -5
  203. package/SVF-doxygen/html/html/functions_c.html +21 -18
  204. package/SVF-doxygen/html/html/functions_f.html +6 -6
  205. package/SVF-doxygen/html/html/functions_func.html +16 -10
  206. package/SVF-doxygen/html/html/functions_func_c.html +19 -16
  207. package/SVF-doxygen/html/html/functions_func_i.html +11 -8
  208. package/SVF-doxygen/html/html/functions_i.html +11 -8
  209. package/SVF-doxygen/html/html/functions_l.html +5 -5
  210. package/SVF-doxygen/html/html/functions_p.html +6 -6
  211. package/SVF-doxygen/html/html/functions_r.html +3 -7
  212. package/SVF-doxygen/html/html/functions_s.html +16 -14
  213. package/SVF-doxygen/html/html/functions_v.html +6 -6
  214. package/SVF-doxygen/html/html/functions_w.html +11 -11
  215. package/SVF-doxygen/html/html/globals_g.html +3 -3
  216. package/SVF-doxygen/html/html/globals_v.html +1 -2
  217. package/SVF-doxygen/html/html/globals_vars.html +3 -4
  218. package/SVF-doxygen/html/html/mta_8cpp.html +2 -2
  219. package/SVF-doxygen/html/html/mta_8cpp_source.html +2 -2
  220. package/SVF-doxygen/html/html/namespaceSVF.html +11 -11
  221. package/SVF-doxygen/html/html/search/all_1.js +2 -0
  222. package/SVF-doxygen/html/html/search/all_10.js +5 -5
  223. package/SVF-doxygen/html/html/search/all_11.js +2 -2
  224. package/SVF-doxygen/html/html/search/all_12.js +8 -8
  225. package/SVF-doxygen/html/html/search/all_13.js +2 -2
  226. package/SVF-doxygen/html/html/search/all_14.js +1 -1
  227. package/SVF-doxygen/html/html/search/all_15.js +4 -4
  228. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  229. package/SVF-doxygen/html/html/search/all_3.js +1 -0
  230. package/SVF-doxygen/html/html/search/all_6.js +2 -2
  231. package/SVF-doxygen/html/html/search/all_7.js +2 -2
  232. package/SVF-doxygen/html/html/search/all_9.js +2 -1
  233. package/SVF-doxygen/html/html/search/all_c.js +3 -3
  234. package/SVF-doxygen/html/html/search/all_e.js +2 -2
  235. package/SVF-doxygen/html/html/search/functions_0.js +2 -0
  236. package/SVF-doxygen/html/html/search/functions_2.js +1 -0
  237. package/SVF-doxygen/html/html/search/functions_8.js +1 -0
  238. package/SVF-doxygen/html/html/search/variables_13.js +1 -1
  239. package/SVF-doxygen/html/html/search/variables_14.js +1 -1
  240. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  241. package/SVF-doxygen/html/html/search/variables_7.js +2 -2
  242. package/SVF-doxygen/html/html/search/variables_e.js +1 -1
  243. package/SVF-doxygen/html/html/structSVF_1_1MemRegion_1_1equalMemRegion.html +3 -3
  244. package/SVF-doxygen/html/html/structSVF_1_1VersionedFlowSensitive_1_1SCC_1_1NodeData.html +4 -4
  245. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01TCT_01_5_01_4.html +15 -15
  246. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1TCTNode_01_5_01_4_01_4.html +1 -1
  247. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1TCTNode_01_5_01_4.html +1 -1
  248. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1TCT_01_5_01_4.html +2 -2
  249. package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1SVFGNodeLockSpan_01_4.html +3 -3
  250. package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
  251. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  252. package/include/CFL/CFLGraphBuilder.h +9 -0
  253. package/include/CFL/PEGGrammar.txt +4 -8
  254. package/include/DDA/ContextDDA.h +29 -0
  255. package/include/DDA/DDAClient.h +23 -0
  256. package/include/DDA/DDAPass.h +22 -0
  257. package/include/DDA/DDAStat.h +22 -0
  258. package/include/DDA/DDAVFSolver.h +22 -0
  259. package/include/DDA/FlowDDA.h +29 -0
  260. package/include/MSSA/MSSAMuChi.h +1 -1
  261. package/include/MSSA/MemPartition.h +1 -1
  262. package/include/MSSA/MemRegion.h +5 -1
  263. package/include/MSSA/MemSSA.h +7 -1
  264. package/include/MSSA/SVFGBuilder.h +1 -1
  265. package/include/MTA/FSMPTA.h +26 -0
  266. package/include/MTA/LockAnalysis.h +22 -0
  267. package/include/MTA/MHP.h +22 -0
  268. package/include/MTA/MTA.h +27 -1
  269. package/include/MTA/MTAStat.h +22 -0
  270. package/include/MTA/PCG.h +22 -0
  271. package/include/MTA/TCT.h +22 -0
  272. package/include/MemoryModel/AbstractPointsToDS.h +34 -0
  273. package/include/MemoryModel/ConditionalPT.h +1 -1
  274. package/include/MemoryModel/LocationSet.h +1 -1
  275. package/include/MemoryModel/MutablePointsToDS.h +32 -0
  276. package/include/MemoryModel/PAGBuilderFromFile.h +2 -2
  277. package/include/MemoryModel/PersistentPointsToCache.h +3 -1
  278. package/include/MemoryModel/PersistentPointsToDS.h +10 -0
  279. package/include/MemoryModel/PointerAnalysis.h +1 -1
  280. package/include/MemoryModel/PointerAnalysisImpl.h +1 -1
  281. package/include/MemoryModel/SVFStatements.h +1 -1
  282. package/include/SABER/DoubleFreeChecker.h +1 -1
  283. package/include/SABER/FileChecker.h +1 -1
  284. package/include/SABER/LeakChecker.h +1 -1
  285. package/include/SABER/ProgSlice.h +8 -1
  286. package/include/SABER/SaberAnnotator.h +1 -1
  287. package/include/SABER/SaberCheckerAPI.h +1 -1
  288. package/include/SABER/SaberCondAllocator.h +1 -1
  289. package/include/SABER/SaberSVFGBuilder.h +1 -1
  290. package/include/SABER/SrcSnkDDA.h +8 -1
  291. package/include/SABER/SrcSnkSolver.h +1 -1
  292. package/include/Util/ExtAPI.h +3 -0
  293. package/include/Util/ExtAPI.json +1456 -44
  294. package/include/WPA/Andersen.h +5 -0
  295. package/include/WPA/TypeAnalysis.h +1 -1
  296. package/include/WPA/VersionedFlowSensitive.h +4 -0
  297. package/lib/CFL/CFLGraphBuilder.cpp +44 -0
  298. package/lib/DDA/ContextDDA.cpp +22 -0
  299. package/lib/DDA/DDAClient.cpp +22 -0
  300. package/lib/DDA/DDAPass.cpp +23 -0
  301. package/lib/DDA/DDAStat.cpp +22 -0
  302. package/lib/DDA/FlowDDA.cpp +22 -0
  303. package/lib/MTA/FSMPTA.cpp +22 -0
  304. package/lib/MTA/LockAnalysis.cpp +22 -0
  305. package/lib/MTA/MHP.cpp +23 -1
  306. package/lib/MTA/MTA.cpp +23 -0
  307. package/lib/MTA/MTAStat.cpp +22 -0
  308. package/lib/MTA/PCG.cpp +22 -0
  309. package/lib/MTA/TCT.cpp +23 -0
  310. package/lib/MemoryModel/LocationSet.cpp +1 -1
  311. package/lib/MemoryModel/PAGBuilderFromFile.cpp +1 -1
  312. package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
  313. package/lib/MemoryModel/PointerAnalysisImpl.cpp +23 -0
  314. package/lib/SABER/DoubleFreeChecker.cpp +1 -1
  315. package/lib/SABER/FileChecker.cpp +1 -1
  316. package/lib/SABER/LeakChecker.cpp +1 -1
  317. package/lib/SABER/ProgSlice.cpp +1 -1
  318. package/lib/SABER/SaberAnnotator.cpp +1 -1
  319. package/lib/SABER/SaberCheckerAPI.cpp +1 -1
  320. package/lib/SABER/SaberCondAllocator.cpp +1 -1
  321. package/lib/SABER/SaberSVFGBuilder.cpp +1 -1
  322. package/lib/SABER/SrcSnkDDA.cpp +1 -1
  323. package/lib/Util/ExtAPI.cpp +42 -4
  324. package/lib/WPA/Steensgaard.cpp +22 -0
  325. package/lib/WPA/TypeAnalysis.cpp +1 -1
  326. package/lib/WPA/WPAPass.cpp +1 -1
  327. package/package.json +1 -1
@@ -25,6 +25,11 @@
25
25
  *
26
26
  * Created on: Nov 12, 2013
27
27
  * Author: Yulei Sui
28
+ *
29
+ * The field-sensitive implementation is improved based on
30
+ *
31
+ * Yuxiang Lei and Yulei Sui. "Fast and Precise Handling of Positive Weight Cycles for Field-sensitive Pointer Analysis".
32
+ * 26th International Static Analysis Symposium (SAS'19)
28
33
  */
29
34
 
30
35
  #ifndef INCLUDE_WPA_ANDERSEN_H_
@@ -1,4 +1,4 @@
1
- //===- Andersen.h -- Field-sensitive Andersen's pointer analysis-------------//
1
+ //===- TypeAnalysis.h -- Fast type-based analysis without pointer analysis---------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -5,6 +5,10 @@
5
5
  *
6
6
  * Created on: Jun 26, 2020
7
7
  * Author: Mohamad Barbar
8
+ *
9
+ * The implementation is based on
10
+ * Mohamad Barbar, Yulei Sui and Shiping Chen. "Object Versioning for Flow-Sensitive Pointer Analysis".
11
+ * International Symposium on Code Generation and Optimization (CGO'21)
8
12
  */
9
13
 
10
14
  #ifndef VFS_H_
@@ -326,6 +326,14 @@ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind sta
326
326
  key.append("bar");
327
327
  cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(CFLDerefNode->getId()), label2KindMap[key]);
328
328
  }
329
+ else if ( edge->getEdgeKind() == ConstraintEdge::VariantGep)
330
+ {
331
+ /// Handle VGep normalize to Normal Gep by connecting all geps' srcs to vgep dest
332
+ /// Example: In Test Case: Ctest field-ptr-arith-varIdx.c.bc
333
+ /// BFS Search the 8 LEVEL up to find the ValueNode, and the number of level search is arbitary
334
+ /// the more the level search the more valueNode and the Vgep Dst will possivble connect
335
+ connectVGep(cflGraph, graph, edge->getSrcNode(), edge->getDstNode(), 8, pag);
336
+ }
329
337
  else
330
338
  {
331
339
  CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
@@ -356,5 +364,41 @@ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind sta
356
364
  return cflGraph;
357
365
  }
358
366
 
367
+ void AliasCFLGraphBuilder::AliasCFLGraphBuilder::connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag)
368
+ {
369
+ if (level == 0) return;
370
+ level -= 1;
371
+ for (auto eit = src->getAddrInEdges().begin(); eit != src->getAddrInEdges().end(); eit++)
372
+ {
373
+ const MemObj* mem = pag->getBaseObj((*eit)->getSrcID());
374
+ for (u32_t maxField = 0 ; maxField < mem->getNumOfElements(); maxField++)
375
+ {
376
+ addBiGepCFLEdge(cflGraph, (*eit)->getDstNode(), dst, maxField);
377
+ }
378
+ }
379
+ for (auto eit = src->getInEdges().begin(); eit != src->getInEdges().end() && level != 0; eit++)
380
+ {
381
+ connectVGep(cflGraph, graph, (*eit)->getSrcNode(), dst, level, pag);
382
+ }
383
+ return;
384
+ }
359
385
 
386
+ void AliasCFLGraphBuilder::addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label)
387
+ {
388
+ cflGraph->addCFLEdge(cflGraph->getGNode(src->getId()), cflGraph->getGNode(dst->getId()), label);
389
+ std::string key = kind2LabelMap[label];
390
+ key.append("bar");
391
+ cflGraph->addCFLEdge(cflGraph->getGNode(dst->getId()), cflGraph->getGNode(src->getId()), label2KindMap[key]);
392
+ return;
393
+ }
394
+
395
+ void AliasCFLGraphBuilder::addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri)
396
+ {
397
+ CFLEdge::GEdgeFlag edgeLabel = CFLGrammar::getAttributedKind(attri, ConstraintEdge::NormalGep);
398
+ cflGraph->addCFLEdge(cflGraph->getGNode(src->getId()), cflGraph->getGNode(dst->getId()), edgeLabel);
399
+ std::string key = kind2LabelMap[ConstraintEdge::NormalGep];
400
+ key.append("bar");
401
+ cflGraph->addCFLEdge(cflGraph->getGNode(dst->getId()), cflGraph->getGNode(src->getId()), CFLGrammar::getAttributedKind(attri, label2KindMap[key]));
402
+ return;
403
+ }
360
404
  } // end of SVF namespace
@@ -1,3 +1,25 @@
1
+ //===- ContextDDA.cpp -- Context-sensitive demand-driven analysis-------------//
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
+
1
23
  /*
2
24
  * ContextDDA.cpp
3
25
  *
@@ -1,3 +1,25 @@
1
+ //===- DDAClient.cpp -- Clients of demand-driven analysis-------------//
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
+
1
23
  /*
2
24
  * @file: DDAClient.cpp
3
25
  * @author: yesen
@@ -1,3 +1,26 @@
1
+ //===- DDAPass.cpp -- Demand-driven analysis driver pass-------------//
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
+
1
24
  /*
2
25
  * @file: DDAPass.cpp
3
26
  * @author: Yulei Sui
@@ -1,3 +1,25 @@
1
+ //===- DDAStat.cpp -- Statistics for demand-driven pass-------------//
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
+
1
23
  /*
2
24
  * DDAStat.cpp
3
25
  *
@@ -1,3 +1,25 @@
1
+ //===- FlowDDA.cpp -- Flow-sensitive demand-driven analysis -------------//
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
+
1
23
  /*
2
24
  * FlowDDA.cpp
3
25
  *
@@ -1,3 +1,25 @@
1
+ //===- FSMPTA.cpp -- Flow-sensitive analysis of multithreaded programs-------------//
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
+
1
23
  /*
2
24
  * FSMPTA.cpp
3
25
  *
@@ -1,3 +1,25 @@
1
+ //===- LockAnalysis.cpp -- Analysis of locksets-------------//
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
+
1
23
  /*
2
24
  * LocksetAnalysis.cpp
3
25
  *
package/lib/MTA/MHP.cpp CHANGED
@@ -1,5 +1,27 @@
1
+ //===- MHP.cpp -- May-happen-in-parallel analysis-------------//
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
+
1
23
  /*
2
- * MTA.cpp
24
+ * MHP.cpp
3
25
  *
4
26
  * Created on: Jan 21, 2014
5
27
  * Author: Yulei Sui, Peng Di
package/lib/MTA/MTA.cpp CHANGED
@@ -1,3 +1,26 @@
1
+ //===- MTA.h -- Analysis of multithreaded programs-------------//
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
+
1
24
  /*
2
25
  * MTA.cpp
3
26
  *
@@ -1,3 +1,25 @@
1
+ //===- MTAStat.cpp -- Statistics for MTA-------------//
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
+
1
23
  /*
2
24
  * MTAStat.cpp
3
25
  *
package/lib/MTA/PCG.cpp CHANGED
@@ -1,3 +1,25 @@
1
+ //===- PCG.cpp -- Procedure creation graph-------------//
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
+
1
23
  /*
2
24
  * PCG.cpp
3
25
  *
package/lib/MTA/TCT.cpp CHANGED
@@ -1,3 +1,26 @@
1
+ //===- TCT.cpp -- Thread creation tree-------------//
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
+
1
24
  /*
2
25
  * TCT.cpp
3
26
  *
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2018> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -1,3 +1,26 @@
1
+ //===- PointerAnalysisImpl.cpp -- Pointer analysis implementation--------------------//
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
+
1
24
  /*
2
25
  * PointerAnalysisImpl.cpp
3
26
  *
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
5
- // Copyright (C) <2013-2017> <Yulei Sui>
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
6
  //
7
7
 
8
8
  // This program is free software: you can redistribute it and/or modify
@@ -307,7 +307,7 @@ std::vector<ExtAPI::Operation> ExtAPI::getAllOperations(std::string funName)
307
307
  {
308
308
  cJSON *obj = item->child;
309
309
  // Get the first operation of the function
310
- obj = obj -> next -> next;
310
+ obj = obj -> next -> next -> next -> next;
311
311
  std::vector<ExtAPI::Operation *> operations;
312
312
  while (obj)
313
313
  {
@@ -358,7 +358,7 @@ ExtAPI::extType ExtAPI::get_type(const std::string& funName)
358
358
  if (item != nullptr)
359
359
  {
360
360
  // Get the first operation of the function
361
- cJSON *obj = item->child;
361
+ cJSON *obj = item->child->next->next;
362
362
  if (strcmp(obj->string, JSON_OPT_FUNCTIONTYPE) == 0)
363
363
  type = obj->valuestring;
364
364
  else
@@ -387,7 +387,7 @@ u32_t ExtAPI::isOverwrittenAppFunction(const SVF::SVFFunction *callee)
387
387
  if (item != nullptr)
388
388
  {
389
389
  cJSON *obj = item->child;
390
- obj = obj->next;
390
+ obj = obj->next->next->next;
391
391
  if (strcmp(obj->string, JSON_OPT_OVERWRITE) == 0)
392
392
  return obj->valueint;
393
393
  else
@@ -473,6 +473,42 @@ bool ExtAPI::is_realloc(const SVFFunction *F)
473
473
  return t == EFT_REALLOC;
474
474
  }
475
475
 
476
+ // Does (F) have the same return type(pointer or nonpointer) and same number of arguments
477
+ bool ExtAPI::is_sameSignature(const SVFFunction *F)
478
+ {
479
+ cJSON *item = get_FunJson(F->getName());
480
+ // If return type is pointer
481
+ bool isPointer = false;
482
+ // The number of arguments
483
+ u32_t argNum = 0;
484
+ if (item != nullptr)
485
+ {
486
+ // Get the "return" attribute
487
+ cJSON *obj = item->child;
488
+ if (strlen(obj->valuestring) == 0) // e.g. "return": ""
489
+ assert(false && "'return' should not be empty!");
490
+ // If "return": "..." includes "*", the return type of extern function is a pointer
491
+ if (strstr(obj->valuestring, "*") != NULL)
492
+ isPointer = true;
493
+ // Get the "arguments" attribute
494
+ obj = obj -> next;
495
+ if (strlen(obj->valuestring) == 0) // e.g. "arguments": "",
496
+ assert(false && "'arguments' should not be empty!");
497
+ // If "arguments": "()", the number of arguments is 0, otherwise, number >= 1;
498
+ if (strcmp(obj->valuestring, "()") != 0)
499
+ {
500
+ argNum++;
501
+ for (u32_t i = 0; i < strlen(obj->valuestring); i++)
502
+ if (obj->valuestring[i] == ',') // Calculate the number of arguments based on the number of ","
503
+ argNum++;
504
+ }
505
+ }
506
+ if (F->arg_size() != argNum) // The number of arguments is different
507
+ return false;
508
+ // Is the return type the same?
509
+ return F->getLLVMFun()->getReturnType()->isPointerTy() == isPointer;
510
+ }
511
+
476
512
  // Should (F) be considered "external" (either not defined in the program
477
513
  // or a user-defined version of a known alloc or no-op)?
478
514
  bool ExtAPI::is_ext(const SVFFunction *F)
@@ -489,9 +525,11 @@ bool ExtAPI::is_ext(const SVFFunction *F)
489
525
  if (t != EFT_NULL)
490
526
  {
491
527
  u32_t overwrittenAppFunction = isOverwrittenAppFunction(F);
528
+ if (!is_sameSignature(F))
529
+ res = 0;
492
530
  // overwrittenAppFunction = 1: Execute function specification in ExtAPI.json
493
531
  // F is considered as external function
494
- if (overwrittenAppFunction == 1)
532
+ else if (overwrittenAppFunction == 1)
495
533
  res = 1;
496
534
  // overwrittenAppFunction = 0: Execute user-defined functions
497
535
  // F is not considered as external function