svf-tools 1.0.331 → 1.0.335

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 (293) hide show
  1. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +2 -2
  2. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +4 -4
  3. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +3 -3
  4. package/SVF-doxygen/html/html/CSC_8cpp_source.html +2 -2
  5. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +3 -3
  6. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +17 -8
  7. package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
  8. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +2 -2
  9. package/SVF-doxygen/html/html/DCHG_8cpp_source.html +2 -2
  10. package/SVF-doxygen/html/html/DCHG_8h_source.html +5 -4
  11. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +2 -2
  12. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +1 -1
  13. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  14. package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +3 -3
  15. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +1 -1
  16. package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +3 -3
  17. package/SVF-doxygen/html/html/ICFGNode_8h_source.html +3 -3
  18. package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +4 -4
  19. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +5 -5
  20. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +1 -1
  21. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
  22. package/SVF-doxygen/html/html/LocationSet_8h_source.html +2 -2
  23. package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +2 -2
  24. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +6 -6
  25. package/SVF-doxygen/html/html/MemRegion_8h_source.html +2 -2
  26. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +2 -2
  27. package/SVF-doxygen/html/html/MemSSA_8h_source.html +2 -2
  28. package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
  29. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +3 -3
  30. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +1 -1
  31. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +3 -3
  32. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
  33. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +3 -3
  34. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +2 -2
  35. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +7 -7
  36. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +18 -18
  37. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +37 -37
  38. package/SVF-doxygen/html/html/SVFIR_8h_source.html +27 -27
  39. package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
  40. package/SVF-doxygen/html/html/SVFStatements_8h.html +14 -12
  41. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +131 -123
  42. package/SVF-doxygen/html/html/SVFVariables_8cpp_source.html +18 -18
  43. package/SVF-doxygen/html/html/SVFVariables_8h_source.html +132 -129
  44. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +3 -3
  45. package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +2 -2
  46. package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +1 -1
  47. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +10 -10
  48. package/SVF-doxygen/html/html/VFGNode_8h_source.html +13 -13
  49. package/SVF-doxygen/html/html/VFG_8cpp_source.html +25 -25
  50. package/SVF-doxygen/html/html/VFG_8h_source.html +18 -17
  51. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
  52. package/SVF-doxygen/html/html/annotated.html +271 -270
  53. package/SVF-doxygen/html/html/classSVF_1_1AddrStmt-members.html +16 -10
  54. package/SVF-doxygen/html/html/classSVF_1_1AddrStmt.html +36 -14
  55. package/SVF-doxygen/html/html/classSVF_1_1AddrStmt.png +0 -0
  56. package/SVF-doxygen/html/html/classSVF_1_1AliasDDAClient.html +2 -2
  57. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
  58. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +2 -2
  59. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +3 -3
  60. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +4 -4
  61. package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode.html +2 -2
  62. package/SVF-doxygen/html/html/classSVF_1_1AssignStmt-members.html +145 -0
  63. package/SVF-doxygen/html/html/classSVF_1_1AssignStmt.html +770 -0
  64. package/SVF-doxygen/html/html/classSVF_1_1AssignStmt.png +0 -0
  65. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +4 -4
  66. package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt-members.html +7 -11
  67. package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +19 -138
  68. package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +3 -3
  69. package/SVF-doxygen/html/html/classSVF_1_1BranchStmt-members.html +2 -2
  70. package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +39 -39
  71. package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +3 -3
  72. package/SVF-doxygen/html/html/classSVF_1_1CSC.html +2 -2
  73. package/SVF-doxygen/html/html/classSVF_1_1CallBlockNode-members.html +4 -4
  74. package/SVF-doxygen/html/html/classSVF_1_1CallBlockNode.html +4 -4
  75. package/SVF-doxygen/html/html/classSVF_1_1CallPE-members.html +19 -13
  76. package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +43 -21
  77. package/SVF-doxygen/html/html/classSVF_1_1CallPE.png +0 -0
  78. package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar-members.html +37 -40
  79. package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar.html +14 -22
  80. package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar-members.html +37 -40
  81. package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar.html +15 -23
  82. package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar-members.html +48 -51
  83. package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.html +18 -26
  84. package/SVF-doxygen/html/html/classSVF_1_1CmpStmt-members.html +7 -11
  85. package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +20 -139
  86. package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +3 -3
  87. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +18 -11
  88. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +2 -2
  89. package/SVF-doxygen/html/html/classSVF_1_1CopyStmt-members.html +16 -10
  90. package/SVF-doxygen/html/html/classSVF_1_1CopyStmt.html +36 -14
  91. package/SVF-doxygen/html/html/classSVF_1_1CopyStmt.png +0 -0
  92. package/SVF-doxygen/html/html/classSVF_1_1DCHEdge-members.html +3 -3
  93. package/SVF-doxygen/html/html/classSVF_1_1DCHEdge.html +19 -19
  94. package/SVF-doxygen/html/html/classSVF_1_1DCHGraph.html +2 -2
  95. package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar-members.html +37 -40
  96. package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar.html +16 -24
  97. package/SVF-doxygen/html/html/classSVF_1_1DummyValVar-members.html +36 -39
  98. package/SVF-doxygen/html/html/classSVF_1_1DummyValVar.html +15 -23
  99. package/SVF-doxygen/html/html/classSVF_1_1FIObjVar-members.html +37 -40
  100. package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +21 -29
  101. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +1 -1
  102. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +1 -1
  103. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
  104. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +5 -5
  105. package/SVF-doxygen/html/html/classSVF_1_1FunEntryBlockNode-members.html +2 -2
  106. package/SVF-doxygen/html/html/classSVF_1_1FunEntryBlockNode.html +4 -4
  107. package/SVF-doxygen/html/html/classSVF_1_1FunExitBlockNode-members.html +2 -2
  108. package/SVF-doxygen/html/html/classSVF_1_1FunExitBlockNode.html +4 -4
  109. package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.html +3 -9
  110. package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.png +0 -0
  111. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar-members.html +49 -52
  112. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +53 -61
  113. package/SVF-doxygen/html/html/classSVF_1_1GepStmt-members.html +23 -15
  114. package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +166 -69
  115. package/SVF-doxygen/html/html/classSVF_1_1GepStmt.png +0 -0
  116. package/SVF-doxygen/html/html/classSVF_1_1GepValVar-members.html +45 -48
  117. package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +40 -48
  118. package/SVF-doxygen/html/html/classSVF_1_1GlobalBlockNode-members.html +2 -2
  119. package/SVF-doxygen/html/html/classSVF_1_1GlobalBlockNode.html +4 -4
  120. package/SVF-doxygen/html/html/classSVF_1_1ICFGNode-members.html +2 -2
  121. package/SVF-doxygen/html/html/classSVF_1_1ICFGNode.html +10 -10
  122. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +12 -12
  123. package/SVF-doxygen/html/html/classSVF_1_1IRAnnotator.html +1 -1
  124. package/SVF-doxygen/html/html/classSVF_1_1IRGraph.html +2 -2
  125. package/SVF-doxygen/html/html/classSVF_1_1InterBlockNode-members.html +2 -2
  126. package/SVF-doxygen/html/html/classSVF_1_1InterBlockNode.html +4 -4
  127. package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode.html +1 -1
  128. package/SVF-doxygen/html/html/classSVF_1_1IntraBlockNode-members.html +2 -2
  129. package/SVF-doxygen/html/html/classSVF_1_1IntraBlockNode.html +4 -4
  130. package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode.html +2 -2
  131. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +1 -1
  132. package/SVF-doxygen/html/html/classSVF_1_1LoadStmt-members.html +16 -10
  133. package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +36 -14
  134. package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.png +0 -0
  135. package/SVF-doxygen/html/html/classSVF_1_1LocationSet-members.html +1 -1
  136. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +12 -12
  137. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +10 -10
  138. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +6 -6
  139. package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt-members.html +36 -29
  140. package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +250 -31
  141. package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge-members.html +2 -2
  142. package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge.html +14 -14
  143. package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt-members.html +51 -46
  144. package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.html +53 -93
  145. package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.png +0 -0
  146. package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode.html +1 -1
  147. package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +1 -1
  148. package/SVF-doxygen/html/html/classSVF_1_1ObjVar-members.html +37 -40
  149. package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +34 -42
  150. package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +3 -3
  151. package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +4 -4
  152. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +1 -1
  153. package/SVF-doxygen/html/html/classSVF_1_1PhiStmt-members.html +5 -9
  154. package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +18 -137
  155. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +7 -7
  156. package/SVF-doxygen/html/html/classSVF_1_1RetBlockNode-members.html +2 -2
  157. package/SVF-doxygen/html/html/classSVF_1_1RetBlockNode.html +4 -4
  158. package/SVF-doxygen/html/html/classSVF_1_1RetPE-members.html +16 -10
  159. package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +43 -21
  160. package/SVF-doxygen/html/html/classSVF_1_1RetPE.png +0 -0
  161. package/SVF-doxygen/html/html/classSVF_1_1RetPN-members.html +36 -39
  162. package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +16 -24
  163. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +2 -2
  164. package/SVF-doxygen/html/html/classSVF_1_1SVFIR-members.html +1 -1
  165. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +61 -53
  166. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +1 -1
  167. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +24 -18
  168. package/SVF-doxygen/html/html/classSVF_1_1SVFStmt.html +12 -8
  169. package/SVF-doxygen/html/html/classSVF_1_1SVFStmt.png +0 -0
  170. package/SVF-doxygen/html/html/classSVF_1_1SVFVar-members.html +28 -25
  171. package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +185 -107
  172. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +3 -3
  173. package/SVF-doxygen/html/html/classSVF_1_1StoreStmt-members.html +16 -10
  174. package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +36 -14
  175. package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.png +0 -0
  176. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +2 -2
  177. package/SVF-doxygen/html/html/classSVF_1_1TDForkPE-members.html +18 -12
  178. package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +35 -13
  179. package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.png +0 -0
  180. package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE-members.html +17 -11
  181. package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +35 -13
  182. package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.png +0 -0
  183. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +1 -1
  184. package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +17 -17
  185. package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt-members.html +2 -2
  186. package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +32 -32
  187. package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +2 -2
  188. package/SVF-doxygen/html/html/classSVF_1_1VFG.html +34 -34
  189. package/SVF-doxygen/html/html/classSVF_1_1ValVar-members.html +36 -39
  190. package/SVF-doxygen/html/html/classSVF_1_1ValVar.html +19 -27
  191. package/SVF-doxygen/html/html/classSVF_1_1VarArgPN-members.html +36 -39
  192. package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +16 -24
  193. package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt-members.html +52 -45
  194. package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt.html +56 -25
  195. package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt.png +0 -0
  196. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +1 -1
  197. package/SVF-doxygen/html/html/classes.html +91 -93
  198. package/SVF-doxygen/html/html/functions_a.html +18 -15
  199. package/SVF-doxygen/html/html/functions_c.html +16 -15
  200. package/SVF-doxygen/html/html/functions_func.html +18 -15
  201. package/SVF-doxygen/html/html/functions_func_c.html +24 -23
  202. package/SVF-doxygen/html/html/functions_func_g.html +45 -37
  203. package/SVF-doxygen/html/html/functions_func_o.html +5 -3
  204. package/SVF-doxygen/html/html/functions_func_s.html +1 -1
  205. package/SVF-doxygen/html/html/functions_func_t.html +1 -0
  206. package/SVF-doxygen/html/html/functions_g.html +46 -38
  207. package/SVF-doxygen/html/html/functions_i.html +7 -6
  208. package/SVF-doxygen/html/html/functions_l.html +4 -4
  209. package/SVF-doxygen/html/html/functions_m.html +1 -1
  210. package/SVF-doxygen/html/html/functions_o.html +12 -10
  211. package/SVF-doxygen/html/html/functions_p.html +12 -8
  212. package/SVF-doxygen/html/html/functions_rela.html +56 -1
  213. package/SVF-doxygen/html/html/functions_s.html +14 -15
  214. package/SVF-doxygen/html/html/functions_t.html +9 -10
  215. package/SVF-doxygen/html/html/functions_v.html +8 -7
  216. package/SVF-doxygen/html/html/functions_vars_l.html +1 -1
  217. package/SVF-doxygen/html/html/functions_vars_o.html +1 -1
  218. package/SVF-doxygen/html/html/hierarchy.html +17 -16
  219. package/SVF-doxygen/html/html/menudata.js +13 -1
  220. package/SVF-doxygen/html/html/namespaceSVF.html +2 -0
  221. package/SVF-doxygen/html/html/search/all_1.js +5 -4
  222. package/SVF-doxygen/html/html/search/all_10.js +6 -6
  223. package/SVF-doxygen/html/html/search/all_13.js +12 -12
  224. package/SVF-doxygen/html/html/search/all_14.js +7 -7
  225. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  226. package/SVF-doxygen/html/html/search/all_16.js +4 -4
  227. package/SVF-doxygen/html/html/search/all_3.js +2 -2
  228. package/SVF-doxygen/html/html/search/all_7.js +12 -8
  229. package/SVF-doxygen/html/html/search/all_9.js +1 -1
  230. package/SVF-doxygen/html/html/search/all_c.js +2 -2
  231. package/SVF-doxygen/html/html/search/all_d.js +3 -3
  232. package/SVF-doxygen/html/html/search/all_e.js +2 -2
  233. package/SVF-doxygen/html/html/search/all_f.js +3 -3
  234. package/SVF-doxygen/html/html/search/classes_0.js +2 -1
  235. package/SVF-doxygen/html/html/search/functions_0.js +5 -4
  236. package/SVF-doxygen/html/html/search/functions_10.js +2 -2
  237. package/SVF-doxygen/html/html/search/functions_11.js +1 -1
  238. package/SVF-doxygen/html/html/search/functions_13.js +1 -1
  239. package/SVF-doxygen/html/html/search/functions_2.js +1 -1
  240. package/SVF-doxygen/html/html/search/functions_6.js +12 -8
  241. package/SVF-doxygen/html/html/search/functions_b.js +1 -1
  242. package/SVF-doxygen/html/html/search/functions_d.js +1 -1
  243. package/SVF-doxygen/html/html/search/related_4.js +1 -2
  244. package/SVF-doxygen/html/html/search/related_5.js +2 -1
  245. package/SVF-doxygen/html/html/search/related_6.js +1 -4
  246. package/SVF-doxygen/html/html/search/related_7.js +4 -1
  247. package/SVF-doxygen/html/html/search/related_8.js +1 -5
  248. package/SVF-doxygen/html/html/search/related_9.js +6 -2
  249. package/SVF-doxygen/html/html/search/related_a.js +2 -1
  250. package/SVF-doxygen/html/html/search/related_b.html +26 -0
  251. package/SVF-doxygen/html/html/search/related_b.js +5 -0
  252. package/SVF-doxygen/html/html/search/searchdata.js +1 -1
  253. package/SVF-doxygen/html/html/search/variables_14.js +3 -3
  254. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  255. package/SVF-doxygen/html/html/search/variables_c.js +1 -1
  256. package/SVF-doxygen/html/html/search/variables_e.js +2 -2
  257. package/SVF-doxygen/html/html/search/variables_f.js +1 -1
  258. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +1 -1
  259. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +3 -3
  260. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +1 -1
  261. package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1LocationSet_01_4.html +2 -2
  262. package/SVF-doxygen/html/html/svf-ex_8cpp.html +2 -2
  263. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +2 -2
  264. package/images/svf-stat.pdf +0 -0
  265. package/include/Graphs/ConsG.h +1 -1
  266. package/include/Graphs/ConsGEdge.h +2 -2
  267. package/include/Graphs/ICFGNode.h +2 -2
  268. package/include/Graphs/VFG.h +4 -4
  269. package/include/MemoryModel/LocationSet.h +3 -3
  270. package/include/MemoryModel/SVFIR.h +1 -1
  271. package/include/MemoryModel/SVFStatements.h +378 -308
  272. package/include/MemoryModel/SVFVariables.h +31 -30
  273. package/include/SVF-FE/DCHG.h +3 -3
  274. package/include/SVF-FE/SVFIRBuilder.h +2 -2
  275. package/include/Util/IRAnnotator.h +1 -1
  276. package/lib/Graphs/ConsG.cpp +25 -25
  277. package/lib/Graphs/VFG.cpp +10 -10
  278. package/lib/MSSA/MemRegion.cpp +5 -5
  279. package/lib/MemoryModel/LocationSet.cpp +2 -2
  280. package/lib/MemoryModel/PAGBuilderFromFile.cpp +1 -1
  281. package/lib/MemoryModel/PointerAnalysisImpl.cpp +1 -1
  282. package/lib/MemoryModel/SVFIR.cpp +9 -9
  283. package/lib/MemoryModel/SVFStatements.cpp +11 -11
  284. package/lib/MemoryModel/SVFVariables.cpp +2 -2
  285. package/lib/MemoryModel/SymbolTableInfo.cpp +2 -2
  286. package/lib/SVF-FE/DCHG.cpp +1 -1
  287. package/lib/SVF-FE/Graph2Json.cpp +1 -1
  288. package/lib/SVF-FE/SVFIRBuilder.cpp +4 -4
  289. package/lib/Util/TypeBasedHeapCloning.cpp +5 -5
  290. package/lib/WPA/AndersenSFR.cpp +2 -2
  291. package/lib/WPA/CSC.cpp +2 -2
  292. package/lib/WPA/FlowSensitiveTBHC.cpp +3 -3
  293. package/package.json +1 -1
@@ -190,16 +190,89 @@ private:
190
190
  static u64_t multiOpndLabelCounter; ///< MultiOpndStmt counter
191
191
  };
192
192
 
193
+ /*
194
+ Parent class of Addr, Copy, Store, Load, Call, Ret, NormalGep, VariantGep, ThreadFork, ThreadJoin
195
+ connecting RHS expression and LHS expression with an assignment (e.g., LHSExpr = RHSExpr)
196
+ Only one operand on the right handside of an assignment
197
+ */
198
+ class AssignStmt : public SVFStmt{
199
+
200
+ private:
201
+ AssignStmt(); ///< place holder
202
+ AssignStmt(const AssignStmt &); ///< place holder
203
+ void operator=(const AssignStmt &); ///< place holder
204
+ SVFVar* getSrcNode(); ///< not allowed, use getRHSVar() instead
205
+ SVFVar* getDstNode(); ///< not allowed, use getLHSVar() instead
206
+ NodeID getSrcID(); ///< not allowed, use getRHSVarID() instead
207
+ NodeID getDstID(); ///< not allowed, use getLHSVarID() instead
208
+
209
+ protected:
210
+ /// constructor
211
+ AssignStmt(SVFVar* s, SVFVar* d, GEdgeFlag k) : SVFStmt(s,d,k)
212
+ {
213
+ }
214
+
215
+ public:
216
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
217
+ //@{
218
+ static inline bool classof(const AssignStmt *)
219
+ {
220
+ return true;
221
+ }
222
+ static inline bool classof(const SVFStmt *edge)
223
+ {
224
+ return edge->getEdgeKind() == SVFStmt::Addr ||
225
+ edge->getEdgeKind() == SVFStmt::Copy ||
226
+ edge->getEdgeKind() == SVFStmt::Store ||
227
+ edge->getEdgeKind() == SVFStmt::Load ||
228
+ edge->getEdgeKind() == SVFStmt::Call ||
229
+ edge->getEdgeKind() == SVFStmt::Ret ||
230
+ edge->getEdgeKind() == SVFStmt::NormalGep ||
231
+ edge->getEdgeKind() == SVFStmt::VariantGep ||
232
+ edge->getEdgeKind() == SVFStmt::ThreadFork ||
233
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
234
+ }
235
+ static inline bool classof(const GenericPAGEdgeTy *edge)
236
+ {
237
+ return edge->getEdgeKind() == SVFStmt::Addr ||
238
+ edge->getEdgeKind() == SVFStmt::Copy ||
239
+ edge->getEdgeKind() == SVFStmt::Store ||
240
+ edge->getEdgeKind() == SVFStmt::Load ||
241
+ edge->getEdgeKind() == SVFStmt::Call ||
242
+ edge->getEdgeKind() == SVFStmt::Ret ||
243
+ edge->getEdgeKind() == SVFStmt::NormalGep ||
244
+ edge->getEdgeKind() == SVFStmt::VariantGep ||
245
+ edge->getEdgeKind() == SVFStmt::ThreadFork ||
246
+ edge->getEdgeKind() == SVFStmt::ThreadJoin;
247
+ }
248
+ //@}
249
+
250
+ inline SVFVar* getRHSVar() const {
251
+ return SVFStmt::getSrcNode();
252
+ }
253
+ inline SVFVar* getLHSVar() const {
254
+ return SVFStmt::getDstNode();
255
+ }
256
+ inline NodeID getRHSVarID() const {
257
+ return SVFStmt::getSrcID();
258
+ }
259
+ inline NodeID getLHSVarID() const {
260
+ return SVFStmt::getDstID();
261
+ }
262
+
263
+ virtual const std::string toString() const = 0;
264
+ };
193
265
 
194
266
  /*!
195
267
  * Address statement (memory allocations)
196
268
  */
197
- class AddrStmt: public SVFStmt
269
+ class AddrStmt: public AssignStmt
198
270
  {
199
271
  private:
200
272
  AddrStmt(); ///< place holder
201
273
  AddrStmt(const AddrStmt &); ///< place holder
202
274
  void operator=(const AddrStmt &); ///< place holder
275
+
203
276
  public:
204
277
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
205
278
  //@{
@@ -218,7 +291,7 @@ public:
218
291
  //@}
219
292
 
220
293
  /// constructor
221
- AddrStmt(SVFVar* s, SVFVar* d) : SVFStmt(s,d,SVFStmt::Addr)
294
+ AddrStmt(SVFVar* s, SVFVar* d) : AssignStmt(s,d,SVFStmt::Addr)
222
295
  {
223
296
  }
224
297
 
@@ -229,7 +302,7 @@ public:
229
302
  /*!
230
303
  * Copy statements (simple assignment and casting)
231
304
  */
232
- class CopyStmt: public SVFStmt
305
+ class CopyStmt: public AssignStmt
233
306
  {
234
307
  private:
235
308
  CopyStmt(); ///< place holder
@@ -253,645 +326,642 @@ public:
253
326
  //@}
254
327
 
255
328
  /// constructor
256
- CopyStmt(SVFVar* s, SVFVar* d) : SVFStmt(s,d,SVFStmt::Copy)
329
+ CopyStmt(SVFVar* s, SVFVar* d) : AssignStmt(s,d,SVFStmt::Copy)
257
330
  {
258
331
  }
259
332
 
260
333
  virtual const std::string toString() const override;
261
334
  };
262
335
 
263
- /*
264
- * Program statements with multiple operands including BinaryOPStmt, CmpStmt and PhiStmt
265
- */
266
- class MultiOpndStmt : public SVFStmt{
267
- public:
268
- typedef std::vector<SVFVar*> OPVars;
269
- protected:
270
- OPVars opVars;
336
+ /*!
337
+ * Store statement
338
+ */
339
+ class StoreStmt: public AssignStmt
340
+ {
341
+ private:
342
+ StoreStmt(); ///< place holder
343
+ StoreStmt(const StoreStmt &); ///< place holder
344
+ void operator=(const StoreStmt &); ///< place holder
345
+
271
346
  public:
272
- /// Constructor, only used by subclassess but not external users
273
- MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k): SVFStmt(opnds.at(0), r, k), opVars(opnds)
274
- {
275
- }
276
347
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
277
348
  //@{
278
- static inline bool classof(const MultiOpndStmt *)
349
+ static inline bool classof(const StoreStmt *)
279
350
  {
280
351
  return true;
281
352
  }
282
- static inline bool classof(const SVFStmt *node)
353
+ static inline bool classof(const SVFStmt *edge)
283
354
  {
284
- return node->getEdgeKind() == Phi ||
285
- node->getEdgeKind() == BinaryOp ||
286
- node->getEdgeKind() == Cmp;
355
+ return edge->getEdgeKind() == SVFStmt::Store;
287
356
  }
288
- static inline bool classof(const GenericPAGEdgeTy *node)
357
+ static inline bool classof(const GenericPAGEdgeTy *edge)
289
358
  {
290
- return node->getEdgeKind() == Phi ||
291
- node->getEdgeKind() == BinaryOp ||
292
- node->getEdgeKind() == Cmp;
359
+ return edge->getEdgeKind() == SVFStmt::Store;
293
360
  }
294
361
  //@}
295
- /// Operands and result at a BinaryNode e.g., p = q + r, `p` is resVar and `r` is OpVar
296
- //@{
297
- /// Operand SVFVars
298
- inline const SVFVar* getOpVar(u32_t pos) const
299
- {
300
- return opVars.at(pos);
301
- }
302
- /// Result SVFVar
303
- inline const SVFVar* getRes() const
304
- {
305
- return getDstNode();
306
- }
307
-
308
- NodeID getOpVarID(u32_t pos) const;
309
- NodeID getResID() const;
310
362
 
311
- inline u32_t getOpVarNum() const
312
- {
313
- return opVars.size();
314
- }
315
- inline const OPVars& getOpndVars() const{
316
- return opVars;
317
- }
318
- inline OPVars::const_iterator opVarBegin() const
319
- {
320
- return opVars.begin();
321
- }
322
- inline OPVars::const_iterator opVerEnd() const
363
+ /// constructor
364
+ StoreStmt(SVFVar* s, SVFVar* d, const IntraBlockNode* st) :
365
+ AssignStmt(s, d, makeEdgeFlagWithStoreInst(SVFStmt::Store, st))
323
366
  {
324
- return opVars.end();
325
367
  }
326
- //@}
368
+
369
+ virtual const std::string toString() const override;
327
370
  };
328
371
 
372
+
329
373
  /*!
330
- * Phi statement (e.g., p = phi(q,r) which receives values from variables q and r from different paths)
331
- * it is typically at a joint point of the control-flow graph
374
+ * Load statement
332
375
  */
333
- class PhiStmt: public MultiOpndStmt
376
+ class LoadStmt: public AssignStmt
334
377
  {
335
378
  private:
336
- PhiStmt(); ///< place holder
337
- PhiStmt(const PhiStmt &); ///< place holder
338
- void operator=(const PhiStmt &); ///< place holder
339
- SVFVar* getSrcNode(); ///< place holder, not allowed since this SVFStmt has multiple operands but not a single source
340
- SVFVar* getDstNode(); ///< place holder, use getRes() instead
341
- SVFVar* getSrcID(); ///< place holder, use getOpVarID(pos) instead
342
- SVFVar* getDstID(); ///< place holder, use getResID() instead
379
+ LoadStmt(); ///< place holder
380
+ LoadStmt(const LoadStmt &); ///< place holder
381
+ void operator=(const LoadStmt &); ///< place holder
343
382
 
344
383
  public:
345
384
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
346
385
  //@{
347
- static inline bool classof(const PhiStmt *)
386
+ static inline bool classof(const LoadStmt *)
348
387
  {
349
388
  return true;
350
389
  }
351
390
  static inline bool classof(const SVFStmt *edge)
352
391
  {
353
- return edge->getEdgeKind() == SVFStmt::Phi;
354
- }
355
- static inline bool classof(const MultiOpndStmt *edge)
356
- {
357
- return edge->getEdgeKind() == SVFStmt::Phi;
392
+ return edge->getEdgeKind() == SVFStmt::Load;
358
393
  }
359
394
  static inline bool classof(const GenericPAGEdgeTy *edge)
360
395
  {
361
- return edge->getEdgeKind() == SVFStmt::Phi;
396
+ return edge->getEdgeKind() == SVFStmt::Load;
362
397
  }
363
398
  //@}
364
399
 
365
400
  /// constructor
366
- PhiStmt(SVFVar* s, const OPVars& opnds) : MultiOpndStmt(s,opnds,SVFStmt::Phi)
401
+ LoadStmt(SVFVar* s, SVFVar* d) : AssignStmt(s,d,SVFStmt::Load)
367
402
  {
368
403
  }
369
- void addOpVar(SVFVar* op){
370
- opVars.push_back(op);
371
- }
404
+
372
405
  virtual const std::string toString() const override;
373
406
  };
374
407
 
375
408
 
376
409
  /*!
377
- * Comparison statement
410
+ * Gep statement for struct field access, array access and pointer arithmetic
378
411
  */
379
- class CmpStmt: public MultiOpndStmt
412
+ class GepStmt: public AssignStmt
380
413
  {
381
414
  private:
382
- CmpStmt(); ///< place holder
383
- CmpStmt(const CmpStmt &); ///< place holder
384
- void operator=(const CmpStmt &); ///< place holder
385
- SVFVar* getSrcNode(); ///< place holder, not allowed since this SVFStmt has multiple operands but not a single source
386
- SVFVar* getDstNode(); ///< place holder, use getRes() instead
387
- SVFVar* getSrcID(); ///< place holder, use getOpVarID(pos) instead
388
- SVFVar* getDstID(); ///< place holder, use getResID() instead
415
+ GepStmt(); ///< place holder
416
+ GepStmt(const GepStmt &); ///< place holder
417
+ void operator=(const GepStmt &); ///< place holder
418
+
419
+ LocationSet ls; ///< location set of the gep edge
389
420
 
390
- u32_t predicate;
391
421
  public:
392
422
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
393
423
  //@{
394
- static inline bool classof(const CmpStmt *)
424
+ static inline bool classof(const GepStmt *)
395
425
  {
396
426
  return true;
397
427
  }
398
428
  static inline bool classof(const SVFStmt *edge)
399
429
  {
400
- return edge->getEdgeKind() == SVFStmt::Cmp;
401
- }
402
- static inline bool classof(const MultiOpndStmt *edge)
403
- {
404
- return edge->getEdgeKind() == SVFStmt::Cmp;
430
+ return edge->getEdgeKind() == SVFStmt::NormalGep ||
431
+ edge->getEdgeKind() == SVFStmt::VariantGep;
405
432
  }
406
433
  static inline bool classof(const GenericPAGEdgeTy *edge)
407
434
  {
408
- return edge->getEdgeKind() == SVFStmt::Cmp;
435
+ return edge->getEdgeKind() == SVFStmt::NormalGep ||
436
+ edge->getEdgeKind() == SVFStmt::VariantGep;
409
437
  }
410
438
  //@}
411
439
 
412
- /// constructor
413
- CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,SVFStmt::Cmp), predicate(pre)
440
+ inline const LocationSet& getLocationSet() const
414
441
  {
442
+ return ls;
415
443
  }
416
444
 
417
- u32_t getPredicate() const
445
+ protected:
446
+ /// constructor
447
+ GepStmt(SVFVar* s, SVFVar* d, const LocationSet& l, PEDGEK k) : AssignStmt(s,d,k), ls(l)
418
448
  {
419
- return predicate;
420
449
  }
421
-
422
- virtual const std::string toString() const override;
450
+
451
+ virtual const std::string toString() const;
452
+
423
453
  };
424
454
 
425
455
 
426
456
  /*!
427
- * Binary statement
457
+ * Gep statement with a fixed field index for struct field access
428
458
  */
429
- class BinaryOPStmt: public MultiOpndStmt
459
+ class NormalGepStmt : public GepStmt
430
460
  {
431
461
  private:
432
- BinaryOPStmt(); ///< place holder
433
- BinaryOPStmt(const BinaryOPStmt &); ///< place holder
434
- void operator=(const BinaryOPStmt &); ///< place holder
435
- SVFVar* getSrcNode(); ///< place holder, not allowed since this SVFStmt has multiple operands but not a single source
436
- SVFVar* getDstNode(); ///< place holder, use getRes() instead
437
- SVFVar* getSrcID(); ///< place holder, use getOpVarID(pos) instead
438
- SVFVar* getDstID(); ///< place holder, use getResID() instead
439
-
440
- u32_t opcode;
462
+ NormalGepStmt(); ///< place holder
463
+ NormalGepStmt(const NormalGepStmt&); ///< place holder
464
+ void operator=(const NormalGepStmt&); ///< place holder
441
465
 
442
466
  public:
443
467
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
444
468
  //@{
445
- static inline bool classof(const BinaryOPStmt *)
469
+ static inline bool classof(const NormalGepStmt *)
446
470
  {
447
471
  return true;
448
472
  }
449
- static inline bool classof(const SVFStmt *edge)
473
+ static inline bool classof(const GepStmt *edge)
450
474
  {
451
- return edge->getEdgeKind() == SVFStmt::BinaryOp;
475
+ return edge->getEdgeKind() == SVFStmt::NormalGep;
452
476
  }
453
- static inline bool classof(const MultiOpndStmt *edge)
477
+ static inline bool classof(const SVFStmt *edge)
454
478
  {
455
- return edge->getEdgeKind() == SVFStmt::BinaryOp;
479
+ return edge->getEdgeKind() == SVFStmt::NormalGep;
456
480
  }
457
481
  static inline bool classof(const GenericPAGEdgeTy *edge)
458
482
  {
459
- return edge->getEdgeKind() == SVFStmt::BinaryOp;
483
+ return edge->getEdgeKind() == SVFStmt::NormalGep;
460
484
  }
461
485
  //@}
462
486
 
463
487
  /// constructor
464
- BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,SVFStmt::BinaryOp), opcode(oc)
465
- {
466
- }
488
+ NormalGepStmt(SVFVar* s, SVFVar* d, const LocationSet& l) : GepStmt(s,d,l, SVFStmt::NormalGep)
489
+ {}
467
490
 
468
- u32_t getOpcode() const
491
+ /// offset of the gep edge
492
+ inline u32_t getFieldOffset() const
469
493
  {
470
- return opcode;
494
+ return getLocationSet().accumulateConstantFieldIdx();
471
495
  }
472
496
 
473
497
  virtual const std::string toString() const override;
474
498
  };
475
499
 
476
500
  /*!
477
- * Unary statement
501
+ * Gep statement with a variant field index for struct field access
478
502
  */
479
- class UnaryOPStmt: public SVFStmt
503
+ class VariantGepStmt : public GepStmt
480
504
  {
481
505
  private:
482
- UnaryOPStmt(); ///< place holder
483
- UnaryOPStmt(const UnaryOPStmt &); ///< place holder
484
- void operator=(const UnaryOPStmt &); ///< place holder
485
- SVFVar* getSrcNode(); ///< place holder, use getOpVar() instead
486
- SVFVar* getDstNode(); ///< place holder, use getRes() instead
487
- SVFVar* getSrcID(); ///< place holder, use getOpVarID() instead
488
- SVFVar* getDstID(); ///< place holder, use getResID() instead
506
+ VariantGepStmt(); ///< place holder
507
+ VariantGepStmt(const VariantGepStmt&); ///< place holder
508
+ void operator=(const VariantGepStmt&); ///< place holder
489
509
 
490
- u32_t opcode;
491
510
  public:
492
511
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
493
512
  //@{
494
- static inline bool classof(const UnaryOPStmt *)
513
+ static inline bool classof(const VariantGepStmt *)
495
514
  {
496
515
  return true;
497
516
  }
517
+ static inline bool classof(const GepStmt *edge)
518
+ {
519
+ return edge->getEdgeKind() == SVFStmt::VariantGep;
520
+ }
498
521
  static inline bool classof(const SVFStmt *edge)
499
522
  {
500
- return edge->getEdgeKind() == SVFStmt::UnaryOp;
523
+ return edge->getEdgeKind() == SVFStmt::VariantGep;
501
524
  }
502
525
  static inline bool classof(const GenericPAGEdgeTy *edge)
503
526
  {
504
- return edge->getEdgeKind() == SVFStmt::UnaryOp;
527
+ return edge->getEdgeKind() == SVFStmt::VariantGep;
505
528
  }
506
529
  //@}
507
530
 
508
531
  /// constructor
509
- UnaryOPStmt(SVFVar* s, SVFVar* d, u32_t oc) : SVFStmt(s,d,SVFStmt::UnaryOp), opcode(oc)
510
- {
511
- }
512
-
513
- u32_t getOpcode() const
514
- {
515
- return opcode;
516
- }
517
- inline const SVFVar* getOpVar() const{
518
- return SVFStmt::getSrcNode();
519
- }
520
- inline const SVFVar* getRes() const{
521
- return SVFStmt::getDstNode();
522
- }
523
- NodeID getOpVarID() const;
524
- NodeID getResID() const;
532
+ VariantGepStmt(SVFVar* s, SVFVar* d, const LocationSet& l) : GepStmt(s,d,l, SVFStmt::VariantGep) {}
525
533
 
526
534
  virtual const std::string toString() const override;
535
+
527
536
  };
528
537
 
529
538
 
530
539
  /*!
531
- * Branch statements including if/else and switch
540
+ * Call
532
541
  */
533
- class BranchStmt: public SVFStmt
542
+ class CallPE: public AssignStmt
534
543
  {
535
544
  private:
536
- BranchStmt(); ///< place holder
537
- BranchStmt(const BranchStmt &); ///< place holder
538
- void operator=(const BranchStmt &); ///< place holder
539
- SVFVar* getSrcNode(); ///< place holder, not allowed
540
- SVFVar* getDstNode(); ///< place holder, not allowed
541
- SVFVar* getSrcID(); ///< place holder, not allowed
542
- SVFVar* getDstID(); ///< place holder, not allowed
545
+ CallPE(); ///< place holder
546
+ CallPE(const CallPE &); ///< place holder
547
+ void operator=(const CallPE &); ///< place holder
543
548
 
544
- std::vector<const ICFGNode*> successors;
545
- const SVFVar* cond;
546
- const SVFVar* brInst;
549
+ const CallBlockNode* inst; ///< llvm instruction for this call
547
550
  public:
548
551
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
549
552
  //@{
550
- static inline bool classof(const BranchStmt *)
553
+ static inline bool classof(const CallPE *)
551
554
  {
552
555
  return true;
553
556
  }
554
557
  static inline bool classof(const SVFStmt *edge)
555
558
  {
556
- return edge->getEdgeKind() == SVFStmt::Branch;
559
+ return edge->getEdgeKind() == SVFStmt::Call
560
+ || edge->getEdgeKind() == SVFStmt::ThreadFork;
557
561
  }
558
562
  static inline bool classof(const GenericPAGEdgeTy *edge)
559
563
  {
560
- return edge->getEdgeKind() == SVFStmt::Branch;
564
+ return edge->getEdgeKind() == SVFStmt::Call
565
+ || edge->getEdgeKind() == SVFStmt::ThreadFork;
561
566
  }
562
567
  //@}
563
568
 
564
569
  /// constructor
565
- BranchStmt(SVFVar* inst, SVFVar* c, const std::vector<const ICFGNode*>& succs) : SVFStmt(c,inst,SVFStmt::Branch), successors(succs), cond(c), brInst(inst)
570
+ CallPE(SVFVar* s, SVFVar* d, const CallBlockNode* i, GEdgeKind k = SVFStmt::Call) :
571
+ AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
566
572
  {
567
573
  }
568
574
 
569
- /// The branch is unconditional if cond is a null value
570
- bool isUnconditional() const;
571
- /// The branch is conditional if cond is not a null value
572
- bool isConditional() const;
573
- /// Return the condition
574
- const SVFVar* getCondition() const;
575
- const SVFVar* getBranchInst() const{
576
- return brInst;
577
- }
578
- /// Successors of this branch statement
579
- ///@{
580
- u32_t getNumSuccessors() const{
581
- return successors.size();
582
- }
583
- const std::vector<const ICFGNode*>& getSuccessors() const{
584
- return successors;
575
+ /// Get method for the call instruction
576
+ //@{
577
+ inline const CallBlockNode* getCallInst() const
578
+ {
579
+ return inst;
585
580
  }
586
- const ICFGNode* getSuccessor (u32_t i) const{
587
- return successors.at(i);
581
+ inline const CallBlockNode* getCallSite() const
582
+ {
583
+ return inst;
588
584
  }
589
- ///@}
585
+ //@}
586
+
590
587
  virtual const std::string toString() const override;
591
588
  };
592
589
 
590
+
593
591
  /*!
594
- * Store statement
592
+ * Return
595
593
  */
596
- class StoreStmt: public SVFStmt
594
+ class RetPE: public AssignStmt
597
595
  {
598
596
  private:
599
- StoreStmt(); ///< place holder
600
- StoreStmt(const StoreStmt &); ///< place holder
601
- void operator=(const StoreStmt &); ///< place holder
597
+ RetPE(); ///< place holder
598
+ RetPE(const RetPE &); ///< place holder
599
+ void operator=(const RetPE &); ///< place holder
602
600
 
601
+ const CallBlockNode* inst; /// the callsite instruction return to
603
602
  public:
604
603
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
605
604
  //@{
606
- static inline bool classof(const StoreStmt *)
605
+ static inline bool classof(const RetPE *)
607
606
  {
608
607
  return true;
609
608
  }
610
609
  static inline bool classof(const SVFStmt *edge)
611
610
  {
612
- return edge->getEdgeKind() == SVFStmt::Store;
611
+ return edge->getEdgeKind() == SVFStmt::Ret
612
+ || edge->getEdgeKind() == SVFStmt::ThreadJoin;
613
613
  }
614
614
  static inline bool classof(const GenericPAGEdgeTy *edge)
615
615
  {
616
- return edge->getEdgeKind() == SVFStmt::Store;
616
+ return edge->getEdgeKind() == SVFStmt::Ret
617
+ || edge->getEdgeKind() == SVFStmt::ThreadJoin;
617
618
  }
618
619
  //@}
619
620
 
620
621
  /// constructor
621
- StoreStmt(SVFVar* s, SVFVar* d, const IntraBlockNode* st) :
622
- SVFStmt(s, d, makeEdgeFlagWithStoreInst(SVFStmt::Store, st))
622
+ RetPE(SVFVar* s, SVFVar* d, const CallBlockNode* i, GEdgeKind k = SVFStmt::Ret) :
623
+ AssignStmt(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
623
624
  {
624
625
  }
625
626
 
627
+ /// Get method for call instruction at caller
628
+ //@{
629
+ inline const CallBlockNode* getCallInst() const
630
+ {
631
+ return inst;
632
+ }
633
+ inline const CallBlockNode* getCallSite() const
634
+ {
635
+ return inst;
636
+ }
637
+ //@}
638
+
626
639
  virtual const std::string toString() const override;
627
640
  };
628
641
 
629
-
630
- /*!
631
- * Load statement
632
- */
633
- class LoadStmt: public SVFStmt
634
- {
642
+ /*
643
+ * Program statements with multiple operands including BinaryOPStmt, CmpStmt and PhiStmt
644
+ */
645
+ class MultiOpndStmt : public SVFStmt{
646
+ public:
647
+ typedef std::vector<SVFVar*> OPVars;
635
648
  private:
636
- LoadStmt(); ///< place holder
637
- LoadStmt(const LoadStmt &); ///< place holder
638
- void operator=(const LoadStmt &); ///< place holder
649
+ MultiOpndStmt(); ///< place holder
650
+ MultiOpndStmt(const MultiOpndStmt &); ///< place holder
651
+ void operator=(const MultiOpndStmt &); ///< place holder
652
+ SVFVar* getSrcNode(); ///< not allowed, use getOpVar(idx) instead
653
+ SVFVar* getDstNode(); ///< not allowed, use getRes() instead
654
+ NodeID getSrcID(); ///< not allowed, use getOpVarID(idx) instead
655
+ NodeID getDstID(); ///< not allowed, use getResID() instead
639
656
 
657
+ protected:
658
+ OPVars opVars;
659
+ /// Constructor, only used by subclassess but not external users
660
+ MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k): SVFStmt(opnds.at(0), r, k), opVars(opnds)
661
+ {
662
+ }
640
663
  public:
641
664
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
642
665
  //@{
643
- static inline bool classof(const LoadStmt *)
666
+ static inline bool classof(const MultiOpndStmt *)
644
667
  {
645
668
  return true;
646
669
  }
647
- static inline bool classof(const SVFStmt *edge)
670
+ static inline bool classof(const SVFStmt *node)
648
671
  {
649
- return edge->getEdgeKind() == SVFStmt::Load;
672
+ return node->getEdgeKind() == Phi ||
673
+ node->getEdgeKind() == BinaryOp ||
674
+ node->getEdgeKind() == Cmp;
650
675
  }
651
- static inline bool classof(const GenericPAGEdgeTy *edge)
676
+ static inline bool classof(const GenericPAGEdgeTy *node)
652
677
  {
653
- return edge->getEdgeKind() == SVFStmt::Load;
678
+ return node->getEdgeKind() == Phi ||
679
+ node->getEdgeKind() == BinaryOp ||
680
+ node->getEdgeKind() == Cmp;
654
681
  }
655
682
  //@}
656
-
657
- /// constructor
658
- LoadStmt(SVFVar* s, SVFVar* d) : SVFStmt(s,d,SVFStmt::Load)
683
+ /// Operands and result at a BinaryNode e.g., p = q + r, `p` is resVar and `r` is OpVar
684
+ //@{
685
+ /// Operand SVFVars
686
+ inline const SVFVar* getOpVar(u32_t pos) const
687
+ {
688
+ return opVars.at(pos);
689
+ }
690
+ /// Result SVFVar
691
+ inline const SVFVar* getRes() const
659
692
  {
693
+ return SVFStmt::getDstNode();
660
694
  }
695
+
696
+ NodeID getOpVarID(u32_t pos) const;
697
+ NodeID getResID() const;
661
698
 
662
- virtual const std::string toString() const override;
699
+ inline u32_t getOpVarNum() const
700
+ {
701
+ return opVars.size();
702
+ }
703
+ inline const OPVars& getOpndVars() const{
704
+ return opVars;
705
+ }
706
+ inline OPVars::const_iterator opVarBegin() const
707
+ {
708
+ return opVars.begin();
709
+ }
710
+ inline OPVars::const_iterator opVerEnd() const
711
+ {
712
+ return opVars.end();
713
+ }
714
+ //@}
663
715
  };
664
716
 
665
-
666
717
  /*!
667
- * Gep statement for field access and pointer arithmetic
718
+ * Phi statement (e.g., p = phi(q,r) which receives values from variables q and r from different paths)
719
+ * it is typically at a joint point of the control-flow graph
668
720
  */
669
- class GepStmt: public SVFStmt
721
+ class PhiStmt: public MultiOpndStmt
670
722
  {
671
723
  private:
672
- GepStmt(); ///< place holder
673
- GepStmt(const GepStmt &); ///< place holder
674
- void operator=(const GepStmt &); ///< place holder
724
+ PhiStmt(); ///< place holder
725
+ PhiStmt(const PhiStmt &); ///< place holder
726
+ void operator=(const PhiStmt &); ///< place holder
675
727
 
676
728
  public:
677
729
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
678
730
  //@{
679
- static inline bool classof(const GepStmt *)
731
+ static inline bool classof(const PhiStmt *)
680
732
  {
681
733
  return true;
682
734
  }
683
735
  static inline bool classof(const SVFStmt *edge)
684
736
  {
685
- return edge->getEdgeKind() == SVFStmt::NormalGep ||
686
- edge->getEdgeKind() == SVFStmt::VariantGep;
737
+ return edge->getEdgeKind() == SVFStmt::Phi;
738
+ }
739
+ static inline bool classof(const MultiOpndStmt *edge)
740
+ {
741
+ return edge->getEdgeKind() == SVFStmt::Phi;
687
742
  }
688
743
  static inline bool classof(const GenericPAGEdgeTy *edge)
689
744
  {
690
- return edge->getEdgeKind() == SVFStmt::NormalGep ||
691
- edge->getEdgeKind() == SVFStmt::VariantGep;
745
+ return edge->getEdgeKind() == SVFStmt::Phi;
692
746
  }
693
747
  //@}
694
748
 
695
- protected:
696
749
  /// constructor
697
- GepStmt(SVFVar* s, SVFVar* d, PEDGEK k) : SVFStmt(s,d,k)
750
+ PhiStmt(SVFVar* s, const OPVars& opnds) : MultiOpndStmt(s,opnds,SVFStmt::Phi)
698
751
  {
699
-
700
752
  }
701
-
702
- virtual const std::string toString() const;
753
+ void addOpVar(SVFVar* op){
754
+ opVars.push_back(op);
755
+ }
756
+ virtual const std::string toString() const override;
703
757
  };
704
758
 
705
759
 
706
760
  /*!
707
- * Gep statement with a fixed offset
761
+ * Comparison statement
708
762
  */
709
- class NormalGepStmt : public GepStmt
763
+ class CmpStmt: public MultiOpndStmt
710
764
  {
711
765
  private:
712
- NormalGepStmt(); ///< place holder
713
- NormalGepStmt(const NormalGepStmt&); ///< place holder
714
- void operator=(const NormalGepStmt&); ///< place holder
715
-
716
- LocationSet ls; ///< location set of the gep edge
766
+ CmpStmt(); ///< place holder
767
+ CmpStmt(const CmpStmt &); ///< place holder
768
+ void operator=(const CmpStmt &); ///< place holder
717
769
 
770
+ u32_t predicate;
718
771
  public:
719
772
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
720
773
  //@{
721
- static inline bool classof(const NormalGepStmt *)
774
+ static inline bool classof(const CmpStmt *)
722
775
  {
723
776
  return true;
724
777
  }
725
- static inline bool classof(const GepStmt *edge)
778
+ static inline bool classof(const SVFStmt *edge)
726
779
  {
727
- return edge->getEdgeKind() == SVFStmt::NormalGep;
780
+ return edge->getEdgeKind() == SVFStmt::Cmp;
728
781
  }
729
- static inline bool classof(const SVFStmt *edge)
782
+ static inline bool classof(const MultiOpndStmt *edge)
730
783
  {
731
- return edge->getEdgeKind() == SVFStmt::NormalGep;
784
+ return edge->getEdgeKind() == SVFStmt::Cmp;
732
785
  }
733
786
  static inline bool classof(const GenericPAGEdgeTy *edge)
734
787
  {
735
- return edge->getEdgeKind() == SVFStmt::NormalGep;
788
+ return edge->getEdgeKind() == SVFStmt::Cmp;
736
789
  }
737
790
  //@}
738
791
 
739
792
  /// constructor
740
- NormalGepStmt(SVFVar* s, SVFVar* d, const LocationSet& l) : GepStmt(s,d,SVFStmt::NormalGep), ls(l)
741
- {}
742
-
743
- /// offset of the gep edge
744
- inline u32_t getOffset() const
793
+ CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,SVFStmt::Cmp), predicate(pre)
745
794
  {
746
- return ls.accumulateConstantOffset();
747
795
  }
748
- inline const LocationSet& getLocationSet() const
796
+
797
+ u32_t getPredicate() const
749
798
  {
750
- return ls;
799
+ return predicate;
751
800
  }
752
-
801
+
753
802
  virtual const std::string toString() const override;
754
803
  };
755
804
 
805
+
756
806
  /*!
757
- * Gep statement with a variant offset
807
+ * Binary statement
758
808
  */
759
- class VariantGepStmt : public GepStmt
809
+ class BinaryOPStmt: public MultiOpndStmt
760
810
  {
761
811
  private:
762
- VariantGepStmt(); ///< place holder
763
- VariantGepStmt(const VariantGepStmt&); ///< place holder
764
- void operator=(const VariantGepStmt&); ///< place holder
812
+ BinaryOPStmt(); ///< place holder
813
+ BinaryOPStmt(const BinaryOPStmt &); ///< place holder
814
+ void operator=(const BinaryOPStmt &); ///< place holder
815
+ u32_t opcode;
765
816
 
766
817
  public:
767
818
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
768
819
  //@{
769
- static inline bool classof(const VariantGepStmt *)
820
+ static inline bool classof(const BinaryOPStmt *)
770
821
  {
771
822
  return true;
772
823
  }
773
- static inline bool classof(const GepStmt *edge)
824
+ static inline bool classof(const SVFStmt *edge)
774
825
  {
775
- return edge->getEdgeKind() == SVFStmt::VariantGep;
826
+ return edge->getEdgeKind() == SVFStmt::BinaryOp;
776
827
  }
777
- static inline bool classof(const SVFStmt *edge)
828
+ static inline bool classof(const MultiOpndStmt *edge)
778
829
  {
779
- return edge->getEdgeKind() == SVFStmt::VariantGep;
830
+ return edge->getEdgeKind() == SVFStmt::BinaryOp;
780
831
  }
781
832
  static inline bool classof(const GenericPAGEdgeTy *edge)
782
833
  {
783
- return edge->getEdgeKind() == SVFStmt::VariantGep;
834
+ return edge->getEdgeKind() == SVFStmt::BinaryOp;
784
835
  }
785
836
  //@}
786
837
 
787
838
  /// constructor
788
- VariantGepStmt(SVFVar* s, SVFVar* d) : GepStmt(s,d,SVFStmt::VariantGep) {}
839
+ BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,SVFStmt::BinaryOp), opcode(oc)
840
+ {
841
+ }
789
842
 
790
- virtual const std::string toString() const override;
843
+ u32_t getOpcode() const
844
+ {
845
+ return opcode;
846
+ }
791
847
 
848
+ virtual const std::string toString() const override;
792
849
  };
793
850
 
794
-
795
851
  /*!
796
- * Call
852
+ * Unary statement
797
853
  */
798
- class CallPE: public SVFStmt
854
+ class UnaryOPStmt: public SVFStmt
799
855
  {
800
856
  private:
801
- CallPE(); ///< place holder
802
- CallPE(const CallPE &); ///< place holder
803
- void operator=(const CallPE &); ///< place holder
857
+ UnaryOPStmt(); ///< place holder
858
+ UnaryOPStmt(const UnaryOPStmt &); ///< place holder
859
+ void operator=(const UnaryOPStmt &); ///< place holder
860
+ SVFVar* getSrcNode(); ///< place holder, use getOpVar() instead
861
+ SVFVar* getDstNode(); ///< place holder, use getRes() instead
862
+ NodeID getSrcID(); ///< place holder, use getOpVarID(pos) instead
863
+ NodeID getDstID(); ///< place holder, use getResID() instead
804
864
 
805
- const CallBlockNode* inst; ///< llvm instruction for this call
865
+ u32_t opcode;
806
866
  public:
807
867
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
808
868
  //@{
809
- static inline bool classof(const CallPE *)
869
+ static inline bool classof(const UnaryOPStmt *)
810
870
  {
811
871
  return true;
812
872
  }
813
873
  static inline bool classof(const SVFStmt *edge)
814
874
  {
815
- return edge->getEdgeKind() == SVFStmt::Call
816
- || edge->getEdgeKind() == SVFStmt::ThreadFork;
875
+ return edge->getEdgeKind() == SVFStmt::UnaryOp;
817
876
  }
818
877
  static inline bool classof(const GenericPAGEdgeTy *edge)
819
878
  {
820
- return edge->getEdgeKind() == SVFStmt::Call
821
- || edge->getEdgeKind() == SVFStmt::ThreadFork;
879
+ return edge->getEdgeKind() == SVFStmt::UnaryOp;
822
880
  }
823
881
  //@}
824
882
 
825
883
  /// constructor
826
- CallPE(SVFVar* s, SVFVar* d, const CallBlockNode* i, GEdgeKind k = SVFStmt::Call) :
827
- SVFStmt(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
884
+ UnaryOPStmt(SVFVar* s, SVFVar* d, u32_t oc) : SVFStmt(s,d,SVFStmt::UnaryOp), opcode(oc)
828
885
  {
829
886
  }
830
887
 
831
- /// Get method for the call instruction
832
- //@{
833
- inline const CallBlockNode* getCallInst() const
888
+ u32_t getOpcode() const
834
889
  {
835
- return inst;
890
+ return opcode;
836
891
  }
837
- inline const CallBlockNode* getCallSite() const
838
- {
839
- return inst;
892
+ inline const SVFVar* getOpVar() const{
893
+ return SVFStmt::getSrcNode();
840
894
  }
841
- //@}
895
+ inline const SVFVar* getRes() const{
896
+ return SVFStmt::getDstNode();
897
+ }
898
+ NodeID getOpVarID() const;
899
+ NodeID getResID() const;
842
900
 
843
901
  virtual const std::string toString() const override;
844
902
  };
845
903
 
846
904
 
847
905
  /*!
848
- * Return
906
+ * Branch statements including if/else and switch
849
907
  */
850
- class RetPE: public SVFStmt
908
+ class BranchStmt: public SVFStmt
851
909
  {
852
910
  private:
853
- RetPE(); ///< place holder
854
- RetPE(const RetPE &); ///< place holder
855
- void operator=(const RetPE &); ///< place holder
911
+ BranchStmt(); ///< place holder
912
+ BranchStmt(const BranchStmt &); ///< place holder
913
+ void operator=(const BranchStmt &); ///< place holder
914
+ SVFVar* getSrcNode(); ///< place holder, not allowed
915
+ SVFVar* getDstNode(); ///< place holder, not allowed
916
+ NodeID getSrcID(); ///< place holder, use getOpVarID(pos) instead
917
+ NodeID getDstID(); ///< place holder, use getResID() instead
856
918
 
857
- const CallBlockNode* inst; /// the callsite instruction return to
919
+ std::vector<const ICFGNode*> successors;
920
+ const SVFVar* cond;
921
+ const SVFVar* brInst;
858
922
  public:
859
923
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
860
924
  //@{
861
- static inline bool classof(const RetPE *)
925
+ static inline bool classof(const BranchStmt *)
862
926
  {
863
927
  return true;
864
928
  }
865
929
  static inline bool classof(const SVFStmt *edge)
866
930
  {
867
- return edge->getEdgeKind() == SVFStmt::Ret
868
- || edge->getEdgeKind() == SVFStmt::ThreadJoin;
931
+ return edge->getEdgeKind() == SVFStmt::Branch;
869
932
  }
870
933
  static inline bool classof(const GenericPAGEdgeTy *edge)
871
934
  {
872
- return edge->getEdgeKind() == SVFStmt::Ret
873
- || edge->getEdgeKind() == SVFStmt::ThreadJoin;
935
+ return edge->getEdgeKind() == SVFStmt::Branch;
874
936
  }
875
937
  //@}
876
938
 
877
939
  /// constructor
878
- RetPE(SVFVar* s, SVFVar* d, const CallBlockNode* i, GEdgeKind k = SVFStmt::Ret) :
879
- SVFStmt(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
940
+ BranchStmt(SVFVar* inst, SVFVar* c, const std::vector<const ICFGNode*>& succs) : SVFStmt(c,inst,SVFStmt::Branch), successors(succs), cond(c), brInst(inst)
880
941
  {
881
942
  }
882
943
 
883
- /// Get method for call instruction at caller
884
- //@{
885
- inline const CallBlockNode* getCallInst() const
886
- {
887
- return inst;
944
+ /// The branch is unconditional if cond is a null value
945
+ bool isUnconditional() const;
946
+ /// The branch is conditional if cond is not a null value
947
+ bool isConditional() const;
948
+ /// Return the condition
949
+ const SVFVar* getCondition() const;
950
+ const SVFVar* getBranchInst() const{
951
+ return brInst;
888
952
  }
889
- inline const CallBlockNode* getCallSite() const
890
- {
891
- return inst;
953
+ /// Successors of this branch statement
954
+ ///@{
955
+ u32_t getNumSuccessors() const{
956
+ return successors.size();
892
957
  }
893
- //@}
894
-
958
+ const std::vector<const ICFGNode*>& getSuccessors() const{
959
+ return successors;
960
+ }
961
+ const ICFGNode* getSuccessor (u32_t i) const{
962
+ return successors.at(i);
963
+ }
964
+ ///@}
895
965
  virtual const std::string toString() const override;
896
966
  };
897
967