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,295 @@
|
|
|
1
|
+
//===- VersionedFlowSensitive.h -- Versioned flow-sensitive pointer analysis --------//
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* VersionedFlowSensitiveAnalysis.h
|
|
5
|
+
*
|
|
6
|
+
* Created on: Jun 26, 2020
|
|
7
|
+
* Author: Mohamad Barbar
|
|
8
|
+
*
|
|
9
|
+
* The implementation is based on
|
|
10
|
+
* Mohamad Barbar, Yulei Sui and Shiping Chen. "Object Versioning for Flow-Sensitive Pointer Analysis".
|
|
11
|
+
* International Symposium on Code Generation and Optimization (CGO'21)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifndef VFS_H_
|
|
15
|
+
#define VFS_H_
|
|
16
|
+
|
|
17
|
+
#include "Graphs/SVFGOPT.h"
|
|
18
|
+
#include "MSSA/SVFGBuilder.h"
|
|
19
|
+
#include "WPA/FlowSensitive.h"
|
|
20
|
+
#include "WPA/WPAFSSolver.h"
|
|
21
|
+
#include "MemoryModel/PointsTo.h"
|
|
22
|
+
|
|
23
|
+
namespace SVF
|
|
24
|
+
{
|
|
25
|
+
|
|
26
|
+
class AndersenWaveDiff;
|
|
27
|
+
|
|
28
|
+
/*!
|
|
29
|
+
* Versioned flow sensitive whole program pointer analysis
|
|
30
|
+
*/
|
|
31
|
+
class VersionedFlowSensitive : public FlowSensitive
|
|
32
|
+
{
|
|
33
|
+
friend class VersionedFlowSensitiveStat;
|
|
34
|
+
|
|
35
|
+
private:
|
|
36
|
+
typedef CoreBitVector MeldVersion;
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
typedef Map<NodeID, Version> ObjToVersionMap;
|
|
40
|
+
typedef Map<VersionedVar, const DummyVersionPropSVFGNode *> VarToPropNodeMap;
|
|
41
|
+
|
|
42
|
+
typedef std::vector<ObjToVersionMap> LocVersionMap;
|
|
43
|
+
/// (o -> (v -> versions with rely on o:v).
|
|
44
|
+
typedef Map<NodeID, Map<Version, std::vector<Version>>> VersionRelianceMap;
|
|
45
|
+
|
|
46
|
+
/// If this version appears, there has been an error.
|
|
47
|
+
static const Version invalidVersion;
|
|
48
|
+
|
|
49
|
+
/// Return key into vPtD for address-taken var of a specific version.
|
|
50
|
+
static VersionedVar atKey(NodeID, Version);
|
|
51
|
+
|
|
52
|
+
/// Constructor
|
|
53
|
+
VersionedFlowSensitive(SVFIR *_pag, PTATY type = VFS_WPA);
|
|
54
|
+
|
|
55
|
+
/// Initialize analysis
|
|
56
|
+
virtual void initialize() override;
|
|
57
|
+
|
|
58
|
+
/// Finalize analysis
|
|
59
|
+
virtual void finalize() override;
|
|
60
|
+
|
|
61
|
+
/// Get PTA name
|
|
62
|
+
virtual const std::string PTAName() const override
|
|
63
|
+
{
|
|
64
|
+
return "VersionedFlowSensitive";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/// Methods to support type inquiry through isa, cast, and dyn_cast
|
|
68
|
+
//@{
|
|
69
|
+
static inline bool classof(const VersionedFlowSensitive *)
|
|
70
|
+
{
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
static inline bool classof(const PointerAnalysis *pta)
|
|
74
|
+
{
|
|
75
|
+
return pta->getAnalysisTy() == VFS_WPA;
|
|
76
|
+
}
|
|
77
|
+
//@}
|
|
78
|
+
|
|
79
|
+
/// Create single instance of versioned flow-sensitive points-to analysis.
|
|
80
|
+
static VersionedFlowSensitive *createVFSWPA(SVFIR *_pag)
|
|
81
|
+
{
|
|
82
|
+
if (vfspta == nullptr)
|
|
83
|
+
{
|
|
84
|
+
vfspta = new VersionedFlowSensitive(_pag);
|
|
85
|
+
vfspta->analyze();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return vfspta;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/// Release flow-sensitive pointer analysis
|
|
92
|
+
static void releaseVFSWPA()
|
|
93
|
+
{
|
|
94
|
+
if (vfspta) delete vfspta;
|
|
95
|
+
vfspta = nullptr;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
protected:
|
|
99
|
+
virtual bool processLoad(const LoadSVFGNode* load) override;
|
|
100
|
+
virtual bool processStore(const StoreSVFGNode* store) override;
|
|
101
|
+
virtual void processNode(NodeID n) override;
|
|
102
|
+
virtual void updateConnectedNodes(const SVFGEdgeSetTy& newEdges) override;
|
|
103
|
+
|
|
104
|
+
/// Override to do nothing. Instead, we will use propagateVersion when necessary.
|
|
105
|
+
virtual bool propAlongIndirectEdge(const IndirectSVFGEdge*) override
|
|
106
|
+
{
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/// Override since we want to assign different weights based on versioning.
|
|
111
|
+
virtual void cluster(void) override;
|
|
112
|
+
|
|
113
|
+
public:
|
|
114
|
+
/// Returns true if l is a store node.
|
|
115
|
+
virtual bool isStore(const NodeID l) const;
|
|
116
|
+
|
|
117
|
+
/// Returns true if l is a load node.
|
|
118
|
+
virtual bool isLoad(const NodeID l) const;
|
|
119
|
+
|
|
120
|
+
/// Shared code for getConsume and getYield. They wrap this function.
|
|
121
|
+
Version getVersion(const NodeID l, const NodeID o, const LocVersionMap &lvm) const;
|
|
122
|
+
|
|
123
|
+
/// Returns the consumed version of o at l. If no such version exists, returns invalidVersion.
|
|
124
|
+
Version getConsume(const NodeID l, const NodeID o) const;
|
|
125
|
+
|
|
126
|
+
/// Returns the yielded version of o at l. If no such version exists, returns invalidVersion.
|
|
127
|
+
Version getYield(const NodeID l, const NodeID o) const;
|
|
128
|
+
|
|
129
|
+
/// Returns the versions of o which rely on o:v.
|
|
130
|
+
std::vector<Version> &getReliantVersions(const NodeID o, const Version v);
|
|
131
|
+
|
|
132
|
+
/// Returns the statements which rely on o:v.
|
|
133
|
+
NodeBS &getStmtReliance(const NodeID o, const Version v);
|
|
134
|
+
|
|
135
|
+
/// Dumps versionReliance and stmtReliance.
|
|
136
|
+
void dumpReliances(void) const;
|
|
137
|
+
|
|
138
|
+
/// Dumps maps consume and yield.
|
|
139
|
+
void dumpLocVersionMaps(void) const;
|
|
140
|
+
|
|
141
|
+
void solveAndwritePtsToFile(const std::string& filename) override;
|
|
142
|
+
|
|
143
|
+
void writeVersionedAnalysisResultToFile(const std::string& filename);
|
|
144
|
+
|
|
145
|
+
void readVersionedAnalysisResultFromFile(std::ifstream& F);
|
|
146
|
+
|
|
147
|
+
void readPtsFromFile(const std::string& filename) override;
|
|
148
|
+
|
|
149
|
+
/// Dumps a MeldVersion to stdout.
|
|
150
|
+
static void dumpMeldVersion(MeldVersion &v);
|
|
151
|
+
|
|
152
|
+
private:
|
|
153
|
+
/// Prelabel the SVFG: set y(o) for stores and c(o) for delta nodes to a new version.
|
|
154
|
+
void prelabel(void);
|
|
155
|
+
/// Meld label the prelabeled SVFG.
|
|
156
|
+
void meldLabel(void);
|
|
157
|
+
/// Melds v2 into v1 (in place), returns whether a change occurred.
|
|
158
|
+
static bool meld(MeldVersion &mv1, const MeldVersion &mv2);
|
|
159
|
+
|
|
160
|
+
/// Removes all indirect edges in the SVFG.
|
|
161
|
+
void removeAllIndirectSVFGEdges(void);
|
|
162
|
+
|
|
163
|
+
/// Propagates version v of o to any version of o which relies on v when o/v is changed.
|
|
164
|
+
/// Recursively applies to reliant versions till no new changes are made.
|
|
165
|
+
/// Adds any statements which rely on any changes made to the worklist.
|
|
166
|
+
void propagateVersion(NodeID o, Version v);
|
|
167
|
+
|
|
168
|
+
/// Propagates version v of o to version vp of o. time indicates whether it should record time
|
|
169
|
+
/// taken itself.
|
|
170
|
+
void propagateVersion(const NodeID o, const Version v, const Version vp, bool time=true);
|
|
171
|
+
|
|
172
|
+
/// Fills in isStoreMap and isLoadMap.
|
|
173
|
+
virtual void buildIsStoreLoadMaps(void);
|
|
174
|
+
|
|
175
|
+
/// Fills in deltaMap and deltaSourceMap for the SVFG.
|
|
176
|
+
virtual void buildDeltaMaps(void);
|
|
177
|
+
|
|
178
|
+
/// Returns true if l is a delta node, i.e., may get a new incoming indirect
|
|
179
|
+
/// edge due to on-the-fly callgraph construction.
|
|
180
|
+
virtual bool delta(const NodeID l) const;
|
|
181
|
+
|
|
182
|
+
/// Returns true if l is a delta-source node, i.e., may get a new outgoing indirect
|
|
183
|
+
/// edge to a delta node due to on-the-fly callgraph construction.
|
|
184
|
+
virtual bool deltaSource(const NodeID l) const;
|
|
185
|
+
|
|
186
|
+
/// Shared code for setConsume and setYield. They wrap this function.
|
|
187
|
+
void setVersion(const NodeID l, const NodeID o, const Version v, LocVersionMap &lvm);
|
|
188
|
+
|
|
189
|
+
/// Sets the consumed version of o at l to v.
|
|
190
|
+
void setConsume(const NodeID l, const NodeID o, const Version v);
|
|
191
|
+
|
|
192
|
+
/// Sets the yielded version of o at l to v.
|
|
193
|
+
void setYield(const NodeID l, const NodeID o, const Version v);
|
|
194
|
+
|
|
195
|
+
/// Maps locations to objects to a version. The object version is what is
|
|
196
|
+
/// consumed at that location.
|
|
197
|
+
LocVersionMap consume;
|
|
198
|
+
/// Actual yield map. Yield analogue to consume.
|
|
199
|
+
LocVersionMap yield;
|
|
200
|
+
|
|
201
|
+
/// o -> (version -> versions which rely on it).
|
|
202
|
+
VersionRelianceMap versionReliance;
|
|
203
|
+
/// o x version -> statement nodes which rely on that o/version.
|
|
204
|
+
Map<NodeID, Map<Version, NodeBS>> stmtReliance;
|
|
205
|
+
|
|
206
|
+
/// Maps an <object, version> pair to the SVFG node indicating that pair
|
|
207
|
+
/// needs to be propagated.
|
|
208
|
+
VarToPropNodeMap versionedVarToPropNode;
|
|
209
|
+
|
|
210
|
+
// Maps an object o to o' if o is equivalent to o' with respect to
|
|
211
|
+
// versioning. Thus, we don't need to store the versions of o and look
|
|
212
|
+
// up those for o' instead.
|
|
213
|
+
Map<NodeID, NodeID> equivalentObject;
|
|
214
|
+
|
|
215
|
+
/// Worklist for performing meld labeling, takes SVFG node l.
|
|
216
|
+
/// Nodes are added when the version they yield is changed.
|
|
217
|
+
FIFOWorkList<NodeID> vWorklist;
|
|
218
|
+
|
|
219
|
+
Set<NodeID> prelabeledObjects;
|
|
220
|
+
|
|
221
|
+
/// Points-to DS for working with versions.
|
|
222
|
+
BVDataPTAImpl::VersionedPTDataTy *vPtD;
|
|
223
|
+
|
|
224
|
+
/// deltaMap[l] means SVFG node l is a delta node, i.e., may get new
|
|
225
|
+
/// incoming edges due to OTF callgraph construction.
|
|
226
|
+
std::vector<bool> deltaMap;
|
|
227
|
+
|
|
228
|
+
/// deltaSourceMap[l] means SVFG node l *may* be a source to a delta node
|
|
229
|
+
/// through an dge added as a result of on-the-fly callgraph
|
|
230
|
+
/// construction.
|
|
231
|
+
std::vector<bool> deltaSourceMap;
|
|
232
|
+
|
|
233
|
+
/// isStoreMap[l] means SVFG node l is a store node.
|
|
234
|
+
std::vector<bool> isStoreMap;
|
|
235
|
+
|
|
236
|
+
/// isLoadMap[l] means SVFG node l is a load node.
|
|
237
|
+
std::vector<bool> isLoadMap;
|
|
238
|
+
|
|
239
|
+
/// Additional statistics.
|
|
240
|
+
//@{
|
|
241
|
+
u32_t numPrelabeledNodes; ///< Number of prelabeled nodes.
|
|
242
|
+
u32_t numPrelabelVersions; ///< Number of versions created during prelabeling.
|
|
243
|
+
|
|
244
|
+
double prelabelingTime; ///< Time to prelabel SVFG.
|
|
245
|
+
double meldLabelingTime; ///< Time to meld label SVFG.
|
|
246
|
+
double versionPropTime; ///< Time to propagate versions to versions which rely on them.
|
|
247
|
+
//@}
|
|
248
|
+
|
|
249
|
+
static VersionedFlowSensitive *vfspta;
|
|
250
|
+
|
|
251
|
+
class SCC
|
|
252
|
+
{
|
|
253
|
+
private:
|
|
254
|
+
typedef struct NodeData
|
|
255
|
+
{
|
|
256
|
+
int index;
|
|
257
|
+
int lowlink;
|
|
258
|
+
bool onStack;
|
|
259
|
+
} NodeData;
|
|
260
|
+
|
|
261
|
+
public:
|
|
262
|
+
/// Determines the strongly connected components of svfg following only
|
|
263
|
+
/// edges labelled with object. partOf[n] = scc means nodes n is part of
|
|
264
|
+
/// SCC scc. startingNodes contains the nodes to begin the search from.
|
|
265
|
+
/// After completion, footprint will contain all edges which object
|
|
266
|
+
/// appears on (as reached through the algorithm described above) sorted.
|
|
267
|
+
///
|
|
268
|
+
/// This is not a general SCC detection but specifically for versioning,
|
|
269
|
+
/// so edges to delta nodes are skipped as they are prelabelled. Edges
|
|
270
|
+
/// to stores are also skipped to as they yield a new version (they
|
|
271
|
+
/// cannot be part of an SCC containing more than themselves).
|
|
272
|
+
/// Skipped edges still form part of the footprint.
|
|
273
|
+
static unsigned detectSCCs(VersionedFlowSensitive *vfs,
|
|
274
|
+
const SVFG *svfg, const NodeID object,
|
|
275
|
+
const std::vector<const SVFGNode *> &startingNodes,
|
|
276
|
+
std::vector<int> &partOf,
|
|
277
|
+
std::vector<const IndirectSVFGEdge *> &footprint);
|
|
278
|
+
|
|
279
|
+
private:
|
|
280
|
+
/// Called by detectSCCs then called recursively.
|
|
281
|
+
static void visit(VersionedFlowSensitive *vfs,
|
|
282
|
+
const NodeID object,
|
|
283
|
+
std::vector<int> &partOf,
|
|
284
|
+
std::vector<const IndirectSVFGEdge *> &footprint,
|
|
285
|
+
std::vector<NodeData> &nodeData,
|
|
286
|
+
std::stack<const SVFGNode *> &stack,
|
|
287
|
+
int &index,
|
|
288
|
+
int ¤tSCC,
|
|
289
|
+
const SVFGNode *v);
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
} // End namespace SVF
|
|
294
|
+
|
|
295
|
+
#endif /* VFS_H_ */
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
//===- WPAFSSolver.h -- WPA flow-sensitive solver-----------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2017> <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
|
+
* @file: WPAFSSolver.h
|
|
25
|
+
* @author: yesen
|
|
26
|
+
* @date: 14/02/2014
|
|
27
|
+
* @version: 1.0
|
|
28
|
+
*
|
|
29
|
+
* @section LICENSE
|
|
30
|
+
*
|
|
31
|
+
* @section DESCRIPTION
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#ifndef WPAFSSOLVER_H_
|
|
37
|
+
#define WPAFSSOLVER_H_
|
|
38
|
+
|
|
39
|
+
#include "WPA/WPASolver.h"
|
|
40
|
+
|
|
41
|
+
namespace SVF
|
|
42
|
+
{
|
|
43
|
+
|
|
44
|
+
/*!
|
|
45
|
+
* Flow-sensitive Solver
|
|
46
|
+
*/
|
|
47
|
+
template<class GraphType>
|
|
48
|
+
class WPAFSSolver : public WPASolver<GraphType>
|
|
49
|
+
{
|
|
50
|
+
public:
|
|
51
|
+
/// Constructor
|
|
52
|
+
WPAFSSolver() : WPASolver<GraphType>()
|
|
53
|
+
{}
|
|
54
|
+
/// Destructor
|
|
55
|
+
virtual ~WPAFSSolver() {}
|
|
56
|
+
|
|
57
|
+
/// SCC methods
|
|
58
|
+
virtual inline NodeID sccRepNode(NodeID id) const
|
|
59
|
+
{
|
|
60
|
+
return id;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
protected:
|
|
64
|
+
NodeStack nodeStack; ///< stack used for processing nodes.
|
|
65
|
+
|
|
66
|
+
/// SCC detection
|
|
67
|
+
virtual NodeStack& SCCDetect()
|
|
68
|
+
{
|
|
69
|
+
/// SCC detection
|
|
70
|
+
this->getSCCDetector()->find();
|
|
71
|
+
|
|
72
|
+
assert(nodeStack.empty() && "node stack is not empty, some nodes are not popped properly.");
|
|
73
|
+
|
|
74
|
+
/// Both rep and sub nodes need to be processed later.
|
|
75
|
+
/// Collect sub nodes from SCCDetector.
|
|
76
|
+
FIFOWorkList<NodeID> revTopoStack = this->getSCCDetector()->revTopoNodeStack();
|
|
77
|
+
while (!revTopoStack.empty())
|
|
78
|
+
{
|
|
79
|
+
NodeID nodeId = revTopoStack.front();
|
|
80
|
+
revTopoStack.pop();
|
|
81
|
+
const NodeBS& subNodes = this->getSCCDetector()->subNodes(nodeId);
|
|
82
|
+
for (NodeBS::iterator it = subNodes.begin(), eit = subNodes.end(); it != eit; ++it)
|
|
83
|
+
{
|
|
84
|
+
/// restore the topological order.
|
|
85
|
+
nodeStack.push(*it);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return nodeStack;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/*!
|
|
96
|
+
* Solver based on SCC cycles.
|
|
97
|
+
*/
|
|
98
|
+
template<class GraphType>
|
|
99
|
+
class WPASCCSolver : public WPAFSSolver<GraphType>
|
|
100
|
+
{
|
|
101
|
+
public:
|
|
102
|
+
typedef typename WPASolver<GraphType>::GTraits GTraits;
|
|
103
|
+
typedef typename WPASolver<GraphType>::GNODE GNODE;
|
|
104
|
+
typedef typename WPASolver<GraphType>::child_iterator child_iterator;
|
|
105
|
+
|
|
106
|
+
WPASCCSolver() : WPAFSSolver<GraphType>() {}
|
|
107
|
+
|
|
108
|
+
virtual ~WPASCCSolver() {}
|
|
109
|
+
|
|
110
|
+
protected:
|
|
111
|
+
virtual void solve()
|
|
112
|
+
{
|
|
113
|
+
/// All nodes will be solved afterwards, so the worklist
|
|
114
|
+
/// can be cleared before each solve iteration.
|
|
115
|
+
while (!this->isWorklistEmpty())
|
|
116
|
+
this->popFromWorklist();
|
|
117
|
+
|
|
118
|
+
NodeStack& nodeStack = this->SCCDetect();
|
|
119
|
+
|
|
120
|
+
while (!nodeStack.empty())
|
|
121
|
+
{
|
|
122
|
+
NodeID rep = nodeStack.top();
|
|
123
|
+
nodeStack.pop();
|
|
124
|
+
|
|
125
|
+
setCurrentSCC(rep);
|
|
126
|
+
|
|
127
|
+
const NodeBS& sccNodes = this->getSCCDetector()->subNodes(rep);
|
|
128
|
+
for (NodeBS::iterator it = sccNodes.begin(), eit = sccNodes.end(); it != eit; ++it)
|
|
129
|
+
this->pushIntoWorklist(*it);
|
|
130
|
+
|
|
131
|
+
while (!this->isWorklistEmpty())
|
|
132
|
+
this->processNode(this->popFromWorklist());
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/// Propagation for the solving, to be implemented in the child class
|
|
137
|
+
virtual void propagate(GNODE* v)
|
|
138
|
+
{
|
|
139
|
+
child_iterator EI = GTraits::direct_child_begin(v);
|
|
140
|
+
child_iterator EE = GTraits::direct_child_end(v);
|
|
141
|
+
for (; EI != EE; ++EI)
|
|
142
|
+
{
|
|
143
|
+
if (this->propFromSrcToDst(*(EI.getCurrent())))
|
|
144
|
+
addNodeIntoWorkList(this->Node_Index(*EI));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
virtual inline void addNodeIntoWorkList(NodeID node)
|
|
149
|
+
{
|
|
150
|
+
if (isInCurrentSCC(node))
|
|
151
|
+
this->pushIntoWorklist(node);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
inline bool isInCurrentSCC(NodeID node)
|
|
155
|
+
{
|
|
156
|
+
return (const_cast<NodeBS&>(this->getSCCDetector()->subNodes(curSCCID))).test(node);
|
|
157
|
+
}
|
|
158
|
+
inline void setCurrentSCC(NodeID id)
|
|
159
|
+
{
|
|
160
|
+
curSCCID = this->getSCCDetector()->repNode(id);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
NodeID curSCCID; ///< index of current SCC.
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
/*!
|
|
169
|
+
* Only solve nodes which need to be analyzed.
|
|
170
|
+
*/
|
|
171
|
+
template<class GraphType>
|
|
172
|
+
class WPAMinimumSolver : public WPASCCSolver<GraphType>
|
|
173
|
+
{
|
|
174
|
+
public:
|
|
175
|
+
typedef typename WPASolver<GraphType>::GTraits GTraits;
|
|
176
|
+
typedef typename WPASolver<GraphType>::GNODE GNODE;
|
|
177
|
+
typedef typename WPASolver<GraphType>::child_iterator child_iterator;
|
|
178
|
+
|
|
179
|
+
WPAMinimumSolver() : WPASCCSolver<GraphType>() {}
|
|
180
|
+
|
|
181
|
+
virtual ~WPAMinimumSolver() {}
|
|
182
|
+
|
|
183
|
+
protected:
|
|
184
|
+
virtual void solve()
|
|
185
|
+
{
|
|
186
|
+
bool solveAll = true;
|
|
187
|
+
/// If the worklist is not empty, then only solve these nodes contained in
|
|
188
|
+
/// worklist. Otherwise all nodes in the graph will be processed.
|
|
189
|
+
if (!this->isWorklistEmpty())
|
|
190
|
+
{
|
|
191
|
+
solveAll = false;
|
|
192
|
+
while (!this->isWorklistEmpty())
|
|
193
|
+
addNewCandidate(this->popFromWorklist());
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
NodeStack& nodeStack = this->SCCDetect();
|
|
197
|
+
|
|
198
|
+
while (!nodeStack.empty())
|
|
199
|
+
{
|
|
200
|
+
NodeID rep = nodeStack.top();
|
|
201
|
+
nodeStack.pop();
|
|
202
|
+
|
|
203
|
+
this->setCurrentSCC(rep);
|
|
204
|
+
|
|
205
|
+
NodeBS sccNodes = this->getSCCDetector()->subNodes(rep);
|
|
206
|
+
if (solveAll == false)
|
|
207
|
+
sccNodes &= getCandidates(); /// get nodes which need to be processed in this SCC cycle
|
|
208
|
+
|
|
209
|
+
for (NodeBS::iterator it = sccNodes.begin(), eit = sccNodes.end(); it != eit; ++it)
|
|
210
|
+
this->pushIntoWorklist(*it);
|
|
211
|
+
|
|
212
|
+
while (!this->isWorklistEmpty())
|
|
213
|
+
this->processNode(this->popFromWorklist());
|
|
214
|
+
|
|
215
|
+
removeCandidates(sccNodes); /// remove nodes which have been processed from the candidate set
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
virtual inline void addNodeIntoWorkList(NodeID node)
|
|
220
|
+
{
|
|
221
|
+
if (this->isInCurrentSCC(node))
|
|
222
|
+
this->pushIntoWorklist(node);
|
|
223
|
+
else
|
|
224
|
+
addNewCandidate(node);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
private:
|
|
228
|
+
inline void addNewCandidate(NodeID node)
|
|
229
|
+
{
|
|
230
|
+
candidates.set(node);
|
|
231
|
+
}
|
|
232
|
+
inline const NodeBS& getCandidates() const
|
|
233
|
+
{
|
|
234
|
+
return candidates;
|
|
235
|
+
}
|
|
236
|
+
inline void removeCandidates(const NodeBS& nodes)
|
|
237
|
+
{
|
|
238
|
+
candidates.intersectWithComplement(nodes);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
NodeBS candidates; ///< nodes which need to be analyzed in current iteration.
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
} // End namespace SVF
|
|
245
|
+
|
|
246
|
+
#endif /* WPAFSSOLVER_H_ */
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//===- WPAPass.h -- Whole program analysis------------------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2017> <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
|
+
/*
|
|
25
|
+
* @file: WPA.h
|
|
26
|
+
* @author: yesen
|
|
27
|
+
* @date: 10/06/2014
|
|
28
|
+
* @version: 1.0
|
|
29
|
+
*
|
|
30
|
+
* @section LICENSE
|
|
31
|
+
*
|
|
32
|
+
* @section DESCRIPTION
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#ifndef WPA_H_
|
|
38
|
+
#define WPA_H_
|
|
39
|
+
|
|
40
|
+
#include "MemoryModel/PointerAnalysisImpl.h"
|
|
41
|
+
|
|
42
|
+
namespace SVF
|
|
43
|
+
{
|
|
44
|
+
|
|
45
|
+
class SVFG;
|
|
46
|
+
|
|
47
|
+
/*!
|
|
48
|
+
* Whole program pointer analysis.
|
|
49
|
+
* This class performs various pointer analysis on the given module.
|
|
50
|
+
*/
|
|
51
|
+
// excised ", public llvm::AliasAnalysis" as that has a very light interface
|
|
52
|
+
// and I want to see what breaks.
|
|
53
|
+
class WPAPass
|
|
54
|
+
{
|
|
55
|
+
typedef std::vector<PointerAnalysis*> PTAVector;
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
/// Pass ID
|
|
59
|
+
static char ID;
|
|
60
|
+
|
|
61
|
+
enum AliasCheckRule
|
|
62
|
+
{
|
|
63
|
+
Conservative, ///< return MayAlias if any pta says alias
|
|
64
|
+
Veto, ///< return NoAlias if any pta says no alias
|
|
65
|
+
Precise ///< return alias result by the most precise pta
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/// Constructor needs TargetLibraryInfo to be passed to the AliasAnalysis
|
|
69
|
+
WPAPass()
|
|
70
|
+
{
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// Destructor
|
|
75
|
+
virtual ~WPAPass();
|
|
76
|
+
|
|
77
|
+
/// Retrieve points-to set information
|
|
78
|
+
virtual const PointsTo& getPts(NodeID var);
|
|
79
|
+
|
|
80
|
+
/// Print all alias pairs
|
|
81
|
+
virtual void PrintAliasPairs(PointerAnalysis* pta);
|
|
82
|
+
|
|
83
|
+
/// Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref any memory location
|
|
84
|
+
virtual ModRefInfo getModRefInfo(const CallICFGNode* callInst);
|
|
85
|
+
|
|
86
|
+
/// Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref a specific memory location, given Location infos
|
|
87
|
+
// virtual inline ModRefInfo getModRefInfo(const CallSite callInst, const MemoryLocation& Loc)
|
|
88
|
+
// {
|
|
89
|
+
// return getModRefInfo(callInst, Loc.Ptr);
|
|
90
|
+
// }
|
|
91
|
+
|
|
92
|
+
/// Interface of mod-ref analysis between two CallSite instructions
|
|
93
|
+
virtual ModRefInfo getModRefInfo(const CallICFGNode* callInst1, const CallICFGNode* callInst2);
|
|
94
|
+
|
|
95
|
+
/// Run pointer analysis on SVFModule
|
|
96
|
+
virtual void runOnModule(SVFIR* svfModule);
|
|
97
|
+
|
|
98
|
+
/// PTA name
|
|
99
|
+
virtual inline std::string getPassName() const
|
|
100
|
+
{
|
|
101
|
+
return "WPAPass";
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private:
|
|
105
|
+
/// Create pointer analysis according to specified kind and analyze the module.
|
|
106
|
+
void runPointerAnalysis(SVFIR* pag, u32_t kind);
|
|
107
|
+
|
|
108
|
+
PTAVector ptaVector; ///< all pointer analysis to be executed.
|
|
109
|
+
PointerAnalysis* _pta; ///< pointer analysis to be executed.
|
|
110
|
+
SVFG* _svfg; ///< svfg generated through -ander pointer analysis
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
} // End namespace SVF
|
|
114
|
+
|
|
115
|
+
#endif /* WPA_H_ */
|