svf-lib 1.0.2319 → 1.0.2321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/WorkList.h +0 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/Modules/FindZ3.cmake +93 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfig.cmake +106 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfigVersion.cmake +43 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFTargets-release.cmake +101 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFTargets.cmake +180 -0
- package/SVF-linux-aarch64/Release-build/lib/libSvfCore.so.3.1 +0 -0
- package/SVF-linux-aarch64/Release-build/lib/libSvfLLVM.so.3.1 +0 -0
- package/SVF-linux-aarch64/Release-build/lib/pkgconfig/SVF.pc +12 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/AbstractState.h +425 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/AbstractValue.h +157 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/AddressValue.h +225 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/ICFGWTO.h +135 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/IntervalValue.h +1055 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/NumericValue.h +1292 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/RelExeState.h +226 -0
- package/SVF-osx/Release-build/include/SVF/AE/Core/RelationSolver.h +91 -0
- package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AEDetector.h +439 -0
- package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AbsExtAPI.h +138 -0
- package/SVF-osx/Release-build/include/SVF/AE/Svfexe/AbstractInterpretation.h +384 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFGNormalizer.h +84 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFGrammar.h +468 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLAlias.h +168 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLBase.h +118 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLGramGraphChecker.h +74 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLGraphBuilder.h +168 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLSVFGBuilder.h +58 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLSolver.h +374 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLStat.h +67 -0
- package/SVF-osx/Release-build/include/SVF/CFL/CFLVF.h +68 -0
- package/SVF-osx/Release-build/include/SVF/CFL/GrammarBuilder.h +100 -0
- package/SVF-osx/Release-build/include/SVF/DDA/ContextDDA.h +230 -0
- package/SVF-osx/Release-build/include/SVF/DDA/DDAClient.h +163 -0
- package/SVF-osx/Release-build/include/SVF/DDA/DDAPass.h +102 -0
- package/SVF-osx/Release-build/include/SVF/DDA/DDAStat.h +121 -0
- package/SVF-osx/Release-build/include/SVF/DDA/DDAVFSolver.h +794 -0
- package/SVF-osx/Release-build/include/SVF/DDA/FlowDDA.h +178 -0
- package/SVF-osx/Release-build/include/SVF/FastCluster/fastcluster.h +80 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/BasicBlockG.h +318 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/CDG.h +482 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/CFLGraph.h +232 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/CHG.h +368 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/CallGraph.h +497 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ConsG.h +402 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ConsGEdge.h +355 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ConsGNode.h +418 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/DOTGraphTraits.h +188 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/GenericGraph.h +628 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/GraphPrinter.h +111 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/GraphTraits.h +150 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/GraphWriter.h +380 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ICFG.h +331 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ICFGEdge.h +281 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ICFGNode.h +669 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ICFGStat.h +164 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/IRGraph.h +398 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SCC.h +375 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SVFG.h +491 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SVFGEdge.h +237 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SVFGNode.h +501 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SVFGOPT.h +372 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/SVFGStat.h +273 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/ThreadCallGraph.h +399 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/VFG.h +726 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/VFGEdge.h +295 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/VFGNode.h +1266 -0
- package/SVF-osx/Release-build/include/SVF/Graphs/WTO.h +872 -0
- package/SVF-osx/Release-build/include/SVF/MSSA/MSSAMuChi.h +722 -0
- package/SVF-osx/Release-build/include/SVF/MSSA/MemPartition.h +169 -0
- package/SVF-osx/Release-build/include/SVF/MSSA/MemRegion.h +489 -0
- package/SVF-osx/Release-build/include/SVF/MSSA/MemSSA.h +452 -0
- package/SVF-osx/Release-build/include/SVF/MSSA/SVFGBuilder.h +104 -0
- package/SVF-osx/Release-build/include/SVF/MTA/LockAnalysis.h +533 -0
- package/SVF-osx/Release-build/include/SVF/MTA/MHP.h +546 -0
- package/SVF-osx/Release-build/include/SVF/MTA/MTA.h +97 -0
- package/SVF-osx/Release-build/include/SVF/MTA/MTAStat.h +73 -0
- package/SVF-osx/Release-build/include/SVF/MTA/TCT.h +620 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/AbstractPointsToDS.h +316 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/AccessPath.h +194 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/ConditionalPT.h +878 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/MutablePointsToDS.h +1025 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/PersistentPointsToCache.h +463 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/PersistentPointsToDS.h +955 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/PointerAnalysis.h +428 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/PointerAnalysisImpl.h +602 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/PointsTo.h +255 -0
- package/SVF-osx/Release-build/include/SVF/MemoryModel/SVFLoop.h +167 -0
- package/SVF-osx/Release-build/include/SVF/SABER/DoubleFreeChecker.h +76 -0
- package/SVF-osx/Release-build/include/SVF/SABER/FileChecker.h +80 -0
- package/SVF-osx/Release-build/include/SVF/SABER/LeakChecker.h +122 -0
- package/SVF-osx/Release-build/include/SVF/SABER/ProgSlice.h +327 -0
- package/SVF-osx/Release-build/include/SVF/SABER/SaberCheckerAPI.h +151 -0
- package/SVF-osx/Release-build/include/SVF/SABER/SaberCondAllocator.h +317 -0
- package/SVF-osx/Release-build/include/SVF/SABER/SaberSVFGBuilder.h +114 -0
- package/SVF-osx/Release-build/include/SVF/SABER/SrcSnkDDA.h +327 -0
- package/SVF-osx/Release-build/include/SVF/SABER/SrcSnkSolver.h +186 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/BasicTypes.h +280 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/BreakConstantExpr.h +93 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/CHGBuilder.h +78 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/CppUtil.h +184 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/DCHG.h +474 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/ICFGBuilder.h +160 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMLoopAnalysis.h +60 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMModule.h +527 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/LLVMUtil.h +433 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/ObjTypeInference.h +129 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/SVFIRBuilder.h +523 -0
- package/SVF-osx/Release-build/include/SVF/SVF-LLVM/SymbolTableBuilder.h +132 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/ObjTypeInfo.h +224 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/PAGBuilderFromFile.h +80 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/SVFIR.h +856 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/SVFStatements.h +1330 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/SVFType.h +606 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/SVFValue.h +338 -0
- package/SVF-osx/Release-build/include/SVF/SVFIR/SVFVariables.h +2212 -0
- package/SVF-osx/Release-build/include/SVF/Util/Annotator.h +180 -0
- package/SVF-osx/Release-build/include/SVF/Util/BitVector.h +55 -0
- package/SVF-osx/Release-build/include/SVF/Util/CDGBuilder.h +107 -0
- package/SVF-osx/Release-build/include/SVF/Util/CallGraphBuilder.h +61 -0
- package/SVF-osx/Release-build/include/SVF/Util/Casting.h +426 -0
- package/SVF-osx/Release-build/include/SVF/Util/CommandLine.h +530 -0
- package/SVF-osx/Release-build/include/SVF/Util/CoreBitVector.h +214 -0
- package/SVF-osx/Release-build/include/SVF/Util/CxtStmt.h +502 -0
- package/SVF-osx/Release-build/include/SVF/Util/DPItem.h +618 -0
- package/SVF-osx/Release-build/include/SVF/Util/ExtAPI.h +117 -0
- package/SVF-osx/Release-build/include/SVF/Util/GeneralType.h +127 -0
- package/SVF-osx/Release-build/include/SVF/Util/GraphReachSolver.h +186 -0
- package/SVF-osx/Release-build/include/SVF/Util/NodeIDAllocator.h +203 -0
- package/SVF-osx/Release-build/include/SVF/Util/Options.h +273 -0
- package/SVF-osx/Release-build/include/SVF/Util/PTAStat.h +83 -0
- package/SVF-osx/Release-build/include/SVF/Util/SVFBugReport.h +427 -0
- package/SVF-osx/Release-build/include/SVF/Util/SVFLoopAndDomInfo.h +169 -0
- package/SVF-osx/Release-build/include/SVF/Util/SVFStat.h +103 -0
- package/SVF-osx/Release-build/include/SVF/Util/SVFUtil.h +478 -0
- package/SVF-osx/Release-build/include/SVF/Util/SparseBitVector.h +1252 -0
- package/SVF-osx/Release-build/include/SVF/Util/ThreadAPI.h +188 -0
- package/SVF-osx/Release-build/include/SVF/Util/WorkList.h +317 -0
- package/SVF-osx/Release-build/include/SVF/Util/Z3Expr.h +325 -0
- package/SVF-osx/Release-build/include/SVF/Util/cJSON.h +300 -0
- package/SVF-osx/Release-build/include/SVF/Util/config.h +46 -0
- package/SVF-osx/Release-build/include/SVF/Util/iterator.h +407 -0
- package/SVF-osx/Release-build/include/SVF/Util/iterator_range.h +76 -0
- package/SVF-osx/Release-build/include/SVF/WPA/Andersen.h +434 -0
- package/SVF-osx/Release-build/include/SVF/WPA/AndersenPWC.h +160 -0
- package/SVF-osx/Release-build/include/SVF/WPA/CSC.h +95 -0
- package/SVF-osx/Release-build/include/SVF/WPA/FlowSensitive.h +322 -0
- package/SVF-osx/Release-build/include/SVF/WPA/Steensgaard.h +131 -0
- package/SVF-osx/Release-build/include/SVF/WPA/TypeAnalysis.h +90 -0
- package/SVF-osx/Release-build/include/SVF/WPA/VersionedFlowSensitive.h +295 -0
- package/SVF-osx/Release-build/include/SVF/WPA/WPAFSSolver.h +246 -0
- package/SVF-osx/Release-build/include/SVF/WPA/WPAPass.h +115 -0
- package/SVF-osx/Release-build/include/SVF/WPA/WPASolver.h +205 -0
- package/SVF-osx/Release-build/include/SVF/WPA/WPAStat.h +222 -0
- package/SVF-osx/Release-build/include/SVF/extapi.bc +2384 -0
- package/SVF-osx/Release-build/lib/cmake/SVF/Modules/FindZ3.cmake +93 -0
- package/SVF-osx/Release-build/lib/cmake/SVF/SVFConfig.cmake +106 -0
- package/SVF-osx/Release-build/lib/cmake/SVF/SVFConfigVersion.cmake +43 -0
- package/SVF-osx/Release-build/lib/cmake/SVF/SVFTargets-release.cmake +101 -0
- package/SVF-osx/Release-build/lib/cmake/SVF/SVFTargets.cmake +180 -0
- package/SVF-osx/Release-build/lib/libSvfCore.3.1.dylib +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.3.1.dylib +0 -0
- package/SVF-osx/Release-build/lib/pkgconfig/SVF.pc +12 -0
- package/package.json +1 -1
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PAGGrammar.txt +0 -15
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PEGGrammar.txt +0 -11
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/VFGGrammar.txt +0 -7
- package/SVF-linux-aarch64/Release-build/include/FastCluster/LICENSE.TXT +0 -13
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AbstractState.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AbstractValue.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/AddressValue.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/ICFGWTO.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/IntervalValue.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/NumericValue.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/RelExeState.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Core/RelationSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AEDetector.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AbsExtAPI.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{AE → SVF/AE}/Svfexe/AbstractInterpretation.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFGNormalizer.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFGrammar.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLAlias.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLBase.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLGramGraphChecker.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLGraphBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLSVFGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/CFLVF.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{CFL → SVF/CFL}/GrammarBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/ContextDDA.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAClient.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAPass.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/DDAVFSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{DDA → SVF/DDA}/FlowDDA.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{FastCluster → SVF/FastCluster}/fastcluster.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/BasicBlockG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CDG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CFLGraph.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CHG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/CallGraph.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsGEdge.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ConsGNode.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/DOTGraphTraits.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GenericGraph.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphPrinter.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphTraits.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/GraphWriter.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGEdge.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGNode.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ICFGStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/IRGraph.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SCC.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGEdge.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGNode.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGOPT.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/SVFGStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/ThreadCallGraph.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFGEdge.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/VFGNode.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Graphs → SVF/Graphs}/WTO.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MSSAMuChi.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemPartition.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemRegion.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/MemSSA.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MSSA → SVF/MSSA}/SVFGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/LockAnalysis.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MHP.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MTA.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/MTAStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MTA → SVF/MTA}/TCT.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/AbstractPointsToDS.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/AccessPath.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/ConditionalPT.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/MutablePointsToDS.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PersistentPointsToCache.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PersistentPointsToDS.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointerAnalysis.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointerAnalysisImpl.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/PointsTo.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{MemoryModel → SVF/MemoryModel}/SVFLoop.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/DoubleFreeChecker.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/FileChecker.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/LeakChecker.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/ProgSlice.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberCheckerAPI.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberCondAllocator.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SaberSVFGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SrcSnkDDA.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SABER → SVF/SABER}/SrcSnkSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/BasicTypes.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/BreakConstantExpr.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/CHGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/CppUtil.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/DCHG.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/GEPTypeBridgeIterator.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/ICFGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMLoopAnalysis.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMModule.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/LLVMUtil.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/ObjTypeInference.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/SVFIRBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVF-LLVM → SVF/SVF-LLVM}/SymbolTableBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/ObjTypeInfo.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/PAGBuilderFromFile.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFIR.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFStatements.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFType.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFValue.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{SVFIR → SVF/SVFIR}/SVFVariables.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Annotator.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/BitVector.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CDGBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CallGraphBuilder.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Casting.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CommandLine.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CoreBitVector.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/CxtStmt.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/DPItem.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/ExtAPI.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/GeneralType.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/GraphReachSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/NodeIDAllocator.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Options.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/PTAStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFBugReport.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFLoopAndDomInfo.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SVFUtil.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/SparseBitVector.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/ThreadAPI.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/Z3Expr.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/cJSON.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/iterator.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{Util → SVF/Util}/iterator_range.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/Andersen.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/AndersenPWC.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/CSC.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/FlowSensitive.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/Steensgaard.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/TypeAnalysis.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/VersionedFlowSensitive.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAFSSolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAPass.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPASolver.h +0 -0
- /package/SVF-linux-aarch64/Release-build/include/{WPA → SVF/WPA}/WPAStat.h +0 -0
- /package/SVF-linux-aarch64/Release-build/{lib → include/SVF}/extapi.bc +0 -0
|
@@ -0,0 +1,955 @@
|
|
|
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 information in 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_
|