svf-lib 1.0.1374 → 1.0.1376

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 (679) hide show
  1. package/SVF-linux/Release-build/{lib/libSvf.a → svf-llvm/libSvfLLVM.a} +0 -0
  2. package/SVF-linux/{include → svf/include}/AbstractExecution/AbstractValue.h +0 -0
  3. package/SVF-linux/{include → svf/include}/AbstractExecution/AddressValue.h +0 -0
  4. package/SVF-linux/{include → svf/include}/AbstractExecution/ExeState.h +0 -0
  5. package/SVF-linux/{include → svf/include}/AbstractExecution/IntervalExeState.h +0 -0
  6. package/SVF-linux/{include → svf/include}/AbstractExecution/IntervalValue.h +0 -0
  7. package/SVF-linux/{include → svf/include}/AbstractExecution/NumericLiteral.h +0 -0
  8. package/SVF-linux/{include → svf/include}/AbstractExecution/RelExeState.h +0 -0
  9. package/SVF-linux/{include → svf/include}/AbstractExecution/RelationSolver.h +0 -0
  10. package/SVF-linux/{include → svf/include}/AbstractExecution/SVFIR2ItvExeState.h +0 -0
  11. package/SVF-linux/{include → svf/include}/AbstractExecution/WTO.h +0 -0
  12. package/SVF-linux/{include → svf/include}/CFL/CFGNormalizer.h +0 -0
  13. package/SVF-linux/{include → svf/include}/CFL/CFLAlias.h +0 -0
  14. package/SVF-linux/{include → svf/include}/CFL/CFLBase.h +0 -0
  15. package/SVF-linux/{include → svf/include}/CFL/CFLData.h +0 -0
  16. package/SVF-linux/{include → svf/include}/CFL/CFLDataBuilder.h +0 -0
  17. package/SVF-linux/{include → svf/include}/CFL/CFLGramGraphChecker.h +0 -0
  18. package/SVF-linux/{include → svf/include}/CFL/CFLGrammar.h +0 -0
  19. package/SVF-linux/{include → svf/include}/CFL/CFLGrammar.txt +0 -0
  20. package/SVF-linux/{include → svf/include}/CFL/CFLGrammarDev.txt +0 -0
  21. package/SVF-linux/{include → svf/include}/CFL/CFLGraphBuilder.h +0 -0
  22. package/SVF-linux/{include → svf/include}/CFL/CFLSolver.h +0 -0
  23. package/SVF-linux/{include → svf/include}/CFL/CFLStat.h +0 -0
  24. package/SVF-linux/{include → svf/include}/CFL/CFLVF.h +0 -0
  25. package/SVF-linux/{include → svf/include}/CFL/GrammarBuilder.h +0 -0
  26. package/SVF-linux/{include → svf/include}/CFL/PEGGrammar.txt +0 -0
  27. package/SVF-linux/{include → svf/include}/CFL/VFG.txt +0 -0
  28. package/SVF-linux/{include → svf/include}/CUDD/cudd.h +0 -0
  29. package/SVF-linux/{include → svf/include}/CUDD/cuddInt.h +0 -0
  30. package/SVF-linux/{include → svf/include}/CUDD/epd.h +0 -0
  31. package/SVF-linux/{include → svf/include}/CUDD/mtr.h +0 -0
  32. package/SVF-linux/{include → svf/include}/CUDD/mtrInt.h +0 -0
  33. package/SVF-linux/{include → svf/include}/CUDD/st.h +0 -0
  34. package/SVF-linux/{include → svf/include}/CUDD/util.h +0 -0
  35. package/SVF-linux/{include → svf/include}/DDA/ContextDDA.h +0 -0
  36. package/SVF-linux/{include → svf/include}/DDA/DDAClient.h +0 -0
  37. package/SVF-linux/{include → svf/include}/DDA/DDAPass.h +0 -0
  38. package/SVF-linux/{include → svf/include}/DDA/DDAStat.h +0 -0
  39. package/SVF-linux/{include → svf/include}/DDA/DDAVFSolver.h +0 -0
  40. package/SVF-linux/{include → svf/include}/DDA/FlowDDA.h +0 -0
  41. package/SVF-linux/{include → svf/include}/FastCluster/LICENSE.TXT +0 -0
  42. package/SVF-linux/{include → svf/include}/FastCluster/fastcluster.h +0 -0
  43. package/SVF-linux/{include → svf/include}/Graphs/CFLGraph.h +0 -0
  44. package/SVF-linux/{include → svf/include}/Graphs/CHG.h +0 -0
  45. package/SVF-linux/{include → svf/include}/Graphs/ConsG.h +0 -0
  46. package/SVF-linux/{include → svf/include}/Graphs/ConsGEdge.h +0 -0
  47. package/SVF-linux/{include → svf/include}/Graphs/ConsGNode.h +0 -0
  48. package/SVF-linux/{include → svf/include}/Graphs/DOTGraphTraits.h +0 -0
  49. package/SVF-linux/{include → svf/include}/Graphs/ExternalPAG.h +0 -0
  50. package/SVF-linux/{include → svf/include}/Graphs/GenericGraph.h +0 -0
  51. package/SVF-linux/{include → svf/include}/Graphs/GraphPrinter.h +0 -0
  52. package/SVF-linux/{include → svf/include}/Graphs/GraphTraits.h +0 -0
  53. package/SVF-linux/{include → svf/include}/Graphs/GraphWriter.h +0 -0
  54. package/SVF-linux/{include → svf/include}/Graphs/ICFG.h +0 -0
  55. package/SVF-linux/{include → svf/include}/Graphs/ICFGEdge.h +0 -0
  56. package/SVF-linux/{include → svf/include}/Graphs/ICFGNode.h +0 -0
  57. package/SVF-linux/{include → svf/include}/Graphs/ICFGStat.h +0 -0
  58. package/SVF-linux/{include → svf/include}/Graphs/IRGraph.h +0 -0
  59. package/SVF-linux/{include → svf/include}/Graphs/OfflineConsG.h +0 -0
  60. package/SVF-linux/{include → svf/include}/Graphs/PAG.h +0 -0
  61. package/SVF-linux/{include → svf/include}/Graphs/PAGEdge.h +0 -0
  62. package/SVF-linux/{include → svf/include}/Graphs/PAGNode.h +0 -0
  63. package/SVF-linux/{include → svf/include}/Graphs/PTACallGraph.h +0 -0
  64. package/SVF-linux/{include → svf/include}/Graphs/SVFG.h +0 -0
  65. package/SVF-linux/{include → svf/include}/Graphs/SVFGEdge.h +0 -0
  66. package/SVF-linux/{include → svf/include}/Graphs/SVFGNode.h +0 -0
  67. package/SVF-linux/{include → svf/include}/Graphs/SVFGOPT.h +0 -0
  68. package/SVF-linux/{include → svf/include}/Graphs/SVFGStat.h +0 -0
  69. package/SVF-linux/{include → svf/include}/Graphs/ThreadCallGraph.h +0 -0
  70. package/SVF-linux/{include → svf/include}/Graphs/VFG.h +0 -0
  71. package/SVF-linux/{include → svf/include}/Graphs/VFGEdge.h +0 -0
  72. package/SVF-linux/{include → svf/include}/Graphs/VFGNode.h +0 -0
  73. package/SVF-linux/{include → svf/include}/MSSA/MSSAMuChi.h +0 -0
  74. package/SVF-linux/{include → svf/include}/MSSA/MemPartition.h +0 -0
  75. package/SVF-linux/{include → svf/include}/MSSA/MemRegion.h +0 -0
  76. package/SVF-linux/{include → svf/include}/MSSA/MemSSA.h +0 -0
  77. package/SVF-linux/{include → svf/include}/MSSA/SVFGBuilder.h +0 -0
  78. package/SVF-linux/{include → svf/include}/MTA/FSMPTA.h +0 -0
  79. package/SVF-linux/{include → svf/include}/MTA/LockAnalysis.h +0 -0
  80. package/SVF-linux/{include → svf/include}/MTA/LockResultValidator.h +0 -0
  81. package/SVF-linux/{include → svf/include}/MTA/MHP.h +0 -0
  82. package/SVF-linux/{include → svf/include}/MTA/MTA.h +0 -0
  83. package/SVF-linux/{include → svf/include}/MTA/MTAAnnotator.h +0 -0
  84. package/SVF-linux/{include → svf/include}/MTA/MTAResultValidator.h +0 -0
  85. package/SVF-linux/{include → svf/include}/MTA/MTAStat.h +0 -0
  86. package/SVF-linux/{include → svf/include}/MTA/PCG.h +0 -0
  87. package/SVF-linux/{include → svf/include}/MTA/TCT.h +0 -0
  88. package/SVF-linux/{include → svf/include}/MemoryModel/AbstractPointsToDS.h +0 -0
  89. package/SVF-linux/{include → svf/include}/MemoryModel/ConditionalPT.h +0 -0
  90. package/SVF-linux/{include → svf/include}/MemoryModel/LocationSet.h +0 -0
  91. package/SVF-linux/{include → svf/include}/MemoryModel/MemModel.h +0 -0
  92. package/SVF-linux/{include → svf/include}/MemoryModel/MutablePointsToDS.h +0 -0
  93. package/SVF-linux/{include → svf/include}/MemoryModel/PAGBuilderFromFile.h +0 -0
  94. package/SVF-linux/{include → svf/include}/MemoryModel/PTAStat.h +0 -0
  95. package/SVF-linux/{include → svf/include}/MemoryModel/PTAType.h +0 -0
  96. package/SVF-linux/{include → svf/include}/MemoryModel/PersistentPointsToCache.h +0 -0
  97. package/SVF-linux/{include → svf/include}/MemoryModel/PersistentPointsToDS.h +0 -0
  98. package/SVF-linux/{include → svf/include}/MemoryModel/PointerAnalysis.h +0 -0
  99. package/SVF-linux/{include → svf/include}/MemoryModel/PointerAnalysisImpl.h +0 -0
  100. package/SVF-linux/{include → svf/include}/MemoryModel/PointsTo.h +0 -0
  101. package/SVF-linux/{include → svf/include}/MemoryModel/PointsToDFDS.h +0 -0
  102. package/SVF-linux/{include → svf/include}/MemoryModel/PointsToDS.h +0 -0
  103. package/SVF-linux/{include → svf/include}/MemoryModel/SVFIR.h +0 -0
  104. package/SVF-linux/{include → svf/include}/MemoryModel/SVFLoop.h +0 -0
  105. package/SVF-linux/{include → svf/include}/MemoryModel/SVFStatements.h +0 -0
  106. package/SVF-linux/{include → svf/include}/MemoryModel/SVFSymbols.h +0 -0
  107. package/SVF-linux/{include → svf/include}/MemoryModel/SVFVariables.h +0 -0
  108. package/SVF-linux/{include → svf/include}/MemoryModel/SymbolTableInfo.h +0 -0
  109. package/SVF-linux/{include → svf/include}/SABER/DoubleFreeChecker.h +0 -0
  110. package/SVF-linux/{include → svf/include}/SABER/FileChecker.h +0 -0
  111. package/SVF-linux/{include → svf/include}/SABER/LeakChecker.h +0 -0
  112. package/SVF-linux/{include → svf/include}/SABER/PathCondAllocator.h +0 -0
  113. package/SVF-linux/{include → svf/include}/SABER/ProgSlice.h +0 -0
  114. package/SVF-linux/{include → svf/include}/SABER/SaberAnnotator.h +0 -0
  115. package/SVF-linux/{include → svf/include}/SABER/SaberCheckerAPI.h +0 -0
  116. package/SVF-linux/{include → svf/include}/SABER/SaberCondAllocator.h +0 -0
  117. package/SVF-linux/{include → svf/include}/SABER/SaberSVFGBuilder.h +0 -0
  118. package/SVF-linux/{include → svf/include}/SABER/SrcSnkDDA.h +0 -0
  119. package/SVF-linux/{include → svf/include}/SABER/SrcSnkSolver.h +0 -0
  120. package/SVF-linux/{include → svf/include}/SVFIR/PAGBuilderFromFile.h +0 -0
  121. package/SVF-linux/{include → svf/include}/SVFIR/SVFIR.h +0 -0
  122. package/SVF-linux/{include → svf/include}/SVFIR/SVFModule.h +0 -0
  123. package/SVF-linux/{include → svf/include}/SVFIR/SVFStatements.h +0 -0
  124. package/SVF-linux/{include → svf/include}/SVFIR/SVFType.h +0 -0
  125. package/SVF-linux/{include → svf/include}/SVFIR/SVFValue.h +0 -0
  126. package/SVF-linux/{include → svf/include}/SVFIR/SVFVariables.h +0 -0
  127. package/SVF-linux/{include → svf/include}/SVFIR/SymbolTableInfo.h +0 -0
  128. package/SVF-linux/{include → svf/include}/Util/Annotator.h +0 -0
  129. package/SVF-linux/{include → svf/include}/Util/BDDExpr.h +0 -0
  130. package/SVF-linux/{include → svf/include}/Util/BasicTypes.h +0 -0
  131. package/SVF-linux/{include → svf/include}/Util/BitVector.h +0 -0
  132. package/SVF-linux/{include → svf/include}/Util/CFLSolver.h +0 -0
  133. package/SVF-linux/{include → svf/include}/Util/CallGraphBuilder.h +0 -0
  134. package/SVF-linux/{include → svf/include}/Util/Casting.h +0 -0
  135. package/SVF-linux/{include → svf/include}/Util/CommandLine.h +0 -0
  136. package/SVF-linux/{include → svf/include}/Util/Conditions.h +0 -0
  137. package/SVF-linux/{include → svf/include}/Util/CoreBitVector.h +0 -0
  138. package/SVF-linux/{include → svf/include}/Util/CppUtil.h +0 -0
  139. package/SVF-linux/{include → svf/include}/Util/CxtStmt.h +0 -0
  140. package/SVF-linux/{include → svf/include}/Util/DPItem.h +0 -0
  141. package/SVF-linux/{include → svf/include}/Util/ExeState.h +0 -0
  142. package/SVF-linux/{include → svf/include}/Util/ExtAPI.h +0 -0
  143. package/SVF-linux/{include → svf/include}/Util/ExtAPI.json +0 -0
  144. package/SVF-linux/{include → svf/include}/Util/GraphReachSolver.h +0 -0
  145. package/SVF-linux/{include → svf/include}/Util/IRAnnotator.h +0 -0
  146. package/SVF-linux/{include → svf/include}/Util/NodeIDAllocator.h +0 -0
  147. package/SVF-linux/{include → svf/include}/Util/Options.h +0 -0
  148. package/SVF-linux/{include → svf/include}/Util/PTAStat.h +0 -0
  149. package/SVF-linux/{include → svf/include}/Util/PathCondAllocator.h +0 -0
  150. package/SVF-linux/{include → svf/include}/Util/PathDPItem.h +0 -0
  151. package/SVF-linux/{include → svf/include}/Util/SCC.h +0 -0
  152. package/SVF-linux/{include → svf/include}/Util/SVFBasicTypes.h +0 -0
  153. package/SVF-linux/{include → svf/include}/Util/SVFInstruction.h +0 -0
  154. package/SVF-linux/{include → svf/include}/Util/SVFModule.h +0 -0
  155. package/SVF-linux/{include → svf/include}/Util/SVFStat.h +0 -0
  156. package/SVF-linux/{include → svf/include}/Util/SVFUtil.h +0 -0
  157. package/SVF-linux/{include → svf/include}/Util/SparseBitVector.h +0 -0
  158. package/SVF-linux/{include → svf/include}/Util/SymState.h +0 -0
  159. package/SVF-linux/{include → svf/include}/Util/ThreadAPI.h +0 -0
  160. package/SVF-linux/{include → svf/include}/Util/TypeBasedHeapCloning.h +0 -0
  161. package/SVF-linux/{include → svf/include}/Util/WorkList.h +0 -0
  162. package/SVF-linux/{include → svf/include}/Util/Z3Expr.h +0 -0
  163. package/SVF-linux/{include → svf/include}/Util/cJSON.h +0 -0
  164. package/SVF-linux/{include → svf/include}/Util/config.h +0 -0
  165. package/SVF-linux/{include → svf/include}/Util/iterator.h +0 -0
  166. package/SVF-linux/{include → svf/include}/Util/iterator_range.h +0 -0
  167. package/SVF-linux/{include → svf/include}/WPA/Andersen.h +0 -0
  168. package/SVF-linux/{include → svf/include}/WPA/AndersenPWC.h +0 -0
  169. package/SVF-linux/{include → svf/include}/WPA/AndersenSFR.h +0 -0
  170. package/SVF-linux/{include → svf/include}/WPA/CSC.h +0 -0
  171. package/SVF-linux/{include → svf/include}/WPA/FlowSensitive.h +0 -0
  172. package/SVF-linux/{include → svf/include}/WPA/FlowSensitiveTBHC.h +0 -0
  173. package/SVF-linux/{include → svf/include}/WPA/Steensgaard.h +0 -0
  174. package/SVF-linux/{include → svf/include}/WPA/TypeAnalysis.h +0 -0
  175. package/SVF-linux/{include → svf/include}/WPA/TypeBasedHeapCloning.h +0 -0
  176. package/SVF-linux/{include → svf/include}/WPA/VersionedFlowSensitive.h +0 -0
  177. package/SVF-linux/{include → svf/include}/WPA/WPAFSSolver.h +0 -0
  178. package/SVF-linux/{include → svf/include}/WPA/WPAPass.h +0 -0
  179. package/SVF-linux/{include → svf/include}/WPA/WPASolver.h +0 -0
  180. package/SVF-linux/{include → svf/include}/WPA/WPAStat.h +0 -0
  181. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/AbstractValue.h +0 -0
  182. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/AddressValue.h +0 -0
  183. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/ExeState.h +0 -0
  184. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/IntervalExeState.h +0 -0
  185. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/IntervalValue.h +0 -0
  186. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/NumericLiteral.h +0 -0
  187. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/RelExeState.h +0 -0
  188. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/RelationSolver.h +0 -0
  189. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/SVFIR2ItvExeState.h +0 -0
  190. package/{SVF-osx → SVF-linux/svf/include}/include/AbstractExecution/WTO.h +0 -0
  191. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFGNormalizer.h +0 -0
  192. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLAlias.h +0 -0
  193. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLBase.h +0 -0
  194. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLData.h +0 -0
  195. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLDataBuilder.h +0 -0
  196. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLGramGraphChecker.h +0 -0
  197. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLGrammar.h +0 -0
  198. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLGrammar.txt +0 -0
  199. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLGraphBuilder.h +0 -0
  200. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLSolver.h +0 -0
  201. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLStat.h +0 -0
  202. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/CFLVF.h +0 -0
  203. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/GrammarBuilder.h +0 -0
  204. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/PEGGrammar.txt +0 -0
  205. package/{SVF-osx → SVF-linux/svf/include}/include/CFL/VFG.txt +0 -0
  206. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/ContextDDA.h +0 -0
  207. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/DDAClient.h +0 -0
  208. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/DDAPass.h +0 -0
  209. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/DDAStat.h +0 -0
  210. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/DDAVFSolver.h +0 -0
  211. package/{SVF-osx → SVF-linux/svf/include}/include/DDA/FlowDDA.h +0 -0
  212. package/{SVF-osx → SVF-linux/svf/include}/include/FastCluster/LICENSE.TXT +0 -0
  213. package/{SVF-osx → SVF-linux/svf/include}/include/FastCluster/fastcluster.h +0 -0
  214. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/CFLGraph.h +0 -0
  215. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/CHG.h +0 -0
  216. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ConsG.h +0 -0
  217. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ConsGEdge.h +0 -0
  218. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ConsGNode.h +0 -0
  219. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/DOTGraphTraits.h +0 -0
  220. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/GenericGraph.h +0 -0
  221. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/GraphPrinter.h +0 -0
  222. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/GraphTraits.h +0 -0
  223. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/GraphWriter.h +0 -0
  224. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ICFG.h +0 -0
  225. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ICFGEdge.h +0 -0
  226. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ICFGNode.h +0 -0
  227. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ICFGStat.h +0 -0
  228. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/IRGraph.h +0 -0
  229. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/PTACallGraph.h +0 -0
  230. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/SVFG.h +0 -0
  231. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/SVFGEdge.h +0 -0
  232. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/SVFGNode.h +0 -0
  233. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/SVFGOPT.h +0 -0
  234. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/SVFGStat.h +0 -0
  235. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/ThreadCallGraph.h +0 -0
  236. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/VFG.h +0 -0
  237. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/VFGEdge.h +0 -0
  238. package/{SVF-osx → SVF-linux/svf/include}/include/Graphs/VFGNode.h +0 -0
  239. package/{SVF-osx → SVF-linux/svf/include}/include/MSSA/MSSAMuChi.h +0 -0
  240. package/{SVF-osx → SVF-linux/svf/include}/include/MSSA/MemPartition.h +0 -0
  241. package/{SVF-osx → SVF-linux/svf/include}/include/MSSA/MemRegion.h +0 -0
  242. package/{SVF-osx → SVF-linux/svf/include}/include/MSSA/MemSSA.h +0 -0
  243. package/{SVF-osx → SVF-linux/svf/include}/include/MSSA/SVFGBuilder.h +0 -0
  244. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/FSMPTA.h +0 -0
  245. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/LockAnalysis.h +0 -0
  246. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/MHP.h +0 -0
  247. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/MTA.h +0 -0
  248. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/MTAResultValidator.h +0 -0
  249. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/MTAStat.h +0 -0
  250. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/PCG.h +0 -0
  251. package/{SVF-osx → SVF-linux/svf/include}/include/MTA/TCT.h +0 -0
  252. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/AbstractPointsToDS.h +0 -0
  253. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/ConditionalPT.h +0 -0
  254. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/LocationSet.h +0 -0
  255. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/MutablePointsToDS.h +0 -0
  256. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/PersistentPointsToCache.h +0 -0
  257. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/PersistentPointsToDS.h +0 -0
  258. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/PointerAnalysis.h +0 -0
  259. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/PointerAnalysisImpl.h +0 -0
  260. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/PointsTo.h +0 -0
  261. package/{SVF-osx → SVF-linux/svf/include}/include/MemoryModel/SVFLoop.h +0 -0
  262. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/DoubleFreeChecker.h +0 -0
  263. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/FileChecker.h +0 -0
  264. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/LeakChecker.h +0 -0
  265. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/ProgSlice.h +0 -0
  266. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/SaberCheckerAPI.h +0 -0
  267. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/SaberCondAllocator.h +0 -0
  268. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/SaberSVFGBuilder.h +0 -0
  269. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/SrcSnkDDA.h +0 -0
  270. package/{SVF-osx → SVF-linux/svf/include}/include/SABER/SrcSnkSolver.h +0 -0
  271. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/PAGBuilderFromFile.h +0 -0
  272. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFIR.h +0 -0
  273. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFModule.h +0 -0
  274. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFStatements.h +0 -0
  275. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFType.h +0 -0
  276. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFValue.h +0 -0
  277. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SVFVariables.h +0 -0
  278. package/{SVF-osx → SVF-linux/svf/include}/include/SVFIR/SymbolTableInfo.h +0 -0
  279. package/{SVF-osx → SVF-linux/svf/include}/include/Util/Annotator.h +0 -0
  280. package/{SVF-osx → SVF-linux/svf/include}/include/Util/BitVector.h +0 -0
  281. package/{SVF-osx → SVF-linux/svf/include}/include/Util/CallGraphBuilder.h +0 -0
  282. package/{SVF-osx → SVF-linux/svf/include}/include/Util/Casting.h +0 -0
  283. package/{SVF-osx → SVF-linux/svf/include}/include/Util/CommandLine.h +0 -0
  284. package/{SVF-osx → SVF-linux/svf/include}/include/Util/CoreBitVector.h +0 -0
  285. package/{SVF-osx → SVF-linux/svf/include}/include/Util/CppUtil.h +0 -0
  286. package/{SVF-osx → SVF-linux/svf/include}/include/Util/CxtStmt.h +0 -0
  287. package/{SVF-osx → SVF-linux/svf/include}/include/Util/DPItem.h +0 -0
  288. package/{SVF-osx → SVF-linux/svf/include}/include/Util/ExtAPI.h +0 -0
  289. package/{SVF-osx → SVF-linux/svf/include}/include/Util/ExtAPI.json +0 -0
  290. package/{SVF-osx → SVF-linux/svf/include}/include/Util/GraphReachSolver.h +0 -0
  291. package/{SVF-osx → SVF-linux/svf/include}/include/Util/NodeIDAllocator.h +0 -0
  292. package/{SVF-osx → SVF-linux/svf/include}/include/Util/Options.h +0 -0
  293. package/{SVF-osx → SVF-linux/svf/include}/include/Util/PTAStat.h +0 -0
  294. package/{SVF-osx → SVF-linux/svf/include}/include/Util/SCC.h +0 -0
  295. package/{SVF-osx → SVF-linux/svf/include}/include/Util/SVFStat.h +0 -0
  296. package/{SVF-osx → SVF-linux/svf/include}/include/Util/SVFUtil.h +0 -0
  297. package/{SVF-osx → SVF-linux/svf/include}/include/Util/SparseBitVector.h +0 -0
  298. package/{SVF-osx → SVF-linux/svf/include}/include/Util/ThreadAPI.h +0 -0
  299. package/{SVF-osx → SVF-linux/svf/include}/include/Util/WorkList.h +0 -0
  300. package/{SVF-osx → SVF-linux/svf/include}/include/Util/Z3Expr.h +0 -0
  301. package/{SVF-osx → SVF-linux/svf/include}/include/Util/cJSON.h +0 -0
  302. package/{SVF-osx → SVF-linux/svf/include}/include/Util/iterator.h +0 -0
  303. package/{SVF-osx → SVF-linux/svf/include}/include/Util/iterator_range.h +0 -0
  304. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/Andersen.h +0 -0
  305. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/AndersenPWC.h +0 -0
  306. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/CSC.h +0 -0
  307. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/FlowSensitive.h +0 -0
  308. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/Steensgaard.h +0 -0
  309. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/TypeAnalysis.h +0 -0
  310. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/VersionedFlowSensitive.h +0 -0
  311. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/WPAFSSolver.h +0 -0
  312. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/WPAPass.h +0 -0
  313. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/WPASolver.h +0 -0
  314. package/{SVF-osx → SVF-linux/svf/include}/include/WPA/WPAStat.h +0 -0
  315. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/BasicTypes.h +0 -0
  316. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/BreakConstantExpr.h +0 -0
  317. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/CHGBuilder.h +0 -0
  318. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/CPPUtil.h +0 -0
  319. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/DCHG.h +0 -0
  320. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/GEPTypeBridgeIterator.h +0 -0
  321. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/ICFGBuilder.h +0 -0
  322. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/IRAnnotator.h +0 -0
  323. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/LLVMLoopAnalysis.h +0 -0
  324. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/LLVMModule.h +0 -0
  325. package/SVF-linux/{include → svf-llvm/include}/SVF-LLVM/LLVMUtil.h +0 -0
  326. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/BasicTypes.h +0 -0
  327. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/BreakConstantExpr.h +0 -0
  328. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/CHGBuilder.h +0 -0
  329. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/DCHG.h +0 -0
  330. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/GEPTypeBridgeIterator.h +0 -0
  331. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/ICFGBuilder.h +0 -0
  332. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/LLVMLoopAnalysis.h +0 -0
  333. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/LLVMModule.h +0 -0
  334. package/{SVF-osx/include → SVF-linux/svf-llvm/include/SVF-LLVM}/SVF-LLVM/LLVMUtil.h +0 -0
  335. package/SVF-linux/{include → svf-llvm/include/SVF-LLVM}/SVF-LLVM/SVFIRBuilder.h +0 -0
  336. package/SVF-linux/{include → svf-llvm/include/SVF-LLVM}/SVF-LLVM/SymbolTableBuilder.h +0 -0
  337. package/{SVF-osx → SVF-linux/svf-llvm}/include/SVF-LLVM/SVFIRBuilder.h +0 -0
  338. package/{SVF-osx → SVF-linux/svf-llvm}/include/SVF-LLVM/SymbolTableBuilder.h +0 -0
  339. package/SVF-osx/Release-build/{lib/libSvf.a → svf-llvm/libSvfLLVM.a} +0 -0
  340. package/SVF-osx/svf/include/AbstractExecution/AbstractValue.h +79 -0
  341. package/SVF-osx/svf/include/AbstractExecution/AddressValue.h +210 -0
  342. package/SVF-osx/svf/include/AbstractExecution/ExeState.h +223 -0
  343. package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +425 -0
  344. package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +868 -0
  345. package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +406 -0
  346. package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +225 -0
  347. package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +68 -0
  348. package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +186 -0
  349. package/SVF-osx/svf/include/AbstractExecution/WTO.h +845 -0
  350. package/SVF-osx/svf/include/CFL/CFGNormalizer.h +84 -0
  351. package/SVF-osx/svf/include/CFL/CFLAlias.h +176 -0
  352. package/SVF-osx/svf/include/CFL/CFLBase.h +115 -0
  353. package/SVF-osx/svf/include/CFL/CFLData.h +316 -0
  354. package/SVF-osx/svf/include/CFL/CFLDataBuilder.h +91 -0
  355. package/SVF-osx/svf/include/CFL/CFLGramGraphChecker.h +74 -0
  356. package/SVF-osx/svf/include/CFL/CFLGrammar.h +468 -0
  357. package/SVF-osx/svf/include/CFL/CFLGrammar.txt +15 -0
  358. package/SVF-osx/{include → svf/include}/CFL/CFLGrammarDev.txt +0 -0
  359. package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +193 -0
  360. package/SVF-osx/svf/include/CFL/CFLSolver.h +136 -0
  361. package/SVF-osx/svf/include/CFL/CFLStat.h +67 -0
  362. package/SVF-osx/svf/include/CFL/CFLVF.h +65 -0
  363. package/SVF-osx/svf/include/CFL/GrammarBuilder.h +100 -0
  364. package/SVF-osx/svf/include/CFL/PEGGrammar.txt +11 -0
  365. package/SVF-osx/svf/include/CFL/VFG.txt +7 -0
  366. package/SVF-osx/{include → svf/include}/CUDD/cudd.h +0 -0
  367. package/SVF-osx/{include → svf/include}/CUDD/cuddInt.h +0 -0
  368. package/SVF-osx/{include → svf/include}/CUDD/epd.h +0 -0
  369. package/SVF-osx/{include → svf/include}/CUDD/mtr.h +0 -0
  370. package/SVF-osx/{include → svf/include}/CUDD/mtrInt.h +0 -0
  371. package/SVF-osx/{include → svf/include}/CUDD/st.h +0 -0
  372. package/SVF-osx/{include → svf/include}/CUDD/util.h +0 -0
  373. package/SVF-osx/svf/include/DDA/ContextDDA.h +230 -0
  374. package/SVF-osx/svf/include/DDA/DDAClient.h +168 -0
  375. package/SVF-osx/svf/include/DDA/DDAPass.h +99 -0
  376. package/SVF-osx/svf/include/DDA/DDAStat.h +138 -0
  377. package/SVF-osx/svf/include/DDA/DDAVFSolver.h +789 -0
  378. package/SVF-osx/svf/include/DDA/FlowDDA.h +178 -0
  379. package/SVF-osx/svf/include/FastCluster/LICENSE.TXT +13 -0
  380. package/SVF-osx/svf/include/FastCluster/fastcluster.h +80 -0
  381. package/SVF-osx/svf/include/Graphs/CFLGraph.h +215 -0
  382. package/SVF-osx/svf/include/Graphs/CHG.h +351 -0
  383. package/SVF-osx/svf/include/Graphs/ConsG.h +408 -0
  384. package/SVF-osx/svf/include/Graphs/ConsGEdge.h +353 -0
  385. package/SVF-osx/svf/include/Graphs/ConsGNode.h +391 -0
  386. package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +188 -0
  387. package/SVF-osx/{include → svf/include}/Graphs/ExternalPAG.h +0 -0
  388. package/SVF-osx/svf/include/Graphs/GenericGraph.h +620 -0
  389. package/SVF-osx/svf/include/Graphs/GraphPrinter.h +111 -0
  390. package/SVF-osx/svf/include/Graphs/GraphTraits.h +150 -0
  391. package/SVF-osx/svf/include/Graphs/GraphWriter.h +380 -0
  392. package/SVF-osx/svf/include/Graphs/ICFG.h +331 -0
  393. package/SVF-osx/svf/include/Graphs/ICFGEdge.h +264 -0
  394. package/SVF-osx/svf/include/Graphs/ICFGNode.h +523 -0
  395. package/SVF-osx/svf/include/Graphs/ICFGStat.h +164 -0
  396. package/SVF-osx/svf/include/Graphs/IRGraph.h +243 -0
  397. package/SVF-osx/{include → svf/include}/Graphs/OfflineConsG.h +0 -0
  398. package/SVF-osx/{include → svf/include}/Graphs/PAG.h +0 -0
  399. package/SVF-osx/{include → svf/include}/Graphs/PAGEdge.h +0 -0
  400. package/SVF-osx/{include → svf/include}/Graphs/PAGNode.h +0 -0
  401. package/SVF-osx/svf/include/Graphs/PTACallGraph.h +471 -0
  402. package/SVF-osx/svf/include/Graphs/SVFG.h +490 -0
  403. package/SVF-osx/svf/include/Graphs/SVFGEdge.h +237 -0
  404. package/SVF-osx/svf/include/Graphs/SVFGNode.h +513 -0
  405. package/SVF-osx/svf/include/Graphs/SVFGOPT.h +362 -0
  406. package/SVF-osx/svf/include/Graphs/SVFGStat.h +273 -0
  407. package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +422 -0
  408. package/SVF-osx/svf/include/Graphs/VFG.h +664 -0
  409. package/SVF-osx/svf/include/Graphs/VFGEdge.h +295 -0
  410. package/SVF-osx/svf/include/Graphs/VFGNode.h +1197 -0
  411. package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +722 -0
  412. package/SVF-osx/svf/include/MSSA/MemPartition.h +169 -0
  413. package/SVF-osx/svf/include/MSSA/MemRegion.h +491 -0
  414. package/SVF-osx/svf/include/MSSA/MemSSA.h +452 -0
  415. package/SVF-osx/svf/include/MSSA/SVFGBuilder.h +98 -0
  416. package/SVF-osx/svf/include/MTA/FSMPTA.h +270 -0
  417. package/SVF-osx/svf/include/MTA/LockAnalysis.h +517 -0
  418. package/SVF-osx/{include → svf/include}/MTA/LockResultValidator.h +0 -0
  419. package/SVF-osx/svf/include/MTA/MHP.h +565 -0
  420. package/SVF-osx/svf/include/MTA/MTA.h +101 -0
  421. package/SVF-osx/{include → svf/include}/MTA/MTAAnnotator.h +0 -0
  422. package/SVF-osx/svf/include/MTA/MTAResultValidator.h +448 -0
  423. package/SVF-osx/svf/include/MTA/MTAStat.h +74 -0
  424. package/SVF-osx/svf/include/MTA/PCG.h +229 -0
  425. package/SVF-osx/svf/include/MTA/TCT.h +599 -0
  426. package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +316 -0
  427. package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +878 -0
  428. package/SVF-osx/svf/include/MemoryModel/LocationSet.h +148 -0
  429. package/SVF-osx/{include → svf/include}/MemoryModel/MemModel.h +0 -0
  430. package/SVF-osx/svf/include/MemoryModel/MutablePointsToDS.h +1025 -0
  431. package/SVF-osx/{include → svf/include}/MemoryModel/PAGBuilderFromFile.h +0 -0
  432. package/SVF-osx/{include → svf/include}/MemoryModel/PTAStat.h +0 -0
  433. package/SVF-osx/{include → svf/include}/MemoryModel/PTAType.h +0 -0
  434. package/SVF-osx/svf/include/MemoryModel/PersistentPointsToCache.h +463 -0
  435. package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +955 -0
  436. package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +452 -0
  437. package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +590 -0
  438. package/SVF-osx/svf/include/MemoryModel/PointsTo.h +255 -0
  439. package/SVF-osx/{include → svf/include}/MemoryModel/PointsToDFDS.h +0 -0
  440. package/SVF-osx/{include → svf/include}/MemoryModel/PointsToDS.h +0 -0
  441. package/SVF-osx/{include → svf/include}/MemoryModel/SVFIR.h +0 -0
  442. package/SVF-osx/svf/include/MemoryModel/SVFLoop.h +164 -0
  443. package/SVF-osx/{include → svf/include}/MemoryModel/SVFStatements.h +0 -0
  444. package/SVF-osx/{include → svf/include}/MemoryModel/SVFSymbols.h +0 -0
  445. package/SVF-osx/{include → svf/include}/MemoryModel/SVFVariables.h +0 -0
  446. package/SVF-osx/{include → svf/include}/MemoryModel/SymbolTableInfo.h +0 -0
  447. package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +76 -0
  448. package/SVF-osx/svf/include/SABER/FileChecker.h +82 -0
  449. package/SVF-osx/svf/include/SABER/LeakChecker.h +124 -0
  450. package/SVF-osx/{include → svf/include}/SABER/PathCondAllocator.h +0 -0
  451. package/SVF-osx/svf/include/SABER/ProgSlice.h +313 -0
  452. package/SVF-osx/{include → svf/include}/SABER/SaberAnnotator.h +0 -0
  453. package/SVF-osx/svf/include/SABER/SaberCheckerAPI.h +166 -0
  454. package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +310 -0
  455. package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +104 -0
  456. package/SVF-osx/svf/include/SABER/SrcSnkDDA.h +321 -0
  457. package/SVF-osx/svf/include/SABER/SrcSnkSolver.h +186 -0
  458. package/SVF-osx/svf/include/SVFIR/PAGBuilderFromFile.h +80 -0
  459. package/SVF-osx/svf/include/SVFIR/SVFIR.h +659 -0
  460. package/SVF-osx/svf/include/SVFIR/SVFModule.h +233 -0
  461. package/SVF-osx/svf/include/SVFIR/SVFStatements.h +1136 -0
  462. package/SVF-osx/svf/include/SVFIR/SVFType.h +527 -0
  463. package/SVF-osx/svf/include/SVFIR/SVFValue.h +1120 -0
  464. package/SVF-osx/svf/include/SVFIR/SVFVariables.h +721 -0
  465. package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +597 -0
  466. package/SVF-osx/svf/include/Util/Annotator.h +180 -0
  467. package/SVF-osx/{include → svf/include}/Util/BDDExpr.h +0 -0
  468. package/SVF-osx/{include → svf/include}/Util/BasicTypes.h +0 -0
  469. package/SVF-osx/svf/include/Util/BitVector.h +55 -0
  470. package/SVF-osx/{include → svf/include}/Util/CFLSolver.h +0 -0
  471. package/SVF-osx/svf/include/Util/CallGraphBuilder.h +74 -0
  472. package/SVF-osx/svf/include/Util/Casting.h +426 -0
  473. package/SVF-osx/svf/include/Util/CommandLine.h +530 -0
  474. package/SVF-osx/{include → svf/include}/Util/Conditions.h +0 -0
  475. package/SVF-osx/svf/include/Util/CoreBitVector.h +214 -0
  476. package/SVF-osx/svf/include/Util/CppUtil.h +81 -0
  477. package/SVF-osx/svf/include/Util/CxtStmt.h +501 -0
  478. package/SVF-osx/svf/include/Util/DPItem.h +618 -0
  479. package/SVF-osx/{include → svf/include}/Util/ExeState.h +0 -0
  480. package/SVF-osx/svf/include/Util/ExtAPI.h +339 -0
  481. package/SVF-osx/svf/include/Util/ExtAPI.json +5707 -0
  482. package/SVF-osx/svf/include/Util/GraphReachSolver.h +186 -0
  483. package/SVF-osx/{include → svf/include}/Util/IRAnnotator.h +0 -0
  484. package/SVF-osx/svf/include/Util/NodeIDAllocator.h +194 -0
  485. package/SVF-osx/svf/include/Util/Options.h +266 -0
  486. package/SVF-osx/svf/include/Util/PTAStat.h +65 -0
  487. package/SVF-osx/{include → svf/include}/Util/PathCondAllocator.h +0 -0
  488. package/SVF-osx/{include → svf/include}/Util/PathDPItem.h +0 -0
  489. package/SVF-osx/svf/include/Util/SCC.h +354 -0
  490. package/SVF-osx/{include → svf/include}/Util/SVFBasicTypes.h +0 -0
  491. package/SVF-osx/{include → svf/include}/Util/SVFInstruction.h +0 -0
  492. package/SVF-osx/{include → svf/include}/Util/SVFModule.h +0 -0
  493. package/SVF-osx/svf/include/Util/SVFStat.h +100 -0
  494. package/SVF-osx/svf/include/Util/SVFUtil.h +660 -0
  495. package/SVF-osx/svf/include/Util/SparseBitVector.h +1202 -0
  496. package/SVF-osx/{include → svf/include}/Util/SymState.h +0 -0
  497. package/SVF-osx/svf/include/Util/ThreadAPI.h +330 -0
  498. package/SVF-osx/{include → svf/include}/Util/TypeBasedHeapCloning.h +0 -0
  499. package/SVF-osx/svf/include/Util/WorkList.h +317 -0
  500. package/SVF-osx/svf/include/Util/Z3Expr.h +318 -0
  501. package/SVF-osx/svf/include/Util/cJSON.h +300 -0
  502. package/SVF-osx/{include → svf/include}/Util/config.h +0 -0
  503. package/SVF-osx/svf/include/Util/iterator.h +407 -0
  504. package/SVF-osx/svf/include/Util/iterator_range.h +76 -0
  505. package/SVF-osx/svf/include/WPA/Andersen.h +416 -0
  506. package/SVF-osx/svf/include/WPA/AndersenPWC.h +160 -0
  507. package/SVF-osx/{include → svf/include}/WPA/AndersenSFR.h +0 -0
  508. package/SVF-osx/svf/include/WPA/CSC.h +95 -0
  509. package/SVF-osx/svf/include/WPA/FlowSensitive.h +317 -0
  510. package/SVF-osx/{include → svf/include}/WPA/FlowSensitiveTBHC.h +0 -0
  511. package/SVF-osx/svf/include/WPA/Steensgaard.h +126 -0
  512. package/SVF-osx/svf/include/WPA/TypeAnalysis.h +83 -0
  513. package/SVF-osx/{include → svf/include}/WPA/TypeBasedHeapCloning.h +0 -0
  514. package/SVF-osx/svf/include/WPA/VersionedFlowSensitive.h +287 -0
  515. package/SVF-osx/svf/include/WPA/WPAFSSolver.h +254 -0
  516. package/SVF-osx/svf/include/WPA/WPAPass.h +119 -0
  517. package/SVF-osx/svf/include/WPA/WPASolver.h +205 -0
  518. package/SVF-osx/svf/include/WPA/WPAStat.h +222 -0
  519. package/SVF-osx/svf/include/include/AbstractExecution/AbstractValue.h +79 -0
  520. package/SVF-osx/svf/include/include/AbstractExecution/AddressValue.h +210 -0
  521. package/SVF-osx/svf/include/include/AbstractExecution/ExeState.h +223 -0
  522. package/SVF-osx/svf/include/include/AbstractExecution/IntervalExeState.h +425 -0
  523. package/SVF-osx/svf/include/include/AbstractExecution/IntervalValue.h +868 -0
  524. package/SVF-osx/svf/include/include/AbstractExecution/NumericLiteral.h +406 -0
  525. package/SVF-osx/svf/include/include/AbstractExecution/RelExeState.h +225 -0
  526. package/SVF-osx/svf/include/include/AbstractExecution/RelationSolver.h +68 -0
  527. package/SVF-osx/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +186 -0
  528. package/SVF-osx/svf/include/include/AbstractExecution/WTO.h +845 -0
  529. package/SVF-osx/svf/include/include/CFL/CFGNormalizer.h +84 -0
  530. package/SVF-osx/svf/include/include/CFL/CFLAlias.h +176 -0
  531. package/SVF-osx/svf/include/include/CFL/CFLBase.h +115 -0
  532. package/SVF-osx/svf/include/include/CFL/CFLData.h +316 -0
  533. package/SVF-osx/svf/include/include/CFL/CFLDataBuilder.h +91 -0
  534. package/SVF-osx/svf/include/include/CFL/CFLGramGraphChecker.h +74 -0
  535. package/SVF-osx/svf/include/include/CFL/CFLGrammar.h +468 -0
  536. package/SVF-osx/svf/include/include/CFL/CFLGrammar.txt +15 -0
  537. package/SVF-osx/svf/include/include/CFL/CFLGraphBuilder.h +193 -0
  538. package/SVF-osx/svf/include/include/CFL/CFLSolver.h +136 -0
  539. package/SVF-osx/svf/include/include/CFL/CFLStat.h +67 -0
  540. package/SVF-osx/svf/include/include/CFL/CFLVF.h +65 -0
  541. package/SVF-osx/svf/include/include/CFL/GrammarBuilder.h +100 -0
  542. package/SVF-osx/svf/include/include/CFL/PEGGrammar.txt +11 -0
  543. package/SVF-osx/svf/include/include/CFL/VFG.txt +7 -0
  544. package/SVF-osx/svf/include/include/DDA/ContextDDA.h +230 -0
  545. package/SVF-osx/svf/include/include/DDA/DDAClient.h +168 -0
  546. package/SVF-osx/svf/include/include/DDA/DDAPass.h +99 -0
  547. package/SVF-osx/svf/include/include/DDA/DDAStat.h +138 -0
  548. package/SVF-osx/svf/include/include/DDA/DDAVFSolver.h +789 -0
  549. package/SVF-osx/svf/include/include/DDA/FlowDDA.h +178 -0
  550. package/SVF-osx/svf/include/include/FastCluster/LICENSE.TXT +13 -0
  551. package/SVF-osx/svf/include/include/FastCluster/fastcluster.h +80 -0
  552. package/SVF-osx/svf/include/include/Graphs/CFLGraph.h +215 -0
  553. package/SVF-osx/svf/include/include/Graphs/CHG.h +351 -0
  554. package/SVF-osx/svf/include/include/Graphs/ConsG.h +408 -0
  555. package/SVF-osx/svf/include/include/Graphs/ConsGEdge.h +353 -0
  556. package/SVF-osx/svf/include/include/Graphs/ConsGNode.h +391 -0
  557. package/SVF-osx/svf/include/include/Graphs/DOTGraphTraits.h +188 -0
  558. package/SVF-osx/svf/include/include/Graphs/GenericGraph.h +620 -0
  559. package/SVF-osx/svf/include/include/Graphs/GraphPrinter.h +111 -0
  560. package/SVF-osx/svf/include/include/Graphs/GraphTraits.h +150 -0
  561. package/SVF-osx/svf/include/include/Graphs/GraphWriter.h +380 -0
  562. package/SVF-osx/svf/include/include/Graphs/ICFG.h +331 -0
  563. package/SVF-osx/svf/include/include/Graphs/ICFGEdge.h +264 -0
  564. package/SVF-osx/svf/include/include/Graphs/ICFGNode.h +523 -0
  565. package/SVF-osx/svf/include/include/Graphs/ICFGStat.h +164 -0
  566. package/SVF-osx/svf/include/include/Graphs/IRGraph.h +243 -0
  567. package/SVF-osx/svf/include/include/Graphs/PTACallGraph.h +471 -0
  568. package/SVF-osx/svf/include/include/Graphs/SVFG.h +490 -0
  569. package/SVF-osx/svf/include/include/Graphs/SVFGEdge.h +237 -0
  570. package/SVF-osx/svf/include/include/Graphs/SVFGNode.h +513 -0
  571. package/SVF-osx/svf/include/include/Graphs/SVFGOPT.h +362 -0
  572. package/SVF-osx/svf/include/include/Graphs/SVFGStat.h +273 -0
  573. package/SVF-osx/svf/include/include/Graphs/ThreadCallGraph.h +422 -0
  574. package/SVF-osx/svf/include/include/Graphs/VFG.h +664 -0
  575. package/SVF-osx/svf/include/include/Graphs/VFGEdge.h +295 -0
  576. package/SVF-osx/svf/include/include/Graphs/VFGNode.h +1197 -0
  577. package/SVF-osx/svf/include/include/MSSA/MSSAMuChi.h +722 -0
  578. package/SVF-osx/svf/include/include/MSSA/MemPartition.h +169 -0
  579. package/SVF-osx/svf/include/include/MSSA/MemRegion.h +491 -0
  580. package/SVF-osx/svf/include/include/MSSA/MemSSA.h +452 -0
  581. package/SVF-osx/svf/include/include/MSSA/SVFGBuilder.h +98 -0
  582. package/SVF-osx/svf/include/include/MTA/FSMPTA.h +270 -0
  583. package/SVF-osx/svf/include/include/MTA/LockAnalysis.h +517 -0
  584. package/SVF-osx/svf/include/include/MTA/MHP.h +565 -0
  585. package/SVF-osx/svf/include/include/MTA/MTA.h +101 -0
  586. package/SVF-osx/svf/include/include/MTA/MTAResultValidator.h +448 -0
  587. package/SVF-osx/svf/include/include/MTA/MTAStat.h +74 -0
  588. package/SVF-osx/svf/include/include/MTA/PCG.h +229 -0
  589. package/SVF-osx/svf/include/include/MTA/TCT.h +599 -0
  590. package/SVF-osx/svf/include/include/MemoryModel/AbstractPointsToDS.h +316 -0
  591. package/SVF-osx/svf/include/include/MemoryModel/ConditionalPT.h +878 -0
  592. package/SVF-osx/svf/include/include/MemoryModel/LocationSet.h +148 -0
  593. package/SVF-osx/svf/include/include/MemoryModel/MutablePointsToDS.h +1025 -0
  594. package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToCache.h +463 -0
  595. package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToDS.h +955 -0
  596. package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysis.h +452 -0
  597. package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysisImpl.h +590 -0
  598. package/SVF-osx/svf/include/include/MemoryModel/PointsTo.h +255 -0
  599. package/SVF-osx/svf/include/include/MemoryModel/SVFLoop.h +164 -0
  600. package/SVF-osx/svf/include/include/SABER/DoubleFreeChecker.h +76 -0
  601. package/SVF-osx/svf/include/include/SABER/FileChecker.h +82 -0
  602. package/SVF-osx/svf/include/include/SABER/LeakChecker.h +124 -0
  603. package/SVF-osx/svf/include/include/SABER/ProgSlice.h +313 -0
  604. package/SVF-osx/svf/include/include/SABER/SaberCheckerAPI.h +166 -0
  605. package/SVF-osx/svf/include/include/SABER/SaberCondAllocator.h +310 -0
  606. package/SVF-osx/svf/include/include/SABER/SaberSVFGBuilder.h +104 -0
  607. package/SVF-osx/svf/include/include/SABER/SrcSnkDDA.h +321 -0
  608. package/SVF-osx/svf/include/include/SABER/SrcSnkSolver.h +186 -0
  609. package/SVF-osx/svf/include/include/SVFIR/PAGBuilderFromFile.h +80 -0
  610. package/SVF-osx/svf/include/include/SVFIR/SVFIR.h +659 -0
  611. package/SVF-osx/svf/include/include/SVFIR/SVFModule.h +233 -0
  612. package/SVF-osx/svf/include/include/SVFIR/SVFStatements.h +1136 -0
  613. package/SVF-osx/svf/include/include/SVFIR/SVFType.h +527 -0
  614. package/SVF-osx/svf/include/include/SVFIR/SVFValue.h +1120 -0
  615. package/SVF-osx/svf/include/include/SVFIR/SVFVariables.h +721 -0
  616. package/SVF-osx/svf/include/include/SVFIR/SymbolTableInfo.h +597 -0
  617. package/SVF-osx/svf/include/include/Util/Annotator.h +180 -0
  618. package/SVF-osx/svf/include/include/Util/BitVector.h +55 -0
  619. package/SVF-osx/svf/include/include/Util/CallGraphBuilder.h +74 -0
  620. package/SVF-osx/svf/include/include/Util/Casting.h +426 -0
  621. package/SVF-osx/svf/include/include/Util/CommandLine.h +530 -0
  622. package/SVF-osx/svf/include/include/Util/CoreBitVector.h +214 -0
  623. package/SVF-osx/svf/include/include/Util/CppUtil.h +81 -0
  624. package/SVF-osx/svf/include/include/Util/CxtStmt.h +501 -0
  625. package/SVF-osx/svf/include/include/Util/DPItem.h +618 -0
  626. package/SVF-osx/svf/include/include/Util/ExtAPI.h +339 -0
  627. package/SVF-osx/svf/include/include/Util/ExtAPI.json +5707 -0
  628. package/SVF-osx/svf/include/include/Util/GraphReachSolver.h +186 -0
  629. package/SVF-osx/svf/include/include/Util/NodeIDAllocator.h +194 -0
  630. package/SVF-osx/svf/include/include/Util/Options.h +266 -0
  631. package/SVF-osx/svf/include/include/Util/PTAStat.h +65 -0
  632. package/SVF-osx/svf/include/include/Util/SCC.h +354 -0
  633. package/SVF-osx/svf/include/include/Util/SVFStat.h +100 -0
  634. package/SVF-osx/svf/include/include/Util/SVFUtil.h +660 -0
  635. package/SVF-osx/svf/include/include/Util/SparseBitVector.h +1202 -0
  636. package/SVF-osx/svf/include/include/Util/ThreadAPI.h +330 -0
  637. package/SVF-osx/svf/include/include/Util/WorkList.h +317 -0
  638. package/SVF-osx/svf/include/include/Util/Z3Expr.h +318 -0
  639. package/SVF-osx/svf/include/include/Util/cJSON.h +300 -0
  640. package/SVF-osx/svf/include/include/Util/iterator.h +407 -0
  641. package/SVF-osx/svf/include/include/Util/iterator_range.h +76 -0
  642. package/SVF-osx/svf/include/include/WPA/Andersen.h +416 -0
  643. package/SVF-osx/svf/include/include/WPA/AndersenPWC.h +160 -0
  644. package/SVF-osx/svf/include/include/WPA/CSC.h +95 -0
  645. package/SVF-osx/svf/include/include/WPA/FlowSensitive.h +317 -0
  646. package/SVF-osx/svf/include/include/WPA/Steensgaard.h +126 -0
  647. package/SVF-osx/svf/include/include/WPA/TypeAnalysis.h +83 -0
  648. package/SVF-osx/svf/include/include/WPA/VersionedFlowSensitive.h +287 -0
  649. package/SVF-osx/svf/include/include/WPA/WPAFSSolver.h +254 -0
  650. package/SVF-osx/svf/include/include/WPA/WPAPass.h +119 -0
  651. package/SVF-osx/svf/include/include/WPA/WPASolver.h +205 -0
  652. package/SVF-osx/svf/include/include/WPA/WPAStat.h +222 -0
  653. package/SVF-osx/svf-llvm/include/SVF-LLVM/BasicTypes.h +250 -0
  654. package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +94 -0
  655. package/SVF-osx/svf-llvm/include/SVF-LLVM/CHGBuilder.h +73 -0
  656. package/SVF-osx/{include → svf-llvm/include}/SVF-LLVM/CPPUtil.h +0 -0
  657. package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +484 -0
  658. package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
  659. package/SVF-osx/svf-llvm/include/SVF-LLVM/ICFGBuilder.h +106 -0
  660. package/SVF-osx/{include → svf-llvm/include}/SVF-LLVM/IRAnnotator.h +0 -0
  661. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMLoopAnalysis.h +61 -0
  662. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +360 -0
  663. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +466 -0
  664. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +250 -0
  665. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +94 -0
  666. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +73 -0
  667. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +484 -0
  668. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
  669. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +106 -0
  670. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +61 -0
  671. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +360 -0
  672. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +466 -0
  673. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +417 -0
  674. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +110 -0
  675. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +417 -0
  676. package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +110 -0
  677. package/package.json +1 -1
  678. package/SVF-linux/Release-build/lib/CUDD/libCudd.a +0 -0
  679. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
@@ -0,0 +1,1202 @@
1
+ //===- SparseBitVector.h - Efficient Sparse BitVector --*- C++ -*-===//
2
+ //
3
+ // From the LLVM Project with some modifications, under the Apache License v2.0
4
+ // with LLVM Exceptions. See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+
8
+ #ifndef SPARSEBITVECTOR_H
9
+ #define SPARSEBITVECTOR_H
10
+
11
+ #include <ostream>
12
+ #include <cassert>
13
+ #include <cstring>
14
+ #include <climits>
15
+ #include <limits>
16
+ #include <iterator>
17
+ #include <list>
18
+
19
+ // Appease GCC?
20
+ #ifdef __has_builtin
21
+ # define HAS_CLZ __has_builtin(__builtin_clz)
22
+ # define HAS_CLZLL __has_builtin(__builtin_clzll)
23
+ #else
24
+ # define HAS_CLZ 0
25
+ # define HAS_CLZLL 0
26
+ #endif
27
+
28
+ namespace SVF
29
+ {
30
+
31
+ /// The behavior an operation has on an input of 0.
32
+ enum ZeroBehavior
33
+ {
34
+ /// The returned value is undefined.
35
+ ZB_Undefined,
36
+ /// The returned value is numeric_limits<T>::max()
37
+ ZB_Max,
38
+ /// The returned value is numeric_limits<T>::digits
39
+ ZB_Width
40
+ };
41
+
42
+ template <typename T, std::size_t SizeOfT> struct TrailingZerosCounter
43
+ {
44
+ static unsigned count(T Val, ZeroBehavior)
45
+ {
46
+ if (!Val)
47
+ return std::numeric_limits<T>::digits;
48
+ if (Val & 0x1)
49
+ return 0;
50
+
51
+ // Bisection method.
52
+ unsigned ZeroBits = 0;
53
+ T Shift = std::numeric_limits<T>::digits >> 1;
54
+ T Mask = std::numeric_limits<T>::max() >> Shift;
55
+ while (Shift)
56
+ {
57
+ if ((Val & Mask) == 0)
58
+ {
59
+ Val >>= Shift;
60
+ ZeroBits |= Shift;
61
+ }
62
+ Shift >>= 1;
63
+ Mask >>= Shift;
64
+ }
65
+ return ZeroBits;
66
+ }
67
+ };
68
+
69
+ /// Count number of 0's from the least significant bit to the most
70
+ /// stopping at the first 1.
71
+ ///
72
+ /// Only unsigned integral types are allowed.
73
+ ///
74
+ /// \param ZB the behavior on an input of 0. Only ZB_Width and ZB_Undefined are
75
+ /// valid arguments.
76
+ template <typename T>
77
+ unsigned countTrailingZeros(T Val, ZeroBehavior ZB = ZB_Width)
78
+ {
79
+ static_assert(std::numeric_limits<T>::is_integer &&
80
+ !std::numeric_limits<T>::is_signed,
81
+ "Only unsigned integral types are allowed.");
82
+ return TrailingZerosCounter<T, sizeof(T)>::count(Val, ZB);
83
+ }
84
+
85
+ template <typename T, std::size_t SizeOfT> struct PopulationCounter
86
+ {
87
+ static unsigned count(T Value)
88
+ {
89
+ // Generic version, forward to 32 bits.
90
+ static_assert(SizeOfT <= 4, "Not implemented!");
91
+ #if defined(__GNUC__)
92
+ return __builtin_popcount(Value);
93
+ #else
94
+ uint32_t v = Value;
95
+ v = v - ((v >> 1) & 0x55555555);
96
+ v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
97
+ return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
98
+ #endif
99
+ }
100
+ };
101
+
102
+ template <typename T, std::size_t SizeOfT> struct LeadingZerosCounter
103
+ {
104
+ static unsigned count(T Val, ZeroBehavior)
105
+ {
106
+ if (!Val)
107
+ return std::numeric_limits<T>::digits;
108
+
109
+ // Bisection method.
110
+ unsigned ZeroBits = 0;
111
+ for (T Shift = std::numeric_limits<T>::digits >> 1; Shift; Shift >>= 1)
112
+ {
113
+ T Tmp = Val >> Shift;
114
+ if (Tmp)
115
+ Val = Tmp;
116
+ else
117
+ ZeroBits |= Shift;
118
+ }
119
+ return ZeroBits;
120
+ }
121
+ };
122
+
123
+ #if defined(__GNUC__) || defined(_MSC_VER)
124
+ template <typename T> struct LeadingZerosCounter<T, 4>
125
+ {
126
+ static unsigned count(T Val, ZeroBehavior ZB)
127
+ {
128
+ if (ZB != ZB_Undefined && Val == 0)
129
+ return 32;
130
+
131
+ #if defined(__GNUC__) || HAS_CLZ
132
+ return __builtin_clz(Val);
133
+ #elif defined(_MSC_VER)
134
+ unsigned long Index;
135
+ _BitScanReverse(&Index, Val);
136
+ return Index ^ 31;
137
+ #endif
138
+ }
139
+ };
140
+
141
+ #if !defined(_MSC_VER) || defined(_M_X64)
142
+ template <typename T> struct LeadingZerosCounter<T, 8>
143
+ {
144
+ static unsigned count(T Val, ZeroBehavior ZB)
145
+ {
146
+ if (ZB != ZB_Undefined && Val == 0)
147
+ return 64;
148
+
149
+ #if defined(__GNUC__) || HAS_CLZLL
150
+ return __builtin_clzll(Val);
151
+ #elif defined(_MSC_VER)
152
+ unsigned long Index;
153
+ _BitScanReverse64(&Index, Val);
154
+ return Index ^ 63;
155
+ #endif
156
+ }
157
+ };
158
+ #endif
159
+ #endif
160
+
161
+ /// Count number of 0's from the most significant bit to the least
162
+ /// stopping at the first 1.
163
+ ///
164
+ /// Only unsigned integral types are allowed.
165
+ ///
166
+ /// \param ZB the behavior on an input of 0. Only ZB_Width and ZB_Undefined are
167
+ /// valid arguments.
168
+ template <typename T>
169
+ unsigned countLeadingZeros(T Val, ZeroBehavior ZB = ZB_Width)
170
+ {
171
+ static_assert(std::numeric_limits<T>::is_integer &&
172
+ !std::numeric_limits<T>::is_signed,
173
+ "Only unsigned integral types are allowed.");
174
+ return LeadingZerosCounter<T, sizeof(T)>::count(Val, ZB);
175
+ }
176
+
177
+ template <typename T> struct PopulationCounter<T, 8>
178
+ {
179
+ static unsigned count(T Value)
180
+ {
181
+ #if defined(__GNUC__)
182
+ return __builtin_popcountll(Value);
183
+ #else
184
+ uint64_t v = Value;
185
+ v = v - ((v >> 1) & 0x5555555555555555ULL);
186
+ v = (v & 0x3333333333333333ULL) + ((v >> 2) & 0x3333333333333333ULL);
187
+ v = (v + (v >> 4)) & 0x0F0F0F0F0F0F0F0FULL;
188
+ return unsigned((uint64_t)(v * 0x0101010101010101ULL) >> 56);
189
+ #endif
190
+ }
191
+ };
192
+
193
+ /// Count the number of set bits in a value.
194
+ /// Ex. countPopulation(0xF000F000) = 8
195
+ /// Returns 0 if the word is zero.
196
+ template <typename T>
197
+ inline unsigned countPopulation(T Value)
198
+ {
199
+ static_assert(std::numeric_limits<T>::is_integer &&
200
+ !std::numeric_limits<T>::is_signed,
201
+ "Only unsigned integral types are allowed.");
202
+ return PopulationCounter<T, sizeof(T)>::count(Value);
203
+ }
204
+
205
+ /// SparseBitVector is an implementation of a bitvector that is sparse by only
206
+ /// storing the elements that have non-zero bits set. In order to make this
207
+ /// fast for the most common cases, SparseBitVector is implemented as a linked
208
+ /// list of SparseBitVectorElements. We maintain a pointer to the last
209
+ /// SparseBitVectorElement accessed (in the form of a list iterator), in order
210
+ /// to make multiple in-order test/set constant time after the first one is
211
+ /// executed. Note that using vectors to store SparseBitVectorElement's does
212
+ /// not work out very well because it causes insertion in the middle to take
213
+ /// enormous amounts of time with a large amount of bits. Other structures that
214
+ /// have better worst cases for insertion in the middle (various balanced trees,
215
+ /// etc) do not perform as well in practice as a linked list with this iterator
216
+ /// kept up to date. They are also significantly more memory intensive.
217
+ template <unsigned ElementSize = 128> struct SparseBitVectorElement
218
+ {
219
+ public:
220
+ using BitWord = unsigned long;
221
+ using size_type = unsigned;
222
+ enum
223
+ {
224
+ BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT,
225
+ BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE,
226
+ BITS_PER_ELEMENT = ElementSize
227
+ };
228
+
229
+ private:
230
+ // Index of Element in terms of where first bit starts.
231
+ unsigned ElementIndex = 0;
232
+ BitWord Bits[BITWORDS_PER_ELEMENT] = {0};
233
+
234
+ SparseBitVectorElement() = default;
235
+
236
+ public:
237
+ explicit SparseBitVectorElement(unsigned Idx) : ElementIndex(Idx) {}
238
+
239
+ // Comparison.
240
+ bool operator==(const SparseBitVectorElement &RHS) const
241
+ {
242
+ if (ElementIndex != RHS.ElementIndex)
243
+ return false;
244
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
245
+ if (Bits[i] != RHS.Bits[i])
246
+ return false;
247
+ return true;
248
+ }
249
+
250
+ bool operator!=(const SparseBitVectorElement &RHS) const
251
+ {
252
+ return !(*this == RHS);
253
+ }
254
+
255
+ // Return the bits that make up word Idx in our element.
256
+ BitWord word(unsigned Idx) const
257
+ {
258
+ assert(Idx < BITWORDS_PER_ELEMENT);
259
+ return Bits[Idx];
260
+ }
261
+
262
+ unsigned index() const
263
+ {
264
+ return ElementIndex;
265
+ }
266
+
267
+ bool empty() const
268
+ {
269
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
270
+ if (Bits[i])
271
+ return false;
272
+ return true;
273
+ }
274
+
275
+ void set(unsigned Idx)
276
+ {
277
+ Bits[Idx / BITWORD_SIZE] |= 1L << (Idx % BITWORD_SIZE);
278
+ }
279
+
280
+ bool test_and_set(unsigned Idx)
281
+ {
282
+ bool old = test(Idx);
283
+ if (!old)
284
+ {
285
+ set(Idx);
286
+ return true;
287
+ }
288
+ return false;
289
+ }
290
+
291
+ void reset(unsigned Idx)
292
+ {
293
+ Bits[Idx / BITWORD_SIZE] &= ~(1L << (Idx % BITWORD_SIZE));
294
+ }
295
+
296
+ bool test(unsigned Idx) const
297
+ {
298
+ return Bits[Idx / BITWORD_SIZE] & (1L << (Idx % BITWORD_SIZE));
299
+ }
300
+
301
+ size_type count() const
302
+ {
303
+ unsigned NumBits = 0;
304
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
305
+ NumBits += countPopulation(Bits[i]);
306
+ return NumBits;
307
+ }
308
+
309
+ /// find_first - Returns the index of the first set bit.
310
+ int find_first() const
311
+ {
312
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
313
+ if (Bits[i] != 0)
314
+ return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
315
+ assert(false && "SBV: find_first: SBV cannot be empty");
316
+ abort();
317
+ }
318
+
319
+ /// find_last - Returns the index of the last set bit.
320
+ int find_last() const
321
+ {
322
+ for (unsigned I = 0; I < BITWORDS_PER_ELEMENT; ++I)
323
+ {
324
+ unsigned Idx = BITWORDS_PER_ELEMENT - I - 1;
325
+ if (Bits[Idx] != 0)
326
+ return Idx * BITWORD_SIZE + BITWORD_SIZE -
327
+ countLeadingZeros(Bits[Idx]) - 1;
328
+ }
329
+ assert(false && "SBV: find_last: SBV cannot be empty");
330
+ abort();
331
+ }
332
+
333
+ /// find_next - Returns the index of the next set bit starting from the
334
+ /// "Curr" bit. Returns -1 if the next set bit is not found.
335
+ int find_next(unsigned Curr) const
336
+ {
337
+ if (Curr >= BITS_PER_ELEMENT)
338
+ return -1;
339
+
340
+ unsigned WordPos = Curr / BITWORD_SIZE;
341
+ unsigned BitPos = Curr % BITWORD_SIZE;
342
+ BitWord Copy = Bits[WordPos];
343
+ assert(WordPos <= BITWORDS_PER_ELEMENT
344
+ && "Word Position outside of element");
345
+
346
+ // Mask off previous bits.
347
+ Copy &= ~0UL << BitPos;
348
+
349
+ if (Copy != 0)
350
+ return WordPos * BITWORD_SIZE + countTrailingZeros(Copy);
351
+
352
+ // Check subsequent words.
353
+ for (unsigned i = WordPos+1; i < BITWORDS_PER_ELEMENT; ++i)
354
+ if (Bits[i] != 0)
355
+ return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
356
+ return -1;
357
+ }
358
+
359
+ // Union this element with RHS and return true if this one changed.
360
+ bool unionWith(const SparseBitVectorElement &RHS)
361
+ {
362
+ bool changed = false;
363
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
364
+ {
365
+ BitWord old = changed ? 0 : Bits[i];
366
+
367
+ Bits[i] |= RHS.Bits[i];
368
+ if (!changed && old != Bits[i])
369
+ changed = true;
370
+ }
371
+ return changed;
372
+ }
373
+
374
+ // Return true if we have any bits in common with RHS
375
+ bool intersects(const SparseBitVectorElement &RHS) const
376
+ {
377
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
378
+ {
379
+ if (RHS.Bits[i] & Bits[i])
380
+ return true;
381
+ }
382
+ return false;
383
+ }
384
+
385
+ // Intersect this Element with RHS and return true if this one changed.
386
+ // BecameZero is set to true if this element became all-zero bits.
387
+ bool intersectWith(const SparseBitVectorElement &RHS,
388
+ bool &BecameZero)
389
+ {
390
+ bool changed = false;
391
+ bool allzero = true;
392
+
393
+ BecameZero = false;
394
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
395
+ {
396
+ BitWord old = changed ? 0 : Bits[i];
397
+
398
+ Bits[i] &= RHS.Bits[i];
399
+ if (Bits[i] != 0)
400
+ allzero = false;
401
+
402
+ if (!changed && old != Bits[i])
403
+ changed = true;
404
+ }
405
+ BecameZero = allzero;
406
+ return changed;
407
+ }
408
+
409
+ // Intersect this Element with the complement of RHS and return true if this
410
+ // one changed. BecameZero is set to true if this element became all-zero
411
+ // bits.
412
+ bool intersectWithComplement(const SparseBitVectorElement &RHS,
413
+ bool &BecameZero)
414
+ {
415
+ bool changed = false;
416
+ bool allzero = true;
417
+
418
+ BecameZero = false;
419
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
420
+ {
421
+ BitWord old = changed ? 0 : Bits[i];
422
+
423
+ Bits[i] &= ~RHS.Bits[i];
424
+ if (Bits[i] != 0)
425
+ allzero = false;
426
+
427
+ if (!changed && old != Bits[i])
428
+ changed = true;
429
+ }
430
+ BecameZero = allzero;
431
+ return changed;
432
+ }
433
+
434
+ // Three argument version of intersectWithComplement that intersects
435
+ // RHS1 & ~RHS2 into this element
436
+ void intersectWithComplement(const SparseBitVectorElement &RHS1,
437
+ const SparseBitVectorElement &RHS2,
438
+ bool &BecameZero)
439
+ {
440
+ bool allzero = true;
441
+
442
+ BecameZero = false;
443
+ for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
444
+ {
445
+ Bits[i] = RHS1.Bits[i] & ~RHS2.Bits[i];
446
+ if (Bits[i] != 0)
447
+ allzero = false;
448
+ }
449
+ BecameZero = allzero;
450
+ }
451
+ };
452
+
453
+ template <unsigned ElementSize = 128>
454
+ class SparseBitVector
455
+ {
456
+ using ElementList = std::list<SparseBitVectorElement<ElementSize>>;
457
+ using ElementListIter = typename ElementList::iterator;
458
+ using ElementListConstIter = typename ElementList::const_iterator;
459
+ enum
460
+ {
461
+ BITWORD_SIZE = SparseBitVectorElement<ElementSize>::BITWORD_SIZE
462
+ };
463
+
464
+ ElementList Elements;
465
+ // Pointer to our current Element. This has no visible effect on the external
466
+ // state of a SparseBitVector, it's just used to improve performance in the
467
+ // common case of testing/modifying bits with similar indices.
468
+ mutable ElementListIter CurrElementIter;
469
+
470
+ // This is like std::lower_bound, except we do linear searching from the
471
+ // current position.
472
+ ElementListIter FindLowerBoundImpl(unsigned ElementIndex) const
473
+ {
474
+
475
+ // We cache a non-const iterator so we're forced to resort to const_cast to
476
+ // get the begin/end in the case where 'this' is const. To avoid duplication
477
+ // of code with the only difference being whether the const cast is present
478
+ // 'this' is always const in this particular function and we sort out the
479
+ // difference in FindLowerBound and FindLowerBoundConst.
480
+ ElementListIter Begin =
481
+ const_cast<SparseBitVector<ElementSize> *>(this)->Elements.begin();
482
+ ElementListIter End =
483
+ const_cast<SparseBitVector<ElementSize> *>(this)->Elements.end();
484
+
485
+ if (Elements.empty())
486
+ {
487
+ CurrElementIter = Begin;
488
+ return CurrElementIter;
489
+ }
490
+
491
+ // Make sure our current iterator is valid.
492
+ if (CurrElementIter == End)
493
+ --CurrElementIter;
494
+
495
+ // Search from our current iterator, either backwards or forwards,
496
+ // depending on what element we are looking for.
497
+ ElementListIter ElementIter = CurrElementIter;
498
+ if (CurrElementIter->index() == ElementIndex)
499
+ {
500
+ return ElementIter;
501
+ }
502
+ else if (CurrElementIter->index() > ElementIndex)
503
+ {
504
+ while (ElementIter != Begin
505
+ && ElementIter->index() > ElementIndex)
506
+ --ElementIter;
507
+ }
508
+ else
509
+ {
510
+ while (ElementIter != End &&
511
+ ElementIter->index() < ElementIndex)
512
+ ++ElementIter;
513
+ }
514
+ CurrElementIter = ElementIter;
515
+ return ElementIter;
516
+ }
517
+ ElementListConstIter FindLowerBoundConst(unsigned ElementIndex) const
518
+ {
519
+ return FindLowerBoundImpl(ElementIndex);
520
+ }
521
+ ElementListIter FindLowerBound(unsigned ElementIndex)
522
+ {
523
+ return FindLowerBoundImpl(ElementIndex);
524
+ }
525
+
526
+ // Iterator to walk set bits in the bitmap. This iterator is a lot uglier
527
+ // than it would be, in order to be efficient.
528
+ class SparseBitVectorIterator
529
+ {
530
+ private:
531
+ bool AtEnd;
532
+
533
+ const SparseBitVector<ElementSize> *BitVector = nullptr;
534
+
535
+ // Current element inside of bitmap.
536
+ ElementListConstIter Iter;
537
+
538
+ // Current bit number inside of our bitmap.
539
+ unsigned BitNumber;
540
+
541
+ // Current word number inside of our element.
542
+ unsigned WordNumber;
543
+
544
+ // Current bits from the element.
545
+ typename SparseBitVectorElement<ElementSize>::BitWord Bits;
546
+
547
+ // Move our iterator to the first non-zero bit in the bitmap.
548
+ void AdvanceToFirstNonZero()
549
+ {
550
+ if (AtEnd)
551
+ return;
552
+ if (BitVector->Elements.empty())
553
+ {
554
+ AtEnd = true;
555
+ return;
556
+ }
557
+ Iter = BitVector->Elements.begin();
558
+ BitNumber = Iter->index() * ElementSize;
559
+ unsigned BitPos = Iter->find_first();
560
+ BitNumber += BitPos;
561
+ WordNumber = (BitNumber % ElementSize) / BITWORD_SIZE;
562
+ Bits = Iter->word(WordNumber);
563
+ Bits >>= BitPos % BITWORD_SIZE;
564
+ }
565
+
566
+ // Move our iterator to the next non-zero bit.
567
+ void AdvanceToNextNonZero()
568
+ {
569
+ if (AtEnd)
570
+ return;
571
+
572
+ while (Bits && !(Bits & 1))
573
+ {
574
+ Bits >>= 1;
575
+ BitNumber += 1;
576
+ }
577
+
578
+ // See if we ran out of Bits in this word.
579
+ if (!Bits)
580
+ {
581
+ int NextSetBitNumber = Iter->find_next(BitNumber % ElementSize) ;
582
+ // If we ran out of set bits in this element, move to next element.
583
+ if (NextSetBitNumber == -1 || (BitNumber % ElementSize == 0))
584
+ {
585
+ ++Iter;
586
+ WordNumber = 0;
587
+
588
+ // We may run out of elements in the bitmap.
589
+ if (Iter == BitVector->Elements.end())
590
+ {
591
+ AtEnd = true;
592
+ return;
593
+ }
594
+ // Set up for next non-zero word in bitmap.
595
+ BitNumber = Iter->index() * ElementSize;
596
+ NextSetBitNumber = Iter->find_first();
597
+ BitNumber += NextSetBitNumber;
598
+ WordNumber = (BitNumber % ElementSize) / BITWORD_SIZE;
599
+ Bits = Iter->word(WordNumber);
600
+ Bits >>= NextSetBitNumber % BITWORD_SIZE;
601
+ }
602
+ else
603
+ {
604
+ WordNumber = (NextSetBitNumber % ElementSize) / BITWORD_SIZE;
605
+ Bits = Iter->word(WordNumber);
606
+ Bits >>= NextSetBitNumber % BITWORD_SIZE;
607
+ BitNumber = Iter->index() * ElementSize;
608
+ BitNumber += NextSetBitNumber;
609
+ }
610
+ }
611
+ }
612
+
613
+ public:
614
+ SparseBitVectorIterator() = delete;
615
+
616
+ SparseBitVectorIterator(const SparseBitVector<ElementSize> *RHS,
617
+ bool end = false):BitVector(RHS)
618
+ {
619
+ Iter = BitVector->Elements.begin();
620
+ BitNumber = 0;
621
+ Bits = 0;
622
+ WordNumber = ~0;
623
+ AtEnd = end;
624
+ AdvanceToFirstNonZero();
625
+ }
626
+
627
+ // Preincrement.
628
+ inline SparseBitVectorIterator& operator++()
629
+ {
630
+ ++BitNumber;
631
+ Bits >>= 1;
632
+ AdvanceToNextNonZero();
633
+ return *this;
634
+ }
635
+
636
+ // Postincrement.
637
+ inline SparseBitVectorIterator operator++(int)
638
+ {
639
+ SparseBitVectorIterator tmp = *this;
640
+ ++*this;
641
+ return tmp;
642
+ }
643
+
644
+ // Return the current set bit number.
645
+ unsigned operator*() const
646
+ {
647
+ return BitNumber;
648
+ }
649
+
650
+ bool operator==(const SparseBitVectorIterator &RHS) const
651
+ {
652
+ // If they are both at the end, ignore the rest of the fields.
653
+ if (AtEnd && RHS.AtEnd)
654
+ return true;
655
+ // Otherwise they are the same if they have the same bit number and
656
+ // bitmap.
657
+ return AtEnd == RHS.AtEnd && RHS.BitNumber == BitNumber;
658
+ }
659
+
660
+ bool operator!=(const SparseBitVectorIterator &RHS) const
661
+ {
662
+ return !(*this == RHS);
663
+ }
664
+ };
665
+
666
+ public:
667
+ using iterator = SparseBitVectorIterator;
668
+
669
+ SparseBitVector() : Elements(), CurrElementIter(Elements.begin()) {}
670
+
671
+ SparseBitVector(const SparseBitVector &RHS)
672
+ : Elements(RHS.Elements), CurrElementIter(Elements.begin()) {}
673
+ SparseBitVector(SparseBitVector &&RHS)
674
+ noexcept : Elements(std::move(RHS.Elements)), CurrElementIter(Elements.begin()) {}
675
+
676
+ // Clear.
677
+ void clear()
678
+ {
679
+ Elements.clear();
680
+ }
681
+
682
+ // Assignment
683
+ SparseBitVector& operator=(const SparseBitVector& RHS)
684
+ {
685
+ if (this == &RHS)
686
+ return *this;
687
+
688
+ Elements = RHS.Elements;
689
+ CurrElementIter = Elements.begin();
690
+ return *this;
691
+ }
692
+ SparseBitVector &operator=(SparseBitVector &&RHS)
693
+ {
694
+ Elements = std::move(RHS.Elements);
695
+ CurrElementIter = Elements.begin();
696
+ return *this;
697
+ }
698
+
699
+ // Test, Reset, and Set a bit in the bitmap.
700
+ bool test(unsigned Idx) const
701
+ {
702
+ if (Elements.empty())
703
+ return false;
704
+
705
+ unsigned ElementIndex = Idx / ElementSize;
706
+ ElementListConstIter ElementIter = FindLowerBoundConst(ElementIndex);
707
+
708
+ // If we can't find an element that is supposed to contain this bit, there
709
+ // is nothing more to do.
710
+ if (ElementIter == Elements.end() ||
711
+ ElementIter->index() != ElementIndex)
712
+ return false;
713
+ return ElementIter->test(Idx % ElementSize);
714
+ }
715
+
716
+ void reset(unsigned Idx)
717
+ {
718
+ if (Elements.empty())
719
+ return;
720
+
721
+ unsigned ElementIndex = Idx / ElementSize;
722
+ ElementListIter ElementIter = FindLowerBound(ElementIndex);
723
+
724
+ // If we can't find an element that is supposed to contain this bit, there
725
+ // is nothing more to do.
726
+ if (ElementIter == Elements.end() ||
727
+ ElementIter->index() != ElementIndex)
728
+ return;
729
+ ElementIter->reset(Idx % ElementSize);
730
+
731
+ // When the element is zeroed out, delete it.
732
+ if (ElementIter->empty())
733
+ {
734
+ ++CurrElementIter;
735
+ Elements.erase(ElementIter);
736
+ }
737
+ }
738
+
739
+ void set(unsigned Idx)
740
+ {
741
+ unsigned ElementIndex = Idx / ElementSize;
742
+ ElementListIter ElementIter;
743
+ if (Elements.empty())
744
+ {
745
+ ElementIter = Elements.emplace(Elements.end(), ElementIndex);
746
+ }
747
+ else
748
+ {
749
+ ElementIter = FindLowerBound(ElementIndex);
750
+
751
+ if (ElementIter == Elements.end() ||
752
+ ElementIter->index() != ElementIndex)
753
+ {
754
+ // We may have hit the beginning of our SparseBitVector, in which case,
755
+ // we may need to insert right after this element, which requires moving
756
+ // the current iterator forward one, because insert does insert before.
757
+ if (ElementIter != Elements.end() &&
758
+ ElementIter->index() < ElementIndex)
759
+ ++ElementIter;
760
+ ElementIter = Elements.emplace(ElementIter, ElementIndex);
761
+ }
762
+ }
763
+ CurrElementIter = ElementIter;
764
+
765
+ ElementIter->set(Idx % ElementSize);
766
+ }
767
+
768
+ bool test_and_set(unsigned Idx)
769
+ {
770
+ bool old = test(Idx);
771
+ if (!old)
772
+ {
773
+ set(Idx);
774
+ return true;
775
+ }
776
+ return false;
777
+ }
778
+
779
+ bool operator!=(const SparseBitVector &RHS) const
780
+ {
781
+ return !(*this == RHS);
782
+ }
783
+
784
+ bool operator==(const SparseBitVector &RHS) const
785
+ {
786
+ ElementListConstIter Iter1 = Elements.begin();
787
+ ElementListConstIter Iter2 = RHS.Elements.begin();
788
+
789
+ for (; Iter1 != Elements.end() && Iter2 != RHS.Elements.end();
790
+ ++Iter1, ++Iter2)
791
+ {
792
+ if (*Iter1 != *Iter2)
793
+ return false;
794
+ }
795
+ return Iter1 == Elements.end() && Iter2 == RHS.Elements.end();
796
+ }
797
+
798
+ // Union our bitmap with the RHS and return true if we changed.
799
+ bool operator|=(const SparseBitVector &RHS)
800
+ {
801
+ if (this == &RHS)
802
+ return false;
803
+
804
+ bool changed = false;
805
+ ElementListIter Iter1 = Elements.begin();
806
+ ElementListConstIter Iter2 = RHS.Elements.begin();
807
+
808
+ // If RHS is empty, we are done
809
+ if (RHS.Elements.empty())
810
+ return false;
811
+
812
+ while (Iter2 != RHS.Elements.end())
813
+ {
814
+ if (Iter1 == Elements.end() || Iter1->index() > Iter2->index())
815
+ {
816
+ Elements.insert(Iter1, *Iter2);
817
+ ++Iter2;
818
+ changed = true;
819
+ }
820
+ else if (Iter1->index() == Iter2->index())
821
+ {
822
+ changed |= Iter1->unionWith(*Iter2);
823
+ ++Iter1;
824
+ ++Iter2;
825
+ }
826
+ else
827
+ {
828
+ ++Iter1;
829
+ }
830
+ }
831
+ CurrElementIter = Elements.begin();
832
+ return changed;
833
+ }
834
+
835
+ // Intersect our bitmap with the RHS and return true if ours changed.
836
+ bool operator&=(const SparseBitVector &RHS)
837
+ {
838
+ if (this == &RHS)
839
+ return false;
840
+
841
+ bool changed = false;
842
+ ElementListIter Iter1 = Elements.begin();
843
+ ElementListConstIter Iter2 = RHS.Elements.begin();
844
+
845
+ // Check if both bitmaps are empty.
846
+ if (Elements.empty() && RHS.Elements.empty())
847
+ return false;
848
+
849
+ // Loop through, intersecting as we go, erasing elements when necessary.
850
+ while (Iter2 != RHS.Elements.end())
851
+ {
852
+ if (Iter1 == Elements.end())
853
+ {
854
+ CurrElementIter = Elements.begin();
855
+ return changed;
856
+ }
857
+
858
+ if (Iter1->index() > Iter2->index())
859
+ {
860
+ ++Iter2;
861
+ }
862
+ else if (Iter1->index() == Iter2->index())
863
+ {
864
+ bool BecameZero;
865
+ changed |= Iter1->intersectWith(*Iter2, BecameZero);
866
+ if (BecameZero)
867
+ {
868
+ ElementListIter IterTmp = Iter1;
869
+ ++Iter1;
870
+ Elements.erase(IterTmp);
871
+ }
872
+ else
873
+ {
874
+ ++Iter1;
875
+ }
876
+ ++Iter2;
877
+ }
878
+ else
879
+ {
880
+ ElementListIter IterTmp = Iter1;
881
+ ++Iter1;
882
+ Elements.erase(IterTmp);
883
+ changed = true;
884
+ }
885
+ }
886
+ if (Iter1 != Elements.end())
887
+ {
888
+ Elements.erase(Iter1, Elements.end());
889
+ changed = true;
890
+ }
891
+ CurrElementIter = Elements.begin();
892
+ return changed;
893
+ }
894
+
895
+ // Intersect our bitmap with the complement of the RHS and return true
896
+ // if ours changed.
897
+ bool intersectWithComplement(const SparseBitVector &RHS)
898
+ {
899
+ if (this == &RHS)
900
+ {
901
+ if (!empty())
902
+ {
903
+ clear();
904
+ return true;
905
+ }
906
+ return false;
907
+ }
908
+
909
+ bool changed = false;
910
+ ElementListIter Iter1 = Elements.begin();
911
+ ElementListConstIter Iter2 = RHS.Elements.begin();
912
+
913
+ // If either our bitmap or RHS is empty, we are done
914
+ if (Elements.empty() || RHS.Elements.empty())
915
+ return false;
916
+
917
+ // Loop through, intersecting as we go, erasing elements when necessary.
918
+ while (Iter2 != RHS.Elements.end())
919
+ {
920
+ if (Iter1 == Elements.end())
921
+ {
922
+ CurrElementIter = Elements.begin();
923
+ return changed;
924
+ }
925
+
926
+ if (Iter1->index() > Iter2->index())
927
+ {
928
+ ++Iter2;
929
+ }
930
+ else if (Iter1->index() == Iter2->index())
931
+ {
932
+ bool BecameZero;
933
+ changed |= Iter1->intersectWithComplement(*Iter2, BecameZero);
934
+ if (BecameZero)
935
+ {
936
+ ElementListIter IterTmp = Iter1;
937
+ ++Iter1;
938
+ Elements.erase(IterTmp);
939
+ }
940
+ else
941
+ {
942
+ ++Iter1;
943
+ }
944
+ ++Iter2;
945
+ }
946
+ else
947
+ {
948
+ ++Iter1;
949
+ }
950
+ }
951
+ CurrElementIter = Elements.begin();
952
+ return changed;
953
+ }
954
+
955
+ bool intersectWithComplement(const SparseBitVector<ElementSize> *RHS) const
956
+ {
957
+ return intersectWithComplement(*RHS);
958
+ }
959
+
960
+ // Three argument version of intersectWithComplement.
961
+ // Result of RHS1 & ~RHS2 is stored into this bitmap.
962
+ void intersectWithComplement(const SparseBitVector<ElementSize> &RHS1,
963
+ const SparseBitVector<ElementSize> &RHS2)
964
+ {
965
+ if (this == &RHS1)
966
+ {
967
+ intersectWithComplement(RHS2);
968
+ return;
969
+ }
970
+ else if (this == &RHS2)
971
+ {
972
+ SparseBitVector RHS2Copy(RHS2);
973
+ intersectWithComplement(RHS1, RHS2Copy);
974
+ return;
975
+ }
976
+
977
+ Elements.clear();
978
+ CurrElementIter = Elements.begin();
979
+ ElementListConstIter Iter1 = RHS1.Elements.begin();
980
+ ElementListConstIter Iter2 = RHS2.Elements.begin();
981
+
982
+ // If RHS1 is empty, we are done
983
+ // If RHS2 is empty, we still have to copy RHS1
984
+ if (RHS1.Elements.empty())
985
+ return;
986
+
987
+ // Loop through, intersecting as we go, erasing elements when necessary.
988
+ while (Iter2 != RHS2.Elements.end())
989
+ {
990
+ if (Iter1 == RHS1.Elements.end())
991
+ return;
992
+
993
+ if (Iter1->index() > Iter2->index())
994
+ {
995
+ ++Iter2;
996
+ }
997
+ else if (Iter1->index() == Iter2->index())
998
+ {
999
+ bool BecameZero = false;
1000
+ Elements.emplace_back(Iter1->index());
1001
+ Elements.back().intersectWithComplement(*Iter1, *Iter2, BecameZero);
1002
+ if (BecameZero)
1003
+ Elements.pop_back();
1004
+ ++Iter1;
1005
+ ++Iter2;
1006
+ }
1007
+ else
1008
+ {
1009
+ Elements.push_back(*Iter1++);
1010
+ }
1011
+ }
1012
+
1013
+ // copy the remaining elements
1014
+ std::copy(Iter1, RHS1.Elements.end(), std::back_inserter(Elements));
1015
+ }
1016
+
1017
+ void intersectWithComplement(const SparseBitVector<ElementSize> *RHS1,
1018
+ const SparseBitVector<ElementSize> *RHS2)
1019
+ {
1020
+ intersectWithComplement(*RHS1, *RHS2);
1021
+ }
1022
+
1023
+ bool intersects(const SparseBitVector<ElementSize> *RHS) const
1024
+ {
1025
+ return intersects(*RHS);
1026
+ }
1027
+
1028
+ // Return true if we share any bits in common with RHS
1029
+ bool intersects(const SparseBitVector<ElementSize> &RHS) const
1030
+ {
1031
+ ElementListConstIter Iter1 = Elements.begin();
1032
+ ElementListConstIter Iter2 = RHS.Elements.begin();
1033
+
1034
+ // Check if both bitmaps are empty.
1035
+ if (Elements.empty() && RHS.Elements.empty())
1036
+ return false;
1037
+
1038
+ // Loop through, intersecting stopping when we hit bits in common.
1039
+ while (Iter2 != RHS.Elements.end())
1040
+ {
1041
+ if (Iter1 == Elements.end())
1042
+ return false;
1043
+
1044
+ if (Iter1->index() > Iter2->index())
1045
+ {
1046
+ ++Iter2;
1047
+ }
1048
+ else if (Iter1->index() == Iter2->index())
1049
+ {
1050
+ if (Iter1->intersects(*Iter2))
1051
+ return true;
1052
+ ++Iter1;
1053
+ ++Iter2;
1054
+ }
1055
+ else
1056
+ {
1057
+ ++Iter1;
1058
+ }
1059
+ }
1060
+ return false;
1061
+ }
1062
+
1063
+ // Return true iff all bits set in this SparseBitVector are
1064
+ // also set in RHS.
1065
+ bool contains(const SparseBitVector<ElementSize> &RHS) const
1066
+ {
1067
+ SparseBitVector<ElementSize> Result(*this);
1068
+ Result &= RHS;
1069
+ return (Result == RHS);
1070
+ }
1071
+
1072
+ // Return the first set bit in the bitmap. Return -1 if no bits are set.
1073
+ int find_first() const
1074
+ {
1075
+ if (Elements.empty())
1076
+ return -1;
1077
+ const SparseBitVectorElement<ElementSize> &First = *(Elements.begin());
1078
+ return (First.index() * ElementSize) + First.find_first();
1079
+ }
1080
+
1081
+ // Return the last set bit in the bitmap. Return -1 if no bits are set.
1082
+ int find_last() const
1083
+ {
1084
+ if (Elements.empty())
1085
+ return -1;
1086
+ const SparseBitVectorElement<ElementSize> &Last = *(Elements.rbegin());
1087
+ return (Last.index() * ElementSize) + Last.find_last();
1088
+ }
1089
+
1090
+ // Return true if the SparseBitVector is empty
1091
+ bool empty() const
1092
+ {
1093
+ return Elements.empty();
1094
+ }
1095
+
1096
+ unsigned count() const
1097
+ {
1098
+ unsigned BitCount = 0;
1099
+ for (ElementListConstIter Iter = Elements.begin();
1100
+ Iter != Elements.end();
1101
+ ++Iter)
1102
+ BitCount += Iter->count();
1103
+
1104
+ return BitCount;
1105
+ }
1106
+
1107
+ iterator begin() const
1108
+ {
1109
+ return iterator(this);
1110
+ }
1111
+
1112
+ iterator end() const
1113
+ {
1114
+ return iterator(this, true);
1115
+ }
1116
+ };
1117
+
1118
+ // Convenience functions to allow Or and And without dereferencing in the user
1119
+ // code.
1120
+
1121
+ template <unsigned ElementSize>
1122
+ inline bool operator |=(SparseBitVector<ElementSize> &LHS,
1123
+ const SparseBitVector<ElementSize> *RHS)
1124
+ {
1125
+ return LHS |= *RHS;
1126
+ }
1127
+
1128
+ template <unsigned ElementSize>
1129
+ inline bool operator |=(SparseBitVector<ElementSize> *LHS,
1130
+ const SparseBitVector<ElementSize> &RHS)
1131
+ {
1132
+ return LHS->operator|=(RHS);
1133
+ }
1134
+
1135
+ template <unsigned ElementSize>
1136
+ inline bool operator &=(SparseBitVector<ElementSize> *LHS,
1137
+ const SparseBitVector<ElementSize> &RHS)
1138
+ {
1139
+ return LHS->operator&=(RHS);
1140
+ }
1141
+
1142
+ template <unsigned ElementSize>
1143
+ inline bool operator &=(SparseBitVector<ElementSize> &LHS,
1144
+ const SparseBitVector<ElementSize> *RHS)
1145
+ {
1146
+ return LHS &= *RHS;
1147
+ }
1148
+
1149
+ // Convenience functions for infix union, intersection, difference operators.
1150
+
1151
+ template <unsigned ElementSize>
1152
+ inline SparseBitVector<ElementSize>
1153
+ operator|(const SparseBitVector<ElementSize> &LHS,
1154
+ const SparseBitVector<ElementSize> &RHS)
1155
+ {
1156
+ SparseBitVector<ElementSize> Result(LHS);
1157
+ Result |= RHS;
1158
+ return Result;
1159
+ }
1160
+
1161
+ template <unsigned ElementSize>
1162
+ inline SparseBitVector<ElementSize>
1163
+ operator&(const SparseBitVector<ElementSize> &LHS,
1164
+ const SparseBitVector<ElementSize> &RHS)
1165
+ {
1166
+ SparseBitVector<ElementSize> Result(LHS);
1167
+ Result &= RHS;
1168
+ return Result;
1169
+ }
1170
+
1171
+ template <unsigned ElementSize>
1172
+ inline SparseBitVector<ElementSize>
1173
+ operator-(const SparseBitVector<ElementSize> &LHS,
1174
+ const SparseBitVector<ElementSize> &RHS)
1175
+ {
1176
+ SparseBitVector<ElementSize> Result;
1177
+ Result.intersectWithComplement(LHS, RHS);
1178
+ return Result;
1179
+ }
1180
+
1181
+ // Dump a SparseBitVector to a stream
1182
+ template <unsigned ElementSize>
1183
+ void dump(const SparseBitVector<ElementSize> &LHS, std::ostream &out)
1184
+ {
1185
+ out << "[";
1186
+
1187
+ typename SparseBitVector<ElementSize>::iterator bi = LHS.begin(),
1188
+ be = LHS.end();
1189
+ if (bi != be)
1190
+ {
1191
+ out << *bi;
1192
+ for (++bi; bi != be; ++bi)
1193
+ {
1194
+ out << " " << *bi;
1195
+ }
1196
+ }
1197
+ out << "]\n";
1198
+ }
1199
+
1200
+ } // End namespace SVF
1201
+
1202
+ #endif // SPARSEBITVECTOR_H