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,602 @@
|
|
|
1
|
+
//===- PointerAnalysisImpl.h -- Pointer analysis implementation--------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU Affero General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* PointerAnalysis.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: Nov 12, 2013
|
|
27
|
+
* Author: Yulei Sui
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_
|
|
31
|
+
#define INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_
|
|
32
|
+
|
|
33
|
+
#include <Graphs/ConsG.h>
|
|
34
|
+
#include "MemoryModel/PointerAnalysis.h"
|
|
35
|
+
|
|
36
|
+
namespace SVF
|
|
37
|
+
{
|
|
38
|
+
|
|
39
|
+
/*!
|
|
40
|
+
* Pointer analysis implementation which uses bit vector based points-to data structure
|
|
41
|
+
*/
|
|
42
|
+
class BVDataPTAImpl : public PointerAnalysis
|
|
43
|
+
{
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
typedef PTData<NodeID, NodeSet, NodeID, PointsTo> PTDataTy;
|
|
47
|
+
typedef DiffPTData<NodeID, NodeSet, NodeID, PointsTo> DiffPTDataTy;
|
|
48
|
+
typedef DFPTData<NodeID, NodeSet, NodeID, PointsTo> DFPTDataTy;
|
|
49
|
+
typedef VersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar>> VersionedPTDataTy;
|
|
50
|
+
|
|
51
|
+
typedef MutablePTData<NodeID, NodeSet, NodeID, PointsTo> MutPTDataTy;
|
|
52
|
+
typedef MutableDiffPTData<NodeID, NodeSet, NodeID, PointsTo> MutDiffPTDataTy;
|
|
53
|
+
typedef MutableDFPTData<NodeID, NodeSet, NodeID, PointsTo> MutDFPTDataTy;
|
|
54
|
+
typedef MutableIncDFPTData<NodeID, NodeSet, NodeID, PointsTo> MutIncDFPTDataTy;
|
|
55
|
+
typedef MutableVersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar>> MutVersionedPTDataTy;
|
|
56
|
+
|
|
57
|
+
typedef PersistentPTData<NodeID, NodeSet, NodeID, PointsTo> PersPTDataTy;
|
|
58
|
+
typedef PersistentDiffPTData<NodeID, NodeSet, NodeID, PointsTo> PersDiffPTDataTy;
|
|
59
|
+
typedef PersistentDFPTData<NodeID, NodeSet, NodeID, PointsTo> PersDFPTDataTy;
|
|
60
|
+
typedef PersistentIncDFPTData<NodeID, NodeSet, NodeID, PointsTo> PersIncDFPTDataTy;
|
|
61
|
+
typedef PersistentVersionedPTData<NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set<VersionedVar>> PersVersionedPTDataTy;
|
|
62
|
+
|
|
63
|
+
/// How the PTData used is implemented.
|
|
64
|
+
enum PTBackingType
|
|
65
|
+
{
|
|
66
|
+
Mutable,
|
|
67
|
+
Persistent,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/// Constructor
|
|
71
|
+
BVDataPTAImpl(SVFIR* pag, PointerAnalysis::PTATY type, bool alias_check = true);
|
|
72
|
+
|
|
73
|
+
/// Destructor
|
|
74
|
+
~BVDataPTAImpl() override = default;
|
|
75
|
+
|
|
76
|
+
inline PersistentPointsToCache<PointsTo> &getPtCache()
|
|
77
|
+
{
|
|
78
|
+
return ptCache;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static inline bool classof(const PointerAnalysis *pta)
|
|
82
|
+
{
|
|
83
|
+
return pta->getImplTy() == BVDataImpl;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/// Get points-to and reverse points-to
|
|
87
|
+
///@{
|
|
88
|
+
inline const PointsTo& getPts(NodeID id) override
|
|
89
|
+
{
|
|
90
|
+
return ptD->getPts(id);
|
|
91
|
+
}
|
|
92
|
+
inline const NodeSet& getRevPts(NodeID nodeId) override
|
|
93
|
+
{
|
|
94
|
+
return ptD->getRevPts(nodeId);
|
|
95
|
+
}
|
|
96
|
+
//@}
|
|
97
|
+
|
|
98
|
+
/// Remove element from the points-to set of id.
|
|
99
|
+
virtual inline void clearPts(NodeID id, NodeID element)
|
|
100
|
+
{
|
|
101
|
+
ptD->clearPts(id, element);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// Clear points-to set of id.
|
|
105
|
+
virtual inline void clearFullPts(NodeID id)
|
|
106
|
+
{
|
|
107
|
+
ptD->clearFullPts(id);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/// Union/add points-to. Add the reverse points-to for node collapse purpose
|
|
111
|
+
/// To be noted that adding reverse pts might incur 10% total overhead during solving
|
|
112
|
+
//@{
|
|
113
|
+
virtual inline bool unionPts(NodeID id, const PointsTo& target)
|
|
114
|
+
{
|
|
115
|
+
return ptD->unionPts(id, target);
|
|
116
|
+
}
|
|
117
|
+
virtual inline bool unionPts(NodeID id, NodeID ptd)
|
|
118
|
+
{
|
|
119
|
+
return ptD->unionPts(id,ptd);
|
|
120
|
+
}
|
|
121
|
+
virtual inline bool addPts(NodeID id, NodeID ptd)
|
|
122
|
+
{
|
|
123
|
+
return ptD->addPts(id,ptd);
|
|
124
|
+
}
|
|
125
|
+
//@}
|
|
126
|
+
|
|
127
|
+
/// Clear all data
|
|
128
|
+
virtual inline void clearAllPts()
|
|
129
|
+
{
|
|
130
|
+
ptD->clear();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/// Expand FI objects
|
|
134
|
+
virtual void expandFIObjs(const PointsTo& pts, PointsTo& expandedPts);
|
|
135
|
+
/// TODO: remove repetition.
|
|
136
|
+
virtual void expandFIObjs(const NodeBS& pts, NodeBS& expandedPts);
|
|
137
|
+
|
|
138
|
+
/// Remap all points-to sets to use the current mapping.
|
|
139
|
+
void remapPointsToSets(void);
|
|
140
|
+
|
|
141
|
+
/// Interface for analysis result storage on filesystem.
|
|
142
|
+
//@{
|
|
143
|
+
virtual void writeToFile(const std::string& filename);
|
|
144
|
+
virtual void writeObjVarToFile(const std::string& filename);
|
|
145
|
+
virtual void writePtsResultToFile(std::fstream& f);
|
|
146
|
+
virtual void writeGepObjVarMapToFile(std::fstream& f);
|
|
147
|
+
virtual bool readFromFile(const std::string& filename);
|
|
148
|
+
virtual void readPtsResultFromFile(std::ifstream& f);
|
|
149
|
+
virtual void readGepObjVarMapFromFile(std::ifstream& f);
|
|
150
|
+
virtual void readAndSetObjFieldSensitivity(std::ifstream& f, const std::string& delimiterStr);
|
|
151
|
+
//@}
|
|
152
|
+
|
|
153
|
+
protected:
|
|
154
|
+
/// Get points-to data structure
|
|
155
|
+
inline PTDataTy* getPTDataTy() const
|
|
156
|
+
{
|
|
157
|
+
return ptD.get();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
/// Finalization of pointer analysis, and normalize points-to information to Bit Vector representation
|
|
162
|
+
void finalize() override;
|
|
163
|
+
|
|
164
|
+
/// Update callgraph. This should be implemented by its subclass.
|
|
165
|
+
virtual inline bool updateCallGraph(const CallSiteToFunPtrMap&)
|
|
166
|
+
{
|
|
167
|
+
assert(false && "Virtual function not implemented!");
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
inline DiffPTDataTy* getDiffPTDataTy() const
|
|
172
|
+
{
|
|
173
|
+
DiffPTDataTy* diff = SVFUtil::dyn_cast<DiffPTDataTy>(ptD.get());
|
|
174
|
+
assert(diff && "BVDataPTAImpl::getDiffPTDataTy: not a DiffPTDataTy!");
|
|
175
|
+
return diff;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
inline DFPTDataTy* getDFPTDataTy() const
|
|
179
|
+
{
|
|
180
|
+
DFPTDataTy* df = SVFUtil::dyn_cast<DFPTDataTy>(ptD.get());
|
|
181
|
+
assert(df && "BVDataPTAImpl::getDFPTDataTy: not a DFPTDataTy!");
|
|
182
|
+
return df;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
inline MutDFPTDataTy* getMutDFPTDataTy() const
|
|
186
|
+
{
|
|
187
|
+
MutDFPTDataTy* mdf = SVFUtil::dyn_cast<MutDFPTDataTy>(ptD.get());
|
|
188
|
+
assert(mdf && "BVDataPTAImpl::getMutDFPTDataTy: not a MutDFPTDataTy!");
|
|
189
|
+
return mdf;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
inline VersionedPTDataTy* getVersionedPTDataTy() const
|
|
193
|
+
{
|
|
194
|
+
VersionedPTDataTy* v = SVFUtil::dyn_cast<VersionedPTDataTy>(ptD.get());
|
|
195
|
+
assert(v && "BVDataPTAImpl::getVersionedPTDataTy: not a VersionedPTDataTy!");
|
|
196
|
+
return v;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/// On the fly call graph construction
|
|
200
|
+
virtual void onTheFlyCallGraphSolve(const CallSiteToFunPtrMap& callsites, CallEdgeMap& newEdges);
|
|
201
|
+
|
|
202
|
+
/// On the fly thread call graph construction respecting forksite
|
|
203
|
+
virtual void onTheFlyThreadCallGraphSolve(const CallSiteToFunPtrMap& callsites,
|
|
204
|
+
CallEdgeMap& newForkEdges);
|
|
205
|
+
|
|
206
|
+
/// Normalize points-to information for field-sensitive analysis,
|
|
207
|
+
/// i.e., replace fieldObj with baseObj if it is field-insensitive
|
|
208
|
+
virtual void normalizePointsTo();
|
|
209
|
+
|
|
210
|
+
private:
|
|
211
|
+
/// Points-to data
|
|
212
|
+
std::unique_ptr<PTDataTy> ptD;
|
|
213
|
+
|
|
214
|
+
PersistentPointsToCache<PointsTo> ptCache;
|
|
215
|
+
|
|
216
|
+
public:
|
|
217
|
+
/// Interface expose to users of our pointer analysis, given Value infos
|
|
218
|
+
AliasResult alias(const SVFVar* V1,
|
|
219
|
+
const SVFVar* V2) override
|
|
220
|
+
{
|
|
221
|
+
return alias(V1->getId(), V2->getId());
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/// Interface expose to users of our pointer analysis, given PAGNodeID
|
|
225
|
+
AliasResult alias(NodeID node1, NodeID node2) override;
|
|
226
|
+
|
|
227
|
+
/// Interface expose to users of our pointer analysis, given two pts
|
|
228
|
+
virtual AliasResult alias(const PointsTo& pts1, const PointsTo& pts2);
|
|
229
|
+
|
|
230
|
+
/// dump and debug, print out conditional pts
|
|
231
|
+
//@{
|
|
232
|
+
void dumpCPts() override
|
|
233
|
+
{
|
|
234
|
+
ptD->dumpPTData();
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
void dumpTopLevelPtsTo() override;
|
|
238
|
+
|
|
239
|
+
void dumpAllPts() override;
|
|
240
|
+
//@}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/*!
|
|
244
|
+
* Pointer analysis implementation which uses conditional points-to map data structure (context/path sensitive analysis)
|
|
245
|
+
*/
|
|
246
|
+
template<class Cond>
|
|
247
|
+
class CondPTAImpl : public PointerAnalysis
|
|
248
|
+
{
|
|
249
|
+
|
|
250
|
+
public:
|
|
251
|
+
typedef CondVar<Cond> CVar;
|
|
252
|
+
typedef CondStdSet<CVar> CPtSet;
|
|
253
|
+
typedef PTData<CVar, Set<CVar>, CVar, CPtSet> PTDataTy;
|
|
254
|
+
typedef MutablePTData<CVar, Set<CVar>, CVar, CPtSet> MutPTDataTy;
|
|
255
|
+
typedef Map<NodeID,PointsTo> PtrToBVPtsMap; /// map a pointer to its BitVector points-to representation
|
|
256
|
+
typedef Map<NodeID, NodeSet> PtrToNSMap;
|
|
257
|
+
typedef Map<NodeID,CPtSet> PtrToCPtsMap; /// map a pointer to its conditional points-to set
|
|
258
|
+
|
|
259
|
+
/// Constructor
|
|
260
|
+
CondPTAImpl(SVFIR* pag, PointerAnalysis::PTATY type) : PointerAnalysis(pag, type), normalized(false)
|
|
261
|
+
{
|
|
262
|
+
if (type == PathS_DDA || type == Cxt_DDA)
|
|
263
|
+
ptD = new MutPTDataTy();
|
|
264
|
+
else
|
|
265
|
+
assert(false && "no points-to data available");
|
|
266
|
+
|
|
267
|
+
ptaImplTy = CondImpl;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/// Destructor
|
|
271
|
+
virtual ~CondPTAImpl()
|
|
272
|
+
{
|
|
273
|
+
destroy();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
static inline bool classof(const PointerAnalysis *pta)
|
|
277
|
+
{
|
|
278
|
+
return pta->getImplTy() == CondImpl;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/// Release memory
|
|
282
|
+
inline void destroy()
|
|
283
|
+
{
|
|
284
|
+
delete ptD;
|
|
285
|
+
ptD = nullptr;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/// Get points-to data
|
|
289
|
+
inline PTDataTy* getPTDataTy() const
|
|
290
|
+
{
|
|
291
|
+
return ptD;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
inline MutPTDataTy* getMutPTDataTy() const
|
|
295
|
+
{
|
|
296
|
+
MutPTDataTy* mut = SVFUtil::dyn_cast<MutPTDataTy>(ptD);
|
|
297
|
+
assert(mut && "BVDataPTAImpl::getMutPTDataTy: not a MutPTDataTy!");
|
|
298
|
+
return mut;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
inline bool hasPtsMap(void) const
|
|
302
|
+
{
|
|
303
|
+
return SVFUtil::isa<MutPTDataTy>(ptD);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
inline const typename MutPTDataTy::PtsMap& getPtsMap() const
|
|
307
|
+
{
|
|
308
|
+
if (MutPTDataTy *m = SVFUtil::dyn_cast<MutPTDataTy>(ptD)) return m->getPtsMap();
|
|
309
|
+
assert(false && "CondPTAImpl::getPtsMap: not a PTData with a PtsMap!");
|
|
310
|
+
exit(1);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/// Get points-to and reverse points-to
|
|
314
|
+
///@{
|
|
315
|
+
virtual inline const CPtSet& getPts(CVar id)
|
|
316
|
+
{
|
|
317
|
+
return ptD->getPts(id);
|
|
318
|
+
}
|
|
319
|
+
virtual inline const Set<CVar>& getRevPts(CVar nodeId)
|
|
320
|
+
{
|
|
321
|
+
return ptD->getRevPts(nodeId);
|
|
322
|
+
}
|
|
323
|
+
//@}
|
|
324
|
+
|
|
325
|
+
/// Clear all data
|
|
326
|
+
virtual inline void clearPts()
|
|
327
|
+
{
|
|
328
|
+
ptD->clear();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/// Whether cpts1 and cpts2 have overlap points-to targets
|
|
332
|
+
bool overlap(const CPtSet& cpts1, const CPtSet& cpts2) const
|
|
333
|
+
{
|
|
334
|
+
for (typename CPtSet::const_iterator it1 = cpts1.begin(); it1 != cpts1.end(); ++it1)
|
|
335
|
+
{
|
|
336
|
+
for (typename CPtSet::const_iterator it2 = cpts2.begin(); it2 != cpts2.end(); ++it2)
|
|
337
|
+
{
|
|
338
|
+
if(isSameVar(*it1,*it2))
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/// Expand all fields of an aggregate in all points-to sets
|
|
346
|
+
void expandFIObjs(const CPtSet& cpts, CPtSet& expandedCpts)
|
|
347
|
+
{
|
|
348
|
+
expandedCpts = cpts;;
|
|
349
|
+
for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
|
|
350
|
+
{
|
|
351
|
+
if(pag->getBaseObjVar(cit->get_id())==cit->get_id())
|
|
352
|
+
{
|
|
353
|
+
NodeBS& fields = pag->getAllFieldsObjVars(cit->get_id());
|
|
354
|
+
for(NodeBS::iterator it = fields.begin(), eit = fields.end(); it!=eit; ++it)
|
|
355
|
+
{
|
|
356
|
+
CVar cvar(cit->get_cond(),*it);
|
|
357
|
+
expandedCpts.set(cvar);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
protected:
|
|
364
|
+
|
|
365
|
+
/// Finalization of pointer analysis, and normalize points-to information to Bit Vector representation
|
|
366
|
+
virtual void finalize()
|
|
367
|
+
{
|
|
368
|
+
normalizePointsTo();
|
|
369
|
+
PointerAnalysis::finalize();
|
|
370
|
+
}
|
|
371
|
+
/// Union/add points-to, and add the reverse points-to for node collapse purpose
|
|
372
|
+
/// To be noted that adding reverse pts might incur 10% total overhead during solving
|
|
373
|
+
//@{
|
|
374
|
+
virtual inline bool unionPts(CVar id, const CPtSet& target)
|
|
375
|
+
{
|
|
376
|
+
return ptD->unionPts(id, target);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
virtual inline bool unionPts(CVar id, CVar ptd)
|
|
380
|
+
{
|
|
381
|
+
return ptD->unionPts(id,ptd);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
virtual inline bool addPts(CVar id, CVar ptd)
|
|
385
|
+
{
|
|
386
|
+
return ptD->addPts(id,ptd);
|
|
387
|
+
}
|
|
388
|
+
//@}
|
|
389
|
+
|
|
390
|
+
/// Internal interface to be used for conditional points-to set queries
|
|
391
|
+
//@{
|
|
392
|
+
inline bool mustAlias(const CVar& var1, const CVar& var2)
|
|
393
|
+
{
|
|
394
|
+
if(isSameVar(var1,var2))
|
|
395
|
+
return true;
|
|
396
|
+
|
|
397
|
+
bool singleton = !(isHeapMemObj(var1.get_id()) || isLocalVarInRecursiveFun(var1.get_id()));
|
|
398
|
+
if(isCondCompatible(var1.get_cond(),var2.get_cond(),singleton) == false)
|
|
399
|
+
return false;
|
|
400
|
+
|
|
401
|
+
const CPtSet& cpts1 = getPts(var1);
|
|
402
|
+
const CPtSet& cpts2 = getPts(var2);
|
|
403
|
+
return (contains(cpts1,cpts2) && contains(cpts2,cpts1));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Whether cpts1 contains all points-to targets of pts2
|
|
407
|
+
bool contains(const CPtSet& cpts1, const CPtSet& cpts2)
|
|
408
|
+
{
|
|
409
|
+
if (cpts1.empty() || cpts2.empty())
|
|
410
|
+
return false;
|
|
411
|
+
|
|
412
|
+
for (typename CPtSet::const_iterator it2 = cpts2.begin(); it2 != cpts2.end(); ++it2)
|
|
413
|
+
{
|
|
414
|
+
bool hasObj = false;
|
|
415
|
+
for (typename CPtSet::const_iterator it1 = cpts1.begin(); it1 != cpts1.end(); ++it1)
|
|
416
|
+
{
|
|
417
|
+
if(isSameVar(*it1,*it2))
|
|
418
|
+
{
|
|
419
|
+
hasObj = true;
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
if(hasObj == false)
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
return true;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/// Whether two pointers/objects are the same one by considering their conditions
|
|
430
|
+
bool isSameVar(const CVar& var1, const CVar& var2) const
|
|
431
|
+
{
|
|
432
|
+
if(var1.get_id() != var2.get_id())
|
|
433
|
+
return false;
|
|
434
|
+
|
|
435
|
+
/// we distinguish context sensitive memory allocation here
|
|
436
|
+
bool singleton = !(isHeapMemObj(var1.get_id()) || isLocalVarInRecursiveFun(var1.get_id()));
|
|
437
|
+
return isCondCompatible(var1.get_cond(),var2.get_cond(),singleton);
|
|
438
|
+
}
|
|
439
|
+
//@}
|
|
440
|
+
|
|
441
|
+
/// Normalize points-to information to BitVector/conditional representation
|
|
442
|
+
virtual void normalizePointsTo()
|
|
443
|
+
{
|
|
444
|
+
normalized = true;
|
|
445
|
+
if (hasPtsMap())
|
|
446
|
+
{
|
|
447
|
+
const typename MutPTDataTy::PtsMap& ptsMap = getPtsMap();
|
|
448
|
+
for(typename MutPTDataTy::PtsMap::const_iterator it = ptsMap.begin(), eit=ptsMap.end(); it!=eit; ++it)
|
|
449
|
+
{
|
|
450
|
+
for(typename CPtSet::const_iterator cit = it->second.begin(), ecit=it->second.end(); cit!=ecit; ++cit)
|
|
451
|
+
{
|
|
452
|
+
ptrToBVPtsMap[(it->first).get_id()].set(cit->get_id());
|
|
453
|
+
objToNSRevPtsMap[cit->get_id()].insert((it->first).get_id());
|
|
454
|
+
ptrToCPtsMap[(it->first).get_id()].set(*cit);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
else
|
|
459
|
+
{
|
|
460
|
+
assert(false && "CondPTAImpl::NormalizePointsTo: could not normalize points-to sets");
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
/// Points-to data
|
|
464
|
+
PTDataTy* ptD;
|
|
465
|
+
/// Normalized flag
|
|
466
|
+
bool normalized;
|
|
467
|
+
/// Normal points-to representation (without conditions)
|
|
468
|
+
PtrToBVPtsMap ptrToBVPtsMap;
|
|
469
|
+
/// Normal points-to representation (without conditions)
|
|
470
|
+
PtrToNSMap objToNSRevPtsMap;
|
|
471
|
+
/// Conditional points-to representation (with conditions)
|
|
472
|
+
PtrToCPtsMap ptrToCPtsMap;
|
|
473
|
+
public:
|
|
474
|
+
/// Print out conditional pts
|
|
475
|
+
virtual void dumpCPts()
|
|
476
|
+
{
|
|
477
|
+
ptD->dumpPTData();
|
|
478
|
+
}
|
|
479
|
+
/// Given a conditional pts return its bit vector points-to
|
|
480
|
+
virtual inline PointsTo getBVPointsTo(const CPtSet& cpts) const
|
|
481
|
+
{
|
|
482
|
+
PointsTo pts;
|
|
483
|
+
for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
|
|
484
|
+
pts.set(cit->get_id());
|
|
485
|
+
return pts;
|
|
486
|
+
}
|
|
487
|
+
/// Given a pointer return its bit vector points-to
|
|
488
|
+
virtual inline PointsTo& getPts(NodeID ptr)
|
|
489
|
+
{
|
|
490
|
+
assert(normalized && "Pts of all context-var have to be merged/normalized. Want to use getPts(CVar cvar)??");
|
|
491
|
+
return ptrToBVPtsMap[ptr];
|
|
492
|
+
}
|
|
493
|
+
/// Given a pointer return its conditional points-to
|
|
494
|
+
virtual inline const CPtSet& getCondPointsTo(NodeID ptr)
|
|
495
|
+
{
|
|
496
|
+
assert(normalized && "Pts of all context-vars have to be merged/normalized. Want to use getPts(CVar cvar)??");
|
|
497
|
+
return ptrToCPtsMap[ptr];
|
|
498
|
+
}
|
|
499
|
+
/// Given an object return all pointers points to this object
|
|
500
|
+
virtual inline NodeSet& getRevPts(NodeID obj)
|
|
501
|
+
{
|
|
502
|
+
assert(normalized && "Pts of all context-var have to be merged/normalized. Want to use getPts(CVar cvar)??");
|
|
503
|
+
return objToNSRevPtsMap[obj];
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/// Interface expose to users of our pointer analysis, given Value infos
|
|
507
|
+
virtual inline AliasResult alias(const SVFVar* V1, const SVFVar* V2)
|
|
508
|
+
{
|
|
509
|
+
return alias(V1->getId(), V2->getId());
|
|
510
|
+
}
|
|
511
|
+
/// Interface expose to users of our pointer analysis, given two pointers
|
|
512
|
+
virtual inline AliasResult alias(NodeID node1, NodeID node2)
|
|
513
|
+
{
|
|
514
|
+
return alias(getCondPointsTo(node1),getCondPointsTo(node2));
|
|
515
|
+
}
|
|
516
|
+
/// Interface expose to users of our pointer analysis, given conditional variables
|
|
517
|
+
virtual AliasResult alias(const CVar& var1, const CVar& var2)
|
|
518
|
+
{
|
|
519
|
+
return alias(getPts(var1),getPts(var2));
|
|
520
|
+
}
|
|
521
|
+
/// Interface expose to users of our pointer analysis, given two conditional points-to sets
|
|
522
|
+
virtual inline AliasResult alias(const CPtSet& pts1, const CPtSet& pts2)
|
|
523
|
+
{
|
|
524
|
+
CPtSet cpts1;
|
|
525
|
+
expandFIObjs(pts1,cpts1);
|
|
526
|
+
CPtSet cpts2;
|
|
527
|
+
expandFIObjs(pts2,cpts2);
|
|
528
|
+
if (containBlackHoleNode(cpts1) || containBlackHoleNode(cpts2))
|
|
529
|
+
return AliasResult::MayAlias;
|
|
530
|
+
else if(this->getAnalysisTy()==PathS_DDA && contains(cpts1,cpts2) && contains(cpts2,cpts1))
|
|
531
|
+
{
|
|
532
|
+
return AliasResult::MustAlias;
|
|
533
|
+
}
|
|
534
|
+
else if(overlap(cpts1,cpts2))
|
|
535
|
+
return AliasResult::MayAlias;
|
|
536
|
+
else
|
|
537
|
+
return AliasResult::NoAlias;
|
|
538
|
+
}
|
|
539
|
+
/// Test blk node for cpts
|
|
540
|
+
inline bool containBlackHoleNode(const CPtSet& cpts)
|
|
541
|
+
{
|
|
542
|
+
for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
|
|
543
|
+
{
|
|
544
|
+
if(cit->get_id() == pag->getBlackHoleNode())
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
return false;
|
|
548
|
+
}
|
|
549
|
+
/// Test constant node for cpts
|
|
550
|
+
inline bool containConstantNode(const CPtSet& cpts)
|
|
551
|
+
{
|
|
552
|
+
for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
|
|
553
|
+
{
|
|
554
|
+
if(cit->get_id() == pag->getConstantNode())
|
|
555
|
+
return true;
|
|
556
|
+
}
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
/// Whether two conditions are compatible (to be implemented by child class)
|
|
560
|
+
virtual bool isCondCompatible(const Cond& cxt1, const Cond& cxt2, bool singleton) const = 0;
|
|
561
|
+
|
|
562
|
+
/// Dump points-to information of top-level pointers
|
|
563
|
+
void dumpTopLevelPtsTo()
|
|
564
|
+
{
|
|
565
|
+
for (OrderedNodeSet::iterator nIter = this->getAllValidPtrs().begin(); nIter != this->getAllValidPtrs().end(); ++nIter)
|
|
566
|
+
{
|
|
567
|
+
const PAGNode* node = this->getPAG()->getGNode(*nIter);
|
|
568
|
+
if (this->getPAG()->isValidTopLevelPtr(node))
|
|
569
|
+
{
|
|
570
|
+
if (SVFUtil::isa<DummyObjVar>(node))
|
|
571
|
+
{
|
|
572
|
+
SVFUtil::outs() << "##<Blackhole or constant> id:" << node->getId();
|
|
573
|
+
}
|
|
574
|
+
else if (!SVFUtil::isa<DummyValVar>(node))
|
|
575
|
+
{
|
|
576
|
+
SVFUtil::outs() << "##<" << node->toString() << "> ";
|
|
577
|
+
//SVFUtil::outs() << "Source Loc: " << SVFUtil::getSourceLoc(node->getValue());
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
const PointsTo& pts = getPts(node->getId());
|
|
581
|
+
SVFUtil::outs() << "\nNodeID " << node->getId() << " ";
|
|
582
|
+
if (pts.empty())
|
|
583
|
+
{
|
|
584
|
+
SVFUtil::outs() << "\t\tPointsTo: {empty}\n\n";
|
|
585
|
+
}
|
|
586
|
+
else
|
|
587
|
+
{
|
|
588
|
+
SVFUtil::outs() << "\t\tPointsTo: { ";
|
|
589
|
+
for (PointsTo::iterator it = pts.begin(), eit = pts.end(); it != eit; ++it)
|
|
590
|
+
SVFUtil::outs() << *it << " ";
|
|
591
|
+
SVFUtil::outs() << "}\n\n";
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
SVFUtil::outs().flush();
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
} // End namespace SVF
|
|
601
|
+
|
|
602
|
+
#endif /* INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_ */
|