svf-lib 1.0.2319 → 1.0.2321

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 (320) hide show
  1. package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/WorkList.h +0 -0
  2. package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/Modules/FindZ3.cmake +93 -0
  3. package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfig.cmake +106 -0
  4. package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfigVersion.cmake +43 -0
  5. package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFTargets-release.cmake +101 -0
  6. package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFTargets.cmake +180 -0
  7. package/SVF-linux-aarch64/Release-build/lib/libSvfCore.so.3.1 +0 -0
  8. package/SVF-linux-aarch64/Release-build/lib/libSvfLLVM.so.3.1 +0 -0
  9. package/SVF-linux-aarch64/Release-build/lib/pkgconfig/SVF.pc +12 -0
  10. package/SVF-osx/Release-build/bin/ae +0 -0
  11. package/SVF-osx/Release-build/bin/cfl +0 -0
  12. package/SVF-osx/Release-build/bin/dvf +0 -0
  13. package/SVF-osx/Release-build/bin/llvm2svf +0 -0
  14. package/SVF-osx/Release-build/bin/mta +0 -0
  15. package/SVF-osx/Release-build/bin/saber +0 -0
  16. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  17. package/SVF-osx/Release-build/bin/wpa +0 -0
  18. package/SVF-osx/Release-build/include/SVF/AE/Core/AbstractState.h +425 -0
  19. package/SVF-osx/Release-build/include/SVF/AE/Core/AbstractValue.h +157 -0
  20. package/SVF-osx/Release-build/include/SVF/AE/Core/AddressValue.h +225 -0
  21. package/SVF-osx/Release-build/include/SVF/AE/Core/ICFGWTO.h +135 -0
  22. package/SVF-osx/Release-build/include/SVF/AE/Core/IntervalValue.h +1055 -0
  23. package/SVF-osx/Release-build/include/SVF/AE/Core/NumericValue.h +1292 -0
  24. package/SVF-osx/Release-build/include/SVF/AE/Core/RelExeState.h +226 -0
  25. package/SVF-osx/Release-build/include/SVF/AE/Core/RelationSolver.h +91 -0
  26. package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AEDetector.h +439 -0
  27. package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AbsExtAPI.h +138 -0
  28. package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AbstractInterpretation.h +384 -0
  29. package/SVF-osx/Release-build/include/SVF/CFL/CFGNormalizer.h +84 -0
  30. package/SVF-osx/Release-build/include/SVF/CFL/CFGrammar.h +468 -0
  31. package/SVF-osx/Release-build/include/SVF/CFL/CFLAlias.h +168 -0
  32. package/SVF-osx/Release-build/include/SVF/CFL/CFLBase.h +118 -0
  33. package/SVF-osx/Release-build/include/SVF/CFL/CFLGramGraphChecker.h +74 -0
  34. package/SVF-osx/Release-build/include/SVF/CFL/CFLGraphBuilder.h +168 -0
  35. package/SVF-osx/Release-build/include/SVF/CFL/CFLSVFGBuilder.h +58 -0
  36. package/SVF-osx/Release-build/include/SVF/CFL/CFLSolver.h +374 -0
  37. package/SVF-osx/Release-build/include/SVF/CFL/CFLStat.h +67 -0
  38. package/SVF-osx/Release-build/include/SVF/CFL/CFLVF.h +68 -0
  39. package/SVF-osx/Release-build/include/SVF/CFL/GrammarBuilder.h +100 -0
  40. package/SVF-osx/Release-build/include/SVF/DDA/ContextDDA.h +230 -0
  41. package/SVF-osx/Release-build/include/SVF/DDA/DDAClient.h +163 -0
  42. package/SVF-osx/Release-build/include/SVF/DDA/DDAPass.h +102 -0
  43. package/SVF-osx/Release-build/include/SVF/DDA/DDAStat.h +121 -0
  44. package/SVF-osx/Release-build/include/SVF/DDA/DDAVFSolver.h +794 -0
  45. package/SVF-osx/Release-build/include/SVF/DDA/FlowDDA.h +178 -0
  46. package/SVF-osx/Release-build/include/SVF/FastCluster/fastcluster.h +80 -0
  47. package/SVF-osx/Release-build/include/SVF/Graphs/BasicBlockG.h +318 -0
  48. package/SVF-osx/Release-build/include/SVF/Graphs/CDG.h +482 -0
  49. package/SVF-osx/Release-build/include/SVF/Graphs/CFLGraph.h +232 -0
  50. package/SVF-osx/Release-build/include/SVF/Graphs/CHG.h +368 -0
  51. package/SVF-osx/Release-build/include/SVF/Graphs/CallGraph.h +497 -0
  52. package/SVF-osx/Release-build/include/SVF/Graphs/ConsG.h +402 -0
  53. package/SVF-osx/Release-build/include/SVF/Graphs/ConsGEdge.h +355 -0
  54. package/SVF-osx/Release-build/include/SVF/Graphs/ConsGNode.h +418 -0
  55. package/SVF-osx/Release-build/include/SVF/Graphs/DOTGraphTraits.h +188 -0
  56. package/SVF-osx/Release-build/include/SVF/Graphs/GenericGraph.h +628 -0
  57. package/SVF-osx/Release-build/include/SVF/Graphs/GraphPrinter.h +111 -0
  58. package/SVF-osx/Release-build/include/SVF/Graphs/GraphTraits.h +150 -0
  59. package/SVF-osx/Release-build/include/SVF/Graphs/GraphWriter.h +380 -0
  60. package/SVF-osx/Release-build/include/SVF/Graphs/ICFG.h +331 -0
  61. package/SVF-osx/Release-build/include/SVF/Graphs/ICFGEdge.h +281 -0
  62. package/SVF-osx/Release-build/include/SVF/Graphs/ICFGNode.h +669 -0
  63. package/SVF-osx/Release-build/include/SVF/Graphs/ICFGStat.h +164 -0
  64. package/SVF-osx/Release-build/include/SVF/Graphs/IRGraph.h +398 -0
  65. package/SVF-osx/Release-build/include/SVF/Graphs/SCC.h +375 -0
  66. package/SVF-osx/Release-build/include/SVF/Graphs/SVFG.h +491 -0
  67. package/SVF-osx/Release-build/include/SVF/Graphs/SVFGEdge.h +237 -0
  68. package/SVF-osx/Release-build/include/SVF/Graphs/SVFGNode.h +501 -0
  69. package/SVF-osx/Release-build/include/SVF/Graphs/SVFGOPT.h +372 -0
  70. package/SVF-osx/Release-build/include/SVF/Graphs/SVFGStat.h +273 -0
  71. package/SVF-osx/Release-build/include/SVF/Graphs/ThreadCallGraph.h +399 -0
  72. package/SVF-osx/Release-build/include/SVF/Graphs/VFG.h +726 -0
  73. package/SVF-osx/Release-build/include/SVF/Graphs/VFGEdge.h +295 -0
  74. package/SVF-osx/Release-build/include/SVF/Graphs/VFGNode.h +1266 -0
  75. package/SVF-osx/Release-build/include/SVF/Graphs/WTO.h +872 -0
  76. package/SVF-osx/Release-build/include/SVF/MSSA/MSSAMuChi.h +722 -0
  77. package/SVF-osx/Release-build/include/SVF/MSSA/MemPartition.h +169 -0
  78. package/SVF-osx/Release-build/include/SVF/MSSA/MemRegion.h +489 -0
  79. package/SVF-osx/Release-build/include/SVF/MSSA/MemSSA.h +452 -0
  80. package/SVF-osx/Release-build/include/SVF/MSSA/SVFGBuilder.h +104 -0
  81. package/SVF-osx/Release-build/include/SVF/MTA/LockAnalysis.h +533 -0
  82. package/SVF-osx/Release-build/include/SVF/MTA/MHP.h +546 -0
  83. package/SVF-osx/Release-build/include/SVF/MTA/MTA.h +97 -0
  84. package/SVF-osx/Release-build/include/SVF/MTA/MTAStat.h +73 -0
  85. package/SVF-osx/Release-build/include/SVF/MTA/TCT.h +620 -0
  86. package/SVF-osx/Release-build/include/SVF/MemoryModel/AbstractPointsToDS.h +316 -0
  87. package/SVF-osx/Release-build/include/SVF/MemoryModel/AccessPath.h +194 -0
  88. package/SVF-osx/Release-build/include/SVF/MemoryModel/ConditionalPT.h +878 -0
  89. package/SVF-osx/Release-build/include/SVF/MemoryModel/MutablePointsToDS.h +1025 -0
  90. package/SVF-osx/Release-build/include/SVF/MemoryModel/PersistentPointsToCache.h +463 -0
  91. package/SVF-osx/Release-build/include/SVF/MemoryModel/PersistentPointsToDS.h +955 -0
  92. package/SVF-osx/Release-build/include/SVF/MemoryModel/PointerAnalysis.h +428 -0
  93. package/SVF-osx/Release-build/include/SVF/MemoryModel/PointerAnalysisImpl.h +602 -0
  94. package/SVF-osx/Release-build/include/SVF/MemoryModel/PointsTo.h +255 -0
  95. package/SVF-osx/Release-build/include/SVF/MemoryModel/SVFLoop.h +167 -0
  96. package/SVF-osx/Release-build/include/SVF/SABER/DoubleFreeChecker.h +76 -0
  97. package/SVF-osx/Release-build/include/SVF/SABER/FileChecker.h +80 -0
  98. package/SVF-osx/Release-build/include/SVF/SABER/LeakChecker.h +122 -0
  99. package/SVF-osx/Release-build/include/SVF/SABER/ProgSlice.h +327 -0
  100. package/SVF-osx/Release-build/include/SVF/SABER/SaberCheckerAPI.h +151 -0
  101. package/SVF-osx/Release-build/include/SVF/SABER/SaberCondAllocator.h +317 -0
  102. package/SVF-osx/Release-build/include/SVF/SABER/SaberSVFGBuilder.h +114 -0
  103. package/SVF-osx/Release-build/include/SVF/SABER/SrcSnkDDA.h +327 -0
  104. package/SVF-osx/Release-build/include/SVF/SABER/SrcSnkSolver.h +186 -0
  105. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/BasicTypes.h +280 -0
  106. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/BreakConstantExpr.h +93 -0
  107. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/CHGBuilder.h +78 -0
  108. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/CppUtil.h +184 -0
  109. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/DCHG.h +474 -0
  110. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
  111. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/ICFGBuilder.h +160 -0
  112. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMLoopAnalysis.h +60 -0
  113. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMModule.h +527 -0
  114. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMUtil.h +433 -0
  115. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/ObjTypeInference.h +129 -0
  116. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/SVFIRBuilder.h +523 -0
  117. package/SVF-osx/Release-build/include/SVF/SVF-LLVM/SymbolTableBuilder.h +132 -0
  118. package/SVF-osx/Release-build/include/SVF/SVFIR/ObjTypeInfo.h +224 -0
  119. package/SVF-osx/Release-build/include/SVF/SVFIR/PAGBuilderFromFile.h +80 -0
  120. package/SVF-osx/Release-build/include/SVF/SVFIR/SVFIR.h +856 -0
  121. package/SVF-osx/Release-build/include/SVF/SVFIR/SVFStatements.h +1330 -0
  122. package/SVF-osx/Release-build/include/SVF/SVFIR/SVFType.h +606 -0
  123. package/SVF-osx/Release-build/include/SVF/SVFIR/SVFValue.h +338 -0
  124. package/SVF-osx/Release-build/include/SVF/SVFIR/SVFVariables.h +2212 -0
  125. package/SVF-osx/Release-build/include/SVF/Util/Annotator.h +180 -0
  126. package/SVF-osx/Release-build/include/SVF/Util/BitVector.h +55 -0
  127. package/SVF-osx/Release-build/include/SVF/Util/CDGBuilder.h +107 -0
  128. package/SVF-osx/Release-build/include/SVF/Util/CallGraphBuilder.h +61 -0
  129. package/SVF-osx/Release-build/include/SVF/Util/Casting.h +426 -0
  130. package/SVF-osx/Release-build/include/SVF/Util/CommandLine.h +530 -0
  131. package/SVF-osx/Release-build/include/SVF/Util/CoreBitVector.h +214 -0
  132. package/SVF-osx/Release-build/include/SVF/Util/CxtStmt.h +502 -0
  133. package/SVF-osx/Release-build/include/SVF/Util/DPItem.h +618 -0
  134. package/SVF-osx/Release-build/include/SVF/Util/ExtAPI.h +117 -0
  135. package/SVF-osx/Release-build/include/SVF/Util/GeneralType.h +127 -0
  136. package/SVF-osx/Release-build/include/SVF/Util/GraphReachSolver.h +186 -0
  137. package/SVF-osx/Release-build/include/SVF/Util/NodeIDAllocator.h +203 -0
  138. package/SVF-osx/Release-build/include/SVF/Util/Options.h +273 -0
  139. package/SVF-osx/Release-build/include/SVF/Util/PTAStat.h +83 -0
  140. package/SVF-osx/Release-build/include/SVF/Util/SVFBugReport.h +427 -0
  141. package/SVF-osx/Release-build/include/SVF/Util/SVFLoopAndDomInfo.h +169 -0
  142. package/SVF-osx/Release-build/include/SVF/Util/SVFStat.h +103 -0
  143. package/SVF-osx/Release-build/include/SVF/Util/SVFUtil.h +478 -0
  144. package/SVF-osx/Release-build/include/SVF/Util/SparseBitVector.h +1252 -0
  145. package/SVF-osx/Release-build/include/SVF/Util/ThreadAPI.h +188 -0
  146. package/SVF-osx/Release-build/include/SVF/Util/WorkList.h +317 -0
  147. package/SVF-osx/Release-build/include/SVF/Util/Z3Expr.h +325 -0
  148. package/SVF-osx/Release-build/include/SVF/Util/cJSON.h +300 -0
  149. package/SVF-osx/Release-build/include/SVF/Util/config.h +46 -0
  150. package/SVF-osx/Release-build/include/SVF/Util/iterator.h +407 -0
  151. package/SVF-osx/Release-build/include/SVF/Util/iterator_range.h +76 -0
  152. package/SVF-osx/Release-build/include/SVF/WPA/Andersen.h +434 -0
  153. package/SVF-osx/Release-build/include/SVF/WPA/AndersenPWC.h +160 -0
  154. package/SVF-osx/Release-build/include/SVF/WPA/CSC.h +95 -0
  155. package/SVF-osx/Release-build/include/SVF/WPA/FlowSensitive.h +322 -0
  156. package/SVF-osx/Release-build/include/SVF/WPA/Steensgaard.h +131 -0
  157. package/SVF-osx/Release-build/include/SVF/WPA/TypeAnalysis.h +90 -0
  158. package/SVF-osx/Release-build/include/SVF/WPA/VersionedFlowSensitive.h +295 -0
  159. package/SVF-osx/Release-build/include/SVF/WPA/WPAFSSolver.h +246 -0
  160. package/SVF-osx/Release-build/include/SVF/WPA/WPAPass.h +115 -0
  161. package/SVF-osx/Release-build/include/SVF/WPA/WPASolver.h +205 -0
  162. package/SVF-osx/Release-build/include/SVF/WPA/WPAStat.h +222 -0
  163. package/SVF-osx/Release-build/include/SVF/extapi.bc +2384 -0
  164. package/SVF-osx/Release-build/lib/cmake/SVF/Modules/FindZ3.cmake +93 -0
  165. package/SVF-osx/Release-build/lib/cmake/SVF/SVFConfig.cmake +106 -0
  166. package/SVF-osx/Release-build/lib/cmake/SVF/SVFConfigVersion.cmake +43 -0
  167. package/SVF-osx/Release-build/lib/cmake/SVF/SVFTargets-release.cmake +101 -0
  168. package/SVF-osx/Release-build/lib/cmake/SVF/SVFTargets.cmake +180 -0
  169. package/SVF-osx/Release-build/lib/libSvfCore.3.1.dylib +0 -0
  170. package/SVF-osx/Release-build/lib/libSvfLLVM.3.1.dylib +0 -0
  171. package/SVF-osx/Release-build/lib/pkgconfig/SVF.pc +12 -0
  172. package/package.json +1 -1
  173. package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PAGGrammar.txt +0 -15
  174. package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PEGGrammar.txt +0 -11
  175. package/SVF-linux-aarch64/Release-build/include/CFL/grammar/VFGGrammar.txt +0 -7
  176. package/SVF-linux-aarch64/Release-build/include/FastCluster/LICENSE.TXT +0 -13
  177. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AbstractState.h +0 -0
  178. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AbstractValue.h +0 -0
  179. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AddressValue.h +0 -0
  180. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/ICFGWTO.h +0 -0
  181. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/IntervalValue.h +0 -0
  182. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/NumericValue.h +0 -0
  183. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/RelExeState.h +0 -0
  184. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/RelationSolver.h +0 -0
  185. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AEDetector.h +0 -0
  186. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AbsExtAPI.h +0 -0
  187. /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AbstractInterpretation.h +0 -0
  188. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFGNormalizer.h +0 -0
  189. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFGrammar.h +0 -0
  190. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLAlias.h +0 -0
  191. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLBase.h +0 -0
  192. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLGramGraphChecker.h +0 -0
  193. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLGraphBuilder.h +0 -0
  194. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLSVFGBuilder.h +0 -0
  195. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLSolver.h +0 -0
  196. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLStat.h +0 -0
  197. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLVF.h +0 -0
  198. /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/GrammarBuilder.h +0 -0
  199. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/ContextDDA.h +0 -0
  200. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAClient.h +0 -0
  201. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAPass.h +0 -0
  202. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAStat.h +0 -0
  203. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAVFSolver.h +0 -0
  204. /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/FlowDDA.h +0 -0
  205. /package/SVF-linux-aarch64/Release-build/include/{FastCluster → SVF/FastCluster}/fastcluster.h +0 -0
  206. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/BasicBlockG.h +0 -0
  207. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CDG.h +0 -0
  208. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CFLGraph.h +0 -0
  209. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CHG.h +0 -0
  210. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CallGraph.h +0 -0
  211. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsG.h +0 -0
  212. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsGEdge.h +0 -0
  213. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsGNode.h +0 -0
  214. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/DOTGraphTraits.h +0 -0
  215. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GenericGraph.h +0 -0
  216. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphPrinter.h +0 -0
  217. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphTraits.h +0 -0
  218. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphWriter.h +0 -0
  219. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFG.h +0 -0
  220. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGEdge.h +0 -0
  221. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGNode.h +0 -0
  222. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGStat.h +0 -0
  223. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/IRGraph.h +0 -0
  224. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SCC.h +0 -0
  225. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFG.h +0 -0
  226. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGEdge.h +0 -0
  227. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGNode.h +0 -0
  228. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGOPT.h +0 -0
  229. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGStat.h +0 -0
  230. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ThreadCallGraph.h +0 -0
  231. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFG.h +0 -0
  232. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFGEdge.h +0 -0
  233. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFGNode.h +0 -0
  234. /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/WTO.h +0 -0
  235. /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MSSAMuChi.h +0 -0
  236. /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemPartition.h +0 -0
  237. /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemRegion.h +0 -0
  238. /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemSSA.h +0 -0
  239. /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/SVFGBuilder.h +0 -0
  240. /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/LockAnalysis.h +0 -0
  241. /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MHP.h +0 -0
  242. /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MTA.h +0 -0
  243. /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MTAStat.h +0 -0
  244. /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/TCT.h +0 -0
  245. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/AbstractPointsToDS.h +0 -0
  246. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/AccessPath.h +0 -0
  247. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/ConditionalPT.h +0 -0
  248. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/MutablePointsToDS.h +0 -0
  249. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PersistentPointsToCache.h +0 -0
  250. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PersistentPointsToDS.h +0 -0
  251. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointerAnalysis.h +0 -0
  252. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointerAnalysisImpl.h +0 -0
  253. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointsTo.h +0 -0
  254. /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/SVFLoop.h +0 -0
  255. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/DoubleFreeChecker.h +0 -0
  256. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/FileChecker.h +0 -0
  257. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/LeakChecker.h +0 -0
  258. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/ProgSlice.h +0 -0
  259. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberCheckerAPI.h +0 -0
  260. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberCondAllocator.h +0 -0
  261. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberSVFGBuilder.h +0 -0
  262. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SrcSnkDDA.h +0 -0
  263. /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SrcSnkSolver.h +0 -0
  264. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/BasicTypes.h +0 -0
  265. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/BreakConstantExpr.h +0 -0
  266. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/CHGBuilder.h +0 -0
  267. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/CppUtil.h +0 -0
  268. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/DCHG.h +0 -0
  269. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/GEPTypeBridgeIterator.h +0 -0
  270. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/ICFGBuilder.h +0 -0
  271. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMLoopAnalysis.h +0 -0
  272. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMModule.h +0 -0
  273. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMUtil.h +0 -0
  274. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/ObjTypeInference.h +0 -0
  275. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/SVFIRBuilder.h +0 -0
  276. /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/SymbolTableBuilder.h +0 -0
  277. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/ObjTypeInfo.h +0 -0
  278. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/PAGBuilderFromFile.h +0 -0
  279. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFIR.h +0 -0
  280. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFStatements.h +0 -0
  281. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFType.h +0 -0
  282. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFValue.h +0 -0
  283. /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFVariables.h +0 -0
  284. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Annotator.h +0 -0
  285. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/BitVector.h +0 -0
  286. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CDGBuilder.h +0 -0
  287. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CallGraphBuilder.h +0 -0
  288. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Casting.h +0 -0
  289. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CommandLine.h +0 -0
  290. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CoreBitVector.h +0 -0
  291. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CxtStmt.h +0 -0
  292. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/DPItem.h +0 -0
  293. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/ExtAPI.h +0 -0
  294. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/GeneralType.h +0 -0
  295. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/GraphReachSolver.h +0 -0
  296. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/NodeIDAllocator.h +0 -0
  297. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Options.h +0 -0
  298. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/PTAStat.h +0 -0
  299. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFBugReport.h +0 -0
  300. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFLoopAndDomInfo.h +0 -0
  301. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFStat.h +0 -0
  302. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFUtil.h +0 -0
  303. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SparseBitVector.h +0 -0
  304. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/ThreadAPI.h +0 -0
  305. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Z3Expr.h +0 -0
  306. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/cJSON.h +0 -0
  307. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/iterator.h +0 -0
  308. /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/iterator_range.h +0 -0
  309. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/Andersen.h +0 -0
  310. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/AndersenPWC.h +0 -0
  311. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/CSC.h +0 -0
  312. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/FlowSensitive.h +0 -0
  313. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/Steensgaard.h +0 -0
  314. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/TypeAnalysis.h +0 -0
  315. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/VersionedFlowSensitive.h +0 -0
  316. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAFSSolver.h +0 -0
  317. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAPass.h +0 -0
  318. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPASolver.h +0 -0
  319. /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAStat.h +0 -0
  320. /package/SVF-linux-aarch64/Release-build/{lib → include/SVF}/extapi.bc +0 -0
@@ -0,0 +1,856 @@
1
+ //===- SVFIR.h -- IR of SVF ---------------------------------------------//
2
+ //
3
+ // SVF: Static Value-Flow Analysis
4
+ //
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
+ //
7
+
8
+ // This program is free software: you can redistribute it and/or modify
9
+ // it under the terms of the GNU Affero General Public License as published by
10
+ // the Free Software Foundation, either version 3 of the License, or
11
+ // (at your option) any later version.
12
+
13
+ // This program is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU Affero General Public License for more details.
17
+
18
+ // You should have received a copy of the GNU Affero General Public License
19
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ //
21
+ //===----------------------------------------------------------------------===//
22
+
23
+ /*
24
+ * SVFIR.h
25
+ *
26
+ * Created on: 31, 12, 2021
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #ifndef INCLUDE_SVFIR_H_
31
+ #define INCLUDE_SVFIR_H_
32
+
33
+ #include "Graphs/IRGraph.h"
34
+
35
+ namespace SVF
36
+ {
37
+ class CommonCHGraph;
38
+ /*!
39
+ * SVF Intermediate representation, representing variables and statements as a Program Assignment Graph (PAG)
40
+ * Variables as nodes and statements as edges.
41
+ */
42
+ class SVFIR : public IRGraph
43
+ {
44
+ friend class SVFIRBuilder;
45
+ friend class ExternalPAG;
46
+ friend class PAGBuilderFromFile;
47
+ friend class TypeBasedHeapCloning;
48
+ friend class SVFIRWriter;
49
+ friend class SVFIRReader;
50
+ friend class BVDataPTAImpl;
51
+
52
+ public:
53
+ typedef Set<const CallICFGNode*> CallSiteSet;
54
+ typedef OrderedMap<const CallICFGNode*,NodeID> CallSiteToFunPtrMap;
55
+ typedef Map<NodeID,CallSiteSet> FunPtrToCallSitesMap;
56
+ typedef Map<NodeID,NodeBS> MemObjToFieldsMap;
57
+ typedef std::vector<const SVFStmt*> SVFStmtList;
58
+ typedef std::vector<const SVFVar*> SVFVarList;
59
+ typedef Map<const SVFVar*,PhiStmt*> PHINodeMap;
60
+ typedef Map<const FunObjVar*,SVFVarList> FunToArgsListMap;
61
+ typedef Map<const CallICFGNode*,SVFVarList> CSToArgsListMap;
62
+ typedef Map<const RetICFGNode*,const SVFVar*> CSToRetMap;
63
+ typedef Map<const FunObjVar*,const SVFVar*> FunToRetMap;
64
+ typedef Map<const FunObjVar*,SVFStmtSet> FunToPAGEdgeSetMap;
65
+ typedef Map<const ICFGNode*,SVFStmtList> ICFGNode2SVFStmtsMap;
66
+ typedef Map<NodeID, NodeID> NodeToNodeMap;
67
+ typedef std::pair<NodeID, APOffset> NodeOffset;
68
+ typedef std::pair<NodeID, AccessPath> NodeAccessPath;
69
+ typedef Map<NodeOffset,NodeID> NodeOffsetMap;
70
+ typedef Map<NodeAccessPath,NodeID> NodeAccessPathMap;
71
+ typedef Map<NodeID, NodeAccessPathMap> GepValueVarMap;
72
+ typedef std::pair<const SVFType*, std::vector<AccessPath>> SVFTypeLocSetsPair;
73
+ typedef Map<NodeID, SVFTypeLocSetsPair> TypeLocSetsMap;
74
+ typedef Map<NodePair,NodeID> NodePairSetMap;
75
+
76
+ private:
77
+ /// ValueNodes - This map indicates the Node that a particular SVFValue* is
78
+ /// represented by. This contains entries for all pointers.
79
+ ICFGNode2SVFStmtsMap icfgNode2SVFStmtsMap; ///< Map an ICFGNode to its SVFStmts
80
+ ICFGNode2SVFStmtsMap icfgNode2PTASVFStmtsMap; ///< Map an ICFGNode to its PointerAnalysis related SVFStmts
81
+ GepValueVarMap GepValObjMap; ///< Map a pair<base,off> to a gep value node id
82
+ TypeLocSetsMap typeLocSetsMap; ///< Map an arg to its base SVFType* and all its field location sets
83
+ NodeOffsetMap GepObjVarMap; ///< Map a pair<base,off> to a gep obj node id
84
+ MemObjToFieldsMap memToFieldsMap; ///< Map a mem object id to all its fields
85
+ SVFStmtSet globSVFStmtSet; ///< Global PAGEdges without control flow information
86
+ PHINodeMap phiNodeMap; ///< A set of phi copy edges
87
+ FunToArgsListMap funArgsListMap; ///< Map a function to a list of all its formal parameters
88
+ CSToArgsListMap callSiteArgsListMap; ///< Map a callsite to a list of all its actual parameters
89
+ CSToRetMap callSiteRetMap; ///< Map a callsite to its callsite returns PAGNodes
90
+ FunToRetMap funRetMap; ///< Map a function to its unique function return PAGNodes
91
+ CallSiteToFunPtrMap indCallSiteToFunPtrMap; ///< Map an indirect callsite to its function pointer
92
+ FunPtrToCallSitesMap funPtrToCallSitesMap; ///< Map a function pointer to the callsites where it is used
93
+ /// Valid pointers for pointer analysis resolution connected by SVFIR edges (constraints)
94
+ /// this set of candidate pointers can change during pointer resolution (e.g. adding new object nodes)
95
+ OrderedNodeSet candidatePointers;
96
+ ICFG* icfg; // ICFG
97
+ CommonCHGraph* chgraph; // class hierarchy graph
98
+ CallSiteSet callSiteSet; /// all the callsites of a program
99
+ CallGraph* callGraph; /// call graph
100
+
101
+ static std::unique_ptr<SVFIR> pag; ///< Singleton pattern here to enable instance of SVFIR can only be created once.
102
+ static std::string pagReadFromTxt;
103
+
104
+ std::string moduleIdentifier;
105
+
106
+ /// Constructor
107
+ SVFIR(bool buildFromFile);
108
+
109
+ /// Clean up memory
110
+ void destroy();
111
+
112
+ public:
113
+
114
+ /// Singleton design here to make sure we only have one instance during any analysis
115
+ //@{
116
+ static inline SVFIR* getPAG(bool buildFromFile = false)
117
+ {
118
+ if (pag == nullptr)
119
+ {
120
+ pag = std::unique_ptr<SVFIR>(new SVFIR(buildFromFile));
121
+ }
122
+ return pag.get();
123
+ }
124
+ static void releaseSVFIR()
125
+ {
126
+ pag = nullptr;
127
+ }
128
+ //@}
129
+ /// Return memToFieldsMap
130
+ inline MemObjToFieldsMap& getMemToFieldsMap()
131
+ {
132
+ return memToFieldsMap;
133
+ }
134
+ /// Return GepObjVarMap
135
+ inline NodeOffsetMap& getGepObjNodeMap()
136
+ {
137
+ return GepObjVarMap;
138
+ }
139
+ /// Return valid pointers
140
+ inline OrderedNodeSet& getAllValidPtrs()
141
+ {
142
+ return candidatePointers;
143
+ }
144
+ /// Initialize candidate pointers
145
+ void initialiseCandidatePointers();
146
+
147
+ /// Destructor
148
+ virtual ~SVFIR()
149
+ {
150
+ destroy();
151
+ }
152
+ /// SVFIR build configurations
153
+ //@{
154
+ /// Whether to handle blackhole edge
155
+ static void handleBlackHole(bool b);
156
+ //@}
157
+
158
+ /// Set/Get ICFG
159
+ inline void setICFG(ICFG* i)
160
+ {
161
+ icfg = i;
162
+ }
163
+ inline ICFG* getICFG() const
164
+ {
165
+ assert(icfg->totalICFGNode>0 && "empty ICFG! Build SVF IR first!");
166
+ return icfg;
167
+ }
168
+ /// Set/Get CHG
169
+ inline void setCHG(CommonCHGraph* c)
170
+ {
171
+ chgraph = c;
172
+ }
173
+ inline CommonCHGraph* getCHG()
174
+ {
175
+ assert(chgraph && "empty ICFG! Build SVF IR first!");
176
+ return chgraph;
177
+ }
178
+
179
+ /// Set/Get CG
180
+ inline void setCallGraph(CallGraph* c)
181
+ {
182
+ callGraph = c;
183
+ }
184
+ inline CallGraph* getCallGraph()
185
+ {
186
+ assert(callGraph && "empty CallGraph! Build SVF IR first!");
187
+ return callGraph;
188
+ }
189
+
190
+ const FunObjVar* getFunObjVar(const std::string& name);
191
+
192
+ inline const std::string& getModuleIdentifier() const
193
+ {
194
+ if (pagReadFromTxt.empty())
195
+ {
196
+ assert(!moduleIdentifier.empty() &&
197
+ "No module found! Reading from a file other than LLVM-IR?");
198
+ return moduleIdentifier;
199
+ }
200
+ else
201
+ {
202
+ return pagReadFromTxt;
203
+ }
204
+ }
205
+
206
+ static inline std::string pagFileName()
207
+ {
208
+ return pagReadFromTxt;
209
+ }
210
+
211
+ static inline bool pagReadFromTXT()
212
+ {
213
+ return !pagReadFromTxt.empty();
214
+ }
215
+
216
+ static inline void setPagFromTXT(const std::string& txt)
217
+ {
218
+ pagReadFromTxt = txt;
219
+ }
220
+
221
+ inline void setModuleIdentifier(const std::string& moduleIdentifier)
222
+ {
223
+ this->moduleIdentifier = moduleIdentifier;
224
+ }
225
+
226
+ /// Get/set methods to get SVFStmts based on their kinds and ICFGNodes
227
+ //@{
228
+ /// Get edges set according to its kind
229
+ inline SVFStmt::SVFStmtSetTy& getSVFStmtSet(SVFStmt::PEDGEK kind)
230
+ {
231
+ return KindToSVFStmtSetMap[kind];
232
+ }
233
+ /// Get PTA edges set according to its kind
234
+ inline SVFStmt::SVFStmtSetTy& getPTASVFStmtSet(SVFStmt::PEDGEK kind)
235
+ {
236
+ return KindToPTASVFStmtSetMap[kind];
237
+ }
238
+ /// Whether this instruction has SVFIR Edge
239
+ inline bool hasSVFStmtList(const ICFGNode* inst) const
240
+ {
241
+ return icfgNode2SVFStmtsMap.find(inst) != icfgNode2SVFStmtsMap.end();
242
+ }
243
+ inline bool hasPTASVFStmtList(const ICFGNode* inst) const
244
+ {
245
+ return icfgNode2PTASVFStmtsMap.find(inst) !=
246
+ icfgNode2PTASVFStmtsMap.end();
247
+ }
248
+ /// Given an instruction, get all its PAGEdges
249
+ inline SVFStmtList& getSVFStmtList(const ICFGNode* inst)
250
+ {
251
+ return icfgNode2SVFStmtsMap[inst];
252
+ }
253
+ /// Given an instruction, get all its PTA PAGEdges
254
+ inline SVFStmtList& getPTASVFStmtList(const ICFGNode* inst)
255
+ {
256
+ return icfgNode2PTASVFStmtsMap[inst];
257
+ }
258
+ /// Add a SVFStmt into instruction map
259
+ inline void addToSVFStmtList(ICFGNode* inst, SVFStmt* edge)
260
+ {
261
+ edge->setICFGNode(inst);
262
+ icfgNode2SVFStmtsMap[inst].push_back(edge);
263
+ if (edge->isPTAEdge())
264
+ icfgNode2PTASVFStmtsMap[inst].push_back(edge);
265
+ }
266
+ /// Add a base SVFType* and all its field location sets to an arg NodeId
267
+ inline void addToTypeLocSetsMap(NodeID argId, SVFTypeLocSetsPair& locSets)
268
+ {
269
+ typeLocSetsMap[argId]=locSets;
270
+ }
271
+ /// Given an arg NodeId, get its base SVFType* and all its field location sets
272
+ inline SVFTypeLocSetsPair& getTypeLocSetsMap(NodeID argId)
273
+ {
274
+ return typeLocSetsMap[argId];
275
+ }
276
+ /// Get global PAGEdges (not in a procedure)
277
+ inline SVFStmtSet& getGlobalSVFStmtSet()
278
+ {
279
+ return globSVFStmtSet;
280
+ }
281
+ /// Get all callsites
282
+ inline const CallSiteSet& getCallSiteSet() const
283
+ {
284
+ return callSiteSet;
285
+ }
286
+ /// Whether this SVFVar is a result operand a of phi node
287
+ inline bool isPhiNode(const SVFVar* node) const
288
+ {
289
+ return phiNodeMap.find(node) != phiNodeMap.end();
290
+ }
291
+
292
+ /// Function has arguments list
293
+ inline bool hasFunArgsList(const FunObjVar* func) const
294
+ {
295
+ return (funArgsListMap.find(func) != funArgsListMap.end());
296
+ }
297
+ /// Get function arguments list
298
+ inline FunToArgsListMap& getFunArgsMap()
299
+ {
300
+ return funArgsListMap;
301
+ }
302
+ /// Get function arguments list
303
+ inline const SVFVarList& getFunArgsList(const FunObjVar* func) const
304
+ {
305
+ FunToArgsListMap::const_iterator it = funArgsListMap.find(func);
306
+ assert(it != funArgsListMap.end() && "this function doesn't have arguments");
307
+ return it->second;
308
+ }
309
+ /// Callsite has argument list
310
+ inline bool hasCallSiteArgsMap(const CallICFGNode* cs) const
311
+ {
312
+ return (callSiteArgsListMap.find(cs) != callSiteArgsListMap.end());
313
+ }
314
+ /// Get callsite argument list
315
+ inline CSToArgsListMap& getCallSiteArgsMap()
316
+ {
317
+ return callSiteArgsListMap;
318
+ }
319
+ /// Get callsite argument list
320
+ inline const SVFVarList& getCallSiteArgsList(const CallICFGNode* cs) const
321
+ {
322
+ CSToArgsListMap::const_iterator it = callSiteArgsListMap.find(cs);
323
+ assert(it != callSiteArgsListMap.end() && "this call site doesn't have arguments");
324
+ return it->second;
325
+ }
326
+ /// Get callsite return
327
+ inline CSToRetMap& getCallSiteRets()
328
+ {
329
+ return callSiteRetMap;
330
+ }
331
+ /// Get callsite return
332
+ inline const SVFVar* getCallSiteRet(const RetICFGNode* cs) const
333
+ {
334
+ CSToRetMap::const_iterator it = callSiteRetMap.find(cs);
335
+ assert(it != callSiteRetMap.end() && "this call site doesn't have return");
336
+ return it->second;
337
+ }
338
+ inline bool callsiteHasRet(const RetICFGNode* cs) const
339
+ {
340
+ return callSiteRetMap.find(cs) != callSiteRetMap.end();
341
+ }
342
+ /// Get function return list
343
+ inline FunToRetMap& getFunRets()
344
+ {
345
+ return funRetMap;
346
+ }
347
+ /// Get function return list
348
+ inline const SVFVar* getFunRet(const FunObjVar* func) const
349
+ {
350
+ FunToRetMap::const_iterator it = funRetMap.find(func);
351
+ assert(it != funRetMap.end() && "this function doesn't have return");
352
+ return it->second;
353
+ }
354
+ inline bool funHasRet(const FunObjVar* func) const
355
+ {
356
+ return funRetMap.find(func) != funRetMap.end();
357
+ }
358
+ //@}
359
+
360
+ /// Node and edge statistics
361
+ //@{
362
+ inline u32_t getFieldValNodeNum() const
363
+ {
364
+ return GepValObjMap.size();
365
+ }
366
+ inline u32_t getFieldObjNodeNum() const
367
+ {
368
+ return GepObjVarMap.size();
369
+ }
370
+ //@}
371
+
372
+ /// Due to constraint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar.
373
+ NodeID getGepValVar(NodeID curInst, NodeID base,
374
+ const AccessPath& ap) const;
375
+
376
+ /// Add/get indirect callsites
377
+ //@{
378
+ inline const CallSiteToFunPtrMap& getIndirectCallsites() const
379
+ {
380
+ return indCallSiteToFunPtrMap;
381
+ }
382
+ inline NodeID getFunPtr(const CallICFGNode* cs) const
383
+ {
384
+ CallSiteToFunPtrMap::const_iterator it = indCallSiteToFunPtrMap.find(cs);
385
+ assert(it!=indCallSiteToFunPtrMap.end() && "indirect callsite not have a function pointer?");
386
+ return it->second;
387
+ }
388
+ inline const CallSiteSet& getIndCallSites(NodeID funPtr) const
389
+ {
390
+ FunPtrToCallSitesMap::const_iterator it = funPtrToCallSitesMap.find(funPtr);
391
+ assert(it!=funPtrToCallSitesMap.end() && "function pointer not used at any indirect callsite?");
392
+ return it->second;
393
+ }
394
+ inline bool isIndirectCallSites(const CallICFGNode* cs) const
395
+ {
396
+ return (indCallSiteToFunPtrMap.find(cs) != indCallSiteToFunPtrMap.end());
397
+ }
398
+ inline bool isFunPtr(NodeID id) const
399
+ {
400
+ return (funPtrToCallSitesMap.find(id) != funPtrToCallSitesMap.end());
401
+ }
402
+ //@}
403
+ /// Get an edge according to src, dst and kind
404
+ //@{
405
+ inline SVFStmt* getIntraPAGEdge(NodeID src, NodeID dst, SVFStmt::PEDGEK kind)
406
+ {
407
+ return getIntraPAGEdge(getGNode(src), getGNode(dst), kind);
408
+ }
409
+ inline SVFStmt* getIntraPAGEdge(SVFVar* src, SVFVar* dst, SVFStmt::PEDGEK kind)
410
+ {
411
+ SVFStmt edge(src, dst, kind, false);
412
+ const SVFStmt::SVFStmtSetTy& edgeSet = getSVFStmtSet(kind);
413
+ SVFStmt::SVFStmtSetTy::const_iterator it = edgeSet.find(&edge);
414
+ assert(it != edgeSet.end() && "can not find pag edge");
415
+ return (*it);
416
+ }
417
+ //@}
418
+
419
+ /// Get memory object - Return memory object according to pag node id
420
+ /// return whole allocated memory object if this node is a gep obj node
421
+ /// return nullptr is this node is not a ObjVar type
422
+ //@{
423
+ inline const BaseObjVar* getBaseObject(NodeID id) const
424
+ {
425
+ const SVFVar* node = getGNode(id);
426
+ if(const GepObjVar* gepObjVar = SVFUtil::dyn_cast<GepObjVar>(node))
427
+ return SVFUtil::dyn_cast<BaseObjVar>(
428
+ getGNode(gepObjVar->getBaseNode()));
429
+ else
430
+ return SVFUtil::dyn_cast<BaseObjVar>(node);
431
+ }
432
+
433
+ inline const ValVar* getBaseValVar(NodeID id) const
434
+ {
435
+ const SVFVar* node = getGNode(id);
436
+ if(const GepValVar* gepVar = SVFUtil::dyn_cast<GepValVar>(node))
437
+ return gepVar->getBaseNode();
438
+ else
439
+ return SVFUtil::dyn_cast<ValVar>(node);
440
+ }
441
+ //@}
442
+
443
+ /// Get a field SVFIR Object node according to base mem obj and offset
444
+ NodeID getGepObjVar(const BaseObjVar* baseObj, const APOffset& ap);
445
+ /// Get a field obj SVFIR node according to a mem obj and a given offset
446
+ NodeID getGepObjVar(NodeID id, const APOffset& ap) ;
447
+ /// Get a field-insensitive obj SVFIR node according to a mem obj
448
+ //@{
449
+ inline NodeID getFIObjVar(const BaseObjVar* obj) const
450
+ {
451
+ return obj->getId();
452
+ }
453
+ inline NodeID getFIObjVar(NodeID id) const
454
+ {
455
+ return getBaseObjVar(id);
456
+ }
457
+ //@}
458
+
459
+ /// Get black hole and constant id
460
+ //@{
461
+
462
+ inline bool isBlkObjOrConstantObj(NodeID id) const
463
+ {
464
+ return (isBlkObj(id) || isConstantObj(id));
465
+ }
466
+
467
+ inline bool isConstantObj(NodeID id) const
468
+ {
469
+ const BaseObjVar* obj = getBaseObject(id);
470
+ assert(obj && "not an object node?");
471
+ return isConstantSym(id) ||
472
+ obj->isConstDataOrConstGlobal();
473
+ }
474
+ //@}
475
+
476
+ /// Base and Offset methods for Value and Object node
477
+ //@{
478
+ /// Get a base pointer node given a field pointer
479
+ inline NodeID getBaseObjVar(NodeID id) const
480
+ {
481
+ return getBaseObject(id)->getId();
482
+ }
483
+ //@}
484
+
485
+ /// Get all fields of an object
486
+ //@{
487
+ NodeBS& getAllFieldsObjVars(const BaseObjVar* obj);
488
+ NodeBS& getAllFieldsObjVars(NodeID id);
489
+ NodeBS getFieldsAfterCollapse(NodeID id);
490
+ //@}
491
+ inline NodeID addDummyValNode()
492
+ {
493
+ return addDummyValNode(NodeIDAllocator::get()->allocateValueId(), nullptr);
494
+ }
495
+ inline NodeID addDummyObjNode(const SVFType* type)
496
+ {
497
+ return addDummyObjNode(NodeIDAllocator::get()->allocateObjectId(), type);
498
+ }
499
+ /// Whether a node is a valid pointer
500
+ //@{
501
+ bool isValidPointer(NodeID nodeId) const;
502
+
503
+ bool isValidTopLevelPtr(const SVFVar* node);
504
+ //@}
505
+
506
+ /// Print SVFIR
507
+ void print();
508
+
509
+ private:
510
+
511
+ /// Map a SVFStatement type to a set of corresponding SVF statements
512
+ inline void addToStmt2TypeMap(SVFStmt* edge)
513
+ {
514
+ bool added = KindToSVFStmtSetMap[edge->getEdgeKind()].insert(edge).second;
515
+ (void)added; // Suppress warning of unused variable under release build
516
+ assert(added && "duplicated edge, not added!!!");
517
+ /// this is a pointer-related SVFStmt if (1) both RHS and LHS are pointers or (2) this an int2ptr statment, i.e., LHS = int2ptr RHS
518
+ if (edge->isPTAEdge() || (SVFUtil::isa<CopyStmt>(edge) && SVFUtil::cast<CopyStmt>(edge)->isInt2Ptr()))
519
+ {
520
+ totalPTAPAGEdge++;
521
+ KindToPTASVFStmtSetMap[edge->getEdgeKind()].insert(edge);
522
+ }
523
+ }
524
+ /// Get/set method for function/callsite arguments and returns
525
+ //@{
526
+ /// Add function arguments
527
+ inline void addFunArgs(const FunObjVar* fun, const SVFVar* arg)
528
+ {
529
+ FunEntryICFGNode* funEntryBlockNode = icfg->getFunEntryICFGNode(fun);
530
+ funEntryBlockNode->addFormalParms(arg);
531
+ funArgsListMap[fun].push_back(arg);
532
+ }
533
+ /// Add function returns
534
+ inline void addFunRet(const FunObjVar* fun, const SVFVar* ret)
535
+ {
536
+ FunExitICFGNode* funExitBlockNode = icfg->getFunExitICFGNode(fun);
537
+ funExitBlockNode->addFormalRet(ret);
538
+ funRetMap[fun] = ret;
539
+ }
540
+ /// Add callsite arguments
541
+ inline void addCallSiteArgs(CallICFGNode* callBlockNode,const ValVar* arg)
542
+ {
543
+ callBlockNode->addActualParms(arg);
544
+ callSiteArgsListMap[callBlockNode].push_back(arg);
545
+ }
546
+ /// Add callsite returns
547
+ inline void addCallSiteRets(RetICFGNode* retBlockNode,const SVFVar* arg)
548
+ {
549
+ retBlockNode->addActualRet(arg);
550
+ callSiteRetMap[retBlockNode]= arg;
551
+ }
552
+ /// Add indirect callsites
553
+ inline void addIndirectCallsites(const CallICFGNode* cs,NodeID funPtr)
554
+ {
555
+ bool added = indCallSiteToFunPtrMap.emplace(cs, funPtr).second;
556
+ (void) added;
557
+ funPtrToCallSitesMap[funPtr].insert(cs);
558
+ assert(added && "adding the same indirect callsite twice?");
559
+ }
560
+
561
+ /// add node into SVFIR
562
+ //@{
563
+ /// Add a value (pointer) node
564
+ inline NodeID addValNode(NodeID i, const SVFType* type, const ICFGNode* icfgNode)
565
+ {
566
+ SVFVar *node = new ValVar(i, type, icfgNode, ValVar::ValNode);
567
+ return addValNode(node);
568
+ }
569
+
570
+ NodeID addFunValNode(NodeID i, const ICFGNode* icfgNode, const FunObjVar* funObjVar, const SVFType* type)
571
+ {
572
+ FunValVar* node = new FunValVar(i, icfgNode, funObjVar, type);
573
+ return addValNode(node);
574
+ }
575
+
576
+ NodeID addArgValNode(NodeID i, u32_t argNo, const ICFGNode* icfgNode, const FunObjVar* callGraphNode, const SVFType* type)
577
+ {
578
+ ArgValVar* node =
579
+ new ArgValVar(i, argNo, icfgNode, callGraphNode, type);
580
+ return addValNode(node);
581
+ }
582
+
583
+ inline NodeID addConstantFPValNode(const NodeID i, double dval,
584
+ const ICFGNode* icfgNode, const SVFType* type)
585
+ {
586
+ SVFVar* node = new ConstFPValVar(i, dval, icfgNode, type);
587
+ return addNode(node);
588
+ }
589
+
590
+ inline NodeID addConstantIntValNode(NodeID i, const std::pair<s64_t, u64_t>& intValue,
591
+ const ICFGNode* icfgNode, const SVFType* type)
592
+ {
593
+ SVFVar* node = new ConstIntValVar(i, intValue.first, intValue.second, icfgNode, type);
594
+ return addNode(node);
595
+ }
596
+
597
+ inline NodeID addConstantNullPtrValNode(const NodeID i, const ICFGNode* icfgNode, const SVFType* type)
598
+ {
599
+ SVFVar* node = new ConstNullPtrValVar(i, icfgNode, type);
600
+ return addNode(node);
601
+ }
602
+
603
+ inline NodeID addGlobalValNode(const NodeID i, const ICFGNode* icfgNode, const SVFType* svfType)
604
+ {
605
+ SVFVar* node = new GlobalValVar(i, icfgNode, svfType);
606
+ return addNode(node);
607
+ }
608
+
609
+ inline NodeID addConstantAggValNode(const NodeID i, const ICFGNode* icfgNode, const SVFType* svfType)
610
+ {
611
+ SVFVar* node = new ConstAggValVar(i, icfgNode, svfType);
612
+ return addNode(node);
613
+ }
614
+
615
+ inline NodeID addConstantDataValNode(const NodeID i, const ICFGNode* icfgNode, const SVFType* type)
616
+ {
617
+ SVFVar* node = new ConstDataValVar(i, icfgNode, type);
618
+ return addNode(node);
619
+ }
620
+
621
+
622
+ /// Add a memory obj node
623
+ inline NodeID addObjNode(NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
624
+ {
625
+ return addFIObjNode( i, ti, type, node);
626
+ }
627
+
628
+ /**
629
+ * Creates and adds a heap object node to the SVFIR
630
+ */
631
+ inline NodeID addHeapObjNode(NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
632
+ {
633
+ memToFieldsMap[i].set(i);
634
+ HeapObjVar *heapObj = new HeapObjVar(i, ti, type, node);
635
+ return addObjNode(heapObj);
636
+ }
637
+
638
+ /**
639
+ * Creates and adds a stack object node to the SVFIR
640
+ */
641
+ inline NodeID addStackObjNode(NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
642
+ {
643
+ memToFieldsMap[i].set(i);
644
+ StackObjVar *stackObj = new StackObjVar(i, ti, type, node);
645
+ return addObjNode(stackObj);
646
+ }
647
+
648
+ NodeID addFunObjNode(NodeID id, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
649
+ {
650
+ memToFieldsMap[id].set(id);
651
+ FunObjVar* funObj = new FunObjVar(id, ti, type, node);
652
+ return addObjNode(funObj);
653
+ }
654
+
655
+
656
+ inline NodeID addConstantFPObjNode(NodeID i, ObjTypeInfo* ti, double dval, const SVFType* type, const ICFGNode* node)
657
+ {
658
+ memToFieldsMap[i].set(i);
659
+ ConstFPObjVar* conObj = new ConstFPObjVar(i, dval, ti, type, node);
660
+ return addObjNode(conObj);
661
+ }
662
+
663
+
664
+ inline NodeID addConstantIntObjNode(NodeID i, ObjTypeInfo* ti, const std::pair<s64_t, u64_t>& intValue, const SVFType* type, const ICFGNode* node)
665
+ {
666
+ memToFieldsMap[i].set(i);
667
+ ConstIntObjVar* conObj =
668
+ new ConstIntObjVar(i, intValue.first, intValue.second, ti, type, node);
669
+ return addObjNode(conObj);
670
+ }
671
+
672
+
673
+ inline NodeID addConstantNullPtrObjNode(const NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
674
+ {
675
+ memToFieldsMap[i].set(i);
676
+ ConstNullPtrObjVar* conObj = new ConstNullPtrObjVar(i, ti, type, node);
677
+ return addObjNode(conObj);
678
+ }
679
+
680
+ inline NodeID addGlobalObjNode(const NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
681
+ {
682
+ memToFieldsMap[i].set(i);
683
+ GlobalObjVar* gObj = new GlobalObjVar(i, ti, type, node);
684
+ return addObjNode(gObj);
685
+ }
686
+ inline NodeID addConstantAggObjNode(const NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
687
+ {
688
+ memToFieldsMap[i].set(i);
689
+ ConstAggObjVar* conObj = new ConstAggObjVar(i, ti, type, node);
690
+ return addObjNode(conObj);
691
+ }
692
+ inline NodeID addConstantDataObjNode(const NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
693
+ {
694
+ memToFieldsMap[i].set(i);
695
+ ConstDataObjVar* conObj = new ConstDataObjVar(i, ti, type, node);
696
+ return addObjNode(conObj);
697
+ }
698
+
699
+ /// Add a unique return node for a procedure
700
+ inline NodeID addRetNode(NodeID i, const FunObjVar* callGraphNode, const SVFType* type, const ICFGNode* icn)
701
+ {
702
+ SVFVar *node = new RetValPN(i, callGraphNode, type, icn);
703
+ return addRetNode(callGraphNode, node);
704
+ }
705
+ /// Add a unique vararg node for a procedure
706
+ inline NodeID addVarargNode(NodeID i, const FunObjVar* val, const SVFType* type, const ICFGNode* n)
707
+ {
708
+ SVFVar *node = new VarArgValPN(i, val, type, n);
709
+ return addNode(node);
710
+ }
711
+
712
+ /// Add a temp field value node, this method can only invoked by getGepValVar
713
+ NodeID addGepValNode(NodeID curInst, const ValVar* base, const AccessPath& ap, NodeID i, const SVFType* type, const ICFGNode* node);
714
+ /// Add a field obj node, this method can only invoked by getGepObjVar
715
+ NodeID addGepObjNode(const BaseObjVar* baseObj, const APOffset& apOffset, const NodeID gepId);
716
+ /// Add a field-insensitive node, this method can only invoked by getFIGepObjNode
717
+ NodeID addFIObjNode(NodeID i, ObjTypeInfo* ti, const SVFType* type, const ICFGNode* node)
718
+ {
719
+ memToFieldsMap[i].set(i);
720
+ BaseObjVar* baseObj = new BaseObjVar(i, ti, type, node);
721
+ return addObjNode(baseObj);
722
+ }
723
+
724
+
725
+ //@}
726
+
727
+ /// Add a dummy value/object node according to node ID (llvm value is null)
728
+ //@{
729
+ inline NodeID addDummyValNode(NodeID i, const ICFGNode* node)
730
+ {
731
+ return addValNode(new DummyValVar(i, node));
732
+ }
733
+ inline NodeID addDummyObjNode(NodeID i, const SVFType* type)
734
+ {
735
+ if (idToObjTypeInfoMap().find(i) == idToObjTypeInfoMap().end())
736
+ {
737
+ ObjTypeInfo* ti = createObjTypeInfo(type);
738
+ idToObjTypeInfoMap()[i] = ti;
739
+ return addObjNode(new DummyObjVar(i, ti, nullptr, type));
740
+ }
741
+ else
742
+ {
743
+ return addObjNode(new DummyObjVar(i, getObjTypeInfo(i), nullptr, type));
744
+ }
745
+ }
746
+
747
+ inline NodeID addBlackholeObjNode()
748
+ {
749
+ return addObjNode(new DummyObjVar(getBlackHoleNode(), getObjTypeInfo(getBlackHoleNode()), nullptr));
750
+ }
751
+ inline NodeID addConstantObjNode()
752
+ {
753
+ return addObjNode(new DummyObjVar(getConstantNode(), getObjTypeInfo(getConstantNode()), nullptr));
754
+ }
755
+ inline NodeID addBlackholePtrNode()
756
+ {
757
+ return addDummyValNode(getBlkPtr(), nullptr);
758
+ }
759
+ //@}
760
+
761
+ /// Add a value (pointer) node
762
+ inline NodeID addValNode(SVFVar *node)
763
+ {
764
+ assert(node && "node cannot be nullptr.");
765
+ assert(hasGNode(node->getId()) == false &&
766
+ "This NodeID clashes here. Please check NodeIDAllocator. Switch "
767
+ "Strategy::DBUG to SEQ or DENSE");
768
+ return addNode(node);
769
+ }
770
+ /// Add a memory obj node
771
+ inline NodeID addObjNode(SVFVar *node)
772
+ {
773
+ assert(node && "node cannot be nullptr.");
774
+ assert(hasGNode(node->getId()) == false &&
775
+ "This NodeID clashes here. Please check NodeIDAllocator. Switch "
776
+ "Strategy::DBUG to SEQ or DENSE");
777
+ return addNode(node);
778
+ }
779
+ /// Add a unique return node for a procedure
780
+ inline NodeID addRetNode(const FunObjVar*, SVFVar *node)
781
+ {
782
+ return addNode(node);
783
+ }
784
+ /// Add a unique vararg node for a procedure
785
+ inline NodeID addVarargNode(const FunObjVar*, SVFVar *node)
786
+ {
787
+ return addNode(node);
788
+ }
789
+
790
+ /// Add global PAGEdges (not in a procedure)
791
+ inline void addGlobalPAGEdge(const SVFStmt* edge)
792
+ {
793
+ globSVFStmtSet.insert(edge);
794
+ }
795
+ /// Add callsites
796
+ inline void addCallSite(const CallICFGNode* call)
797
+ {
798
+ callSiteSet.insert(call);
799
+ }
800
+ /// Add an edge into SVFIR
801
+ //@{
802
+ /// Add Address edge
803
+ AddrStmt* addAddrStmt(NodeID src, NodeID dst);
804
+ /// Add Copy edge
805
+ CopyStmt* addCopyStmt(NodeID src, NodeID dst, CopyStmt::CopyKind type);
806
+
807
+ /// Add phi node information
808
+ PhiStmt* addPhiStmt(NodeID res, NodeID opnd, const ICFGNode* pred);
809
+ /// Add SelectStmt
810
+ SelectStmt* addSelectStmt(NodeID res, NodeID op1, NodeID op2, NodeID cond);
811
+ /// Add Copy edge
812
+ CmpStmt* addCmpStmt(NodeID op1, NodeID op2, NodeID dst, u32_t predict);
813
+ /// Add Copy edge
814
+ BinaryOPStmt* addBinaryOPStmt(NodeID op1, NodeID op2, NodeID dst,
815
+ u32_t opcode);
816
+ /// Add Unary edge
817
+ UnaryOPStmt* addUnaryOPStmt(NodeID src, NodeID dst, u32_t opcode);
818
+ /// Add BranchStmt
819
+ BranchStmt* addBranchStmt(NodeID br, NodeID cond,
820
+ const BranchStmt::SuccAndCondPairVec& succs);
821
+ /// Add Load edge
822
+ LoadStmt* addLoadStmt(NodeID src, NodeID dst);
823
+ /// Add Store edge
824
+ StoreStmt* addStoreStmt(NodeID src, NodeID dst, const ICFGNode* val);
825
+ /// Add Call edge
826
+ CallPE* addCallPE(NodeID src, NodeID dst, const CallICFGNode* cs,
827
+ const FunEntryICFGNode* entry);
828
+ /// Add Return edge
829
+ RetPE* addRetPE(NodeID src, NodeID dst, const CallICFGNode* cs,
830
+ const FunExitICFGNode* exit);
831
+ /// Add Gep edge
832
+ GepStmt* addGepStmt(NodeID src, NodeID dst, const AccessPath& ap,
833
+ bool constGep);
834
+ /// Add Offset(Gep) edge
835
+ GepStmt* addNormalGepStmt(NodeID src, NodeID dst, const AccessPath& ap);
836
+ /// Add Variant(Gep) edge
837
+ GepStmt* addVariantGepStmt(NodeID src, NodeID dst, const AccessPath& ap);
838
+ /// Add Thread fork edge for parameter passing
839
+ TDForkPE* addThreadForkPE(NodeID src, NodeID dst, const CallICFGNode* cs,
840
+ const FunEntryICFGNode* entry);
841
+ /// Add Thread join edge for parameter passing
842
+ TDJoinPE* addThreadJoinPE(NodeID src, NodeID dst, const CallICFGNode* cs,
843
+ const FunExitICFGNode* exit);
844
+ //@}
845
+
846
+ /// Set a pointer points-to black hole (e.g. int2ptr)
847
+ SVFStmt* addBlackHoleAddrStmt(NodeID node);
848
+ };
849
+
850
+ typedef SVFIR PAG;
851
+
852
+ } // End namespace SVF
853
+
854
+
855
+
856
+ #endif /* INCLUDE_SVFIR_H_ */