svf-lib 1.0.1376 → 1.0.1377

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 (292) hide show
  1. package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  2. package/package.json +1 -1
  3. package/SVF-linux/svf/include/include/AbstractExecution/AbstractValue.h +0 -79
  4. package/SVF-linux/svf/include/include/AbstractExecution/AddressValue.h +0 -210
  5. package/SVF-linux/svf/include/include/AbstractExecution/ExeState.h +0 -223
  6. package/SVF-linux/svf/include/include/AbstractExecution/IntervalExeState.h +0 -425
  7. package/SVF-linux/svf/include/include/AbstractExecution/IntervalValue.h +0 -868
  8. package/SVF-linux/svf/include/include/AbstractExecution/NumericLiteral.h +0 -406
  9. package/SVF-linux/svf/include/include/AbstractExecution/RelExeState.h +0 -225
  10. package/SVF-linux/svf/include/include/AbstractExecution/RelationSolver.h +0 -68
  11. package/SVF-linux/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +0 -186
  12. package/SVF-linux/svf/include/include/AbstractExecution/WTO.h +0 -845
  13. package/SVF-linux/svf/include/include/CFL/CFGNormalizer.h +0 -84
  14. package/SVF-linux/svf/include/include/CFL/CFLAlias.h +0 -176
  15. package/SVF-linux/svf/include/include/CFL/CFLBase.h +0 -115
  16. package/SVF-linux/svf/include/include/CFL/CFLData.h +0 -316
  17. package/SVF-linux/svf/include/include/CFL/CFLDataBuilder.h +0 -91
  18. package/SVF-linux/svf/include/include/CFL/CFLGramGraphChecker.h +0 -74
  19. package/SVF-linux/svf/include/include/CFL/CFLGrammar.h +0 -468
  20. package/SVF-linux/svf/include/include/CFL/CFLGrammar.txt +0 -15
  21. package/SVF-linux/svf/include/include/CFL/CFLGraphBuilder.h +0 -193
  22. package/SVF-linux/svf/include/include/CFL/CFLSolver.h +0 -136
  23. package/SVF-linux/svf/include/include/CFL/CFLStat.h +0 -67
  24. package/SVF-linux/svf/include/include/CFL/CFLVF.h +0 -65
  25. package/SVF-linux/svf/include/include/CFL/GrammarBuilder.h +0 -100
  26. package/SVF-linux/svf/include/include/CFL/PEGGrammar.txt +0 -11
  27. package/SVF-linux/svf/include/include/CFL/VFG.txt +0 -7
  28. package/SVF-linux/svf/include/include/DDA/ContextDDA.h +0 -230
  29. package/SVF-linux/svf/include/include/DDA/DDAClient.h +0 -168
  30. package/SVF-linux/svf/include/include/DDA/DDAPass.h +0 -99
  31. package/SVF-linux/svf/include/include/DDA/DDAStat.h +0 -138
  32. package/SVF-linux/svf/include/include/DDA/DDAVFSolver.h +0 -789
  33. package/SVF-linux/svf/include/include/DDA/FlowDDA.h +0 -178
  34. package/SVF-linux/svf/include/include/FastCluster/LICENSE.TXT +0 -13
  35. package/SVF-linux/svf/include/include/FastCluster/fastcluster.h +0 -80
  36. package/SVF-linux/svf/include/include/Graphs/CFLGraph.h +0 -215
  37. package/SVF-linux/svf/include/include/Graphs/CHG.h +0 -351
  38. package/SVF-linux/svf/include/include/Graphs/ConsG.h +0 -408
  39. package/SVF-linux/svf/include/include/Graphs/ConsGEdge.h +0 -353
  40. package/SVF-linux/svf/include/include/Graphs/ConsGNode.h +0 -391
  41. package/SVF-linux/svf/include/include/Graphs/DOTGraphTraits.h +0 -188
  42. package/SVF-linux/svf/include/include/Graphs/GenericGraph.h +0 -620
  43. package/SVF-linux/svf/include/include/Graphs/GraphPrinter.h +0 -111
  44. package/SVF-linux/svf/include/include/Graphs/GraphTraits.h +0 -150
  45. package/SVF-linux/svf/include/include/Graphs/GraphWriter.h +0 -380
  46. package/SVF-linux/svf/include/include/Graphs/ICFG.h +0 -331
  47. package/SVF-linux/svf/include/include/Graphs/ICFGEdge.h +0 -264
  48. package/SVF-linux/svf/include/include/Graphs/ICFGNode.h +0 -523
  49. package/SVF-linux/svf/include/include/Graphs/ICFGStat.h +0 -164
  50. package/SVF-linux/svf/include/include/Graphs/IRGraph.h +0 -243
  51. package/SVF-linux/svf/include/include/Graphs/PTACallGraph.h +0 -471
  52. package/SVF-linux/svf/include/include/Graphs/SVFG.h +0 -490
  53. package/SVF-linux/svf/include/include/Graphs/SVFGEdge.h +0 -237
  54. package/SVF-linux/svf/include/include/Graphs/SVFGNode.h +0 -513
  55. package/SVF-linux/svf/include/include/Graphs/SVFGOPT.h +0 -362
  56. package/SVF-linux/svf/include/include/Graphs/SVFGStat.h +0 -273
  57. package/SVF-linux/svf/include/include/Graphs/ThreadCallGraph.h +0 -422
  58. package/SVF-linux/svf/include/include/Graphs/VFG.h +0 -664
  59. package/SVF-linux/svf/include/include/Graphs/VFGEdge.h +0 -295
  60. package/SVF-linux/svf/include/include/Graphs/VFGNode.h +0 -1197
  61. package/SVF-linux/svf/include/include/MSSA/MSSAMuChi.h +0 -722
  62. package/SVF-linux/svf/include/include/MSSA/MemPartition.h +0 -169
  63. package/SVF-linux/svf/include/include/MSSA/MemRegion.h +0 -491
  64. package/SVF-linux/svf/include/include/MSSA/MemSSA.h +0 -452
  65. package/SVF-linux/svf/include/include/MSSA/SVFGBuilder.h +0 -98
  66. package/SVF-linux/svf/include/include/MTA/FSMPTA.h +0 -270
  67. package/SVF-linux/svf/include/include/MTA/LockAnalysis.h +0 -517
  68. package/SVF-linux/svf/include/include/MTA/MHP.h +0 -565
  69. package/SVF-linux/svf/include/include/MTA/MTA.h +0 -101
  70. package/SVF-linux/svf/include/include/MTA/MTAResultValidator.h +0 -448
  71. package/SVF-linux/svf/include/include/MTA/MTAStat.h +0 -74
  72. package/SVF-linux/svf/include/include/MTA/PCG.h +0 -229
  73. package/SVF-linux/svf/include/include/MTA/TCT.h +0 -599
  74. package/SVF-linux/svf/include/include/MemoryModel/AbstractPointsToDS.h +0 -316
  75. package/SVF-linux/svf/include/include/MemoryModel/ConditionalPT.h +0 -878
  76. package/SVF-linux/svf/include/include/MemoryModel/LocationSet.h +0 -148
  77. package/SVF-linux/svf/include/include/MemoryModel/MutablePointsToDS.h +0 -1025
  78. package/SVF-linux/svf/include/include/MemoryModel/PersistentPointsToCache.h +0 -463
  79. package/SVF-linux/svf/include/include/MemoryModel/PersistentPointsToDS.h +0 -955
  80. package/SVF-linux/svf/include/include/MemoryModel/PointerAnalysis.h +0 -452
  81. package/SVF-linux/svf/include/include/MemoryModel/PointerAnalysisImpl.h +0 -590
  82. package/SVF-linux/svf/include/include/MemoryModel/PointsTo.h +0 -255
  83. package/SVF-linux/svf/include/include/MemoryModel/SVFLoop.h +0 -164
  84. package/SVF-linux/svf/include/include/SABER/DoubleFreeChecker.h +0 -76
  85. package/SVF-linux/svf/include/include/SABER/FileChecker.h +0 -82
  86. package/SVF-linux/svf/include/include/SABER/LeakChecker.h +0 -124
  87. package/SVF-linux/svf/include/include/SABER/ProgSlice.h +0 -313
  88. package/SVF-linux/svf/include/include/SABER/SaberCheckerAPI.h +0 -166
  89. package/SVF-linux/svf/include/include/SABER/SaberCondAllocator.h +0 -310
  90. package/SVF-linux/svf/include/include/SABER/SaberSVFGBuilder.h +0 -104
  91. package/SVF-linux/svf/include/include/SABER/SrcSnkDDA.h +0 -321
  92. package/SVF-linux/svf/include/include/SABER/SrcSnkSolver.h +0 -186
  93. package/SVF-linux/svf/include/include/SVFIR/PAGBuilderFromFile.h +0 -80
  94. package/SVF-linux/svf/include/include/SVFIR/SVFIR.h +0 -659
  95. package/SVF-linux/svf/include/include/SVFIR/SVFModule.h +0 -233
  96. package/SVF-linux/svf/include/include/SVFIR/SVFStatements.h +0 -1136
  97. package/SVF-linux/svf/include/include/SVFIR/SVFType.h +0 -527
  98. package/SVF-linux/svf/include/include/SVFIR/SVFValue.h +0 -1120
  99. package/SVF-linux/svf/include/include/SVFIR/SVFVariables.h +0 -721
  100. package/SVF-linux/svf/include/include/SVFIR/SymbolTableInfo.h +0 -597
  101. package/SVF-linux/svf/include/include/Util/Annotator.h +0 -180
  102. package/SVF-linux/svf/include/include/Util/BitVector.h +0 -55
  103. package/SVF-linux/svf/include/include/Util/CallGraphBuilder.h +0 -74
  104. package/SVF-linux/svf/include/include/Util/Casting.h +0 -426
  105. package/SVF-linux/svf/include/include/Util/CommandLine.h +0 -530
  106. package/SVF-linux/svf/include/include/Util/CoreBitVector.h +0 -214
  107. package/SVF-linux/svf/include/include/Util/CppUtil.h +0 -81
  108. package/SVF-linux/svf/include/include/Util/CxtStmt.h +0 -501
  109. package/SVF-linux/svf/include/include/Util/DPItem.h +0 -618
  110. package/SVF-linux/svf/include/include/Util/ExtAPI.h +0 -339
  111. package/SVF-linux/svf/include/include/Util/ExtAPI.json +0 -5707
  112. package/SVF-linux/svf/include/include/Util/GraphReachSolver.h +0 -186
  113. package/SVF-linux/svf/include/include/Util/NodeIDAllocator.h +0 -194
  114. package/SVF-linux/svf/include/include/Util/Options.h +0 -266
  115. package/SVF-linux/svf/include/include/Util/PTAStat.h +0 -65
  116. package/SVF-linux/svf/include/include/Util/SCC.h +0 -354
  117. package/SVF-linux/svf/include/include/Util/SVFStat.h +0 -100
  118. package/SVF-linux/svf/include/include/Util/SVFUtil.h +0 -660
  119. package/SVF-linux/svf/include/include/Util/SparseBitVector.h +0 -1202
  120. package/SVF-linux/svf/include/include/Util/ThreadAPI.h +0 -330
  121. package/SVF-linux/svf/include/include/Util/WorkList.h +0 -317
  122. package/SVF-linux/svf/include/include/Util/Z3Expr.h +0 -318
  123. package/SVF-linux/svf/include/include/Util/cJSON.h +0 -300
  124. package/SVF-linux/svf/include/include/Util/iterator.h +0 -407
  125. package/SVF-linux/svf/include/include/Util/iterator_range.h +0 -76
  126. package/SVF-linux/svf/include/include/WPA/Andersen.h +0 -416
  127. package/SVF-linux/svf/include/include/WPA/AndersenPWC.h +0 -160
  128. package/SVF-linux/svf/include/include/WPA/CSC.h +0 -95
  129. package/SVF-linux/svf/include/include/WPA/FlowSensitive.h +0 -317
  130. package/SVF-linux/svf/include/include/WPA/Steensgaard.h +0 -126
  131. package/SVF-linux/svf/include/include/WPA/TypeAnalysis.h +0 -83
  132. package/SVF-linux/svf/include/include/WPA/VersionedFlowSensitive.h +0 -287
  133. package/SVF-linux/svf/include/include/WPA/WPAFSSolver.h +0 -254
  134. package/SVF-linux/svf/include/include/WPA/WPAPass.h +0 -119
  135. package/SVF-linux/svf/include/include/WPA/WPASolver.h +0 -205
  136. package/SVF-linux/svf/include/include/WPA/WPAStat.h +0 -222
  137. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +0 -250
  138. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +0 -94
  139. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +0 -73
  140. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +0 -484
  141. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +0 -183
  142. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +0 -106
  143. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +0 -61
  144. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +0 -360
  145. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +0 -466
  146. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +0 -417
  147. package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +0 -110
  148. package/SVF-osx/svf/include/include/AbstractExecution/AbstractValue.h +0 -79
  149. package/SVF-osx/svf/include/include/AbstractExecution/AddressValue.h +0 -210
  150. package/SVF-osx/svf/include/include/AbstractExecution/ExeState.h +0 -223
  151. package/SVF-osx/svf/include/include/AbstractExecution/IntervalExeState.h +0 -425
  152. package/SVF-osx/svf/include/include/AbstractExecution/IntervalValue.h +0 -868
  153. package/SVF-osx/svf/include/include/AbstractExecution/NumericLiteral.h +0 -406
  154. package/SVF-osx/svf/include/include/AbstractExecution/RelExeState.h +0 -225
  155. package/SVF-osx/svf/include/include/AbstractExecution/RelationSolver.h +0 -68
  156. package/SVF-osx/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +0 -186
  157. package/SVF-osx/svf/include/include/AbstractExecution/WTO.h +0 -845
  158. package/SVF-osx/svf/include/include/CFL/CFGNormalizer.h +0 -84
  159. package/SVF-osx/svf/include/include/CFL/CFLAlias.h +0 -176
  160. package/SVF-osx/svf/include/include/CFL/CFLBase.h +0 -115
  161. package/SVF-osx/svf/include/include/CFL/CFLData.h +0 -316
  162. package/SVF-osx/svf/include/include/CFL/CFLDataBuilder.h +0 -91
  163. package/SVF-osx/svf/include/include/CFL/CFLGramGraphChecker.h +0 -74
  164. package/SVF-osx/svf/include/include/CFL/CFLGrammar.h +0 -468
  165. package/SVF-osx/svf/include/include/CFL/CFLGrammar.txt +0 -15
  166. package/SVF-osx/svf/include/include/CFL/CFLGraphBuilder.h +0 -193
  167. package/SVF-osx/svf/include/include/CFL/CFLSolver.h +0 -136
  168. package/SVF-osx/svf/include/include/CFL/CFLStat.h +0 -67
  169. package/SVF-osx/svf/include/include/CFL/CFLVF.h +0 -65
  170. package/SVF-osx/svf/include/include/CFL/GrammarBuilder.h +0 -100
  171. package/SVF-osx/svf/include/include/CFL/PEGGrammar.txt +0 -11
  172. package/SVF-osx/svf/include/include/CFL/VFG.txt +0 -7
  173. package/SVF-osx/svf/include/include/DDA/ContextDDA.h +0 -230
  174. package/SVF-osx/svf/include/include/DDA/DDAClient.h +0 -168
  175. package/SVF-osx/svf/include/include/DDA/DDAPass.h +0 -99
  176. package/SVF-osx/svf/include/include/DDA/DDAStat.h +0 -138
  177. package/SVF-osx/svf/include/include/DDA/DDAVFSolver.h +0 -789
  178. package/SVF-osx/svf/include/include/DDA/FlowDDA.h +0 -178
  179. package/SVF-osx/svf/include/include/FastCluster/LICENSE.TXT +0 -13
  180. package/SVF-osx/svf/include/include/FastCluster/fastcluster.h +0 -80
  181. package/SVF-osx/svf/include/include/Graphs/CFLGraph.h +0 -215
  182. package/SVF-osx/svf/include/include/Graphs/CHG.h +0 -351
  183. package/SVF-osx/svf/include/include/Graphs/ConsG.h +0 -408
  184. package/SVF-osx/svf/include/include/Graphs/ConsGEdge.h +0 -353
  185. package/SVF-osx/svf/include/include/Graphs/ConsGNode.h +0 -391
  186. package/SVF-osx/svf/include/include/Graphs/DOTGraphTraits.h +0 -188
  187. package/SVF-osx/svf/include/include/Graphs/GenericGraph.h +0 -620
  188. package/SVF-osx/svf/include/include/Graphs/GraphPrinter.h +0 -111
  189. package/SVF-osx/svf/include/include/Graphs/GraphTraits.h +0 -150
  190. package/SVF-osx/svf/include/include/Graphs/GraphWriter.h +0 -380
  191. package/SVF-osx/svf/include/include/Graphs/ICFG.h +0 -331
  192. package/SVF-osx/svf/include/include/Graphs/ICFGEdge.h +0 -264
  193. package/SVF-osx/svf/include/include/Graphs/ICFGNode.h +0 -523
  194. package/SVF-osx/svf/include/include/Graphs/ICFGStat.h +0 -164
  195. package/SVF-osx/svf/include/include/Graphs/IRGraph.h +0 -243
  196. package/SVF-osx/svf/include/include/Graphs/PTACallGraph.h +0 -471
  197. package/SVF-osx/svf/include/include/Graphs/SVFG.h +0 -490
  198. package/SVF-osx/svf/include/include/Graphs/SVFGEdge.h +0 -237
  199. package/SVF-osx/svf/include/include/Graphs/SVFGNode.h +0 -513
  200. package/SVF-osx/svf/include/include/Graphs/SVFGOPT.h +0 -362
  201. package/SVF-osx/svf/include/include/Graphs/SVFGStat.h +0 -273
  202. package/SVF-osx/svf/include/include/Graphs/ThreadCallGraph.h +0 -422
  203. package/SVF-osx/svf/include/include/Graphs/VFG.h +0 -664
  204. package/SVF-osx/svf/include/include/Graphs/VFGEdge.h +0 -295
  205. package/SVF-osx/svf/include/include/Graphs/VFGNode.h +0 -1197
  206. package/SVF-osx/svf/include/include/MSSA/MSSAMuChi.h +0 -722
  207. package/SVF-osx/svf/include/include/MSSA/MemPartition.h +0 -169
  208. package/SVF-osx/svf/include/include/MSSA/MemRegion.h +0 -491
  209. package/SVF-osx/svf/include/include/MSSA/MemSSA.h +0 -452
  210. package/SVF-osx/svf/include/include/MSSA/SVFGBuilder.h +0 -98
  211. package/SVF-osx/svf/include/include/MTA/FSMPTA.h +0 -270
  212. package/SVF-osx/svf/include/include/MTA/LockAnalysis.h +0 -517
  213. package/SVF-osx/svf/include/include/MTA/MHP.h +0 -565
  214. package/SVF-osx/svf/include/include/MTA/MTA.h +0 -101
  215. package/SVF-osx/svf/include/include/MTA/MTAResultValidator.h +0 -448
  216. package/SVF-osx/svf/include/include/MTA/MTAStat.h +0 -74
  217. package/SVF-osx/svf/include/include/MTA/PCG.h +0 -229
  218. package/SVF-osx/svf/include/include/MTA/TCT.h +0 -599
  219. package/SVF-osx/svf/include/include/MemoryModel/AbstractPointsToDS.h +0 -316
  220. package/SVF-osx/svf/include/include/MemoryModel/ConditionalPT.h +0 -878
  221. package/SVF-osx/svf/include/include/MemoryModel/LocationSet.h +0 -148
  222. package/SVF-osx/svf/include/include/MemoryModel/MutablePointsToDS.h +0 -1025
  223. package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToCache.h +0 -463
  224. package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToDS.h +0 -955
  225. package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysis.h +0 -452
  226. package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysisImpl.h +0 -590
  227. package/SVF-osx/svf/include/include/MemoryModel/PointsTo.h +0 -255
  228. package/SVF-osx/svf/include/include/MemoryModel/SVFLoop.h +0 -164
  229. package/SVF-osx/svf/include/include/SABER/DoubleFreeChecker.h +0 -76
  230. package/SVF-osx/svf/include/include/SABER/FileChecker.h +0 -82
  231. package/SVF-osx/svf/include/include/SABER/LeakChecker.h +0 -124
  232. package/SVF-osx/svf/include/include/SABER/ProgSlice.h +0 -313
  233. package/SVF-osx/svf/include/include/SABER/SaberCheckerAPI.h +0 -166
  234. package/SVF-osx/svf/include/include/SABER/SaberCondAllocator.h +0 -310
  235. package/SVF-osx/svf/include/include/SABER/SaberSVFGBuilder.h +0 -104
  236. package/SVF-osx/svf/include/include/SABER/SrcSnkDDA.h +0 -321
  237. package/SVF-osx/svf/include/include/SABER/SrcSnkSolver.h +0 -186
  238. package/SVF-osx/svf/include/include/SVFIR/PAGBuilderFromFile.h +0 -80
  239. package/SVF-osx/svf/include/include/SVFIR/SVFIR.h +0 -659
  240. package/SVF-osx/svf/include/include/SVFIR/SVFModule.h +0 -233
  241. package/SVF-osx/svf/include/include/SVFIR/SVFStatements.h +0 -1136
  242. package/SVF-osx/svf/include/include/SVFIR/SVFType.h +0 -527
  243. package/SVF-osx/svf/include/include/SVFIR/SVFValue.h +0 -1120
  244. package/SVF-osx/svf/include/include/SVFIR/SVFVariables.h +0 -721
  245. package/SVF-osx/svf/include/include/SVFIR/SymbolTableInfo.h +0 -597
  246. package/SVF-osx/svf/include/include/Util/Annotator.h +0 -180
  247. package/SVF-osx/svf/include/include/Util/BitVector.h +0 -55
  248. package/SVF-osx/svf/include/include/Util/CallGraphBuilder.h +0 -74
  249. package/SVF-osx/svf/include/include/Util/Casting.h +0 -426
  250. package/SVF-osx/svf/include/include/Util/CommandLine.h +0 -530
  251. package/SVF-osx/svf/include/include/Util/CoreBitVector.h +0 -214
  252. package/SVF-osx/svf/include/include/Util/CppUtil.h +0 -81
  253. package/SVF-osx/svf/include/include/Util/CxtStmt.h +0 -501
  254. package/SVF-osx/svf/include/include/Util/DPItem.h +0 -618
  255. package/SVF-osx/svf/include/include/Util/ExtAPI.h +0 -339
  256. package/SVF-osx/svf/include/include/Util/ExtAPI.json +0 -5707
  257. package/SVF-osx/svf/include/include/Util/GraphReachSolver.h +0 -186
  258. package/SVF-osx/svf/include/include/Util/NodeIDAllocator.h +0 -194
  259. package/SVF-osx/svf/include/include/Util/Options.h +0 -266
  260. package/SVF-osx/svf/include/include/Util/PTAStat.h +0 -65
  261. package/SVF-osx/svf/include/include/Util/SCC.h +0 -354
  262. package/SVF-osx/svf/include/include/Util/SVFStat.h +0 -100
  263. package/SVF-osx/svf/include/include/Util/SVFUtil.h +0 -660
  264. package/SVF-osx/svf/include/include/Util/SparseBitVector.h +0 -1202
  265. package/SVF-osx/svf/include/include/Util/ThreadAPI.h +0 -330
  266. package/SVF-osx/svf/include/include/Util/WorkList.h +0 -317
  267. package/SVF-osx/svf/include/include/Util/Z3Expr.h +0 -318
  268. package/SVF-osx/svf/include/include/Util/cJSON.h +0 -300
  269. package/SVF-osx/svf/include/include/Util/iterator.h +0 -407
  270. package/SVF-osx/svf/include/include/Util/iterator_range.h +0 -76
  271. package/SVF-osx/svf/include/include/WPA/Andersen.h +0 -416
  272. package/SVF-osx/svf/include/include/WPA/AndersenPWC.h +0 -160
  273. package/SVF-osx/svf/include/include/WPA/CSC.h +0 -95
  274. package/SVF-osx/svf/include/include/WPA/FlowSensitive.h +0 -317
  275. package/SVF-osx/svf/include/include/WPA/Steensgaard.h +0 -126
  276. package/SVF-osx/svf/include/include/WPA/TypeAnalysis.h +0 -83
  277. package/SVF-osx/svf/include/include/WPA/VersionedFlowSensitive.h +0 -287
  278. package/SVF-osx/svf/include/include/WPA/WPAFSSolver.h +0 -254
  279. package/SVF-osx/svf/include/include/WPA/WPAPass.h +0 -119
  280. package/SVF-osx/svf/include/include/WPA/WPASolver.h +0 -205
  281. package/SVF-osx/svf/include/include/WPA/WPAStat.h +0 -222
  282. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +0 -250
  283. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +0 -94
  284. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +0 -73
  285. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +0 -484
  286. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +0 -183
  287. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +0 -106
  288. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +0 -61
  289. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +0 -360
  290. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +0 -466
  291. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +0 -417
  292. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +0 -110
@@ -1,955 +0,0 @@
1
- /// PTData (AbstractPointsToDS.h) implementations with a persistent backend.
2
- /// Each Key is given a cheap points-to ID which refers to some real points-to set.
3
-
4
- /*
5
- * PersistentPointsToDS.h
6
- *
7
- * Authors: Mohamad Barbar
8
- *
9
- * The implementation is based on
10
- * Mohamad Barbar and Yulei Sui. Hash Consed Points-To Sets.
11
- * 28th Static Analysis Symposium (SAS'21)
12
- */
13
-
14
- #ifndef PERSISTENT_POINTSTO_H_
15
- #define PERSISTENT_POINTSTO_H_
16
-
17
- #include "MemoryModel/AbstractPointsToDS.h"
18
- #include "MemoryModel/PersistentPointsToCache.h"
19
- #include "MemoryModel/PointsTo.h"
20
- #include "Util/SVFUtil.h"
21
-
22
- namespace SVF
23
- {
24
-
25
- template <typename Key, typename KeySet, typename Data, typename DataSet>
26
- class PersistentDFPTData;
27
- template <typename Key, typename KeySet, typename Data, typename DataSet>
28
- class PersistentIncDFPTData;
29
- template <typename Key, typename KeySet, typename Data, typename DataSet, typename VersionedKey, typename VersionedKeySet>
30
- class PersistentVersionedPTData;
31
-
32
- /// PTData backed by a PersistentPointsToCache.
33
- template <typename Key, typename KeySet, typename Data, typename DataSet>
34
- class PersistentPTData : public PTData<Key, KeySet, Data, DataSet>
35
- {
36
- template <typename K, typename KS, typename D, typename DS, typename VK, typename VKS>
37
- friend class PersistentVersionedPTData;
38
- friend class PersistentDFPTData<Key, KeySet, Data, DataSet>;
39
- friend class PersistentIncDFPTData<Key, KeySet, Data, DataSet>;
40
- public:
41
- typedef PTData<Key, KeySet, Data, DataSet> BasePTData;
42
- typedef typename BasePTData::PTDataTy PTDataTy;
43
-
44
- typedef Map<Key, PointsToID> KeyToIDMap;
45
- typedef Map<Data, KeySet> RevPtsMap;
46
-
47
- /// Constructor
48
- explicit PersistentPTData(PersistentPointsToCache<DataSet> &cache, bool reversePT = true, PTDataTy ty = PTDataTy::PersBase)
49
- : BasePTData(reversePT, ty), ptCache(cache) { }
50
-
51
- ~PersistentPTData() override = default;
52
-
53
- inline void clear() override
54
- {
55
- ptsMap.clear();
56
- revPtsMap.clear();
57
- }
58
-
59
- inline const DataSet& getPts(const Key &var) override
60
- {
61
- PointsToID id = ptsMap[var];
62
- return ptCache.getActualPts(id);
63
- }
64
-
65
- inline const KeySet& getRevPts(const Data &data) override
66
- {
67
- assert(this->rev && "PersistentPTData::getRevPts: constructed without reverse PT support!");
68
- return revPtsMap[data];
69
- }
70
-
71
- inline bool addPts(const Key &dstKey, const Data &element) override
72
- {
73
- DataSet srcPts;
74
- srcPts.set(element);
75
- PointsToID srcId = ptCache.emplacePts(srcPts);
76
- return unionPtsFromId(dstKey, srcId);
77
- }
78
-
79
- inline bool unionPts(const Key& dstKey, const Key& srcKey) override
80
- {
81
- PointsToID srcId = ptsMap[srcKey];
82
- return unionPtsFromId(dstKey, srcId);
83
- }
84
-
85
- inline bool unionPts(const Key& dstKey, const DataSet& srcData) override
86
- {
87
- PointsToID srcId = ptCache.emplacePts(srcData);
88
- return unionPtsFromId(dstKey, srcId);
89
- }
90
-
91
- inline void dumpPTData() override
92
- {
93
- }
94
-
95
- void clearPts(const Key &var, const Data &element) override
96
- {
97
- DataSet toRemoveData;
98
- toRemoveData.set(element);
99
- PointsToID toRemoveId = ptCache.emplacePts(toRemoveData);
100
- PointsToID varId = ptsMap[var];
101
- PointsToID complementId = ptCache.complementPts(varId, toRemoveId);
102
- if (varId != complementId)
103
- {
104
- ptsMap[var] = complementId;
105
- clearSingleRevPts(revPtsMap[element], var);
106
- }
107
- }
108
-
109
- void clearFullPts(const Key& var) override
110
- {
111
- clearRevPts(getPts(var), var);
112
- ptsMap[var] = PersistentPointsToCache<DataSet>::emptyPointsToId();
113
- }
114
-
115
- void remapAllPts() override
116
- {
117
- ptCache.remapAllPts();
118
- }
119
-
120
- Map<DataSet, unsigned> getAllPts(bool liveOnly) const override
121
- {
122
- Map<DataSet, unsigned> allPts;
123
- if (liveOnly)
124
- {
125
- for (const typename KeyToIDMap::value_type &ki : ptsMap)
126
- {
127
- ++allPts[ptCache.getActualPts(ki.second)];
128
- }
129
- }
130
- else
131
- {
132
- allPts = ptCache.getAllPts();
133
- }
134
-
135
- return allPts;
136
- }
137
-
138
- /// Methods to support type inquiry through isa, cast, and dyn_cast:
139
- ///@{
140
- static inline bool classof(const PersistentPTData<Key, KeySet, Data, DataSet> *)
141
- {
142
- return true;
143
- }
144
-
145
- static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
146
- {
147
- return ptd->getPTDTY() == PTDataTy::PersBase;
148
- }
149
- ///@}
150
-
151
- private:
152
- /// Internal unionPts since other methods follow the same pattern.
153
- /// Renamed because PointsToID and Key may be the same type...
154
- inline bool unionPtsFromId(const Key &dstKey, PointsToID srcId)
155
- {
156
- PointsToID dstId = ptsMap[dstKey];
157
- PointsToID newDstId = ptCache.unionPts(dstId, srcId);
158
-
159
- bool changed = newDstId != dstId;
160
- if (changed)
161
- {
162
- ptsMap[dstKey] = newDstId;
163
-
164
- // Reverse points-to only needs to be handled when dst's
165
- // points-to set has changed (i.e., do it the first time only).
166
- if (this->rev)
167
- {
168
- const DataSet &srcPts = ptCache.getActualPts(srcId);
169
- for (const Data &d : srcPts) SVFUtil::insertKey(dstKey, revPtsMap[d]);
170
- }
171
- }
172
-
173
- return changed;
174
- }
175
-
176
- inline void clearSingleRevPts(KeySet &revSet, const Key &k)
177
- {
178
- if (this->rev)
179
- {
180
- SVFUtil::removeKey(k, revSet);
181
- }
182
- }
183
-
184
- inline void clearRevPts(const DataSet &pts, const Key &k)
185
- {
186
- if (this->rev)
187
- {
188
- for (const Data &d : pts) clearSingleRevPts(revPtsMap[d], k);
189
- }
190
- }
191
-
192
- protected:
193
- PersistentPointsToCache<DataSet> &ptCache;
194
- KeyToIDMap ptsMap;
195
- RevPtsMap revPtsMap;
196
- };
197
-
198
- /// DiffPTData implemented with a persistent points-to backing.
199
- template <typename Key, typename KeySet, typename Data, typename DataSet>
200
- class PersistentDiffPTData : public DiffPTData<Key, KeySet, Data, DataSet>
201
- {
202
- public:
203
- typedef PTData<Key, KeySet, Data, DataSet> BasePTData;
204
- typedef DiffPTData<Key, KeySet, Data, DataSet> BaseDiffPTData;
205
- typedef PersistentPTData<Key, KeySet, Data, DataSet> BasePersPTData;
206
- typedef typename BasePTData::PTDataTy PTDataTy;
207
-
208
- typedef typename BasePersPTData::KeyToIDMap KeyToIDMap;
209
- typedef typename BasePersPTData::RevPtsMap RevPtsMap;
210
-
211
- /// Constructor
212
- explicit PersistentDiffPTData(PersistentPointsToCache<DataSet> &cache, bool reversePT = true, PTDataTy ty = PTDataTy::PersDiff)
213
- : BaseDiffPTData(reversePT, ty), ptCache(cache), persPTData(cache, reversePT) { }
214
-
215
- ~PersistentDiffPTData() override = default;
216
-
217
- void clear() override
218
- {
219
- persPTData.clear();
220
- diffPtsMap.clear();
221
- propaPtsMap.clear();
222
- }
223
-
224
- inline const DataSet &getPts(const Key& var) override
225
- {
226
- return persPTData.getPts(var);
227
- }
228
-
229
- inline const KeySet& getRevPts(const Data &data) override
230
- {
231
- assert(this->rev && "PersistentDiffPTData::getRevPts: constructed without reverse PT support!");
232
- return persPTData.getRevPts(data);
233
- }
234
-
235
- inline bool addPts(const Key &dstKey, const Data &element) override
236
- {
237
- return persPTData.addPts(dstKey, element);
238
- }
239
-
240
- inline bool unionPts(const Key& dstKey, const Key& srcKey) override
241
- {
242
- return persPTData.unionPts(dstKey, srcKey);
243
- }
244
-
245
- inline bool unionPts(const Key &dstKey, const DataSet &srcDataSet) override
246
- {
247
- return persPTData.unionPts(dstKey, srcDataSet);
248
- }
249
-
250
- void clearPts(const Key &var, const Data &element) override
251
- {
252
- return persPTData.clearPts(var, element);
253
- }
254
-
255
- void clearFullPts(const Key &var) override
256
- {
257
- return persPTData.clearFullPts(var);
258
- }
259
-
260
- void remapAllPts() override
261
- {
262
- ptCache.remapAllPts();
263
- }
264
-
265
- inline void dumpPTData() override
266
- {
267
- // TODO.
268
- }
269
-
270
- inline const DataSet &getDiffPts(Key &var) override
271
- {
272
- PointsToID id = diffPtsMap[var];
273
- return ptCache.getActualPts(id);
274
- }
275
-
276
- inline bool computeDiffPts(Key &var, const DataSet &all) override
277
- {
278
- PointsToID propaId = propaPtsMap[var];
279
- PointsToID allId = ptCache.emplacePts(all);
280
- // Diff is made up of the entire points-to set minus what has been propagated.
281
- PointsToID diffId = ptCache.complementPts(allId, propaId);
282
- diffPtsMap[var] = diffId;
283
-
284
- // We've now propagated the entire thing.
285
- propaPtsMap[var] = allId;
286
-
287
- // Whether diff is empty or not; just need to check against the ID since it
288
- // is the only empty set.
289
- return diffId != ptCache.emptyPointsToId();
290
- }
291
-
292
- inline void updatePropaPtsMap(Key &src, Key &dst) override
293
- {
294
- PointsToID dstId = propaPtsMap[dst];
295
- PointsToID srcId = propaPtsMap[src];
296
- propaPtsMap[dst] = ptCache.intersectPts(dstId, srcId);
297
- }
298
-
299
- inline void clearPropaPts(Key &var) override
300
- {
301
- propaPtsMap[var] = ptCache.emptyPointsToId();
302
- }
303
-
304
- Map<DataSet, unsigned> getAllPts(bool liveOnly) const override
305
- {
306
- return persPTData.getAllPts(liveOnly);
307
- }
308
-
309
- /// Methods to support type inquiry through isa, cast, and dyn_cast:
310
- ///@{
311
- static inline bool classof(const PersistentDiffPTData<Key, KeySet, Data, DataSet> *)
312
- {
313
- return true;
314
- }
315
-
316
- static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
317
- {
318
- return ptd->getPTDTY() == PTDataTy::PersDiff;
319
- }
320
- ///@}
321
-
322
- private:
323
- PersistentPointsToCache<DataSet> &ptCache;
324
- /// Backing to implement basic PTData methods. Allows us to avoid multiple inheritance.
325
- PersistentPTData<Key, KeySet, Data, DataSet> persPTData;
326
- /// Diff points-to to be propagated.
327
- KeyToIDMap diffPtsMap;
328
- /// Points-to already propagated.
329
- KeyToIDMap propaPtsMap;
330
- };
331
-
332
- /// DFPTData backed by a PersistentPointsToCache.
333
- template <typename Key, typename KeySet, typename Data, typename DataSet>
334
- class PersistentDFPTData : public DFPTData<Key, KeySet, Data, DataSet>
335
- {
336
- public:
337
- typedef PTData<Key, KeySet, Data, DataSet> BasePTData;
338
- typedef typename BasePTData::PTDataTy PTDataTy;
339
- typedef DFPTData<Key, KeySet, Data, DataSet> BaseDFPTData;
340
- typedef PersistentPTData<Key, KeySet, Data, DataSet> BasePersPTData;
341
-
342
- typedef typename BaseDFPTData::LocID LocID;
343
- typedef typename BasePersPTData::KeyToIDMap KeyToIDMap;
344
- typedef Map<LocID, KeyToIDMap> DFKeyToIDMap;
345
-
346
- explicit PersistentDFPTData(PersistentPointsToCache<DataSet> &cache, bool reversePT = true, PTDataTy ty = PTDataTy::PersDataFlow)
347
- : BaseDFPTData(reversePT, ty), ptCache(cache), persPTData(cache, reversePT) { }
348
-
349
- ~PersistentDFPTData() override = default;
350
-
351
- inline void clear() override
352
- {
353
- dfInPtsMap.clear();
354
- dfOutPtsMap.clear();
355
- persPTData.clear();
356
- }
357
-
358
- inline const DataSet &getPts(const Key& var) override
359
- {
360
- return persPTData.getPts(var);
361
- }
362
-
363
- inline const KeySet& getRevPts(const Data&) override
364
- {
365
- assert(false && "PersistentDFPTData::getRevPts: not supported yet!");
366
- abort();
367
- }
368
-
369
- inline bool unionPts(const Key& dstKey, const Key& srcKey) override
370
- {
371
- return persPTData.unionPts(dstKey, srcKey);
372
- }
373
-
374
- inline bool unionPts(const Key& dstKey, const DataSet &srcDataSet) override
375
- {
376
- return persPTData.unionPts(dstKey, srcDataSet);
377
- }
378
-
379
- inline bool addPts(const Key &dstKey, const Data &element) override
380
- {
381
- return persPTData.addPts(dstKey, element);
382
- }
383
-
384
- void clearPts(const Key& var, const Data &element) override
385
- {
386
- persPTData.clearPts(var, element);
387
- }
388
-
389
- void clearFullPts(const Key& var) override
390
- {
391
- persPTData.clearFullPts(var);
392
- }
393
-
394
- void remapAllPts() override
395
- {
396
- ptCache.remapAllPts();
397
- }
398
-
399
- inline void dumpPTData() override
400
- {
401
- persPTData.dumpPTData();
402
- }
403
-
404
- bool hasDFInSet(LocID loc) const override
405
- {
406
- return dfInPtsMap.find(loc) != dfInPtsMap.end();
407
- }
408
-
409
- bool hasDFOutSet(LocID loc) const override
410
- {
411
- return dfOutPtsMap.find(loc) != dfOutPtsMap.end();
412
- }
413
-
414
- bool hasDFInSet(LocID loc, const Key& var) const override
415
- {
416
- typename DFKeyToIDMap::const_iterator foundInKeyToId = dfInPtsMap.find(loc);
417
- if (foundInKeyToId == dfInPtsMap.end()) return false;
418
- const KeyToIDMap &inKeyToId = foundInKeyToId->second;
419
- return (inKeyToId.find(var) != inKeyToId.end());
420
- }
421
-
422
- bool hasDFOutSet(LocID loc, const Key& var) const override
423
- {
424
- typename DFKeyToIDMap::const_iterator foundOutKeyToId = dfOutPtsMap.find(loc);
425
- if (foundOutKeyToId == dfOutPtsMap.end()) return false;
426
- const KeyToIDMap &outKeyToId = foundOutKeyToId->second;
427
- return (outKeyToId.find(var) != outKeyToId.end());
428
- }
429
-
430
- const DataSet &getDFInPtsSet(LocID loc, const Key& var) override
431
- {
432
- PointsToID id = dfInPtsMap[loc][var];
433
- return ptCache.getActualPts(id);
434
- }
435
-
436
- const DataSet &getDFOutPtsSet(LocID loc, const Key& var) override
437
- {
438
- PointsToID id = dfOutPtsMap[loc][var];
439
- return ptCache.getActualPts(id);
440
- }
441
-
442
- bool updateDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
443
- {
444
- return unionPtsThroughIds(getDFInPtIdRef(dstLoc, dstVar), getDFInPtIdRef(srcLoc, srcVar));
445
- }
446
-
447
- bool updateAllDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
448
- {
449
- return updateDFInFromIn(srcLoc, srcVar, dstLoc, dstVar);
450
- }
451
-
452
- bool updateDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
453
- {
454
- return unionPtsThroughIds(getDFInPtIdRef(dstLoc, dstVar), getDFOutPtIdRef(srcLoc, srcVar));
455
- }
456
-
457
- bool updateAllDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
458
- {
459
- return updateDFInFromOut(srcLoc, srcVar, dstLoc, dstVar);
460
- }
461
-
462
- bool updateDFOutFromIn(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
463
- {
464
- return unionPtsThroughIds(getDFOutPtIdRef(dstLoc, dstVar), getDFInPtIdRef(srcLoc, srcVar));
465
- }
466
-
467
- bool updateAllDFOutFromIn(LocID loc, const Key &singleton, bool strongUpdates) override
468
- {
469
- bool changed = false;
470
- if (this->hasDFInSet(loc))
471
- {
472
- const KeyToIDMap &inKeyToId = dfInPtsMap[loc];
473
- for (const typename KeyToIDMap::value_type &ki : inKeyToId)
474
- {
475
- const Key var = ki.first;
476
- /// Enable strong updates if required.
477
- if (strongUpdates && var == singleton) continue;
478
-
479
- if (updateDFOutFromIn(loc, var, loc, var)) changed = true;
480
- }
481
- }
482
-
483
- return changed;
484
- }
485
-
486
- void clearAllDFOutUpdatedVar(LocID) override
487
- {
488
- }
489
-
490
- /// Update points-to set of top-level pointers with IN[srcLoc:srcVar].
491
- bool updateTLVPts(LocID srcLoc, const Key &srcVar, const Key &dstVar) override
492
- {
493
- return unionPtsThroughIds(persPTData.ptsMap[dstVar], getDFInPtIdRef(srcLoc, srcVar));
494
- }
495
-
496
- bool updateATVPts(const Key& srcVar, LocID dstLoc, const Key& dstVar) override
497
- {
498
- return unionPtsThroughIds(getDFOutPtIdRef(dstLoc, dstVar), persPTData.ptsMap[srcVar]);
499
- }
500
-
501
- Map<DataSet, unsigned> getAllPts(bool liveOnly) const override
502
- {
503
- Map<DataSet, unsigned> allPts = persPTData.getAllPts(liveOnly);
504
- for (const typename DFKeyToIDMap::value_type &lki : dfInPtsMap)
505
- {
506
- for (const typename KeyToIDMap::value_type &ki : lki.second)
507
- {
508
- ++allPts[ptCache.getActualPts(ki.second)];
509
- }
510
- }
511
-
512
- for (const typename DFKeyToIDMap::value_type &lki : dfOutPtsMap)
513
- {
514
- for (const typename KeyToIDMap::value_type &ki : lki.second)
515
- {
516
- ++allPts[ptCache.getActualPts(ki.second)];
517
- }
518
- }
519
-
520
- if (!liveOnly)
521
- {
522
- // Subtract 1 from each counted points-to set because the live points-to
523
- // sets have already been inserted and accounted for how often they occur.
524
- // They will each occur one more time in the cache.
525
- // In essence, we want the ptCache.getAllPts() to just add the unused, non-GC'd
526
- // points-to sets to allPts.
527
- for (typename Map<DataSet, unsigned>::value_type pto : allPts) pto.second -= 1;
528
- SVFUtil::mergePtsOccMaps<DataSet>(allPts, ptCache.getAllPts());
529
- }
530
-
531
- return allPts;
532
- }
533
-
534
- /// Methods to support type inquiry through isa, cast, and dyn_cast:
535
- ///@{
536
- static inline bool classof(const PersistentDFPTData<Key, KeySet, Data, DataSet> *)
537
- {
538
- return true;
539
- }
540
-
541
- static inline bool classof(const PTData<Key, KeySet, Data, DataSet> *ptd)
542
- {
543
- return ptd->getPTDTY() == PTDataTy::PersDataFlow
544
- || ptd->getPTDTY() == PTDataTy::PersIncDataFlow;
545
- }
546
- ///@}
547
-
548
- protected:
549
- inline bool unionPtsThroughIds(PointsToID &dst, PointsToID &src)
550
- {
551
- PointsToID oldDst = dst;
552
- dst = ptCache.unionPts(dst, src);
553
- return oldDst != dst;
554
- }
555
-
556
- PointsToID &getDFInPtIdRef(LocID loc, const Key &var)
557
- {
558
- return dfInPtsMap[loc][var];
559
- }
560
-
561
- PointsToID &getDFOutPtIdRef(LocID loc, const Key &var)
562
- {
563
- return dfOutPtsMap[loc][var];
564
- }
565
-
566
- protected:
567
- PersistentPointsToCache<DataSet> &ptCache;
568
-
569
- /// PTData for top-level pointers. We will also use its cache for address-taken pointers.
570
- PersistentPTData<Key, KeySet, Data, DataSet> persPTData;
571
-
572
- /// Address-taken points-to sets in IN-sets.
573
- DFKeyToIDMap dfInPtsMap;
574
- /// Address-taken points-to sets in OUT-sets.
575
- DFKeyToIDMap dfOutPtsMap;
576
- };
577
-
578
- /// Incremental version of the persistent data-flow points-to data structure.
579
- template <typename Key, typename KeySet, typename Data, typename DataSet>
580
- class PersistentIncDFPTData : public PersistentDFPTData<Key, KeySet, Data, DataSet>
581
- {
582
- public:
583
- typedef PTData<Key, KeySet, Data, DataSet> BasePTData;
584
- typedef PersistentPTData<Key, KeySet, Data, DataSet> BasePersPTData;
585
- typedef DFPTData<Key, KeySet, Data, DataSet> BaseDFPTData;
586
- typedef PersistentDFPTData<Key, KeySet, Data, DataSet> BasePersDFPTData;
587
- typedef typename BasePTData::PTDataTy PTDataTy;
588
-
589
- typedef typename BaseDFPTData::LocID LocID;
590
- typedef Map<LocID, KeySet> UpdatedVarMap;
591
-
592
- public:
593
- /// Constructor
594
- explicit PersistentIncDFPTData(PersistentPointsToCache<DataSet> &cache, bool reversePT = true, PTDataTy ty = BasePTData::PersIncDataFlow)
595
- : BasePersDFPTData(cache, reversePT, ty) { }
596
-
597
- ~PersistentIncDFPTData() override = default;
598
-
599
- inline bool updateDFInFromIn(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
600
- {
601
- if (varHasNewDFInPts(srcLoc, srcVar)
602
- && this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
603
- {
604
- setVarDFInSetUpdated(dstLoc, dstVar);
605
- return true;
606
- }
607
-
608
- return false;
609
- }
610
-
611
- inline bool updateDFInFromOut(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
612
- {
613
- if (varHasNewDFOutPts(srcLoc, srcVar)
614
- && this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFOutPtIdRef(srcLoc, srcVar)))
615
- {
616
- setVarDFInSetUpdated(dstLoc, dstVar);
617
- return true;
618
- }
619
-
620
- return false;
621
- }
622
-
623
- inline bool updateDFOutFromIn(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
624
- {
625
- if (varHasNewDFInPts(srcLoc, srcVar))
626
- {
627
- removeVarFromDFInUpdatedSet(srcLoc, srcVar);
628
- if (this->unionPtsThroughIds(this->getDFOutPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
629
- {
630
- setVarDFOutSetUpdated(dstLoc, dstVar);
631
- return true;
632
- }
633
- }
634
-
635
- return false;
636
- }
637
-
638
- inline bool updateAllDFInFromOut(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
639
- {
640
- if (this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFOutPtIdRef(srcLoc, srcVar)))
641
- {
642
- setVarDFInSetUpdated(dstLoc, dstVar);
643
- return true;
644
- }
645
-
646
- return false;
647
- }
648
-
649
- inline bool updateAllDFInFromIn(LocID srcLoc, const Key& srcVar, LocID dstLoc, const Key& dstVar) override
650
- {
651
- if (this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
652
- {
653
- setVarDFInSetUpdated(dstLoc, dstVar);
654
- return true;
655
- }
656
-
657
- return false;
658
- }
659
-
660
- inline bool updateAllDFOutFromIn(LocID loc, const Key& singleton, bool strongUpdates) override
661
- {
662
- bool changed = false;
663
- if (this->hasDFInSet(loc))
664
- {
665
- /// Only variables which have a new (IN) pts need to be updated.
666
- const KeySet vars = getDFInUpdatedVar(loc);
667
- for (const Key &var : vars)
668
- {
669
- /// Enable strong updates if it is required to do so
670
- if (strongUpdates && var == singleton) continue;
671
- if (updateDFOutFromIn(loc, var, loc, var)) changed = true;
672
- }
673
- }
674
-
675
- return changed;
676
- }
677
-
678
- inline bool updateTLVPts(LocID srcLoc, const Key& srcVar, const Key& dstVar) override
679
- {
680
- if (varHasNewDFInPts(srcLoc, srcVar))
681
- {
682
- removeVarFromDFInUpdatedSet(srcLoc, srcVar);
683
- return this->unionPtsThroughIds(this->persPTData.ptsMap[dstVar], this->getDFInPtIdRef(srcLoc, srcVar));
684
- }
685
-
686
- return false;
687
- }
688
-
689
- inline bool updateATVPts(const Key& srcVar, LocID dstLoc, const Key& dstVar) override
690
- {
691
- if (this->unionPtsThroughIds(this->getDFOutPtIdRef(dstLoc, dstVar), this->persPTData.ptsMap[srcVar]))
692
- {
693
- setVarDFOutSetUpdated(dstLoc, dstVar);
694
- return true;
695
- }
696
-
697
- return false;
698
- }
699
-
700
- inline void clearAllDFOutUpdatedVar(LocID loc) override
701
- {
702
- if (this->hasDFOutSet(loc))
703
- {
704
- const KeySet vars = getDFOutUpdatedVar(loc);
705
- for (const Key &var : vars)
706
- {
707
- removeVarFromDFOutUpdatedSet(loc, var);
708
- }
709
- }
710
- }
711
-
712
- inline void clear() override
713
- {
714
- outUpdatedVarMap.clear();
715
- inUpdatedVarMap.clear();
716
- BasePersDFPTData::clear();
717
- }
718
-
719
- /// Methods to support type inquiry through isa, cast, and dyn_cast:
720
- ///@{
721
- static inline bool classof(const PersistentIncDFPTData<Key, KeySet, Data, DataSet> *)
722
- {
723
- return true;
724
- }
725
-
726
- static inline bool classof(const PTData<Key, KeySet, Data, DataSet> *ptd)
727
- {
728
- return ptd->getPTDTY() == BasePTData::PersIncDataFlow;
729
- }
730
- ///@}
731
-
732
- private:
733
-
734
- /// Handle address-taken variables whose IN pts changed
735
- //@{
736
- /// Add var into loc's IN updated set. Called when var's pts in loc's IN set is changed.
737
- inline void setVarDFInSetUpdated(LocID loc, const Key& var)
738
- {
739
- SVFUtil::insertKey(var, inUpdatedVarMap[loc]);
740
- }
741
-
742
- /// Remove var from loc's IN updated set.
743
- inline void removeVarFromDFInUpdatedSet(LocID loc, const Key& var)
744
- {
745
- typename UpdatedVarMap::iterator it = inUpdatedVarMap.find(loc);
746
- if (it != inUpdatedVarMap.end()) it->second.erase(var);
747
- }
748
-
749
- /// Return TRUE if var has a new pts in loc's IN set
750
- inline bool varHasNewDFInPts(LocID loc, const Key& var)
751
- {
752
- typename UpdatedVarMap::iterator it = inUpdatedVarMap.find(loc);
753
- if (it != inUpdatedVarMap.end()) return it->second.find(var) != it->second.end();
754
- return false;
755
- }
756
-
757
- /// Get all variables which have new pts informationin loc's IN set
758
- inline const KeySet& getDFInUpdatedVar(LocID loc)
759
- {
760
- return inUpdatedVarMap[loc];
761
- }
762
- ///@}
763
-
764
- /// Handle address-taken variables whose OUT pts changed
765
- ///@{
766
- /// Add var into loc's OUT updated set. Called when var's pts in loc's OUT set changed
767
- inline void setVarDFOutSetUpdated(LocID loc, const Key& var)
768
- {
769
- SVFUtil::insertKey(var, outUpdatedVarMap[loc]);
770
- }
771
-
772
- /// Remove var from loc's OUT updated set.
773
- inline void removeVarFromDFOutUpdatedSet(LocID loc, const Key& var)
774
- {
775
- typename UpdatedVarMap::iterator it = outUpdatedVarMap.find(loc);
776
- if (it != outUpdatedVarMap.end()) it->second.erase(var);
777
- }
778
-
779
- /// Return TRUE if var has a new pts in loc's OUT set.
780
- inline bool varHasNewDFOutPts(LocID loc, const Key& var)
781
- {
782
- typename UpdatedVarMap::iterator it = outUpdatedVarMap.find(loc);
783
- if (it != outUpdatedVarMap.end()) return it->second.find(var) != it->second.end();
784
- return false;
785
- }
786
-
787
- /// Get all variables which have new pts info in loc's OUT set
788
- inline const KeySet& getDFOutUpdatedVar(LocID loc)
789
- {
790
- return outUpdatedVarMap[loc];
791
- }
792
- ///@}
793
-
794
-
795
- private:
796
- UpdatedVarMap outUpdatedVarMap;
797
- UpdatedVarMap inUpdatedVarMap;
798
- };
799
-
800
- /// VersionedPTData implemented with persistent points-to sets (Data).
801
- /// Implemented as a wrapper around two PersistentPTDatas: one for Keys, one
802
- /// for VersionedKeys.
803
- /// They are constructed with the same PersistentPointsToCache.
804
- template <typename Key, typename KeySet, typename Data, typename DataSet, typename VersionedKey, typename VersionedKeySet>
805
- class PersistentVersionedPTData : public VersionedPTData<Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet>
806
- {
807
- public:
808
- typedef PTData<Key, KeySet, Data, DataSet> BasePTData;
809
- typedef VersionedPTData<Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet> BaseVersionedPTData;
810
- typedef typename BasePTData::PTDataTy PTDataTy;
811
-
812
- typedef typename PersistentPTData<Key, KeySet, Data, DataSet>::KeyToIDMap KeyToIDMap;
813
- typedef typename PersistentPTData<VersionedKey, VersionedKeySet, Data, DataSet>::KeyToIDMap VersionedKeyToIDMap;
814
-
815
- explicit PersistentVersionedPTData(PersistentPointsToCache<DataSet> &cache, bool reversePT = true, PTDataTy ty = PTDataTy::PersVersioned)
816
- : BaseVersionedPTData(reversePT, ty), tlPTData(cache, reversePT), atPTData(cache, reversePT) { }
817
-
818
- ~PersistentVersionedPTData() override = default;
819
-
820
- inline void clear() override
821
- {
822
- tlPTData.clear();
823
- atPTData.clear();
824
- }
825
-
826
- const DataSet &getPts(const Key& vk) override
827
- {
828
- return tlPTData.getPts(vk);
829
- }
830
- const DataSet &getPts(const VersionedKey& vk) override
831
- {
832
- return atPTData.getPts(vk);
833
- }
834
-
835
- const KeySet& getRevPts(const Data &data) override
836
- {
837
- assert(this->rev && "PersistentVersionedPTData::getRevPts: constructed without reverse PT support!");
838
- return tlPTData.getRevPts(data);
839
- }
840
- const VersionedKeySet& getVersionedKeyRevPts(const Data &data) override
841
- {
842
- assert(this->rev && "PersistentVersionedPTData::getVersionedKeyRevPts: constructed without reverse PT support!");
843
- return atPTData.getRevPts(data);
844
- }
845
-
846
- bool addPts(const Key& k, const Data &element) override
847
- {
848
- return tlPTData.addPts(k, element);
849
- }
850
- bool addPts(const VersionedKey& vk, const Data &element) override
851
- {
852
- return atPTData.addPts(vk, element);
853
- }
854
-
855
- bool unionPts(const Key& dstVar, const Key& srcVar) override
856
- {
857
- return tlPTData.unionPts(dstVar, srcVar);
858
- }
859
- bool unionPts(const VersionedKey& dstVar, const VersionedKey& srcVar) override
860
- {
861
- return atPTData.unionPts(dstVar, srcVar);
862
- }
863
- bool unionPts(const VersionedKey& dstVar, const Key& srcVar) override
864
- {
865
- return atPTData.unionPtsFromId(dstVar, tlPTData.ptsMap[srcVar]);
866
- }
867
- bool unionPts(const Key& dstVar, const VersionedKey& srcVar) override
868
- {
869
- return tlPTData.unionPtsFromId(dstVar, atPTData.ptsMap[srcVar]);
870
- }
871
- bool unionPts(const Key &dstVar, const DataSet &srcDataSet) override
872
- {
873
- return tlPTData.unionPts(dstVar, srcDataSet);
874
- }
875
- bool unionPts(const VersionedKey &dstVar, const DataSet &srcDataSet) override
876
- {
877
- return atPTData.unionPts(dstVar, srcDataSet);
878
- }
879
-
880
- void clearPts(const Key& k, const Data &element) override
881
- {
882
- tlPTData.clearPts(k, element);
883
- }
884
- void clearPts(const VersionedKey& vk, const Data &element) override
885
- {
886
- atPTData.clearPts(vk, element);
887
- }
888
-
889
- void clearFullPts(const Key& k) override
890
- {
891
- tlPTData.clearFullPts(k);
892
- }
893
- void clearFullPts(const VersionedKey& vk) override
894
- {
895
- atPTData.clearFullPts(vk);
896
- }
897
-
898
- void remapAllPts() override
899
- {
900
- // tlPTData and atPTData use the same cache.
901
- tlPTData.remapAllPts();
902
- }
903
-
904
- Map<DataSet, unsigned> getAllPts(bool liveOnly) const override
905
- {
906
- // Explicitly pass in true because if we call it with false,
907
- // we will double up on the cache, since it is shared with atPTData.
908
- // if liveOnly == false, we will handle it in the if below.
909
- Map<DataSet, unsigned> allPts = tlPTData.getAllPts(true);
910
- SVFUtil::mergePtsOccMaps<DataSet>(allPts, atPTData.getAllPts(true));
911
-
912
- if (!liveOnly)
913
- {
914
- // Subtract 1 from each counted points-to set because the live points-to
915
- // sets have already been inserted and accounted for how often they occur.
916
- // They will each occur one more time in the cache.
917
- // In essence, we want the ptCache.getAllPts() to just add the unused, non-GC'd
918
- // points-to sets to allPts.
919
- for (typename Map<DataSet, unsigned>::value_type &pto : allPts) pto.second -= 1;
920
- SVFUtil::mergePtsOccMaps<DataSet>(allPts, tlPTData.ptCache.getAllPts());
921
- }
922
-
923
- return allPts;
924
- }
925
-
926
- inline void dumpPTData() override
927
- {
928
- SVFUtil::outs() << "== Top-level points-to information\n";
929
- tlPTData.dumpPTData();
930
- SVFUtil::outs() << "== Address-taken points-to information\n";
931
- atPTData.dumpPTData();
932
- }
933
-
934
- /// Methods to support type inquiry through isa, cast, and dyn_cast:
935
- ///@{
936
- static inline bool classof(const PersistentVersionedPTData<Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet> *)
937
- {
938
- return true;
939
- }
940
-
941
- static inline bool classof(const PTData<Key, KeySet, Data, DataSet>* ptd)
942
- {
943
- return ptd->getPTDTY() == PTDataTy::PersVersioned;
944
- }
945
- ///@}
946
-
947
- private:
948
- /// PTData for Keys (top-level pointers, generally).
949
- PersistentPTData<Key, KeySet, Data, DataSet> tlPTData;
950
- /// PTData for VersionedKeys (address-taken objects, generally).
951
- PersistentPTData<VersionedKey, VersionedKeySet, Data, DataSet> atPTData;
952
- };
953
-
954
- } // End namespace SVF
955
- #endif // PERSISTENT_POINTSTO_H_