svf-tools 1.0.811 → 1.0.813

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 (341) hide show
  1. package/SVF-doxygen/html/AccessPath_8cpp_source.html +159 -136
  2. package/SVF-doxygen/html/AccessPath_8h_source.html +45 -42
  3. package/SVF-doxygen/html/ConsExeState_8cpp_source.html +21 -21
  4. package/SVF-doxygen/html/ConsExeState_8h_source.html +384 -385
  5. package/SVF-doxygen/html/ConsG_8cpp_source.html +8 -8
  6. package/SVF-doxygen/html/ContextDDA_8cpp_source.html +1 -1
  7. package/SVF-doxygen/html/ExeState_8cpp_source.html +24 -24
  8. package/SVF-doxygen/html/ExeState_8h_source.html +227 -217
  9. package/SVF-doxygen/html/FlowDDA_8cpp_source.html +1 -1
  10. package/SVF-doxygen/html/FlowSensitive_8cpp_source.html +1 -1
  11. package/SVF-doxygen/html/ICFGEdge_8h_source.html +2 -2
  12. package/SVF-doxygen/html/ICFG_8cpp_source.html +2 -2
  13. package/SVF-doxygen/html/IRGraph_8cpp_source.html +2 -2
  14. package/SVF-doxygen/html/IntervalExeState_8cpp_source.html +8 -8
  15. package/SVF-doxygen/html/IntervalExeState_8h_source.html +412 -408
  16. package/SVF-doxygen/html/PAGBuilderFromFile_8cpp_source.html +2 -2
  17. package/SVF-doxygen/html/RelationSolver_8cpp_source.html +3 -3
  18. package/SVF-doxygen/html/SVFFileSystem_8cpp_source.html +13 -13
  19. package/SVF-doxygen/html/SVFFileSystem_8h_source.html +11 -11
  20. package/SVF-doxygen/html/SVFIR2ConsExeState_8cpp_source.html +273 -272
  21. package/SVF-doxygen/html/SVFIR2ConsExeState_8h_source.html +28 -28
  22. package/SVF-doxygen/html/SVFIR2ItvExeState_8cpp_source.html +980 -973
  23. package/SVF-doxygen/html/SVFIR2ItvExeState_8h_source.html +169 -169
  24. package/SVF-doxygen/html/SVFIR2Relation_8cpp_source.html +33 -33
  25. package/SVF-doxygen/html/SVFIRBuilder_8cpp_source.html +4 -4
  26. package/SVF-doxygen/html/SVFIRBuilder_8h_source.html +11 -11
  27. package/SVF-doxygen/html/SVFIR_8cpp_source.html +14 -14
  28. package/SVF-doxygen/html/SVFIR_8h_source.html +11 -11
  29. package/SVF-doxygen/html/SVFStatements_8cpp_source.html +19 -19
  30. package/SVF-doxygen/html/SVFStatements_8h_source.html +829 -830
  31. package/SVF-doxygen/html/SaberCondAllocator_8cpp_source.html +7 -7
  32. package/SVF-doxygen/html/SaberCondAllocator_8h_source.html +2 -2
  33. package/SVF-doxygen/html/SymState_8h_source.html +1 -1
  34. package/SVF-doxygen/html/VFGNode_8h_source.html +7 -7
  35. package/SVF-doxygen/html/VFG_8cpp_source.html +15 -15
  36. package/SVF-doxygen/html/VFG_8h_source.html +10 -10
  37. package/SVF-doxygen/html/classSVF_1_1AccessPath-members.html +18 -17
  38. package/SVF-doxygen/html/classSVF_1_1AccessPath.html +206 -153
  39. package/SVF-doxygen/html/classSVF_1_1BinaryOPStmt.html +68 -68
  40. package/SVF-doxygen/html/classSVF_1_1BranchStmt.html +51 -51
  41. package/SVF-doxygen/html/classSVF_1_1BranchVFGNode.html +3 -3
  42. package/SVF-doxygen/html/classSVF_1_1CallPE.html +35 -35
  43. package/SVF-doxygen/html/classSVF_1_1CmpStmt.html +97 -97
  44. package/SVF-doxygen/html/classSVF_1_1ConsExeState-members.html +74 -74
  45. package/SVF-doxygen/html/classSVF_1_1ConsExeState.html +412 -394
  46. package/SVF-doxygen/html/classSVF_1_1ConstraintGraph.html +8 -8
  47. package/SVF-doxygen/html/classSVF_1_1ContextDDA.html +1 -1
  48. package/SVF-doxygen/html/classSVF_1_1ExeState-members.html +34 -34
  49. package/SVF-doxygen/html/classSVF_1_1ExeState.html +287 -272
  50. package/SVF-doxygen/html/classSVF_1_1FlowDDA.html +1 -1
  51. package/SVF-doxygen/html/classSVF_1_1FlowSensitive.html +1 -1
  52. package/SVF-doxygen/html/classSVF_1_1GepStmt-members.html +1 -1
  53. package/SVF-doxygen/html/classSVF_1_1GepStmt.html +37 -37
  54. package/SVF-doxygen/html/classSVF_1_1ICFG.html +2 -2
  55. package/SVF-doxygen/html/classSVF_1_1IntervalExeState-members.html +78 -78
  56. package/SVF-doxygen/html/classSVF_1_1IntervalExeState.html +445 -434
  57. package/SVF-doxygen/html/classSVF_1_1MultiOpndStmt.html +48 -48
  58. package/SVF-doxygen/html/classSVF_1_1PAGBuilderFromFile.html +2 -2
  59. package/SVF-doxygen/html/classSVF_1_1PhiStmt.html +46 -46
  60. package/SVF-doxygen/html/classSVF_1_1RelationSolver.html +3 -3
  61. package/SVF-doxygen/html/classSVF_1_1RetPE.html +35 -35
  62. package/SVF-doxygen/html/classSVF_1_1SVFIR.html +13 -13
  63. package/SVF-doxygen/html/classSVF_1_1SVFIR2ConsExeState-members.html +28 -28
  64. package/SVF-doxygen/html/classSVF_1_1SVFIR2ConsExeState.html +296 -295
  65. package/SVF-doxygen/html/classSVF_1_1SVFIR2ItvExeState-members.html +15 -16
  66. package/SVF-doxygen/html/classSVF_1_1SVFIR2ItvExeState.html +1087 -1128
  67. package/SVF-doxygen/html/classSVF_1_1SVFIRBuilder.html +4 -4
  68. package/SVF-doxygen/html/classSVF_1_1SVFIRReader.html +1 -1
  69. package/SVF-doxygen/html/classSVF_1_1SVFIRWriter.html +1 -1
  70. package/SVF-doxygen/html/classSVF_1_1SaberCondAllocator.html +7 -7
  71. package/SVF-doxygen/html/classSVF_1_1SelectStmt.html +38 -38
  72. package/SVF-doxygen/html/classSVF_1_1SymState.html +2 -2
  73. package/SVF-doxygen/html/classSVF_1_1TDForkPE.html +22 -22
  74. package/SVF-doxygen/html/classSVF_1_1TDJoinPE.html +21 -21
  75. package/SVF-doxygen/html/classSVF_1_1UnaryOPStmt.html +44 -44
  76. package/SVF-doxygen/html/classSVF_1_1VFG.html +15 -15
  77. package/SVF-doxygen/html/functions.html +6 -6
  78. package/SVF-doxygen/html/functions_a.html +13 -8
  79. package/SVF-doxygen/html/functions_b.html +3 -3
  80. package/SVF-doxygen/html/functions_e.html +2 -2
  81. package/SVF-doxygen/html/functions_func_e.html +2 -2
  82. package/SVF-doxygen/html/functions_func_g.html +44 -45
  83. package/SVF-doxygen/html/functions_func_i.html +12 -22
  84. package/SVF-doxygen/html/functions_func_l.html +6 -6
  85. package/SVF-doxygen/html/functions_func_n.html +3 -3
  86. package/SVF-doxygen/html/functions_func_p.html +1 -1
  87. package/SVF-doxygen/html/functions_func_s.html +7 -7
  88. package/SVF-doxygen/html/functions_func_w.html +3 -3
  89. package/SVF-doxygen/html/functions_g.html +42 -43
  90. package/SVF-doxygen/html/functions_i.html +30 -37
  91. package/SVF-doxygen/html/functions_l.html +8 -8
  92. package/SVF-doxygen/html/functions_n.html +7 -7
  93. package/SVF-doxygen/html/functions_o.html +20 -21
  94. package/SVF-doxygen/html/functions_p.html +12 -12
  95. package/SVF-doxygen/html/functions_r.html +3 -1
  96. package/SVF-doxygen/html/functions_s.html +18 -20
  97. package/SVF-doxygen/html/functions_t.html +10 -10
  98. package/SVF-doxygen/html/functions_type.html +5 -0
  99. package/SVF-doxygen/html/functions_type_i.html +4 -4
  100. package/SVF-doxygen/html/functions_type_v.html +3 -8
  101. package/SVF-doxygen/html/functions_v.html +10 -13
  102. package/SVF-doxygen/html/functions_vars.html +6 -6
  103. package/SVF-doxygen/html/functions_vars_g.html +2 -2
  104. package/SVF-doxygen/html/functions_vars_i.html +3 -0
  105. package/SVF-doxygen/html/functions_vars_o.html +0 -3
  106. package/SVF-doxygen/html/functions_w.html +11 -11
  107. package/SVF-doxygen/html/search/all_0.js +4 -4
  108. package/SVF-doxygen/html/search/all_1.js +210 -209
  109. package/SVF-doxygen/html/search/all_10.js +324 -324
  110. package/SVF-doxygen/html/search/all_11.js +222 -222
  111. package/SVF-doxygen/html/search/all_12.js +544 -544
  112. package/SVF-doxygen/html/search/all_13.js +191 -191
  113. package/SVF-doxygen/html/search/all_14.js +67 -67
  114. package/SVF-doxygen/html/search/all_15.js +167 -169
  115. package/SVF-doxygen/html/search/all_16.js +63 -63
  116. package/SVF-doxygen/html/search/all_17.js +1 -1
  117. package/SVF-doxygen/html/search/all_18.js +1 -1
  118. package/SVF-doxygen/html/search/all_19.js +11 -11
  119. package/SVF-doxygen/html/search/all_1a.js +172 -172
  120. package/SVF-doxygen/html/search/all_2.js +169 -169
  121. package/SVF-doxygen/html/search/all_3.js +642 -642
  122. package/SVF-doxygen/html/search/all_4.js +233 -233
  123. package/SVF-doxygen/html/search/all_5.js +119 -119
  124. package/SVF-doxygen/html/search/all_6.js +225 -225
  125. package/SVF-doxygen/html/search/all_7.js +868 -868
  126. package/SVF-doxygen/html/search/all_8.js +197 -197
  127. package/SVF-doxygen/html/search/all_9.js +606 -611
  128. package/SVF-doxygen/html/search/all_a.js +46 -46
  129. package/SVF-doxygen/html/search/all_b.js +26 -26
  130. package/SVF-doxygen/html/search/all_c.js +116 -116
  131. package/SVF-doxygen/html/search/all_d.js +196 -196
  132. package/SVF-doxygen/html/search/all_e.js +207 -207
  133. package/SVF-doxygen/html/search/all_f.js +115 -116
  134. package/SVF-doxygen/html/search/classes_0.js +26 -26
  135. package/SVF-doxygen/html/search/classes_1.js +9 -9
  136. package/SVF-doxygen/html/search/classes_10.js +73 -73
  137. package/SVF-doxygen/html/search/classes_11.js +15 -15
  138. package/SVF-doxygen/html/search/classes_12.js +2 -2
  139. package/SVF-doxygen/html/search/classes_13.js +10 -10
  140. package/SVF-doxygen/html/search/classes_14.js +14 -14
  141. package/SVF-doxygen/html/search/classes_15.js +1 -1
  142. package/SVF-doxygen/html/search/classes_2.js +80 -80
  143. package/SVF-doxygen/html/search/classes_3.js +37 -37
  144. package/SVF-doxygen/html/search/classes_4.js +9 -9
  145. package/SVF-doxygen/html/search/classes_5.js +28 -28
  146. package/SVF-doxygen/html/search/classes_6.js +104 -104
  147. package/SVF-doxygen/html/search/classes_7.js +33 -33
  148. package/SVF-doxygen/html/search/classes_8.js +56 -56
  149. package/SVF-doxygen/html/search/classes_9.js +1 -1
  150. package/SVF-doxygen/html/search/classes_a.js +12 -12
  151. package/SVF-doxygen/html/search/classes_b.js +29 -29
  152. package/SVF-doxygen/html/search/classes_c.js +6 -6
  153. package/SVF-doxygen/html/search/classes_d.js +18 -18
  154. package/SVF-doxygen/html/search/classes_e.js +36 -36
  155. package/SVF-doxygen/html/search/classes_f.js +25 -25
  156. package/SVF-doxygen/html/search/defines_0.js +3 -3
  157. package/SVF-doxygen/html/search/defines_1.js +2 -2
  158. package/SVF-doxygen/html/search/defines_2.js +30 -30
  159. package/SVF-doxygen/html/search/defines_3.js +21 -21
  160. package/SVF-doxygen/html/search/defines_4.js +2 -2
  161. package/SVF-doxygen/html/search/defines_5.js +4 -4
  162. package/SVF-doxygen/html/search/defines_6.js +2 -2
  163. package/SVF-doxygen/html/search/defines_7.js +5 -5
  164. package/SVF-doxygen/html/search/defines_8.js +11 -11
  165. package/SVF-doxygen/html/search/defines_9.js +9 -9
  166. package/SVF-doxygen/html/search/defines_a.js +2 -2
  167. package/SVF-doxygen/html/search/defines_b.js +1 -1
  168. package/SVF-doxygen/html/search/defines_c.js +3 -3
  169. package/SVF-doxygen/html/search/defines_d.js +2 -2
  170. package/SVF-doxygen/html/search/defines_e.js +7 -7
  171. package/SVF-doxygen/html/search/defines_f.js +3 -3
  172. package/SVF-doxygen/html/search/enums_0.js +3 -3
  173. package/SVF-doxygen/html/search/enums_1.js +2 -2
  174. package/SVF-doxygen/html/search/enums_10.js +1 -1
  175. package/SVF-doxygen/html/search/enums_11.js +1 -1
  176. package/SVF-doxygen/html/search/enums_2.js +8 -8
  177. package/SVF-doxygen/html/search/enums_3.js +1 -1
  178. package/SVF-doxygen/html/search/enums_4.js +3 -3
  179. package/SVF-doxygen/html/search/enums_5.js +1 -1
  180. package/SVF-doxygen/html/search/enums_6.js +2 -2
  181. package/SVF-doxygen/html/search/enums_7.js +2 -2
  182. package/SVF-doxygen/html/search/enums_8.js +4 -4
  183. package/SVF-doxygen/html/search/enums_9.js +1 -1
  184. package/SVF-doxygen/html/search/enums_a.js +1 -1
  185. package/SVF-doxygen/html/search/enums_b.js +7 -7
  186. package/SVF-doxygen/html/search/enums_c.js +1 -1
  187. package/SVF-doxygen/html/search/enums_d.js +4 -4
  188. package/SVF-doxygen/html/search/enums_e.js +2 -2
  189. package/SVF-doxygen/html/search/enums_f.js +4 -4
  190. package/SVF-doxygen/html/search/enumvalues_0.js +14 -14
  191. package/SVF-doxygen/html/search/enumvalues_1.js +14 -14
  192. package/SVF-doxygen/html/search/enumvalues_10.js +35 -35
  193. package/SVF-doxygen/html/search/enumvalues_11.js +3 -3
  194. package/SVF-doxygen/html/search/enumvalues_12.js +10 -10
  195. package/SVF-doxygen/html/search/enumvalues_13.js +1 -1
  196. package/SVF-doxygen/html/search/enumvalues_14.js +1 -1
  197. package/SVF-doxygen/html/search/enumvalues_15.js +3 -3
  198. package/SVF-doxygen/html/search/enumvalues_2.js +36 -36
  199. package/SVF-doxygen/html/search/enumvalues_3.js +13 -13
  200. package/SVF-doxygen/html/search/enumvalues_4.js +2 -2
  201. package/SVF-doxygen/html/search/enumvalues_5.js +47 -47
  202. package/SVF-doxygen/html/search/enumvalues_6.js +6 -6
  203. package/SVF-doxygen/html/search/enumvalues_7.js +9 -9
  204. package/SVF-doxygen/html/search/enumvalues_8.js +23 -23
  205. package/SVF-doxygen/html/search/enumvalues_9.js +6 -6
  206. package/SVF-doxygen/html/search/enumvalues_a.js +15 -15
  207. package/SVF-doxygen/html/search/enumvalues_b.js +11 -11
  208. package/SVF-doxygen/html/search/enumvalues_c.js +5 -5
  209. package/SVF-doxygen/html/search/enumvalues_d.js +18 -18
  210. package/SVF-doxygen/html/search/enumvalues_e.js +9 -9
  211. package/SVF-doxygen/html/search/enumvalues_f.js +45 -45
  212. package/SVF-doxygen/html/search/files_0.js +13 -13
  213. package/SVF-doxygen/html/search/files_1.js +7 -7
  214. package/SVF-doxygen/html/search/files_10.js +8 -8
  215. package/SVF-doxygen/html/search/files_11.js +8 -8
  216. package/SVF-doxygen/html/search/files_12.js +2 -2
  217. package/SVF-doxygen/html/search/files_2.js +55 -55
  218. package/SVF-doxygen/html/search/files_3.js +14 -14
  219. package/SVF-doxygen/html/search/files_4.js +5 -5
  220. package/SVF-doxygen/html/search/files_5.js +13 -13
  221. package/SVF-doxygen/html/search/files_6.js +9 -9
  222. package/SVF-doxygen/html/search/files_7.js +14 -14
  223. package/SVF-doxygen/html/search/files_8.js +13 -13
  224. package/SVF-doxygen/html/search/files_9.js +18 -18
  225. package/SVF-doxygen/html/search/files_a.js +3 -3
  226. package/SVF-doxygen/html/search/files_b.js +2 -2
  227. package/SVF-doxygen/html/search/files_c.js +20 -20
  228. package/SVF-doxygen/html/search/files_d.js +4 -4
  229. package/SVF-doxygen/html/search/files_e.js +62 -62
  230. package/SVF-doxygen/html/search/files_f.js +8 -8
  231. package/SVF-doxygen/html/search/functions_0.js +12 -12
  232. package/SVF-doxygen/html/search/functions_1.js +360 -360
  233. package/SVF-doxygen/html/search/functions_10.js +140 -140
  234. package/SVF-doxygen/html/search/functions_11.js +138 -138
  235. package/SVF-doxygen/html/search/functions_12.js +279 -279
  236. package/SVF-doxygen/html/search/functions_13.js +59 -59
  237. package/SVF-doxygen/html/search/functions_14.js +39 -39
  238. package/SVF-doxygen/html/search/functions_15.js +71 -71
  239. package/SVF-doxygen/html/search/functions_16.js +32 -32
  240. package/SVF-doxygen/html/search/functions_17.js +3 -3
  241. package/SVF-doxygen/html/search/functions_18.js +172 -172
  242. package/SVF-doxygen/html/search/functions_2.js +87 -87
  243. package/SVF-doxygen/html/search/functions_3.js +257 -257
  244. package/SVF-doxygen/html/search/functions_4.js +75 -75
  245. package/SVF-doxygen/html/search/functions_5.js +53 -53
  246. package/SVF-doxygen/html/search/functions_6.js +59 -59
  247. package/SVF-doxygen/html/search/functions_7.js +852 -852
  248. package/SVF-doxygen/html/search/functions_8.js +149 -149
  249. package/SVF-doxygen/html/search/functions_9.js +423 -428
  250. package/SVF-doxygen/html/search/functions_a.js +30 -30
  251. package/SVF-doxygen/html/search/functions_b.js +2 -2
  252. package/SVF-doxygen/html/search/functions_c.js +26 -26
  253. package/SVF-doxygen/html/search/functions_d.js +77 -77
  254. package/SVF-doxygen/html/search/functions_e.js +35 -35
  255. package/SVF-doxygen/html/search/functions_f.js +56 -56
  256. package/SVF-doxygen/html/search/namespaces_0.js +1 -1
  257. package/SVF-doxygen/html/search/namespaces_1.js +7 -7
  258. package/SVF-doxygen/html/search/related_0.js +2 -2
  259. package/SVF-doxygen/html/search/related_1.js +2 -2
  260. package/SVF-doxygen/html/search/related_2.js +2 -2
  261. package/SVF-doxygen/html/search/related_3.js +2 -2
  262. package/SVF-doxygen/html/search/related_4.js +2 -2
  263. package/SVF-doxygen/html/search/related_5.js +1 -1
  264. package/SVF-doxygen/html/search/related_6.js +2 -2
  265. package/SVF-doxygen/html/search/related_7.js +4 -4
  266. package/SVF-doxygen/html/search/related_8.js +2 -2
  267. package/SVF-doxygen/html/search/related_9.js +4 -4
  268. package/SVF-doxygen/html/search/related_a.js +19 -19
  269. package/SVF-doxygen/html/search/related_b.js +4 -4
  270. package/SVF-doxygen/html/search/related_c.js +1 -1
  271. package/SVF-doxygen/html/search/related_d.js +12 -12
  272. package/SVF-doxygen/html/search/related_e.js +2 -2
  273. package/SVF-doxygen/html/search/related_f.js +2 -2
  274. package/SVF-doxygen/html/search/typedefs_0.js +19 -18
  275. package/SVF-doxygen/html/search/typedefs_1.js +26 -26
  276. package/SVF-doxygen/html/search/typedefs_10.js +61 -61
  277. package/SVF-doxygen/html/search/typedefs_11.js +13 -13
  278. package/SVF-doxygen/html/search/typedefs_12.js +11 -11
  279. package/SVF-doxygen/html/search/typedefs_13.js +33 -34
  280. package/SVF-doxygen/html/search/typedefs_14.js +8 -8
  281. package/SVF-doxygen/html/search/typedefs_2.js +129 -129
  282. package/SVF-doxygen/html/search/typedefs_3.js +39 -39
  283. package/SVF-doxygen/html/search/typedefs_4.js +17 -17
  284. package/SVF-doxygen/html/search/typedefs_5.js +41 -41
  285. package/SVF-doxygen/html/search/typedefs_6.js +55 -55
  286. package/SVF-doxygen/html/search/typedefs_7.js +44 -44
  287. package/SVF-doxygen/html/search/typedefs_8.js +1 -1
  288. package/SVF-doxygen/html/search/typedefs_9.js +6 -6
  289. package/SVF-doxygen/html/search/typedefs_a.js +29 -29
  290. package/SVF-doxygen/html/search/typedefs_b.js +29 -29
  291. package/SVF-doxygen/html/search/typedefs_c.js +41 -41
  292. package/SVF-doxygen/html/search/typedefs_d.js +14 -14
  293. package/SVF-doxygen/html/search/typedefs_e.js +52 -52
  294. package/SVF-doxygen/html/search/typedefs_f.js +14 -14
  295. package/SVF-doxygen/html/search/variables_0.js +151 -151
  296. package/SVF-doxygen/html/search/variables_1.js +75 -75
  297. package/SVF-doxygen/html/search/variables_10.js +97 -97
  298. package/SVF-doxygen/html/search/variables_11.js +44 -44
  299. package/SVF-doxygen/html/search/variables_12.js +92 -92
  300. package/SVF-doxygen/html/search/variables_13.js +75 -75
  301. package/SVF-doxygen/html/search/variables_14.js +14 -14
  302. package/SVF-doxygen/html/search/variables_15.js +48 -48
  303. package/SVF-doxygen/html/search/variables_16.js +9 -9
  304. package/SVF-doxygen/html/search/variables_17.js +1 -1
  305. package/SVF-doxygen/html/search/variables_18.js +2 -2
  306. package/SVF-doxygen/html/search/variables_2.js +38 -38
  307. package/SVF-doxygen/html/search/variables_3.js +142 -142
  308. package/SVF-doxygen/html/search/variables_4.js +55 -55
  309. package/SVF-doxygen/html/search/variables_5.js +37 -37
  310. package/SVF-doxygen/html/search/variables_6.js +66 -66
  311. package/SVF-doxygen/html/search/variables_7.js +33 -33
  312. package/SVF-doxygen/html/search/variables_8.js +7 -7
  313. package/SVF-doxygen/html/search/variables_9.js +78 -77
  314. package/SVF-doxygen/html/search/variables_a.js +4 -4
  315. package/SVF-doxygen/html/search/variables_b.js +10 -10
  316. package/SVF-doxygen/html/search/variables_c.js +45 -45
  317. package/SVF-doxygen/html/search/variables_d.js +56 -56
  318. package/SVF-doxygen/html/search/variables_e.js +123 -123
  319. package/SVF-doxygen/html/search/variables_f.js +29 -30
  320. package/SVF-doxygen/html/structSVF_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +2 -2
  321. package/SVF-doxygen/html/structstd_1_1hash_3_01SVF_1_1AccessPath_01_4.html +9 -9
  322. package/SVF-doxygen/html/structstd_1_1hash_3_01SVF_1_1ConsExeState_01_4.html +5 -5
  323. package/SVF-doxygen/html/structstd_1_1hash_3_01SVF_1_1ExeState_01_4.html +5 -5
  324. package/SVF-doxygen/html/structstd_1_1hash_3_01SVF_1_1IntervalExeState_01_4.html +5 -5
  325. package/SVF-doxygen/html/svf-ex_8cpp.html +17 -17
  326. package/SVF-doxygen/html/svf-ex_8cpp_source.html +17 -17
  327. package/package.json +1 -1
  328. package/svf/include/AbstractExecution/ConsExeState.h +99 -96
  329. package/svf/include/AbstractExecution/ExeState.h +66 -53
  330. package/svf/include/AbstractExecution/IntervalExeState.h +66 -61
  331. package/svf/include/AbstractExecution/SVFIR2ConsExeState.h +7 -7
  332. package/svf/include/AbstractExecution/SVFIR2ItvExeState.h +22 -19
  333. package/svf/include/MemoryModel/AccessPath.h +13 -11
  334. package/svf/include/SVFIR/SVFStatements.h +2 -3
  335. package/svf/lib/AbstractExecution/ConsExeState.cpp +13 -13
  336. package/svf/lib/AbstractExecution/ExeState.cpp +19 -19
  337. package/svf/lib/AbstractExecution/IntervalExeState.cpp +4 -4
  338. package/svf/lib/AbstractExecution/SVFIR2ConsExeState.cpp +38 -37
  339. package/svf/lib/AbstractExecution/SVFIR2ItvExeState.cpp +273 -287
  340. package/svf/lib/MemoryModel/AccessPath.cpp +39 -17
  341. package/svf/lib/SVFIR/SVFFileSystem.cpp +2 -2
@@ -33,9 +33,75 @@
33
33
  using namespace SVF;
34
34
  using namespace SVFUtil;
35
35
 
36
- SVF::SVFIR2ItvExeState::VAddrs SVF::SVFIR2ItvExeState::globalNullVaddrs =
36
+ SVF::SVFIR2ItvExeState::Addrs SVF::SVFIR2ItvExeState::globalNulladdrs =
37
37
  AddressValue();
38
38
 
39
+ /**
40
+ * This function, getRangeLimitFromType, calculates the lower and upper bounds of
41
+ * a numeric range for a given SVFType. It is used to determine the possible value
42
+ * range of integer types. If the type is an SVFIntegerType, it calculates the bounds
43
+ * based on the size and signedness of the type. The calculated bounds are returned
44
+ * as an IntervalValue representing the lower (lb) and upper (ub) limits of the range.
45
+ *
46
+ * @param type The SVFType for which to calculate the value range.
47
+ *
48
+ * @return An IntervalValue representing the lower and upper bounds of the range.
49
+ */
50
+ IntervalValue SVFIR2ItvExeState::getRangeLimitFromType(const SVFType* type)
51
+ {
52
+ if (const SVFIntegerType* intType = SVFUtil::dyn_cast<SVFIntegerType>(type))
53
+ {
54
+ u32_t bits = type->getByteSize() * 8;
55
+ s64_t ub = 0;
56
+ s64_t lb = 0;
57
+ if (bits >= 32)
58
+ {
59
+ if (intType->isSigned())
60
+ {
61
+ ub = static_cast<s64_t>(std::numeric_limits<s32_t>::max());
62
+ lb = static_cast<s64_t>(std::numeric_limits<s32_t>::min());
63
+ }
64
+ else
65
+ {
66
+ ub = static_cast<s64_t>(std::numeric_limits<u32_t>::max());
67
+ lb = static_cast<s64_t>(std::numeric_limits<u32_t>::min());
68
+ }
69
+ }
70
+ else if (bits == 16)
71
+ {
72
+ if (intType->isSigned())
73
+ {
74
+ ub = static_cast<s64_t>(std::numeric_limits<int16_t>::max());
75
+ lb = static_cast<s64_t>(std::numeric_limits<int16_t>::min());
76
+ }
77
+ else
78
+ {
79
+ ub = static_cast<s64_t>(std::numeric_limits<uint16_t>::max());
80
+ lb = static_cast<s64_t>(std::numeric_limits<uint16_t>::min());
81
+ }
82
+ }
83
+ else if (bits == 8)
84
+ {
85
+ if (intType->isSigned())
86
+ {
87
+ ub = static_cast<s64_t>(std::numeric_limits<int8_t>::max());
88
+ lb = static_cast<s64_t>(std::numeric_limits<int8_t>::min());
89
+ }
90
+ else
91
+ {
92
+ ub = static_cast<s64_t>(std::numeric_limits<u_int8_t>::max());
93
+ lb = static_cast<s64_t>(std::numeric_limits<u_int8_t>::min());
94
+ }
95
+ }
96
+ return IntervalValue(lb, ub);
97
+ }
98
+ else
99
+ {
100
+ assert(false && "cannot support");
101
+ }
102
+ }
103
+
104
+
39
105
  void SVFIR2ItvExeState::applySummary(IntervalExeState &es)
40
106
  {
41
107
  for (const auto &item: es._varToItvVal)
@@ -46,13 +112,13 @@ void SVFIR2ItvExeState::applySummary(IntervalExeState &es)
46
112
  {
47
113
  _es._locToItvVal[item.first] = item.second;
48
114
  }
49
- for (const auto &item: es._varToVAddrs)
115
+ for (const auto &item: es._varToAddrs)
50
116
  {
51
- _es._varToVAddrs[item.first] = item.second;
117
+ _es._varToAddrs[item.first] = item.second;
52
118
  }
53
- for (const auto &item: es._locToVAddrs)
119
+ for (const auto &item: es._locToAddrs)
54
120
  {
55
- _es._locToVAddrs[item.first] = item.second;
121
+ _es._locToAddrs[item.first] = item.second;
56
122
  }
57
123
  }
58
124
 
@@ -66,29 +132,29 @@ void SVFIR2ItvExeState::moveToGlobal()
66
132
  {
67
133
  IntervalExeState::globalES._locToItvVal.insert(it);
68
134
  }
69
- for (const auto &_varToVAddr: _es._varToVAddrs)
135
+ for (const auto &_varToVAddr: _es._varToAddrs)
70
136
  {
71
- IntervalExeState::globalES._varToVAddrs.insert(_varToVAddr);
137
+ IntervalExeState::globalES._varToAddrs.insert(_varToVAddr);
72
138
  }
73
- for (const auto &_locToVAddr: _es._locToVAddrs)
139
+ for (const auto &_locToVAddr: _es._locToAddrs)
74
140
  {
75
- IntervalExeState::globalES._locToVAddrs.insert(_locToVAddr);
141
+ IntervalExeState::globalES._locToAddrs.insert(_locToVAddr);
76
142
  }
77
143
 
78
144
  _es._varToItvVal.clear();
79
145
  IntervalExeState::globalES._varToItvVal.erase(PAG::getPAG()->getBlkPtr());
80
146
  _es._varToItvVal[PAG::getPAG()->getBlkPtr()] = IntervalValue::top();
81
147
  _es._locToItvVal.clear();
82
- _es._varToVAddrs.clear();
83
- _es._locToVAddrs.clear();
148
+ _es._varToAddrs.clear();
149
+ _es._locToAddrs.clear();
84
150
  }
85
151
 
86
- void SVFIR2ItvExeState::widenVAddrs(IntervalExeState &lhs, const IntervalExeState &rhs)
152
+ void SVFIR2ItvExeState::widenAddrs(IntervalExeState &lhs, const IntervalExeState &rhs)
87
153
  {
88
- for (const auto &rhsItem: rhs._varToVAddrs)
154
+ for (const auto &rhsItem: rhs._varToAddrs)
89
155
  {
90
- auto lhsIter = lhs._varToVAddrs.find(rhsItem.first);
91
- if (lhsIter != lhs._varToVAddrs.end())
156
+ auto lhsIter = lhs._varToAddrs.find(rhsItem.first);
157
+ if (lhsIter != lhs._varToAddrs.end())
92
158
  {
93
159
  for (const auto &addr: rhsItem.second)
94
160
  {
@@ -102,10 +168,10 @@ void SVFIR2ItvExeState::widenVAddrs(IntervalExeState &lhs, const IntervalExeStat
102
168
  }
103
169
  }
104
170
  }
105
- for (const auto &rhsItem: rhs._locToVAddrs)
171
+ for (const auto &rhsItem: rhs._locToAddrs)
106
172
  {
107
- auto lhsIter = lhs._locToVAddrs.find(rhsItem.first);
108
- if (lhsIter != lhs._locToVAddrs.end())
173
+ auto lhsIter = lhs._locToAddrs.find(rhsItem.first);
174
+ if (lhsIter != lhs._locToAddrs.end())
109
175
  {
110
176
  for (const auto &addr: rhsItem.second)
111
177
  {
@@ -121,12 +187,12 @@ void SVFIR2ItvExeState::widenVAddrs(IntervalExeState &lhs, const IntervalExeStat
121
187
  }
122
188
  }
123
189
 
124
- void SVFIR2ItvExeState::narrowVAddrs(IntervalExeState &lhs, const IntervalExeState &rhs)
190
+ void SVFIR2ItvExeState::narrowAddrs(IntervalExeState &lhs, const IntervalExeState &rhs)
125
191
  {
126
- for (const auto &rhsItem: rhs._varToVAddrs)
192
+ for (const auto &rhsItem: rhs._varToAddrs)
127
193
  {
128
- auto lhsIter = lhs._varToVAddrs.find(rhsItem.first);
129
- if (lhsIter != lhs._varToVAddrs.end())
194
+ auto lhsIter = lhs._varToAddrs.find(rhsItem.first);
195
+ if (lhsIter != lhs._varToAddrs.end())
130
196
  {
131
197
  for (const auto &addr: lhsIter->second)
132
198
  {
@@ -138,10 +204,10 @@ void SVFIR2ItvExeState::narrowVAddrs(IntervalExeState &lhs, const IntervalExeSta
138
204
  }
139
205
  }
140
206
  }
141
- for (const auto &rhsItem: rhs._locToVAddrs)
207
+ for (const auto &rhsItem: rhs._locToAddrs)
142
208
  {
143
- auto lhsIter = lhs._locToVAddrs.find(rhsItem.first);
144
- if (lhsIter != lhs._locToVAddrs.end())
209
+ auto lhsIter = lhs._locToAddrs.find(rhsItem.first);
210
+ if (lhsIter != lhs._locToAddrs.end())
145
211
  {
146
212
  for (const auto &addr: lhsIter->second)
147
213
  {
@@ -155,11 +221,11 @@ void SVFIR2ItvExeState::narrowVAddrs(IntervalExeState &lhs, const IntervalExeSta
155
221
  }
156
222
  }
157
223
 
158
- SVFIR2ItvExeState::VAddrs SVFIR2ItvExeState::getGepObjAddress(u32_t pointer, APOffset offset)
224
+ SVFIR2ItvExeState::Addrs SVFIR2ItvExeState::getGepObjAddress(u32_t pointer, APOffset offset)
159
225
  {
160
- assert(!getVAddrs(pointer).empty());
161
- VAddrs &addrs = getVAddrs(pointer);
162
- VAddrs ret;
226
+ assert(!getAddrs(pointer).empty());
227
+ Addrs &addrs = getAddrs(pointer);
228
+ Addrs ret;
163
229
  for (const auto &addr: addrs)
164
230
  {
165
231
  int64_t baseObj = getInternalID(addr);
@@ -176,160 +242,6 @@ SVFIR2ItvExeState::VAddrs SVFIR2ItvExeState::getGepObjAddress(u32_t pointer, APO
176
242
  return ret;
177
243
  }
178
244
 
179
- /**
180
- * This function, getByteOffsetfromGepTypePair, calculates the byte interval value
181
- * for a given IdxVarAndGepTypePair and GepStmt.
182
- *
183
- * @param gep_pair The IdxVarAndGepTypePair containing a value and its type.
184
- * @param gep The GepStmt representing the GetElementPtr instruction.
185
- *
186
- * @return The calculated byte interval value.
187
- *
188
- * e.g. %var2 = getelementptr inbounds %struct.OuterStruct, %struct.OuterStruct* %var0, i64 0, i32 2, i32 0, i64 %var1
189
- * %struct.OuterStruct = type { i32, i32, %struct.InnerStruct }
190
- * %struct.InnerStruct = type { [2 x i32] }
191
- * there are 4 GepTypePairs (<0, %struct.OuterStruct*>, <2, %struct.OuterStruct>, <0, %struct.InnerStruct>, <%var1, [2xi32]>)
192
- * this function can process one GepTypePairs and return byte offset interval value.
193
- * e.g. for 0th pair <0, %struct.OuterStruct*>, it is 0* ptrSize(%struct.OuterStruct*) = 0 bytes
194
- * for 1st pair <2, %struct.OuterStruct>, it is 2nd field in %struct.OuterStruct = 8 bytes
195
- * for 2nd pair <0, %struct.InnerStruct>, it is 0th field in %struct.InnerStruct = 0 bytes
196
- * for 3rd pair <%var1, [2xi32]>, it is %var1'th element in array [2xi32] = 4bytes * %var1
197
- * ----
198
- * for 0th/1st/2nd pair, the SVFValue has constant value
199
- * for 3rd pair, the SVFValue is variable, which needs ES table to calculate the interval.
200
- */
201
- IntervalValue SVFIR2ItvExeState::getByteOffsetfromGepTypePair(const AccessPath::IdxVarAndGepTypePair& gep_pair, const GepStmt *gep)
202
- {
203
- IntervalValue res(0); // Initialize the result interval 'res' to 0.
204
-
205
- const SVFValue *value = gep_pair.first->getValue();
206
- const SVFType *type = gep_pair.second;
207
-
208
- // Check the type of 'gep_pair.second' and process it accordingly.
209
- if (const SVFArrayType* arrType = SVFUtil::dyn_cast<SVFArrayType>(type))
210
- type = arrType->getTypeOfElement();
211
- else if (const SVFPointerType* ptrType = SVFUtil::dyn_cast<SVFPointerType>(type))
212
- type = ptrType->getPtrElementType();
213
- else if (const SVFStructType* structType = SVFUtil::dyn_cast<SVFStructType>(type))
214
- {
215
- // If it's a struct type with a constant index, calculate byte sizes.
216
- if (const SVFConstantInt *op = SVFUtil::dyn_cast<SVFConstantInt>(value))
217
- {
218
- for (u32_t structField = 0; structField < (u32_t)op->getSExtValue(); ++structField)
219
- {
220
- u32_t flattenIdx = structType->getTypeInfo()->getFlattenedFieldIdxVec()[structField];
221
- res = res + IntervalValue(structType->getTypeInfo()->getOriginalElemType(flattenIdx)->getByteSize());
222
- }
223
- return res;
224
- }
225
- else
226
- assert(false && "struct type can only pair with constant idx");
227
- }
228
- else
229
- assert(false && "gep type pair only support arr/ptr/struct");
230
-
231
- u32_t typeSz = type->getByteSize();
232
-
233
- // Calculate byte size based on the type and value, considering MaxFieldLimit option.
234
- if (const SVFConstantInt *op = SVFUtil::dyn_cast<SVFConstantInt>(value))
235
- {
236
- u32_t lb = (double)Options::MaxFieldLimit() / typeSz >= op->getSExtValue() ? op->getSExtValue() * typeSz: Options::MaxFieldLimit();
237
- res = IntervalValue(lb, lb);
238
- }
239
- else
240
- {
241
- u32_t idx = _svfir->getValueNode(value);
242
- IntervalValue idxVal = _es[idx] * IntervalValue(type->getByteSize());
243
- if (idxVal.isBottom())
244
- {
245
- res = IntervalValue(0, 0);
246
- }
247
- else
248
- {
249
- u32_t ub = (double)Options::MaxFieldLimit() / typeSz >= idxVal.ub().getNumeral() ? typeSz * idxVal.ub().getNumeral(): Options::MaxFieldLimit();
250
- u32_t lb = (idxVal.lb().getNumeral() < 0) ? 0 :
251
- ((double)Options::MaxFieldLimit() / typeSz >= idxVal.lb().getNumeral()) ? (typeSz * idxVal.lb().getNumeral()) : Options::MaxFieldLimit();
252
- res = IntervalValue(lb, ub);
253
- }
254
- }
255
-
256
- return res; // Return the resulting byte interval value.
257
- }
258
-
259
- /**
260
- * This function, getItvOfFlattenedElemIndexFromGepTypePair, calculates the index range as a pair
261
- * of APOffset values for a given IdxVarAndGepTypePair and GepStmt.
262
- *
263
- * @param gep_pair The IdxVarAndGepTypePair containing a value and its type.
264
- * @param gep The GepStmt representing the GetElementPtr instruction.
265
- *
266
- * @return A pair of APOffset values representing the index range.
267
- */
268
- IntervalValue SVFIR2ItvExeState::getItvOfFlattenedElemIndexFromGepTypePair(const AccessPath::IdxVarAndGepTypePair& gep_pair, const GepStmt *gep)
269
- {
270
- const SVFValue *value = gep_pair.first->getValue();
271
- const SVFType *type = gep_pair.second;
272
- APOffset offsetLb = 0;
273
- APOffset offsetUb = 0;
274
- APOffset maxFieldLimit = (APOffset)Options::MaxFieldLimit();
275
- APOffset minFieldLimit = 0;
276
-
277
- /// If the offset is constant but stored in a variable
278
- if (const SVFConstantInt *op = SVFUtil::dyn_cast<SVFConstantInt>(value))
279
- offsetLb = offsetUb = op->getSExtValue();
280
- else
281
- {
282
- u32_t idx = _svfir->getValueNode(value);
283
- IntervalValue &idxVal = _es[idx];
284
- if (idxVal.isBottom() || idxVal.isTop())
285
- return IntervalValue((s64_t)0, (s64_t)Options::MaxFieldLimit());
286
- // If idxVal is a concrete value
287
- if (idxVal.is_numeral())
288
- {
289
- u32_t constIdxVal = idxVal.getNumeral();
290
- constIdxVal = (constIdxVal < minFieldLimit) ? minFieldLimit :
291
- (constIdxVal > maxFieldLimit) ? maxFieldLimit : constIdxVal;
292
- offsetLb = offsetUb = constIdxVal;
293
- }
294
- else
295
- {
296
- offsetLb = (idxVal.lb().getNumeral() < minFieldLimit) ? minFieldLimit :
297
- (idxVal.lb().getNumeral() > maxFieldLimit) ? maxFieldLimit : idxVal.lb().getNumeral();
298
- offsetUb = (idxVal.ub().getNumeral() < minFieldLimit) ? minFieldLimit :
299
- (idxVal.ub().getNumeral() > maxFieldLimit) ? maxFieldLimit : idxVal.ub().getNumeral();
300
- }
301
- }
302
-
303
- if (type)
304
- {
305
- if (const SVFPointerType *pty = SVFUtil::dyn_cast<SVFPointerType>(type))
306
- {
307
- offsetLb = offsetLb * gep->getAccessPath().getElementNum(pty->getPtrElementType());
308
- offsetUb = offsetUb * gep->getAccessPath().getElementNum(pty->getPtrElementType());
309
- }
310
- else
311
- {
312
- const std::vector<u32_t>& so = SymbolTableInfo::SymbolInfo()
313
- ->getTypeInfo(type)
314
- ->getFlattenedElemIdxVec();
315
- if (so.empty() || offsetUb >= (APOffset)so.size() ||
316
- offsetLb >= (APOffset)so.size())
317
- {
318
- offsetLb = 0;
319
- offsetUb = maxFieldLimit;
320
- }
321
- else
322
- {
323
- offsetLb = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(type, offsetLb);
324
- offsetUb = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(type, offsetUb);
325
- }
326
- }
327
- }
328
-
329
- return IntervalValue(offsetLb, offsetUb); // Return a pair of APOffset values representing the index range.
330
- }
331
-
332
-
333
245
  /**
334
246
  * This function, getByteOffset, calculates the byte offset for a given GepStmt.
335
247
  *
@@ -337,42 +249,81 @@ IntervalValue SVFIR2ItvExeState::getItvOfFlattenedElemIndexFromGepTypePair(const
337
249
  *
338
250
  * @return The calculated byte offset as an IntervalValue.
339
251
  *
340
- * If this getelementptr has constant byte offset, directly call accumulateConstantByteOffset(),
341
- * otherwise, if one or more index in getelementptr is variable.
252
+ * It is byte offset rather than flatten index.
342
253
  * e.g. %var2 = getelementptr inbounds %struct.OuterStruct, %struct.OuterStruct* %var0, i64 0, i32 2, i32 0, i64 %var1
343
254
  * %struct.OuterStruct = type { i32, i32, %struct.InnerStruct }
344
255
  * %struct.InnerStruct = type { [2 x i32] }
345
256
  * there are 4 GepTypePairs (<0, %struct.OuterStruct*>, <2, %struct.OuterStruct>, <0, %struct.InnerStruct>, <%var1, [2xi32]>)
346
- * this function calls getByteOffsetfromGepTypePair() to process each pair, and finally accumulate them.
257
+ * this function process arr/ptr subtype by calculating elemByteSize * indexOperand
258
+ * and process struct subtype by calculating the byte offset from beginning to the field of struct
347
259
  * e.g. for 0th pair <0, %struct.OuterStruct*>, it is 0* ptrSize(%struct.OuterStruct*) = 0 bytes
348
260
  * for 1st pair <2, %struct.OuterStruct>, it is 2nd field in %struct.OuterStruct = 8 bytes
349
261
  * for 2nd pair <0, %struct.InnerStruct>, it is 0th field in %struct.InnerStruct = 0 bytes
350
262
  * for 3rd pair <%var1, [2xi32]>, it is %var1'th element in array [2xi32] = 4bytes * %var1
351
263
  * ----
352
264
  * Therefore the final byteoffset is [8+4*var1.lb(), 8+4*var1.ub()]
265
+ *
353
266
  */
354
267
  IntervalValue SVFIR2ItvExeState::getByteOffset(const GepStmt *gep)
355
268
  {
356
- // Check if the GepStmt has a constant offset.
357
- if (gep->isConstantOffset())
358
- {
359
- // If it has a constant offset, return it as an IntervalValue.
360
- return IntervalValue(gep->accumulateConstantByteOffset());
361
- }
362
-
363
269
  IntervalValue res(0); // Initialize the result interval 'res' to 0.
364
-
365
270
  // Loop through the offsetVarAndGepTypePairVec in reverse order.
366
271
  for (int i = gep->getOffsetVarAndGepTypePairVec().size() - 1; i >= 0; i--)
367
272
  {
368
- // Calculate the byte offset for the current IdxVarAndGepTypePair.
369
- IntervalValue offsetIdx = getByteOffsetfromGepTypePair(
370
- gep->getOffsetVarAndGepTypePairVec()[i], gep);
371
-
372
- // Accumulate the byte offset in the result 'res'.
373
- res = res + offsetIdx;
273
+ const SVFVar* idxOperandVar =
274
+ gep->getOffsetVarAndGepTypePairVec()[i].first;
275
+ const SVFType* idxOperandType =
276
+ gep->getOffsetVarAndGepTypePairVec()[i].second;
277
+ // calculating Array/Ptr by elemByteSize * indexOperand
278
+ if (SVFUtil::isa<SVFArrayType>(idxOperandType) || SVFUtil::isa<SVFPointerType>(idxOperandType))
279
+ {
280
+ u32_t elemByteSize = 1;
281
+ if (const SVFArrayType* arrOperandType = SVFUtil::dyn_cast<SVFArrayType>(idxOperandType))
282
+ {
283
+ elemByteSize = arrOperandType->getTypeOfElement()->getByteSize();
284
+ }
285
+ else if (const SVFPointerType* ptrOperandType = SVFUtil::dyn_cast<SVFPointerType>(idxOperandType))
286
+ {
287
+ elemByteSize = ptrOperandType->getPtrElementType()->getByteSize();
288
+ }
289
+ else
290
+ assert(false && "idxOperandType must be ArrType or PtrType");
291
+ if (const SVFConstantInt *op = SVFUtil::dyn_cast<SVFConstantInt>(idxOperandVar->getValue()))
292
+ {
293
+ s64_t lb = (double)Options::MaxFieldLimit() / elemByteSize >= op->getSExtValue() ?op->getSExtValue() * elemByteSize
294
+ : Options::MaxFieldLimit();
295
+ res = res + IntervalValue(lb, lb);
296
+ }
297
+ else
298
+ {
299
+ u32_t idx = _svfir->getValueNode(idxOperandVar->getValue());
300
+ IntervalValue idxVal = _es[idx];
301
+ if (idxVal.isBottom())
302
+ {
303
+ res = res + IntervalValue(0, 0);
304
+ }
305
+ else
306
+ {
307
+ s64_t ub = (double)Options::MaxFieldLimit() /
308
+ elemByteSize >= idxVal.ub().getNumeral() ? elemByteSize * idxVal.ub().getNumeral(): Options::MaxFieldLimit();
309
+ s64_t lb = (idxVal.lb().getNumeral() < 0) ? 0 :
310
+ ((double)Options::MaxFieldLimit() /
311
+ elemByteSize >= idxVal.lb().getNumeral()) ? elemByteSize * idxVal.lb().getNumeral() : Options::MaxFieldLimit();
312
+ res = res + IntervalValue(lb, ub);
313
+ }
314
+ }
315
+ }
316
+ // Process struct subtype by calculating the byte offset from beginning to the field of struct
317
+ else if (const SVFStructType* structOperandType = SVFUtil::dyn_cast<SVFStructType>(idxOperandType))
318
+ {
319
+ res = res + IntervalValue(gep->getAccessPath().getStructFieldOffset(
320
+ idxOperandVar, structOperandType));
321
+ }
322
+ else
323
+ {
324
+ assert(false && "gep type pair only support arr/ptr/struct");
325
+ }
374
326
  }
375
-
376
327
  return res; // Return the resulting byte offset as an IntervalValue.
377
328
  }
378
329
 
@@ -386,33 +337,65 @@ IntervalValue SVFIR2ItvExeState::getByteOffset(const GepStmt *gep)
386
337
  */
387
338
  IntervalValue SVFIR2ItvExeState::getItvOfFlattenedElemIndex(const GepStmt *gep)
388
339
  {
389
- APOffset totalOffsetLb = 0;
390
- APOffset totalOffsetUb = 0;
391
-
392
- /// Default value of Min/MaxFieldLimit is 0/512
393
- APOffset minFieldLimit = 0;
394
- APOffset maxFieldLimit = Options::MaxFieldLimit();
395
-
396
- /// For instant constant index, e.g., gep arr, 1
397
- if (gep->getOffsetVarAndGepTypePairVec().empty() || gep->isConstantOffset())
398
- {
399
- u32_t offsetIdx = gep->getConstantFieldIdx();
400
- return IntervalValue(offsetIdx, offsetIdx);
401
- }
402
- else
340
+ IntervalValue res(0);
341
+ for (int i = gep->getOffsetVarAndGepTypePairVec().size() - 1; i >= 0; i--)
403
342
  {
404
- for (int i = gep->getOffsetVarAndGepTypePairVec().size() - 1; i >= 0; i--)
343
+ AccessPath::IdxOperandPair IdxVarAndType =
344
+ gep->getOffsetVarAndGepTypePairVec()[i];
345
+ const SVFValue *value =
346
+ gep->getOffsetVarAndGepTypePairVec()[i].first->getValue();
347
+ const SVFType *type = IdxVarAndType.second;
348
+ // idxLb/Ub is the flattened offset generated by the current OffsetVarAndGepTypePair
349
+ s64_t idxLb;
350
+ s64_t idxUb;
351
+ // get lb and ub of the index value
352
+ if (const SVFConstantInt* constInt = SVFUtil::dyn_cast<SVFConstantInt>(value))
353
+ idxLb = idxUb = constInt->getSExtValue();
354
+ else
405
355
  {
406
- IntervalValue offsetIdx = getItvOfFlattenedElemIndexFromGepTypePair(
407
- gep->getOffsetVarAndGepTypePairVec()[i], gep);
408
- totalOffsetLb += offsetIdx.lb().getNumeral();
409
- totalOffsetUb += offsetIdx.ub().getNumeral();
356
+ IntervalValue idxItv = _es[_svfir->getValueNode(value)];
357
+ if (idxItv.isBottom())
358
+ idxLb = idxUb = 0;
359
+ else
360
+ {
361
+ idxLb = idxItv.lb().getNumeral();
362
+ idxUb = idxItv.ub().getNumeral();
363
+ }
410
364
  }
411
- totalOffsetLb = (totalOffsetLb < minFieldLimit) ? minFieldLimit :
412
- (totalOffsetLb > maxFieldLimit) ? maxFieldLimit : totalOffsetLb;
365
+ // for pointer type, flattened index = elemNum * idx
366
+ if (const SVFPointerType *pty = SVFUtil::dyn_cast<SVFPointerType>(type))
367
+ {
368
+ u32_t elemNum = gep->getAccessPath().getElementNum(pty->getPtrElementType());
369
+ idxLb = (double)Options::MaxFieldLimit() / elemNum < idxLb? Options::MaxFieldLimit(): idxLb * elemNum;
370
+ idxUb = (double)Options::MaxFieldLimit() / elemNum < idxUb? Options::MaxFieldLimit(): idxUb * elemNum;
371
+ }
372
+ // for array or struct, get flattened index from SymbolTable Info
373
+ else
374
+ {
375
+ if(Options::ModelArrays())
376
+ {
377
+ const std::vector<u32_t>& so = SymbolTableInfo::SymbolInfo()
378
+ ->getTypeInfo(type)
379
+ ->getFlattenedElemIdxVec();
380
+ if (so.empty() || idxUb >= (APOffset)so.size() || idxLb < 0)
381
+ {
382
+ idxLb = idxUb = 0;
383
+ }
384
+ else
385
+ {
386
+ idxLb = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(
387
+ type, idxLb);
388
+ idxUb = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(
389
+ type, idxUb);
390
+ }
391
+ }
392
+ else
393
+ idxLb = idxUb = 0;
394
+ }
395
+ res = res + IntervalValue(idxLb, idxUb);
413
396
  }
414
-
415
- return IntervalValue(totalOffsetLb, totalOffsetUb); // Return a pair of APOffset values representing the offset range.
397
+ res.meet_with(IntervalValue((s64_t)0, (s64_t)Options::MaxFieldLimit()));
398
+ return res;
416
399
  }
417
400
 
418
401
  /*!
@@ -475,22 +458,22 @@ void SVFIR2ItvExeState::initObjVar(const ObjVar *objVar, u32_t varId)
475
458
  else if (SVFUtil::isa<SVFConstantNullPtr>(obj->getValue()))
476
459
  IntervalExeState::globalES[varId] = IntervalValue(0, 0);
477
460
  else if (SVFUtil::isa<SVFGlobalValue>(obj->getValue()))
478
- IntervalExeState::globalES.getVAddrs(varId).insert(getVirtualMemAddress(varId));
461
+ IntervalExeState::globalES.getAddrs(varId).insert(getVirtualMemAddress(varId));
479
462
  else if (obj->isConstantArray() || obj->isConstantStruct())
480
463
  IntervalExeState::globalES[varId] = IntervalValue::top();
481
464
  else
482
465
  IntervalExeState::globalES[varId] = IntervalValue::top();
483
466
  }
484
467
  else
485
- IntervalExeState::globalES.getVAddrs(varId).insert(getVirtualMemAddress(varId));
468
+ IntervalExeState::globalES.getAddrs(varId).insert(getVirtualMemAddress(varId));
486
469
  }
487
470
  else
488
- IntervalExeState::globalES.getVAddrs(varId).insert(getVirtualMemAddress(varId));
471
+ IntervalExeState::globalES.getAddrs(varId).insert(getVirtualMemAddress(varId));
489
472
  }
490
473
 
491
474
  void SVFIR2ItvExeState::initSVFVar(u32_t varId)
492
475
  {
493
- if (inVarToIValTable(varId) || _es.inVarToAddrsTable(varId)) return;
476
+ if (inVarToValTable(varId) || _es.inVarToAddrsTable(varId)) return;
494
477
  SVFIR *svfir = PAG::getPAG();
495
478
  SVFVar *svfVar = svfir->getGNode(varId);
496
479
  // write objvar into cache instead of exestate
@@ -515,13 +498,20 @@ void SVFIR2ItvExeState::initSVFVar(u32_t varId)
515
498
  void SVFIR2ItvExeState::translateAddr(const AddrStmt *addr)
516
499
  {
517
500
  initSVFVar(addr->getRHSVarID());
518
- if (inVarToIValTable(addr->getRHSVarID()))
501
+ if (inVarToValTable(addr->getRHSVarID()))
519
502
  {
503
+ // if addr RHS is integerType(i8 i32 etc), value should be limited.
504
+ if (addr->getRHSVar()->getType()->getKind() == SVFType::SVFIntegerTy)
505
+ {
506
+ IntervalExeState::globalES[addr->getRHSVarID()].meet_with(
507
+ getRangeLimitFromType(addr->getRHSVar()->getType()));
508
+ }
520
509
  IntervalExeState::globalES[addr->getLHSVarID()] = IntervalExeState::globalES[addr->getRHSVarID()];
510
+
521
511
  }
522
512
  else if (inVarToAddrsTable(addr->getRHSVarID()))
523
513
  {
524
- IntervalExeState::globalES.getVAddrs(addr->getLHSVarID()) = IntervalExeState::globalES.getVAddrs(
514
+ IntervalExeState::globalES.getAddrs(addr->getLHSVarID()) = IntervalExeState::globalES.getAddrs(
525
515
  addr->getRHSVarID());
526
516
  }
527
517
  else
@@ -536,9 +526,9 @@ void SVFIR2ItvExeState::translateBinary(const BinaryOPStmt *binary)
536
526
  u32_t op0 = binary->getOpVarID(0);
537
527
  u32_t op1 = binary->getOpVarID(1);
538
528
  u32_t res = binary->getResID();
539
- if (!inVarToIValTable(op0)) _es[op0] = IntervalValue::top();
540
- if (!inVarToIValTable(op1)) _es[op1] = IntervalValue::top();
541
- if (inVarToIValTable(op0) && inVarToIValTable(op1))
529
+ if (!inVarToValTable(op0)) _es[op0] = IntervalValue::top();
530
+ if (!inVarToValTable(op1)) _es[op1] = IntervalValue::top();
531
+ if (inVarToValTable(op0) && inVarToValTable(op1))
542
532
  {
543
533
  IntervalValue &lhs = _es[op0], &rhs = _es[op1];
544
534
  IntervalValue resVal;
@@ -598,7 +588,7 @@ void SVFIR2ItvExeState::translateCmp(const CmpStmt *cmp)
598
588
  u32_t op0 = cmp->getOpVarID(0);
599
589
  u32_t op1 = cmp->getOpVarID(1);
600
590
  u32_t res = cmp->getResID();
601
- if (inVarToIValTable(op0) && inVarToIValTable(op1))
591
+ if (inVarToValTable(op0) && inVarToValTable(op1))
602
592
  {
603
593
  IntervalValue resVal;
604
594
  IntervalValue &lhs = _es[op0], &rhs = _es[op1];
@@ -655,7 +645,7 @@ void SVFIR2ItvExeState::translateCmp(const CmpStmt *cmp)
655
645
  else if (inVarToAddrsTable(op0) && inVarToAddrsTable(op1))
656
646
  {
657
647
  IntervalValue resVal;
658
- VAddrs &lhs = getVAddrs(op0), &rhs = getVAddrs(op1);
648
+ Addrs &lhs = getAddrs(op0), &rhs = getAddrs(op1);
659
649
  assert(!lhs.empty() && !rhs.empty() && "empty address?");
660
650
  auto predicate = cmp->getPredicate();
661
651
  switch (predicate)
@@ -783,30 +773,26 @@ void SVFIR2ItvExeState::translateLoad(const LoadStmt *load)
783
773
  u32_t lhs = load->getLHSVarID();
784
774
  if (inVarToAddrsTable(rhs))
785
775
  {
786
- VAddrs &addrs = getVAddrs(rhs);
776
+ Addrs &addrs = getAddrs(rhs);
787
777
  assert(!addrs.empty());
788
778
  IntervalValue rhsItv = IntervalValue::bottom();
789
779
  AddressValue rhsAddr;
790
- bool isItv = false, isAddr = false;
780
+ bool isVal = false, isAddr = false;
791
781
  for (const auto &addr: addrs)
792
782
  {
793
783
  u32_t objId = getInternalID(addr);
794
- if (inLocToIValTable(objId))
784
+ if (inLocToValTable(objId))
795
785
  {
796
786
  rhsItv.join_with(_es.load(addr));
797
- isItv = true;
787
+ isVal = true;
798
788
  }
799
789
  else if (inLocToAddrsTable(objId))
800
790
  {
801
- rhsAddr.join_with(_es.loadVAddrs(addr));
791
+ rhsAddr.join_with(_es.loadAddrs(addr));
802
792
  isAddr = true;
803
793
  }
804
- else
805
- {
806
- // rhs not in table
807
- }
808
794
  }
809
- if (isItv)
795
+ if (isVal)
810
796
  {
811
797
  // lhs var is an integer
812
798
  _es[lhs] = rhsItv;
@@ -814,11 +800,11 @@ void SVFIR2ItvExeState::translateLoad(const LoadStmt *load)
814
800
  else if (isAddr)
815
801
  {
816
802
  // lhs var is an address
817
- _es.getVAddrs(lhs) = rhsAddr;
803
+ _es.getAddrs(lhs) = rhsAddr;
818
804
  }
819
805
  else
820
806
  {
821
- // rhs not in table
807
+ // rhs not initialized, e.g., absence of a store before load
822
808
  }
823
809
  }
824
810
  }
@@ -829,10 +815,10 @@ void SVFIR2ItvExeState::translateStore(const StoreStmt *store)
829
815
  u32_t lhs = store->getLHSVarID();
830
816
  if (inVarToAddrsTable(lhs))
831
817
  {
832
- if (inVarToIValTable(rhs))
818
+ if (inVarToValTable(rhs))
833
819
  {
834
- assert(!getVAddrs(lhs).empty());
835
- VAddrs &addrs = getVAddrs(lhs);
820
+ assert(!getAddrs(lhs).empty());
821
+ Addrs &addrs = getAddrs(lhs);
836
822
  for (const auto &addr: addrs)
837
823
  {
838
824
  _es.store(addr, _es[rhs]);
@@ -840,12 +826,12 @@ void SVFIR2ItvExeState::translateStore(const StoreStmt *store)
840
826
  }
841
827
  else if (inVarToAddrsTable(rhs))
842
828
  {
843
- assert(!getVAddrs(lhs).empty());
844
- VAddrs &addrs = getVAddrs(lhs);
829
+ assert(!getAddrs(lhs).empty());
830
+ Addrs &addrs = getAddrs(lhs);
845
831
  for (const auto &addr: addrs)
846
832
  {
847
- assert(!getVAddrs(rhs).empty());
848
- _es.storeVAddrs(addr, getVAddrs(rhs));
833
+ assert(!getAddrs(rhs).empty());
834
+ _es.storeAddrs(addr, getAddrs(rhs));
849
835
  }
850
836
 
851
837
  }
@@ -862,14 +848,22 @@ void SVFIR2ItvExeState::translateCopy(const CopyStmt *copy)
862
848
  }
863
849
  else
864
850
  {
865
- if (inVarToIValTable(rhs))
851
+ if (inVarToValTable(rhs))
866
852
  {
867
853
  _es[lhs] = _es[rhs];
854
+ // if copy LHS is integerType(i8 i32 etc), value should be limited.
855
+ // this branch can handle bitcast from higher bits integer to
856
+ // lower bits integer. e.g. bitcast i32 to i8
857
+ if (copy->getLHSVar()->getType()->getKind() == SVFType::SVFIntegerTy)
858
+ {
859
+ _es[lhs].meet_with(
860
+ getRangeLimitFromType(copy->getLHSVar()->getType()));
861
+ }
868
862
  }
869
863
  else if (inVarToAddrsTable(rhs))
870
864
  {
871
- assert(!getVAddrs(rhs).empty());
872
- _es.getVAddrs(lhs) = getVAddrs(rhs);
865
+ assert(!getAddrs(rhs).empty());
866
+ _es.getAddrs(lhs) = getAddrs(rhs);
873
867
  }
874
868
  }
875
869
  }
@@ -879,15 +873,15 @@ void SVFIR2ItvExeState::translateGep(const GepStmt *gep)
879
873
  u32_t rhs = gep->getRHSVarID();
880
874
  u32_t lhs = gep->getLHSVarID();
881
875
  if (!inVarToAddrsTable(rhs)) return;
882
- assert(!getVAddrs(rhs).empty());
883
- VAddrs &rhsVal = getVAddrs(rhs);
876
+ assert(!getAddrs(rhs).empty());
877
+ Addrs &rhsVal = getAddrs(rhs);
884
878
  if (rhsVal.empty()) return;
885
879
  IntervalValue offsetPair = getItvOfFlattenedElemIndex(gep);
886
880
  if (!isVirtualMemAddress(*rhsVal.begin()))
887
881
  return;
888
882
  else
889
883
  {
890
- VAddrs gepAddrs;
884
+ Addrs gepAddrs;
891
885
  APOffset lb = offsetPair.lb().getNumeral() < Options::MaxFieldLimit()?
892
886
  offsetPair.lb().getNumeral(): Options::MaxFieldLimit();
893
887
  APOffset ub = offsetPair.ub().getNumeral() < Options::MaxFieldLimit()?
@@ -895,7 +889,7 @@ void SVFIR2ItvExeState::translateGep(const GepStmt *gep)
895
889
  for (APOffset i = lb; i <= ub; i++)
896
890
  gepAddrs.join_with(getGepObjAddress(rhs, i));
897
891
  if(gepAddrs.empty()) return;
898
- _es.getVAddrs(lhs) = gepAddrs;
892
+ _es.getAddrs(lhs) = gepAddrs;
899
893
  return;
900
894
  }
901
895
  }
@@ -906,7 +900,7 @@ void SVFIR2ItvExeState::translateSelect(const SelectStmt *select)
906
900
  u32_t tval = select->getTrueValue()->getId();
907
901
  u32_t fval = select->getFalseValue()->getId();
908
902
  u32_t cond = select->getCondition()->getId();
909
- if (inVarToIValTable(tval) && inVarToIValTable(fval) && inVarToIValTable(cond))
903
+ if (inVarToValTable(tval) && inVarToValTable(fval) && inVarToValTable(cond))
910
904
  {
911
905
  if (_es[cond].is_numeral())
912
906
  {
@@ -917,13 +911,13 @@ void SVFIR2ItvExeState::translateSelect(const SelectStmt *select)
917
911
  _es[res] = _es[cond];
918
912
  }
919
913
  }
920
- else if (inVarToAddrsTable(tval) && inVarToAddrsTable(fval) && inVarToIValTable(cond))
914
+ else if (inVarToAddrsTable(tval) && inVarToAddrsTable(fval) && inVarToValTable(cond))
921
915
  {
922
916
  if (_es[cond].is_numeral())
923
917
  {
924
- assert(!getVAddrs(fval).empty());
925
- assert(!getVAddrs(tval).empty());
926
- _es.getVAddrs(res) = _es[cond].is_zero() ? getVAddrs(fval) : getVAddrs(tval);
918
+ assert(!getAddrs(fval).empty());
919
+ assert(!getAddrs(tval).empty());
920
+ _es.getAddrs(res) = _es[cond].is_zero() ? getAddrs(fval) : getAddrs(tval);
927
921
  }
928
922
  }
929
923
  }
@@ -933,27 +927,23 @@ void SVFIR2ItvExeState::translatePhi(const PhiStmt *phi)
933
927
  u32_t res = phi->getResID();
934
928
  IntervalValue rhsItv = IntervalValue::bottom();
935
929
  AddressValue rhsAddr;
936
- bool isItv = false, isAddr = false;
930
+ bool isVal = false, isAddr = false;
937
931
  for (u32_t i = 0; i < phi->getOpVarNum(); i++)
938
932
  {
939
933
  NodeID curId = phi->getOpVarID(i);
940
- if (inVarToIValTable(curId))
934
+ if (inVarToValTable(curId))
941
935
  {
942
936
  rhsItv.join_with(_es[curId]);
943
- isItv = true;
937
+ isVal = true;
944
938
  }
945
939
  else if (inVarToAddrsTable(curId))
946
940
  {
947
- assert(!getVAddrs(curId).empty());
948
- rhsAddr.join_with(getVAddrs(curId));
941
+ assert(!getAddrs(curId).empty());
942
+ rhsAddr.join_with(getAddrs(curId));
949
943
  isAddr = true;
950
944
  }
951
- else
952
- {
953
- // rhs not in the table
954
- }
955
945
  }
956
- if (isItv)
946
+ if (isVal)
957
947
  {
958
948
  // res var is an integer
959
949
  _es[res] = rhsItv;
@@ -961,11 +951,7 @@ void SVFIR2ItvExeState::translatePhi(const PhiStmt *phi)
961
951
  else if (isAddr)
962
952
  {
963
953
  // res var is an address
964
- _es.getVAddrs(res) = rhsAddr;
965
- }
966
- else
967
- {
968
- // rhs not in table
954
+ _es.getAddrs(res) = rhsAddr;
969
955
  }
970
956
  }
971
957
 
@@ -974,14 +960,14 @@ void SVFIR2ItvExeState::translateCall(const CallPE *callPE)
974
960
  {
975
961
  NodeID lhs = callPE->getLHSVarID();
976
962
  NodeID rhs = callPE->getRHSVarID();
977
- if (inVarToIValTable(rhs))
963
+ if (inVarToValTable(rhs))
978
964
  {
979
965
  _es[lhs] = _es[rhs];
980
966
  }
981
967
  else if (inVarToAddrsTable(rhs))
982
968
  {
983
- assert(!getVAddrs(rhs).empty());
984
- _es.getVAddrs(lhs) = getVAddrs(rhs);
969
+ assert(!getAddrs(rhs).empty());
970
+ _es.getAddrs(lhs) = getAddrs(rhs);
985
971
  }
986
972
  }
987
973
 
@@ -989,13 +975,13 @@ void SVFIR2ItvExeState::translateRet(const RetPE *retPE)
989
975
  {
990
976
  NodeID lhs = retPE->getLHSVarID();
991
977
  NodeID rhs = retPE->getRHSVarID();
992
- if (inVarToIValTable(rhs))
978
+ if (inVarToValTable(rhs))
993
979
  {
994
980
  _es[lhs] = _es[rhs];
995
981
  }
996
982
  else if (inVarToAddrsTable(rhs))
997
983
  {
998
- assert(!getVAddrs(rhs).empty());
999
- _es.getVAddrs(lhs) = getVAddrs(rhs);
984
+ assert(!getAddrs(rhs).empty());
985
+ _es.getAddrs(lhs) = getAddrs(rhs);
1000
986
  }
1001
987
  }