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,425 @@
|
|
|
1
|
+
//===- AbstractExeState.h ----Interval Domain-------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2022> <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
|
+
* IntervalExeState.h
|
|
24
|
+
*
|
|
25
|
+
* Created on: Jul 9, 2022
|
|
26
|
+
* Author: Xiao Cheng, Jiawei Wang
|
|
27
|
+
*
|
|
28
|
+
* [-oo,+oo]
|
|
29
|
+
* / / \ \
|
|
30
|
+
* [-oo,1] ... [-oo,10] ... [-1,+oo] ... [0,+oo]
|
|
31
|
+
* \ \ / /
|
|
32
|
+
* \ [-1,10] /
|
|
33
|
+
* \ / \ /
|
|
34
|
+
* ... [-1,1] ... [0,10] ...
|
|
35
|
+
* \ | \ / \ /
|
|
36
|
+
* ... [-1,0] [0,1] ... [1,9] ...
|
|
37
|
+
* \ | \ | \ /
|
|
38
|
+
* ... [-1,-1] [0,0] [1,1] ...
|
|
39
|
+
* \ \ \ / /
|
|
40
|
+
* ⊥
|
|
41
|
+
*/
|
|
42
|
+
// The implementation is based on
|
|
43
|
+
// Xiao Cheng, Jiawei Wang and Yulei Sui. Precise Sparse Abstract Execution via Cross-Domain Interaction.
|
|
44
|
+
// 46th International Conference on Software Engineering. (ICSE24)
|
|
45
|
+
|
|
46
|
+
#ifndef Z3_EXAMPLE_INTERVAL_DOMAIN_H
|
|
47
|
+
#define Z3_EXAMPLE_INTERVAL_DOMAIN_H
|
|
48
|
+
|
|
49
|
+
#include "AE/Core/AbstractValue.h"
|
|
50
|
+
#include "AE/Core/IntervalValue.h"
|
|
51
|
+
#include "SVFIR/SVFVariables.h"
|
|
52
|
+
#include "Util/Z3Expr.h"
|
|
53
|
+
|
|
54
|
+
#include <iomanip>
|
|
55
|
+
|
|
56
|
+
namespace SVF
|
|
57
|
+
{
|
|
58
|
+
class AbstractState
|
|
59
|
+
{
|
|
60
|
+
friend class SVFIR2AbsState;
|
|
61
|
+
friend class RelationSolver;
|
|
62
|
+
public:
|
|
63
|
+
typedef Map<u32_t, AbstractValue> VarToAbsValMap;
|
|
64
|
+
typedef VarToAbsValMap AddrToAbsValMap;
|
|
65
|
+
Set<NodeID> _freedAddrs;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
public:
|
|
69
|
+
/// default constructor
|
|
70
|
+
AbstractState()
|
|
71
|
+
{
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
AbstractState(VarToAbsValMap&_varToValMap, AddrToAbsValMap&_locToValMap) : _varToAbsVal(_varToValMap), _addrToAbsVal(_locToValMap) {}
|
|
75
|
+
|
|
76
|
+
/// copy constructor
|
|
77
|
+
AbstractState(const AbstractState&rhs) : _freedAddrs(rhs._freedAddrs), _varToAbsVal(rhs.getVarToVal()), _addrToAbsVal(rhs.getLocToVal())
|
|
78
|
+
{
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
virtual ~AbstractState() = default;
|
|
83
|
+
|
|
84
|
+
// getGepObjAddrs
|
|
85
|
+
AddressValue getGepObjAddrs(u32_t pointer, IntervalValue offset);
|
|
86
|
+
|
|
87
|
+
// initObjVar
|
|
88
|
+
void initObjVar(ObjVar* objVar);
|
|
89
|
+
// getElementIndex
|
|
90
|
+
IntervalValue getElementIndex(const GepStmt* gep);
|
|
91
|
+
// getByteOffset
|
|
92
|
+
IntervalValue getByteOffset(const GepStmt* gep);
|
|
93
|
+
// printAbstractState
|
|
94
|
+
// loadValue
|
|
95
|
+
AbstractValue loadValue(NodeID varId);
|
|
96
|
+
// storeValue
|
|
97
|
+
void storeValue(NodeID varId, AbstractValue val);
|
|
98
|
+
|
|
99
|
+
u32_t getAllocaInstByteSize(const AddrStmt *addr);
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/// The physical address starts with 0x7f...... + idx
|
|
103
|
+
static inline u32_t getVirtualMemAddress(u32_t idx)
|
|
104
|
+
{
|
|
105
|
+
return AddressValue::getVirtualMemAddress(idx);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/// Check bit value of val start with 0x7F000000, filter by 0xFF000000
|
|
109
|
+
static inline bool isVirtualMemAddress(u32_t val)
|
|
110
|
+
{
|
|
111
|
+
return AddressValue::isVirtualMemAddress(val);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/// Return the internal index if addr is an address otherwise return the value of idx
|
|
115
|
+
inline u32_t getIDFromAddr(u32_t addr)
|
|
116
|
+
{
|
|
117
|
+
return _freedAddrs.count(addr) ? AddressValue::getInternalID(InvalidMemAddr) : AddressValue::getInternalID(addr);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
AbstractState&operator=(const AbstractState&rhs)
|
|
121
|
+
{
|
|
122
|
+
if (rhs != *this)
|
|
123
|
+
{
|
|
124
|
+
_varToAbsVal = rhs._varToAbsVal;
|
|
125
|
+
_addrToAbsVal = rhs._addrToAbsVal;
|
|
126
|
+
_freedAddrs = rhs._freedAddrs;
|
|
127
|
+
}
|
|
128
|
+
return *this;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/// move constructor
|
|
132
|
+
AbstractState(AbstractState&&rhs) : _varToAbsVal(std::move(rhs._varToAbsVal)),
|
|
133
|
+
_addrToAbsVal(std::move(rhs._addrToAbsVal))
|
|
134
|
+
{
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/// operator= move constructor
|
|
139
|
+
AbstractState&operator=(AbstractState&&rhs)
|
|
140
|
+
{
|
|
141
|
+
if (&rhs != this)
|
|
142
|
+
{
|
|
143
|
+
_varToAbsVal = std::move(rhs._varToAbsVal);
|
|
144
|
+
_addrToAbsVal = std::move(rhs._addrToAbsVal);
|
|
145
|
+
_freedAddrs = std::move(rhs._freedAddrs);
|
|
146
|
+
}
|
|
147
|
+
return *this;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/// Set all value bottom
|
|
151
|
+
AbstractState bottom() const
|
|
152
|
+
{
|
|
153
|
+
AbstractState inv = *this;
|
|
154
|
+
for (auto &item: inv._varToAbsVal)
|
|
155
|
+
{
|
|
156
|
+
if (item.second.isInterval())
|
|
157
|
+
item.second.getInterval().set_to_bottom();
|
|
158
|
+
}
|
|
159
|
+
return inv;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// Set all value top
|
|
163
|
+
AbstractState top() const
|
|
164
|
+
{
|
|
165
|
+
AbstractState inv = *this;
|
|
166
|
+
for (auto &item: inv._varToAbsVal)
|
|
167
|
+
{
|
|
168
|
+
if (item.second.isInterval())
|
|
169
|
+
item.second.getInterval().set_to_top();
|
|
170
|
+
}
|
|
171
|
+
return inv;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/// Copy some values and return a new IntervalExeState
|
|
175
|
+
AbstractState sliceState(Set<u32_t> &sl)
|
|
176
|
+
{
|
|
177
|
+
AbstractState inv;
|
|
178
|
+
for (u32_t id: sl)
|
|
179
|
+
{
|
|
180
|
+
inv._varToAbsVal[id] = _varToAbsVal[id];
|
|
181
|
+
}
|
|
182
|
+
return inv;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
static inline bool isNullMem(u32_t addr)
|
|
186
|
+
{
|
|
187
|
+
return AddressValue::getInternalID(addr) == NullMemAddr;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
static inline bool isInvalidMem(u32_t addr)
|
|
191
|
+
{
|
|
192
|
+
return AddressValue::getInternalID(addr) == InvalidMemAddr;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
protected:
|
|
197
|
+
VarToAbsValMap _varToAbsVal; ///< Map a variable (symbol) to its abstract value
|
|
198
|
+
AddrToAbsValMap
|
|
199
|
+
_addrToAbsVal; ///< Map a memory address to its stored abstract value
|
|
200
|
+
|
|
201
|
+
public:
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
/// get abstract value of variable
|
|
205
|
+
inline virtual AbstractValue &operator[](u32_t varId)
|
|
206
|
+
{
|
|
207
|
+
return _varToAbsVal[varId];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/// get abstract value of variable
|
|
211
|
+
inline virtual const AbstractValue &operator[](u32_t varId) const
|
|
212
|
+
{
|
|
213
|
+
return _varToAbsVal.at(varId);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/// whether the variable is in varToAddrs table
|
|
217
|
+
inline bool inVarToAddrsTable(u32_t id) const
|
|
218
|
+
{
|
|
219
|
+
if (_varToAbsVal.find(id)!= _varToAbsVal.end())
|
|
220
|
+
{
|
|
221
|
+
if (_varToAbsVal.at(id).isAddr())
|
|
222
|
+
{
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/// whether the variable is in varToVal table
|
|
230
|
+
inline virtual bool inVarToValTable(u32_t id) const
|
|
231
|
+
{
|
|
232
|
+
if (_varToAbsVal.find(id) != _varToAbsVal.end())
|
|
233
|
+
{
|
|
234
|
+
if (_varToAbsVal.at(id).isInterval())
|
|
235
|
+
{
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/// whether the memory address stores memory addresses
|
|
243
|
+
inline bool inAddrToAddrsTable(u32_t id) const
|
|
244
|
+
{
|
|
245
|
+
if (_addrToAbsVal.find(id)!= _addrToAbsVal.end())
|
|
246
|
+
{
|
|
247
|
+
if (_addrToAbsVal.at(id).isAddr())
|
|
248
|
+
{
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/// whether the memory address stores abstract value
|
|
256
|
+
inline virtual bool inAddrToValTable(u32_t id) const
|
|
257
|
+
{
|
|
258
|
+
if (_addrToAbsVal.find(id) != _addrToAbsVal.end())
|
|
259
|
+
{
|
|
260
|
+
if (_addrToAbsVal.at(id).isInterval())
|
|
261
|
+
{
|
|
262
|
+
return true;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/// get var2val map
|
|
269
|
+
const VarToAbsValMap&getVarToVal() const
|
|
270
|
+
{
|
|
271
|
+
return _varToAbsVal;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/// get loc2val map
|
|
275
|
+
const AddrToAbsValMap&getLocToVal() const
|
|
276
|
+
{
|
|
277
|
+
return _addrToAbsVal;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
public:
|
|
281
|
+
|
|
282
|
+
/// domain widen with other, and return the widened domain
|
|
283
|
+
AbstractState widening(const AbstractState&other);
|
|
284
|
+
|
|
285
|
+
/// domain narrow with other, and return the narrowed domain
|
|
286
|
+
AbstractState narrowing(const AbstractState&other);
|
|
287
|
+
|
|
288
|
+
/// domain join with other, important! other widen this.
|
|
289
|
+
void joinWith(const AbstractState&other);
|
|
290
|
+
|
|
291
|
+
/// domain meet with other, important! other widen this.
|
|
292
|
+
void meetWith(const AbstractState&other);
|
|
293
|
+
|
|
294
|
+
void addToFreedAddrs(NodeID addr)
|
|
295
|
+
{
|
|
296
|
+
_freedAddrs.insert(addr);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
bool isFreedMem(u32_t addr) const
|
|
300
|
+
{
|
|
301
|
+
return _freedAddrs.find(addr) != _freedAddrs.end();
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* if this NodeID in SVFIR is a pointer, get the pointee type
|
|
307
|
+
* e.g arr = (int*) malloc(10*sizeof(int))
|
|
308
|
+
* getPointeeType(arr) -> return int
|
|
309
|
+
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
310
|
+
* @param call callnode of memset like api
|
|
311
|
+
*/
|
|
312
|
+
const SVFType* getPointeeElement(NodeID id);
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
u32_t hash() const;
|
|
316
|
+
|
|
317
|
+
public:
|
|
318
|
+
inline void store(u32_t addr, const AbstractValue &val)
|
|
319
|
+
{
|
|
320
|
+
assert(isVirtualMemAddress(addr) && "not virtual address?");
|
|
321
|
+
u32_t objId = getIDFromAddr(addr);
|
|
322
|
+
if (isNullMem(addr)) return;
|
|
323
|
+
_addrToAbsVal[objId] = val;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
inline virtual AbstractValue &load(u32_t addr)
|
|
327
|
+
{
|
|
328
|
+
assert(isVirtualMemAddress(addr) && "not virtual address?");
|
|
329
|
+
u32_t objId = getIDFromAddr(addr);
|
|
330
|
+
return _addrToAbsVal[objId];
|
|
331
|
+
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
void printAbstractState() const;
|
|
335
|
+
|
|
336
|
+
std::string toString() const
|
|
337
|
+
{
|
|
338
|
+
return "";
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
bool equals(const AbstractState&other) const;
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
static bool eqVarToValMap(const VarToAbsValMap&lhs, const VarToAbsValMap&rhs)
|
|
345
|
+
{
|
|
346
|
+
if (lhs.size() != rhs.size()) return false;
|
|
347
|
+
for (const auto &item: lhs)
|
|
348
|
+
{
|
|
349
|
+
auto it = rhs.find(item.first);
|
|
350
|
+
if (it == rhs.end())
|
|
351
|
+
return false;
|
|
352
|
+
if (!item.second.equals(it->second))
|
|
353
|
+
return false;
|
|
354
|
+
else
|
|
355
|
+
{
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
static bool lessThanVarToValMap(const VarToAbsValMap&lhs, const VarToAbsValMap&rhs)
|
|
362
|
+
{
|
|
363
|
+
if (lhs.empty()) return !rhs.empty();
|
|
364
|
+
for (const auto &item: lhs)
|
|
365
|
+
{
|
|
366
|
+
auto it = rhs.find(item.first);
|
|
367
|
+
if (it == rhs.end()) return false;
|
|
368
|
+
// judge from expr id
|
|
369
|
+
if (item.second.getInterval().contain(it->second.getInterval())) return false;
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// lhs >= rhs
|
|
375
|
+
static bool geqVarToValMap(const VarToAbsValMap&lhs, const VarToAbsValMap&rhs)
|
|
376
|
+
{
|
|
377
|
+
if (rhs.empty()) return true;
|
|
378
|
+
for (const auto &item: rhs)
|
|
379
|
+
{
|
|
380
|
+
auto it = lhs.find(item.first);
|
|
381
|
+
if (it == lhs.end()) return false;
|
|
382
|
+
// judge from expr id
|
|
383
|
+
if (!it->second.getInterval().contain(
|
|
384
|
+
item.second.getInterval()))
|
|
385
|
+
return false;
|
|
386
|
+
|
|
387
|
+
}
|
|
388
|
+
return true;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
bool operator==(const AbstractState&rhs) const
|
|
392
|
+
{
|
|
393
|
+
return eqVarToValMap(_varToAbsVal, rhs.getVarToVal()) &&
|
|
394
|
+
eqVarToValMap(_addrToAbsVal, rhs.getLocToVal());
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
bool operator!=(const AbstractState&rhs) const
|
|
398
|
+
{
|
|
399
|
+
return !(*this == rhs);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
bool operator<(const AbstractState&rhs) const
|
|
403
|
+
{
|
|
404
|
+
return !(*this >= rhs);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
bool operator>=(const AbstractState&rhs) const
|
|
409
|
+
{
|
|
410
|
+
return geqVarToValMap(_varToAbsVal, rhs.getVarToVal()) && geqVarToValMap(_addrToAbsVal, rhs.getLocToVal());
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
void clear()
|
|
414
|
+
{
|
|
415
|
+
_addrToAbsVal.clear();
|
|
416
|
+
_varToAbsVal.clear();
|
|
417
|
+
_freedAddrs.clear();
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
#endif //Z3_EXAMPLE_INTERVAL_DOMAIN_H
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
//===- AbstractValue.h ----AbstractValue-------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2022> <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
|
+
// The implementation is based on
|
|
24
|
+
// Xiao Cheng, Jiawei Wang and Yulei Sui. Precise Sparse Abstract Execution via Cross-Domain Interaction.
|
|
25
|
+
// 46th International Conference on Software Engineering. (ICSE24)
|
|
26
|
+
|
|
27
|
+
#include "AE/Core/IntervalValue.h"
|
|
28
|
+
#include "AE/Core/AddressValue.h"
|
|
29
|
+
#include "Util/SVFUtil.h"
|
|
30
|
+
|
|
31
|
+
namespace SVF
|
|
32
|
+
{
|
|
33
|
+
|
|
34
|
+
class AbstractValue
|
|
35
|
+
{
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
IntervalValue interval;
|
|
39
|
+
AddressValue addrs;
|
|
40
|
+
|
|
41
|
+
AbstractValue()
|
|
42
|
+
{
|
|
43
|
+
interval = IntervalValue::bottom();
|
|
44
|
+
addrs = AddressValue();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
AbstractValue(const AbstractValue& other)
|
|
48
|
+
{
|
|
49
|
+
interval = other.interval;
|
|
50
|
+
addrs = other.addrs;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
inline bool isInterval() const
|
|
54
|
+
{
|
|
55
|
+
return !interval.isBottom();
|
|
56
|
+
}
|
|
57
|
+
inline bool isAddr() const
|
|
58
|
+
{
|
|
59
|
+
return !addrs.isBottom();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
AbstractValue(AbstractValue &&other)
|
|
63
|
+
{
|
|
64
|
+
interval = SVFUtil::move(other.interval);
|
|
65
|
+
addrs = SVFUtil::move(other.addrs);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// operator overload, supporting both interval and address
|
|
69
|
+
AbstractValue& operator=(const AbstractValue& other)
|
|
70
|
+
{
|
|
71
|
+
interval = other.interval;
|
|
72
|
+
addrs = other.addrs;
|
|
73
|
+
return *this;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
AbstractValue& operator=(const AbstractValue&& other)
|
|
77
|
+
{
|
|
78
|
+
interval = SVFUtil::move(other.interval);
|
|
79
|
+
addrs = SVFUtil::move(other.addrs);
|
|
80
|
+
return *this;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
AbstractValue& operator=(const IntervalValue& other)
|
|
84
|
+
{
|
|
85
|
+
interval = other;
|
|
86
|
+
addrs = AddressValue();
|
|
87
|
+
return *this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
AbstractValue& operator=(const AddressValue& other)
|
|
91
|
+
{
|
|
92
|
+
addrs = other;
|
|
93
|
+
interval = IntervalValue::bottom();
|
|
94
|
+
return *this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
AbstractValue(const IntervalValue& ival) : interval(ival), addrs(AddressValue()) {}
|
|
98
|
+
|
|
99
|
+
AbstractValue(const AddressValue& addr) : interval(IntervalValue::bottom()), addrs(addr) {}
|
|
100
|
+
|
|
101
|
+
IntervalValue& getInterval()
|
|
102
|
+
{
|
|
103
|
+
return interval;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const IntervalValue getInterval() const
|
|
107
|
+
{
|
|
108
|
+
return interval;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
AddressValue& getAddrs()
|
|
112
|
+
{
|
|
113
|
+
return addrs;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const AddressValue getAddrs() const
|
|
117
|
+
{
|
|
118
|
+
return addrs;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
~AbstractValue() {};
|
|
122
|
+
|
|
123
|
+
bool equals(const AbstractValue &rhs) const
|
|
124
|
+
{
|
|
125
|
+
return interval.equals(rhs.interval) && addrs.equals(rhs.addrs);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
void join_with(const AbstractValue &other)
|
|
129
|
+
{
|
|
130
|
+
interval.join_with(other.interval);
|
|
131
|
+
addrs.join_with(other.addrs);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
void meet_with(const AbstractValue &other)
|
|
135
|
+
{
|
|
136
|
+
interval.meet_with(other.interval);
|
|
137
|
+
addrs.meet_with(other.addrs);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
void widen_with(const AbstractValue &other)
|
|
141
|
+
{
|
|
142
|
+
interval.widen_with(other.interval);
|
|
143
|
+
// TODO: widen Addrs
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
void narrow_with(const AbstractValue &other)
|
|
147
|
+
{
|
|
148
|
+
interval.narrow_with(other.interval);
|
|
149
|
+
// TODO: narrow Addrs
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
std::string toString() const
|
|
153
|
+
{
|
|
154
|
+
return "<" + interval.toString() + ", " + addrs.toString() + ">";
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|