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,255 @@
1
+ //===- PointsTo.h -- Wrapper of set-like data structures ------------//
2
+
3
+ /*
4
+ * PointsTo.h
5
+ *
6
+ * Abstracts away data structures to be used as points-to sets.
7
+ *
8
+ * Created on: Feb 01, 2021
9
+ * Author: Mohamad Barbar
10
+ */
11
+
12
+ #ifndef POINTSTO_H_
13
+ #define POINTSTO_H_
14
+
15
+ #include <vector>
16
+
17
+ #include "SVFIR/SVFType.h"
18
+ #include "Util/BitVector.h"
19
+ #include "Util/CoreBitVector.h"
20
+ #include "Util/SparseBitVector.h"
21
+
22
+ namespace SVF
23
+ {
24
+
25
+ /// Wraps data structures to provide a points-to set.
26
+ /// Underlying data structure can be changed globally.
27
+ /// Includes support for mapping nodes for better internal representation.
28
+ class PointsTo
29
+ {
30
+ public:
31
+ enum Type
32
+ {
33
+ SBV,
34
+ CBV,
35
+ BV,
36
+ };
37
+
38
+ class PointsToIterator;
39
+ typedef PointsToIterator const_iterator;
40
+ typedef const_iterator iterator;
41
+
42
+ typedef std::shared_ptr<std::vector<NodeID>> MappingPtr;
43
+
44
+ public:
45
+ /// Construct empty points-to set.
46
+ PointsTo();
47
+ /// Copy constructor.
48
+ PointsTo(const PointsTo &pt);
49
+ /// Move constructor.
50
+ PointsTo(PointsTo &&pt) noexcept ;
51
+
52
+ ~PointsTo();
53
+
54
+ /// Copy assignment.
55
+ PointsTo &operator=(const PointsTo &rhs);
56
+
57
+ /// Move assignment.
58
+ PointsTo &operator=(PointsTo &&rhs) noexcept ;
59
+
60
+ /// Returns true if set is empty.
61
+ bool empty() const;
62
+
63
+ /// Returns number of elements.
64
+ u32_t count() const;
65
+
66
+ /// Empty the set.
67
+ void clear();
68
+
69
+ /// Returns true if n is in this set.
70
+ bool test(u32_t n) const;
71
+
72
+ /// Check if n is in set. If it is, returns false.
73
+ /// Otherwise, inserts n and returns true.
74
+ bool test_and_set(u32_t n);
75
+
76
+ /// Inserts n in the set.
77
+ void set(u32_t n);
78
+
79
+ /// Removes n from the set.
80
+ void reset(u32_t n);
81
+
82
+ /// Returns true if this set is a superset of rhs.
83
+ bool contains(const PointsTo &rhs) const;
84
+
85
+ /// Returns true if this set and rhs share any elements.
86
+ bool intersects(const PointsTo &rhs) const;
87
+
88
+ /// Returns the first element the set. Returns -1 when the set is empty.
89
+ /// TODO: should we diverge from LLVM about the int return?
90
+ int find_first();
91
+
92
+ /// Returns true if this set and rhs contain exactly the same elements.
93
+ bool operator==(const PointsTo &rhs) const;
94
+
95
+ /// Returns true if either this set or rhs has an element not in the other.
96
+ bool operator!=(const PointsTo &rhs) const;
97
+
98
+ /// Put union of this set and rhs into this set.
99
+ /// Returns true if this set changed.
100
+ bool operator|=(const PointsTo &rhs);
101
+ bool operator|=(const NodeBS &rhs);
102
+
103
+ /// Put intersection of this set and rhs into this set.
104
+ /// Returns true if this set changed.
105
+ bool operator&=(const PointsTo &rhs);
106
+
107
+ /// Remove elements in rhs from this set.
108
+ /// Returns true if this set changed.
109
+ bool operator-=(const PointsTo &rhs);
110
+
111
+ /// Put intersection of this set with complement of rhs into this set.
112
+ /// Returns true if this set changed.
113
+ bool intersectWithComplement(const PointsTo &rhs);
114
+
115
+ /// Put intersection of lhs with complement of rhs into this set (overwrites).
116
+ void intersectWithComplement(const PointsTo &lhs, const PointsTo &rhs);
117
+
118
+ /// Returns this points-to set as a NodeBS.
119
+ NodeBS toNodeBS() const;
120
+
121
+ /// Return a hash of this set.
122
+ size_t hash() const;
123
+
124
+ /// Checks if this points-to set is using the current best mapping.
125
+ /// If not, remaps.
126
+ void checkAndRemap();
127
+
128
+ const_iterator begin() const
129
+ {
130
+ return PointsToIterator(this);
131
+ }
132
+ const_iterator end() const
133
+ {
134
+ return PointsToIterator(this, true);
135
+ }
136
+
137
+ MappingPtr getNodeMapping() const;
138
+
139
+ static MappingPtr getCurrentBestNodeMapping();
140
+ static MappingPtr getCurrentBestReverseNodeMapping();
141
+ static void setCurrentBestNodeMapping(MappingPtr newCurrentBestNodeMapping,
142
+ MappingPtr newCurrentBestReverseNodeMapping);
143
+
144
+ private:
145
+ /// Returns nodeMapping[n], checking for nullptr and size.
146
+ NodeID getInternalNode(NodeID n) const;
147
+
148
+ /// Returns reverseNodeMapping[n], checking for nullptr and size.
149
+ NodeID getExternalNode(NodeID n) const;
150
+
151
+ /// Returns true if this points-to set and pt have the same type, nodeMapping,
152
+ /// and reverseNodeMapping
153
+ bool metaSame(const PointsTo &pt) const;
154
+
155
+ private:
156
+ /// Best node mapping we know of the for the analyses at hand.
157
+ static MappingPtr currentBestNodeMapping;
158
+ /// Likewise, but reversed.
159
+ static MappingPtr currentBestReverseNodeMapping;
160
+
161
+ /// Holds backing data structure.
162
+ /// TODO: std::variant when we move to C++17.
163
+ union
164
+ {
165
+ /// Sparse bit vector backing.
166
+ SparseBitVector<> sbv;
167
+ /// Core bit vector backing.
168
+ CoreBitVector cbv;
169
+ /// Bit vector backing.
170
+ BitVector bv;
171
+ };
172
+
173
+ /// Type of this points-to set.
174
+ enum Type type;
175
+ /// External nodes -> internal nodes.
176
+ MappingPtr nodeMapping;
177
+ /// Internal nodes -> external nodes.
178
+ MappingPtr reverseNodeMapping;
179
+
180
+ public:
181
+ class PointsToIterator
182
+ {
183
+ public:
184
+ using iterator_category = std::forward_iterator_tag;
185
+ using value_type = u32_t;
186
+ using difference_type = std::ptrdiff_t;
187
+ using pointer = u32_t *;
188
+ using reference = u32_t &;
189
+
190
+ /// Deleted because we don't want iterators with null pt.
191
+ PointsToIterator() = delete;
192
+ PointsToIterator(const PointsToIterator &pt);
193
+ PointsToIterator(PointsToIterator &&pt) noexcept ;
194
+
195
+ /// Returns an iterator to the beginning of pt if end is false, and to
196
+ /// the end of pt if end is true.
197
+ explicit PointsToIterator(const PointsTo *pt, bool end=false);
198
+
199
+ PointsToIterator &operator=(const PointsToIterator &rhs);
200
+ PointsToIterator &operator=(PointsToIterator &&rhs) noexcept ;
201
+
202
+ /// Pre-increment: ++it.
203
+ const PointsToIterator &operator++();
204
+
205
+ /// Post-increment: it++.
206
+ const PointsToIterator operator++(int);
207
+
208
+ /// Dereference: *it.
209
+ u32_t operator*() const;
210
+
211
+ /// Equality: *this == rhs.
212
+ bool operator==(const PointsToIterator &rhs) const;
213
+
214
+ /// Inequality: *this != rhs.
215
+ bool operator!=(const PointsToIterator &rhs) const;
216
+
217
+ private:
218
+ bool atEnd() const;
219
+
220
+ private:
221
+ /// PointsTo we are iterating over.
222
+ const PointsTo *pt;
223
+ /// Iterator into the backing data structure. Discriminated by pt->type.
224
+ /// TODO: std::variant when we move to C++17.
225
+ union
226
+ {
227
+ SparseBitVector<>::iterator sbvIt;
228
+ CoreBitVector::iterator cbvIt;
229
+ BitVector::iterator bvIt;
230
+ };
231
+ };
232
+ };
233
+
234
+ /// Returns a new lhs | rhs.
235
+ PointsTo operator|(const PointsTo &lhs, const PointsTo &rhs);
236
+
237
+ /// Returns a new lhs & rhs.
238
+ PointsTo operator&(const PointsTo &lhs, const PointsTo &rhs);
239
+
240
+ /// Returns a new lhs - rhs.
241
+ PointsTo operator-(const PointsTo &lhs, const PointsTo &rhs);
242
+
243
+ } // End namespace SVF
244
+
245
+ template <>
246
+ struct std::hash<SVF::PointsTo>
247
+ {
248
+ size_t operator()(const SVF::PointsTo &pt) const
249
+ {
250
+ return pt.hash();
251
+ }
252
+ };
253
+
254
+
255
+ #endif // POINTSTO_H_
@@ -0,0 +1,167 @@
1
+ //===- SVFLoop.h -- SVFLoop 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
+ * SVFLoop.h
25
+ *
26
+ * Created on: 14, 06, 2022
27
+ * Author: Jiawei Wang, Xiao Cheng
28
+ */
29
+
30
+ #ifndef SVF_SVFLOOP_H
31
+ #define SVF_SVFLOOP_H
32
+
33
+ #include "SVFIR/SVFType.h"
34
+
35
+ namespace SVF
36
+ {
37
+
38
+ class SVFLoop
39
+ {
40
+ friend class SVFIRWriter;
41
+ friend class SVFIRReader;
42
+
43
+ typedef Set<const ICFGEdge *> ICFGEdgeSet;
44
+ typedef Set<const ICFGNode *> ICFGNodeSet;
45
+ private:
46
+ ICFGEdgeSet entryICFGEdges, backICFGEdges, inICFGEdges, outICFGEdges;
47
+ ICFGNodeSet icfgNodes;
48
+ u32_t loopBound;
49
+
50
+ public:
51
+ SVFLoop(const ICFGNodeSet &_nodes, u32_t _bound) :
52
+ icfgNodes(_nodes), loopBound(_bound)
53
+ {
54
+
55
+ }
56
+
57
+ virtual ~SVFLoop() = default;
58
+
59
+ inline ICFGNodeSet::iterator ICFGNodesBegin()
60
+ {
61
+ return icfgNodes.begin();
62
+ }
63
+
64
+ inline ICFGNodeSet::iterator ICFGNodesEnd()
65
+ {
66
+ return icfgNodes.end();
67
+ }
68
+
69
+ inline bool isInLoop(const ICFGNode *icfgNode) const
70
+ {
71
+ return icfgNodes.find(icfgNode) != icfgNodes.end();
72
+ }
73
+
74
+ inline bool isEntryICFGEdge(const ICFGEdge *edge) const
75
+ {
76
+ return entryICFGEdges.find(edge) != entryICFGEdges.end();
77
+ }
78
+
79
+ inline bool isBackICFGEdge(const ICFGEdge *edge) const
80
+ {
81
+ return backICFGEdges.find(edge) != backICFGEdges.end();
82
+ }
83
+
84
+ inline bool isInICFGEdge(const ICFGEdge *edge) const
85
+ {
86
+ return inICFGEdges.find(edge) != inICFGEdges.end();
87
+ }
88
+
89
+ inline bool isOutICFGEdge(const ICFGEdge *edge) const
90
+ {
91
+ return outICFGEdges.find(edge) != outICFGEdges.end();
92
+ }
93
+
94
+ inline void addEntryICFGEdge(const ICFGEdge *edge)
95
+ {
96
+ entryICFGEdges.insert(edge);
97
+ }
98
+
99
+ inline ICFGEdgeSet::iterator entryICFGEdgesBegin()
100
+ {
101
+ return entryICFGEdges.begin();
102
+ }
103
+
104
+ inline ICFGEdgeSet::iterator entryICFGEdgesEnd()
105
+ {
106
+ return entryICFGEdges.end();
107
+ }
108
+
109
+ inline void addOutICFGEdge(const ICFGEdge *edge)
110
+ {
111
+ outICFGEdges.insert(edge);
112
+ }
113
+
114
+ inline ICFGEdgeSet::iterator outICFGEdgesBegin()
115
+ {
116
+ return outICFGEdges.begin();
117
+ }
118
+
119
+ inline ICFGEdgeSet::iterator outICFGEdgesEnd()
120
+ {
121
+ return outICFGEdges.end();
122
+ }
123
+
124
+ inline void addBackICFGEdge(const ICFGEdge *edge)
125
+ {
126
+ backICFGEdges.insert(edge);
127
+ }
128
+
129
+ inline ICFGEdgeSet::iterator backICFGEdgesBegin()
130
+ {
131
+ return backICFGEdges.begin();
132
+ }
133
+
134
+ inline ICFGEdgeSet::iterator backICFGEdgesEnd()
135
+ {
136
+ return backICFGEdges.end();
137
+ }
138
+
139
+ inline void addInICFGEdge(const ICFGEdge *edge)
140
+ {
141
+ inICFGEdges.insert(edge);
142
+ }
143
+
144
+ inline ICFGEdgeSet::iterator inEdgesBegin()
145
+ {
146
+ return inICFGEdges.begin();
147
+ }
148
+
149
+ inline ICFGEdgeSet::iterator inEdgesEnd()
150
+ {
151
+ return inICFGEdges.end();
152
+ }
153
+
154
+ inline void setLoopBound(u32_t _bound)
155
+ {
156
+ loopBound = _bound;
157
+ }
158
+
159
+ inline u32_t getLoopBound() const
160
+ {
161
+ return loopBound;
162
+ }
163
+ };
164
+
165
+ } // End namespace SVF
166
+
167
+ #endif //SVF_SVFLOOP_H
@@ -0,0 +1,76 @@
1
+ //===- DoubleFreeChecker.h -- Checking double-free errors---------------------//
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
+ * DoubleFreeChecker.h
25
+ *
26
+ * Created on: Apr 24, 2014
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #ifndef DOUBLEFREECHECKER_H_
31
+ #define DOUBLEFREECHECKER_H_
32
+
33
+ #include "SABER/LeakChecker.h"
34
+
35
+ namespace SVF
36
+ {
37
+
38
+ /*!
39
+ * Double free checker to check deallocations of memory
40
+ */
41
+
42
+ class DoubleFreeChecker : public LeakChecker
43
+ {
44
+
45
+ public:
46
+ /// Constructor
47
+ DoubleFreeChecker(): LeakChecker()
48
+ {
49
+ }
50
+
51
+ /// Destructor
52
+ virtual ~DoubleFreeChecker()
53
+ {
54
+ }
55
+
56
+ /// We start from here
57
+ virtual bool runOnModule(SVFIR* pag) override
58
+ {
59
+ /// start analysis
60
+ analyze();
61
+ return false;
62
+ }
63
+
64
+ /// Report file/close bugs
65
+ void reportBug(ProgSlice* slice) override;
66
+
67
+
68
+ /// Validate test cases for regression test purpose
69
+ void testsValidation(ProgSlice* slice);
70
+ void validateSuccessTests(ProgSlice* slice, const FunObjVar* fun);
71
+ void validateExpectedFailureTests(ProgSlice* slice, const FunObjVar* fun);
72
+ };
73
+
74
+ } // End namespace SVF
75
+
76
+ #endif /* DOUBLEFREECHECKER_H_ */
@@ -0,0 +1,80 @@
1
+ //===- FileChecker.h -- Checking incorrect file-open close errors-------------//
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
+ * FileChecker.h
25
+ *
26
+ * Created on: Apr 24, 2014
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #ifndef FILECHECK_H_
31
+ #define FILECHECK_H_
32
+
33
+ #include "SABER/LeakChecker.h"
34
+
35
+ namespace SVF
36
+ {
37
+
38
+ /*!
39
+ * File open/close checker to check consistency of file operations
40
+ */
41
+
42
+ class FileChecker : public LeakChecker
43
+ {
44
+
45
+ public:
46
+
47
+ /// Constructor
48
+ FileChecker(): LeakChecker()
49
+ {
50
+ }
51
+
52
+ /// Destructor
53
+ virtual ~FileChecker()
54
+ {
55
+ }
56
+
57
+ /// We start from here
58
+ virtual bool runOnModule(SVFIR* pag)
59
+ {
60
+ /// start analysis
61
+ analyze();
62
+ return false;
63
+ }
64
+
65
+ inline bool isSourceLikeFun(const FunObjVar* fun)
66
+ {
67
+ return SaberCheckerAPI::getCheckerAPI()->isFOpen(fun);
68
+ }
69
+ /// Whether the function is a heap deallocator (free/release memory)
70
+ inline bool isSinkLikeFun(const FunObjVar* fun)
71
+ {
72
+ return SaberCheckerAPI::getCheckerAPI()->isFClose(fun);
73
+ }
74
+ /// Report file/close bugs
75
+ void reportBug(ProgSlice* slice);
76
+ };
77
+
78
+ } // End namespace SVF
79
+
80
+ #endif /* FILECHECK_H_ */
@@ -0,0 +1,122 @@
1
+ //===- LeakChecker.h -- Detecting memory leaks--------------------------------//
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
+ * LeakChecker.h
25
+ *
26
+ * Created on: Apr 1, 2014
27
+ * Author: rockysui
28
+ */
29
+
30
+ #ifndef LEAKCHECKER_H_
31
+ #define LEAKCHECKER_H_
32
+
33
+ #include "SABER/SrcSnkDDA.h"
34
+ #include "SABER/SaberCheckerAPI.h"
35
+
36
+ namespace SVF
37
+ {
38
+
39
+ /*!
40
+ * Static Memory Leak Detector
41
+ */
42
+ class LeakChecker : public SrcSnkDDA
43
+ {
44
+
45
+ public:
46
+ typedef Map<const SVFGNode*,const CallICFGNode*> SVFGNodeToCSIDMap;
47
+ typedef FIFOWorkList<const CallICFGNode*> CSWorkList;
48
+ typedef ProgSlice::VFWorkList WorkList;
49
+ typedef NodeBS SVFGNodeBS;
50
+ enum LEAK_TYPE
51
+ {
52
+ NEVER_FREE_LEAK,
53
+ CONTEXT_LEAK,
54
+ PATH_LEAK,
55
+ GLOBAL_LEAK
56
+ };
57
+
58
+ /// Constructor
59
+ LeakChecker()
60
+ {
61
+ }
62
+ /// Destructor
63
+ virtual ~LeakChecker()
64
+ {
65
+ }
66
+
67
+ /// We start from here
68
+ virtual bool runOnModule(SVFIR* pag)
69
+ {
70
+ /// start analysis
71
+ analyze();
72
+ return false;
73
+ }
74
+
75
+ /// Initialize sources and sinks
76
+ //@{
77
+ /// Initialize sources and sinks
78
+ virtual void initSrcs() override;
79
+ virtual void initSnks() override;
80
+ /// Whether the function is a heap allocator/reallocator (allocate memory)
81
+ virtual inline bool isSourceLikeFun(const FunObjVar* fun) override
82
+ {
83
+ return SaberCheckerAPI::getCheckerAPI()->isMemAlloc(fun);
84
+ }
85
+ /// Whether the function is a heap deallocator (free/release memory)
86
+ virtual inline bool isSinkLikeFun(const FunObjVar* fun) override
87
+ {
88
+ return SaberCheckerAPI::getCheckerAPI()->isMemDealloc(fun);
89
+ }
90
+ //@}
91
+
92
+ protected:
93
+ /// Report leaks
94
+ //@{
95
+ virtual void reportBug(ProgSlice* slice) override;
96
+ //@}
97
+
98
+ /// Validate test cases for regression test purpose
99
+ void testsValidation(const ProgSlice* slice);
100
+ void validateSuccessTests(const SVFGNode* source, const FunObjVar* fun);
101
+ void validateExpectedFailureTests(const SVFGNode* source, const FunObjVar* fun);
102
+
103
+ /// Record a source to its callsite
104
+ //@{
105
+ inline void addSrcToCSID(const SVFGNode* src, const CallICFGNode* cs)
106
+ {
107
+ srcToCSIDMap[src] = cs;
108
+ }
109
+ inline const CallICFGNode* getSrcCSID(const SVFGNode* src)
110
+ {
111
+ SVFGNodeToCSIDMap::iterator it =srcToCSIDMap.find(src);
112
+ assert(it!=srcToCSIDMap.end() && "source node not at a callsite??");
113
+ return it->second;
114
+ }
115
+ //@}
116
+ private:
117
+ SVFGNodeToCSIDMap srcToCSIDMap;
118
+ };
119
+
120
+ } // End namespace SVF
121
+
122
+ #endif /* LEAKCHECKER_H_ */