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,618 @@
|
|
|
1
|
+
//===- DPItem.h -- Context/path sensitive classes----------------------------//
|
|
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
|
+
* DPItem.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: Apr 1, 2014
|
|
27
|
+
* Author: Yulei Sui
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef DPITEM_H_
|
|
31
|
+
#define DPITEM_H_
|
|
32
|
+
|
|
33
|
+
#include "MemoryModel/ConditionalPT.h"
|
|
34
|
+
#include <algorithm> // std::sort
|
|
35
|
+
|
|
36
|
+
namespace SVF
|
|
37
|
+
{
|
|
38
|
+
|
|
39
|
+
/*!
|
|
40
|
+
* Dynamic programming item for CFL reachability search
|
|
41
|
+
* This serves as a base class for CFL-reachability formulation by matching parentheses.
|
|
42
|
+
* Extend this class for further sophisticated CFL-reachability items (e.g. field, flow, path)
|
|
43
|
+
*/
|
|
44
|
+
class DPItem
|
|
45
|
+
{
|
|
46
|
+
protected:
|
|
47
|
+
NodeID cur;
|
|
48
|
+
static u64_t maximumBudget;
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/// Constructor
|
|
52
|
+
DPItem(NodeID c) : cur(c)
|
|
53
|
+
{
|
|
54
|
+
}
|
|
55
|
+
/// Copy constructor
|
|
56
|
+
DPItem(const DPItem& dps) : cur(dps.cur)
|
|
57
|
+
{
|
|
58
|
+
}
|
|
59
|
+
/// Move constructor
|
|
60
|
+
DPItem(DPItem&& dps) noexcept : cur(dps.cur)
|
|
61
|
+
{
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
/// Move operator=
|
|
65
|
+
DPItem &operator=(DPItem &&rhs) noexcept
|
|
66
|
+
{
|
|
67
|
+
if (this != &rhs)
|
|
68
|
+
{
|
|
69
|
+
cur = rhs.cur;
|
|
70
|
+
}
|
|
71
|
+
return *this;
|
|
72
|
+
}
|
|
73
|
+
/// Destructor
|
|
74
|
+
virtual ~DPItem()
|
|
75
|
+
{
|
|
76
|
+
}
|
|
77
|
+
inline NodeID getCurNodeID() const
|
|
78
|
+
{
|
|
79
|
+
return cur;
|
|
80
|
+
}
|
|
81
|
+
inline void setCurNodeID(NodeID c)
|
|
82
|
+
{
|
|
83
|
+
cur = c;
|
|
84
|
+
}
|
|
85
|
+
/// set max step budge per query
|
|
86
|
+
static inline void setMaxBudget(u32_t max)
|
|
87
|
+
{
|
|
88
|
+
maximumBudget = max;
|
|
89
|
+
}
|
|
90
|
+
static inline u32_t getMaxBudget()
|
|
91
|
+
{
|
|
92
|
+
return maximumBudget;
|
|
93
|
+
}
|
|
94
|
+
/// Enable compare operator to avoid duplicated item insertion in map or set
|
|
95
|
+
/// to be noted that two vectors can also overload operator()
|
|
96
|
+
inline bool operator< (const DPItem& rhs) const
|
|
97
|
+
{
|
|
98
|
+
return cur < rhs.cur;
|
|
99
|
+
}
|
|
100
|
+
/// Overloading Operator=
|
|
101
|
+
inline DPItem& operator= (const DPItem& rhs)
|
|
102
|
+
{
|
|
103
|
+
if(*this!=rhs)
|
|
104
|
+
{
|
|
105
|
+
cur = rhs.cur;
|
|
106
|
+
}
|
|
107
|
+
return *this;
|
|
108
|
+
}
|
|
109
|
+
/// Overloading Operator==
|
|
110
|
+
inline bool operator== (const DPItem& rhs) const
|
|
111
|
+
{
|
|
112
|
+
return (cur == rhs.cur);
|
|
113
|
+
}
|
|
114
|
+
/// Overloading Operator!=
|
|
115
|
+
inline bool operator!= (const DPItem& rhs) const
|
|
116
|
+
{
|
|
117
|
+
return !(*this == rhs);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
inline void dump() const
|
|
121
|
+
{
|
|
122
|
+
SVFUtil::outs() << "var " << cur << "\n";
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/*!
|
|
128
|
+
* FlowSensitive DPItem
|
|
129
|
+
*/
|
|
130
|
+
template<class LocCond>
|
|
131
|
+
class StmtDPItem : public DPItem
|
|
132
|
+
{
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
protected:
|
|
136
|
+
const LocCond* curloc;
|
|
137
|
+
|
|
138
|
+
public:
|
|
139
|
+
/// Constructor
|
|
140
|
+
StmtDPItem(NodeID c, const LocCond* locCond) : DPItem(c), curloc(locCond)
|
|
141
|
+
{
|
|
142
|
+
}
|
|
143
|
+
/// Copy constructor
|
|
144
|
+
StmtDPItem(const StmtDPItem& dps) :
|
|
145
|
+
DPItem(dps), curloc(dps.curloc)
|
|
146
|
+
{
|
|
147
|
+
}
|
|
148
|
+
/// Destructor
|
|
149
|
+
virtual ~StmtDPItem()
|
|
150
|
+
{
|
|
151
|
+
}
|
|
152
|
+
/// Get context
|
|
153
|
+
inline const LocCond* getLoc() const
|
|
154
|
+
{
|
|
155
|
+
return this->curloc;
|
|
156
|
+
}
|
|
157
|
+
/// Set location
|
|
158
|
+
inline void setLoc(const LocCond* l)
|
|
159
|
+
{
|
|
160
|
+
this->curloc = l;
|
|
161
|
+
}
|
|
162
|
+
/// Set location and pointer id
|
|
163
|
+
inline void setLocVar(const LocCond* l,NodeID v)
|
|
164
|
+
{
|
|
165
|
+
this->curloc = l;
|
|
166
|
+
this->cur = v;
|
|
167
|
+
}
|
|
168
|
+
/// Enable compare operator to avoid duplicated item insertion in map or set
|
|
169
|
+
/// to be noted that two vectors can also overload operator()
|
|
170
|
+
inline bool operator< (const StmtDPItem& rhs) const
|
|
171
|
+
{
|
|
172
|
+
if (this->cur != rhs.cur)
|
|
173
|
+
return this->cur < rhs.cur;
|
|
174
|
+
else
|
|
175
|
+
return this->curloc < rhs.curloc;
|
|
176
|
+
}
|
|
177
|
+
/// Overloading operator==
|
|
178
|
+
inline StmtDPItem& operator= (const StmtDPItem& rhs)
|
|
179
|
+
{
|
|
180
|
+
if(*this!=rhs)
|
|
181
|
+
{
|
|
182
|
+
DPItem::operator=(rhs);
|
|
183
|
+
this->curloc = rhs.getLoc();
|
|
184
|
+
}
|
|
185
|
+
return *this;
|
|
186
|
+
}
|
|
187
|
+
/// Overloading operator==
|
|
188
|
+
inline bool operator== (const StmtDPItem& rhs) const
|
|
189
|
+
{
|
|
190
|
+
return (this->cur == rhs.cur && this->curloc == rhs.getLoc());
|
|
191
|
+
}
|
|
192
|
+
/// Overloading operator!=
|
|
193
|
+
inline bool operator!= (const StmtDPItem& rhs) const
|
|
194
|
+
{
|
|
195
|
+
return !(*this==rhs);
|
|
196
|
+
}
|
|
197
|
+
inline void dump() const
|
|
198
|
+
{
|
|
199
|
+
SVFUtil::outs() << "statement " << *(this->curloc) << ", var " << this->cur << "\n";
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/*!
|
|
204
|
+
* Context Condition
|
|
205
|
+
*/
|
|
206
|
+
class ContextCond
|
|
207
|
+
{
|
|
208
|
+
public:
|
|
209
|
+
typedef CallStrCxt::const_iterator const_iterator;
|
|
210
|
+
/// Constructor
|
|
211
|
+
ContextCond():concreteCxt(true)
|
|
212
|
+
{
|
|
213
|
+
}
|
|
214
|
+
/// Copy Constructor
|
|
215
|
+
ContextCond(const ContextCond& cond): context(cond.getContexts()), concreteCxt(cond.isConcreteCxt())
|
|
216
|
+
{
|
|
217
|
+
}
|
|
218
|
+
/// Move Constructor
|
|
219
|
+
ContextCond(ContextCond &&cond) noexcept: context(std::move(cond.context)), concreteCxt(cond.concreteCxt) {}
|
|
220
|
+
/// Move operator=
|
|
221
|
+
ContextCond& operator=(ContextCond&&cond) noexcept
|
|
222
|
+
{
|
|
223
|
+
if(this!=&cond)
|
|
224
|
+
{
|
|
225
|
+
context = std::move(cond.context);
|
|
226
|
+
concreteCxt = cond.concreteCxt;
|
|
227
|
+
}
|
|
228
|
+
return *this;
|
|
229
|
+
}
|
|
230
|
+
/// Destructor
|
|
231
|
+
virtual ~ContextCond()
|
|
232
|
+
{
|
|
233
|
+
}
|
|
234
|
+
/// Get context
|
|
235
|
+
inline const CallStrCxt& getContexts() const
|
|
236
|
+
{
|
|
237
|
+
return context;
|
|
238
|
+
}
|
|
239
|
+
/// Get context
|
|
240
|
+
inline CallStrCxt& getContexts()
|
|
241
|
+
{
|
|
242
|
+
return context;
|
|
243
|
+
}
|
|
244
|
+
/// Whether it is an concrete context
|
|
245
|
+
inline bool isConcreteCxt() const
|
|
246
|
+
{
|
|
247
|
+
return concreteCxt;
|
|
248
|
+
}
|
|
249
|
+
/// Whether it is an concrete context
|
|
250
|
+
inline void setNonConcreteCxt()
|
|
251
|
+
{
|
|
252
|
+
concreteCxt = false;
|
|
253
|
+
}
|
|
254
|
+
/// Whether contains callstring cxt
|
|
255
|
+
inline bool containCallStr(NodeID cxt) const
|
|
256
|
+
{
|
|
257
|
+
return std::find(context.begin(),context.end(),cxt) != context.end();
|
|
258
|
+
}
|
|
259
|
+
/// Get context size
|
|
260
|
+
inline u32_t cxtSize() const
|
|
261
|
+
{
|
|
262
|
+
return context.size();
|
|
263
|
+
}
|
|
264
|
+
/// set max context limit
|
|
265
|
+
static inline void setMaxCxtLen(u32_t max)
|
|
266
|
+
{
|
|
267
|
+
maximumCxtLen = max;
|
|
268
|
+
}
|
|
269
|
+
/// set max path limit
|
|
270
|
+
static inline void setMaxPathLen(u32_t max)
|
|
271
|
+
{
|
|
272
|
+
maximumPathLen = max;
|
|
273
|
+
}
|
|
274
|
+
inline u32_t getMaxPathLen() const
|
|
275
|
+
{
|
|
276
|
+
return maximumPathLen;
|
|
277
|
+
}
|
|
278
|
+
/// Push context
|
|
279
|
+
inline virtual bool pushContext(NodeID ctx)
|
|
280
|
+
{
|
|
281
|
+
|
|
282
|
+
if(context.size() < maximumCxtLen)
|
|
283
|
+
{
|
|
284
|
+
context.push_back(ctx);
|
|
285
|
+
|
|
286
|
+
if(context.size() > maximumCxt)
|
|
287
|
+
maximumCxt = context.size();
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
else /// handle out of context limit case
|
|
291
|
+
{
|
|
292
|
+
if(!context.empty())
|
|
293
|
+
{
|
|
294
|
+
setNonConcreteCxt();
|
|
295
|
+
context.erase(context.begin());
|
|
296
|
+
context.push_back(ctx);
|
|
297
|
+
}
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/// Match context
|
|
303
|
+
inline virtual bool matchContext(NodeID ctx)
|
|
304
|
+
{
|
|
305
|
+
/// if context is empty, then it is the unbalanced parentheses match
|
|
306
|
+
if(context.empty())
|
|
307
|
+
return true;
|
|
308
|
+
/// otherwise, we perform balanced parentheses matching
|
|
309
|
+
else if(context.back() == ctx)
|
|
310
|
+
{
|
|
311
|
+
context.pop_back();
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/// Enable compare operator to avoid duplicated item insertion in map or set
|
|
318
|
+
/// to be noted that two vectors can also overload operator()
|
|
319
|
+
inline bool operator< (const ContextCond& rhs) const
|
|
320
|
+
{
|
|
321
|
+
return context < rhs.context;
|
|
322
|
+
}
|
|
323
|
+
/// Overloading operator[]
|
|
324
|
+
inline NodeID operator[] (const u32_t index) const
|
|
325
|
+
{
|
|
326
|
+
assert(index < context.size());
|
|
327
|
+
return context[index];
|
|
328
|
+
}
|
|
329
|
+
/// Overloading operator=
|
|
330
|
+
inline ContextCond& operator= (const ContextCond& rhs)
|
|
331
|
+
{
|
|
332
|
+
if(*this!=rhs)
|
|
333
|
+
{
|
|
334
|
+
context = rhs.getContexts();
|
|
335
|
+
concreteCxt = rhs.isConcreteCxt();
|
|
336
|
+
}
|
|
337
|
+
return *this;
|
|
338
|
+
}
|
|
339
|
+
/// Overloading operator==
|
|
340
|
+
inline bool operator== (const ContextCond& rhs) const
|
|
341
|
+
{
|
|
342
|
+
return (context == rhs.getContexts());
|
|
343
|
+
}
|
|
344
|
+
/// Overloading operator!=
|
|
345
|
+
inline bool operator!= (const ContextCond& rhs) const
|
|
346
|
+
{
|
|
347
|
+
return !(*this==rhs);
|
|
348
|
+
}
|
|
349
|
+
/// Begin iterators
|
|
350
|
+
inline const_iterator begin() const
|
|
351
|
+
{
|
|
352
|
+
return context.begin();
|
|
353
|
+
}
|
|
354
|
+
/// End iterators
|
|
355
|
+
inline const_iterator end() const
|
|
356
|
+
{
|
|
357
|
+
return context.end();
|
|
358
|
+
}
|
|
359
|
+
/// Dump context condition
|
|
360
|
+
inline std::string toString() const
|
|
361
|
+
{
|
|
362
|
+
std::string str;
|
|
363
|
+
std::stringstream rawstr(str);
|
|
364
|
+
rawstr << "[:";
|
|
365
|
+
for(CallStrCxt::const_iterator it = context.begin(), eit = context.end(); it!=eit; ++it)
|
|
366
|
+
{
|
|
367
|
+
rawstr << *it << " ";
|
|
368
|
+
}
|
|
369
|
+
rawstr << " ]";
|
|
370
|
+
return rawstr.str();
|
|
371
|
+
}
|
|
372
|
+
protected:
|
|
373
|
+
CallStrCxt context;
|
|
374
|
+
static u32_t maximumCxtLen;
|
|
375
|
+
static u32_t maximumPathLen;
|
|
376
|
+
bool concreteCxt;
|
|
377
|
+
public:
|
|
378
|
+
static u32_t maximumCxt;
|
|
379
|
+
static u32_t maximumPath;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
/*!
|
|
383
|
+
* Context-, flow- sensitive DPItem
|
|
384
|
+
*/
|
|
385
|
+
typedef CondVar<ContextCond> CxtVar;
|
|
386
|
+
typedef CondStdSet<CxtVar> CxtPtSet;
|
|
387
|
+
|
|
388
|
+
template<class LocCond>
|
|
389
|
+
class CxtStmtDPItem : public StmtDPItem<LocCond>
|
|
390
|
+
{
|
|
391
|
+
private:
|
|
392
|
+
ContextCond context;
|
|
393
|
+
public:
|
|
394
|
+
/// Constructor
|
|
395
|
+
CxtStmtDPItem(const CxtVar& var, const LocCond* locCond) : StmtDPItem<LocCond>(var.get_id(),locCond), context(var.get_cond())
|
|
396
|
+
{
|
|
397
|
+
}
|
|
398
|
+
/// Copy constructor
|
|
399
|
+
CxtStmtDPItem(const CxtStmtDPItem<LocCond>& dps) :
|
|
400
|
+
StmtDPItem<LocCond>(dps), context(dps.context)
|
|
401
|
+
{
|
|
402
|
+
}
|
|
403
|
+
/// Destructor
|
|
404
|
+
virtual ~CxtStmtDPItem()
|
|
405
|
+
{
|
|
406
|
+
}
|
|
407
|
+
/// Get context var
|
|
408
|
+
inline CxtVar getCondVar() const
|
|
409
|
+
{
|
|
410
|
+
CxtVar var(this->context,this->cur);
|
|
411
|
+
return var;
|
|
412
|
+
}
|
|
413
|
+
/// Get context
|
|
414
|
+
inline const ContextCond& getCond() const
|
|
415
|
+
{
|
|
416
|
+
return this->context;
|
|
417
|
+
}
|
|
418
|
+
/// Get context
|
|
419
|
+
inline ContextCond& getCond()
|
|
420
|
+
{
|
|
421
|
+
return this->context;
|
|
422
|
+
}
|
|
423
|
+
/// Push context
|
|
424
|
+
inline bool pushContext(NodeID cxt)
|
|
425
|
+
{
|
|
426
|
+
return this->context.pushContext(cxt);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/// Match context
|
|
430
|
+
inline bool matchContext(NodeID cxt)
|
|
431
|
+
{
|
|
432
|
+
return this->context.matchContext(cxt);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/// Enable compare operator to avoid duplicated item insertion in map or set
|
|
436
|
+
/// to be noted that two vectors can also overload operator()
|
|
437
|
+
inline bool operator< (const CxtStmtDPItem<LocCond>& rhs) const
|
|
438
|
+
{
|
|
439
|
+
if (this->cur != rhs.cur)
|
|
440
|
+
return this->cur < rhs.cur;
|
|
441
|
+
else if(this->curloc != rhs.getLoc())
|
|
442
|
+
return this->curloc < rhs.getLoc();
|
|
443
|
+
else
|
|
444
|
+
return this->context < rhs.context;
|
|
445
|
+
}
|
|
446
|
+
/// Overloading operator=
|
|
447
|
+
inline CxtStmtDPItem<LocCond>& operator= (const CxtStmtDPItem<LocCond>& rhs)
|
|
448
|
+
{
|
|
449
|
+
if(*this!=rhs)
|
|
450
|
+
{
|
|
451
|
+
StmtDPItem<LocCond>::operator=(rhs);
|
|
452
|
+
this->context = rhs.getCond();
|
|
453
|
+
}
|
|
454
|
+
return *this;
|
|
455
|
+
}
|
|
456
|
+
/// Overloading operator==
|
|
457
|
+
inline bool operator== (const CxtStmtDPItem<LocCond>& rhs) const
|
|
458
|
+
{
|
|
459
|
+
return (this->cur == rhs.cur && this->curloc == rhs.getLoc() && this->context == rhs.context);
|
|
460
|
+
}
|
|
461
|
+
/// Overloading operator==
|
|
462
|
+
inline bool operator!= (const CxtStmtDPItem<LocCond>& rhs) const
|
|
463
|
+
{
|
|
464
|
+
return !(*this==rhs);
|
|
465
|
+
}
|
|
466
|
+
inline void dump() const
|
|
467
|
+
{
|
|
468
|
+
SVFUtil::outs() << "statement " << *(this->curloc) << ", var " << this->cur << " ";
|
|
469
|
+
SVFUtil::outs() << this->context.toString() <<"\n";
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
/*!
|
|
474
|
+
* Context DPItem
|
|
475
|
+
*/
|
|
476
|
+
typedef CondVar<ContextCond> CxtVar;
|
|
477
|
+
class CxtDPItem : public DPItem
|
|
478
|
+
{
|
|
479
|
+
private:
|
|
480
|
+
ContextCond context;
|
|
481
|
+
|
|
482
|
+
public:
|
|
483
|
+
/// Constructor
|
|
484
|
+
CxtDPItem(NodeID c, const ContextCond& cxt) : DPItem(c),context(cxt)
|
|
485
|
+
{
|
|
486
|
+
}
|
|
487
|
+
CxtDPItem(const CxtVar& var) : DPItem(var.get_id()),context(var.get_cond())
|
|
488
|
+
{
|
|
489
|
+
}
|
|
490
|
+
/// Copy constructor
|
|
491
|
+
CxtDPItem(const CxtDPItem& dps) :
|
|
492
|
+
DPItem(dps.getCurNodeID()), context(dps.context)
|
|
493
|
+
{
|
|
494
|
+
}
|
|
495
|
+
/// Move constructor
|
|
496
|
+
CxtDPItem(CxtDPItem &&dps) noexcept: DPItem(dps), context(std::move(dps.context))
|
|
497
|
+
{
|
|
498
|
+
}
|
|
499
|
+
/// Move operator=
|
|
500
|
+
CxtDPItem &operator=(CxtDPItem &&dps) noexcept
|
|
501
|
+
{
|
|
502
|
+
if (this != &dps)
|
|
503
|
+
{
|
|
504
|
+
DPItem::operator=(dps);
|
|
505
|
+
context = std::move(dps.context);
|
|
506
|
+
}
|
|
507
|
+
return *this;
|
|
508
|
+
}
|
|
509
|
+
/// Destructor
|
|
510
|
+
virtual ~CxtDPItem()
|
|
511
|
+
{
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/// Get context
|
|
515
|
+
inline const ContextCond& getContexts() const
|
|
516
|
+
{
|
|
517
|
+
return context;
|
|
518
|
+
}
|
|
519
|
+
/// Push context
|
|
520
|
+
inline void pushContext(NodeID cxt)
|
|
521
|
+
{
|
|
522
|
+
context.pushContext(cxt);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/// Match context
|
|
526
|
+
inline virtual bool matchContext(NodeID cxt)
|
|
527
|
+
{
|
|
528
|
+
return context.matchContext(cxt);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/// Enable compare operator to avoid duplicated item insertion in map or set
|
|
532
|
+
/// to be noted that two vectors can also overload operator()
|
|
533
|
+
inline bool operator< (const CxtDPItem& rhs) const
|
|
534
|
+
{
|
|
535
|
+
if (cur != rhs.cur)
|
|
536
|
+
return cur < rhs.cur;
|
|
537
|
+
else
|
|
538
|
+
return context < rhs.context;
|
|
539
|
+
}
|
|
540
|
+
/// Overloading Operator=
|
|
541
|
+
inline CxtDPItem& operator= (const CxtDPItem& rhs)
|
|
542
|
+
{
|
|
543
|
+
if(*this!=rhs)
|
|
544
|
+
{
|
|
545
|
+
cur = rhs.cur;
|
|
546
|
+
context = rhs.context;
|
|
547
|
+
}
|
|
548
|
+
return *this;
|
|
549
|
+
}
|
|
550
|
+
/// Overloading Operator==
|
|
551
|
+
inline bool operator== (const CxtDPItem& rhs) const
|
|
552
|
+
{
|
|
553
|
+
return (cur == rhs.cur) && (context == rhs.context);
|
|
554
|
+
}
|
|
555
|
+
/// Overloading Operator!=
|
|
556
|
+
inline bool operator!= (const CxtDPItem& rhs) const
|
|
557
|
+
{
|
|
558
|
+
return !(*this == rhs);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
};
|
|
562
|
+
} // End namespace SVF
|
|
563
|
+
|
|
564
|
+
/// Specialise hash for CxtDPItem.
|
|
565
|
+
template <>
|
|
566
|
+
struct std::hash<SVF::CxtDPItem>
|
|
567
|
+
{
|
|
568
|
+
size_t operator()(const SVF::CxtDPItem &cdpi) const
|
|
569
|
+
{
|
|
570
|
+
SVF::Hash<std::pair<SVF::NodeID, SVF::ContextCond>> h;
|
|
571
|
+
return h(std::make_pair(cdpi.getCurNodeID(), cdpi.getContexts()));
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
/// Specialise hash for StmtDPItem.
|
|
576
|
+
template <typename LocCond>
|
|
577
|
+
struct std::hash<SVF::StmtDPItem<LocCond>>
|
|
578
|
+
{
|
|
579
|
+
size_t operator()(const SVF::StmtDPItem<LocCond> &sdpi) const
|
|
580
|
+
{
|
|
581
|
+
SVF::Hash<std::pair<SVF::NodeID, const LocCond *>> h;
|
|
582
|
+
return h(std::make_pair(sdpi.getCurNodeID(), sdpi.getLoc()));
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
/// Specialise hash for CxtStmtDPItem.
|
|
587
|
+
template<class LocCond>
|
|
588
|
+
struct std::hash<SVF::CxtStmtDPItem<LocCond>>
|
|
589
|
+
{
|
|
590
|
+
size_t operator()(const SVF::CxtStmtDPItem<LocCond> &csdpi) const
|
|
591
|
+
{
|
|
592
|
+
SVF::Hash<std::pair<SVF::NodeID, std::pair<const LocCond *, SVF::ContextCond>>> h;
|
|
593
|
+
return h(std::make_pair(csdpi.getCurNodeID(),
|
|
594
|
+
std::make_pair(csdpi.getLoc(), csdpi.getCond())));
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/// Specialise hash for ContextCond.
|
|
599
|
+
template <>
|
|
600
|
+
struct std::hash<const SVF::ContextCond>
|
|
601
|
+
{
|
|
602
|
+
size_t operator()(const SVF::ContextCond &cc) const
|
|
603
|
+
{
|
|
604
|
+
std::hash<SVF::CallStrCxt> h;
|
|
605
|
+
return h(cc.getContexts());
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
template <>
|
|
610
|
+
struct std::hash<SVF::ContextCond>
|
|
611
|
+
{
|
|
612
|
+
size_t operator()(const SVF::ContextCond &cc) const
|
|
613
|
+
{
|
|
614
|
+
std::hash<SVF::CallStrCxt> h;
|
|
615
|
+
return h(cc.getContexts());
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
#endif /* DPITEM_H_ */
|