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,878 @@
|
|
|
1
|
+
//===- ConditionalPT.h -- Conditional points-to data structure----------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU Affero General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* ConditionalPT.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: 22/03/2014
|
|
27
|
+
* Author: Yulei Sui
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef CONDVAR_H_
|
|
31
|
+
#define CONDVAR_H_
|
|
32
|
+
|
|
33
|
+
#include "Util/SVFUtil.h"
|
|
34
|
+
#include "MemoryModel/PointsTo.h"
|
|
35
|
+
#include <sstream>
|
|
36
|
+
|
|
37
|
+
namespace SVF
|
|
38
|
+
{
|
|
39
|
+
|
|
40
|
+
/*!
|
|
41
|
+
* Conditional Variable (c,v)
|
|
42
|
+
* A context/path condition
|
|
43
|
+
* A variable NodeID
|
|
44
|
+
*/
|
|
45
|
+
template<class Cond>
|
|
46
|
+
class CondVar
|
|
47
|
+
{
|
|
48
|
+
public:
|
|
49
|
+
/// Constructor
|
|
50
|
+
CondVar(const Cond& cond, NodeID id) : m_cond(cond),m_id(id)
|
|
51
|
+
{
|
|
52
|
+
}
|
|
53
|
+
/// Copy constructor
|
|
54
|
+
CondVar(const CondVar& conVar) : m_cond(conVar.m_cond), m_id(conVar.m_id)
|
|
55
|
+
{
|
|
56
|
+
}
|
|
57
|
+
/// Default constructor
|
|
58
|
+
CondVar() : m_cond(), m_id(0) {}
|
|
59
|
+
|
|
60
|
+
~CondVar() {}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Comparison between two elements.
|
|
64
|
+
*/
|
|
65
|
+
///@{
|
|
66
|
+
inline bool operator == (const CondVar & rhs) const
|
|
67
|
+
{
|
|
68
|
+
return (m_id == rhs.get_id() && m_cond == rhs.get_cond());
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
inline bool operator != (const CondVar & rhs) const
|
|
72
|
+
{
|
|
73
|
+
return !(*this == rhs);
|
|
74
|
+
}
|
|
75
|
+
///@}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
inline CondVar& operator= (const CondVar& rhs)
|
|
79
|
+
{
|
|
80
|
+
if(*this!=rhs)
|
|
81
|
+
{
|
|
82
|
+
m_cond = rhs.get_cond();
|
|
83
|
+
m_id = rhs.get_id();
|
|
84
|
+
}
|
|
85
|
+
return *this;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Less than implementation.
|
|
91
|
+
*/
|
|
92
|
+
inline bool operator < (const CondVar & rhs) const
|
|
93
|
+
{
|
|
94
|
+
if(m_id != rhs.get_id())
|
|
95
|
+
return m_id < rhs.get_id();
|
|
96
|
+
else
|
|
97
|
+
return m_cond < rhs.get_cond();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
inline const Cond& get_cond() const
|
|
101
|
+
{
|
|
102
|
+
return m_cond;
|
|
103
|
+
}
|
|
104
|
+
inline NodeID get_id() const
|
|
105
|
+
{
|
|
106
|
+
return m_id;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
inline std::string toString() const
|
|
110
|
+
{
|
|
111
|
+
std::string str;
|
|
112
|
+
std::stringstream rawstr(str);
|
|
113
|
+
rawstr << "<" << m_id << " " << m_cond.toString() << "> ";
|
|
114
|
+
return rawstr.str();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
friend OutStream& operator<< (OutStream &o, const CondVar<Cond> &cvar)
|
|
118
|
+
{
|
|
119
|
+
o << cvar.toString();
|
|
120
|
+
return o;
|
|
121
|
+
}
|
|
122
|
+
private:
|
|
123
|
+
Cond m_cond;
|
|
124
|
+
NodeID m_id;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/*!
|
|
128
|
+
* Conditional variable set
|
|
129
|
+
*/
|
|
130
|
+
template<class Element>
|
|
131
|
+
class CondStdSet
|
|
132
|
+
{
|
|
133
|
+
typedef OrderedSet<Element> ElementSet;
|
|
134
|
+
|
|
135
|
+
public:
|
|
136
|
+
typedef typename OrderedSet<Element>::iterator iterator;
|
|
137
|
+
typedef typename OrderedSet<Element>::const_iterator const_iterator;
|
|
138
|
+
|
|
139
|
+
CondStdSet() {}
|
|
140
|
+
~CondStdSet() {}
|
|
141
|
+
|
|
142
|
+
/// Copy constructor
|
|
143
|
+
CondStdSet(const CondStdSet<Element>& cptsSet) : elements(cptsSet.getElementSet())
|
|
144
|
+
{
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/// Return true if the element is added
|
|
148
|
+
inline bool test_and_set(const Element& var)
|
|
149
|
+
{
|
|
150
|
+
return elements.insert(var).second;
|
|
151
|
+
}
|
|
152
|
+
/// Return true if the element is in the set
|
|
153
|
+
inline bool test(const Element& var) const
|
|
154
|
+
{
|
|
155
|
+
return (elements.find(var) != elements.end());
|
|
156
|
+
}
|
|
157
|
+
/// Add the element into set
|
|
158
|
+
inline void set(const Element& var)
|
|
159
|
+
{
|
|
160
|
+
elements.insert(var);
|
|
161
|
+
}
|
|
162
|
+
/// Remove var from the set.
|
|
163
|
+
inline void reset(const Element& var)
|
|
164
|
+
{
|
|
165
|
+
elements.erase(var);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/// Set size
|
|
169
|
+
//@{
|
|
170
|
+
inline bool empty() const
|
|
171
|
+
{
|
|
172
|
+
return elements.empty();
|
|
173
|
+
}
|
|
174
|
+
inline unsigned size() const
|
|
175
|
+
{
|
|
176
|
+
return elements.size();
|
|
177
|
+
}
|
|
178
|
+
inline unsigned count() const
|
|
179
|
+
{
|
|
180
|
+
return size();
|
|
181
|
+
}
|
|
182
|
+
//@}
|
|
183
|
+
|
|
184
|
+
/// Clear set
|
|
185
|
+
inline void clear()
|
|
186
|
+
{
|
|
187
|
+
elements.clear();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/// Iterators
|
|
191
|
+
//@{
|
|
192
|
+
inline iterator begin()
|
|
193
|
+
{
|
|
194
|
+
return elements.begin();
|
|
195
|
+
}
|
|
196
|
+
inline iterator end()
|
|
197
|
+
{
|
|
198
|
+
return elements.end();
|
|
199
|
+
}
|
|
200
|
+
inline iterator begin() const
|
|
201
|
+
{
|
|
202
|
+
return elements.begin();
|
|
203
|
+
}
|
|
204
|
+
inline iterator end() const
|
|
205
|
+
{
|
|
206
|
+
return elements.end();
|
|
207
|
+
}
|
|
208
|
+
//@}
|
|
209
|
+
|
|
210
|
+
/// Overload operators
|
|
211
|
+
//@{
|
|
212
|
+
inline bool operator|=(const CondStdSet<Element>& rhs)
|
|
213
|
+
{
|
|
214
|
+
const ElementSet& rhsElementSet = rhs.getElementSet();
|
|
215
|
+
if(rhsElementSet.empty() || (*this==rhs))
|
|
216
|
+
return false;
|
|
217
|
+
u32_t oldSize = elements.size();
|
|
218
|
+
elements.insert(rhsElementSet.begin(),rhsElementSet.end());
|
|
219
|
+
return oldSize!=elements.size();
|
|
220
|
+
}
|
|
221
|
+
inline bool operator&=(const CondStdSet<Element>& rhs)
|
|
222
|
+
{
|
|
223
|
+
if(rhs.empty() || (*this == rhs))
|
|
224
|
+
return false;
|
|
225
|
+
bool changed = false;
|
|
226
|
+
for (const_iterator i = rhs.begin(); i != rhs.end(); ++i)
|
|
227
|
+
{
|
|
228
|
+
if (elements.find(*i) == elements.end())
|
|
229
|
+
{
|
|
230
|
+
elements.erase(*i);
|
|
231
|
+
changed = true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return changed;
|
|
235
|
+
}
|
|
236
|
+
inline bool operator!=(const CondStdSet<Element>& rhs) const
|
|
237
|
+
{
|
|
238
|
+
return elements!=rhs.getElementSet();
|
|
239
|
+
}
|
|
240
|
+
inline bool operator==(const CondStdSet<Element>& rhs) const
|
|
241
|
+
{
|
|
242
|
+
return ((*this != rhs) == false);
|
|
243
|
+
}
|
|
244
|
+
inline CondStdSet<Element>& operator=(const CondStdSet<Element>& rhs)
|
|
245
|
+
{
|
|
246
|
+
if(*this!=rhs)
|
|
247
|
+
{
|
|
248
|
+
elements = rhs.getElementSet();
|
|
249
|
+
}
|
|
250
|
+
return *this;
|
|
251
|
+
}
|
|
252
|
+
inline bool operator<(const CondStdSet<Element>& rhs) const
|
|
253
|
+
{
|
|
254
|
+
return elements < rhs.getElementSet();
|
|
255
|
+
}
|
|
256
|
+
//@}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Return TRUE if this and RHS share common elements.
|
|
260
|
+
*/
|
|
261
|
+
bool intersects(const CondStdSet<Element>& rhs) const
|
|
262
|
+
{
|
|
263
|
+
if (empty() && rhs.empty())
|
|
264
|
+
return false;
|
|
265
|
+
|
|
266
|
+
for (const_iterator i = rhs.begin(); i != rhs.end(); ++i)
|
|
267
|
+
{
|
|
268
|
+
if (elements.find(*i) != elements.end())
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
inline std::string toString() const
|
|
275
|
+
{
|
|
276
|
+
std::string str;
|
|
277
|
+
std::stringstream rawstr(str);
|
|
278
|
+
rawstr << "{ ";
|
|
279
|
+
for (const_iterator i = elements.begin(); i != elements.end(); ++i)
|
|
280
|
+
{
|
|
281
|
+
rawstr << (*i).toString() << " ";
|
|
282
|
+
}
|
|
283
|
+
rawstr << "} ";
|
|
284
|
+
return rawstr.str();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
inline const ElementSet& getElementSet() const
|
|
288
|
+
{
|
|
289
|
+
return elements;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/// TODO: dummy to use for PointsTo in the various PTData.
|
|
293
|
+
void checkAndRemap(void) const { }
|
|
294
|
+
|
|
295
|
+
private:
|
|
296
|
+
ElementSet elements;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
/*!
|
|
301
|
+
* Conditional Points-to set
|
|
302
|
+
*/
|
|
303
|
+
template<class Cond>
|
|
304
|
+
class CondPointsToSet
|
|
305
|
+
{
|
|
306
|
+
public:
|
|
307
|
+
typedef Map<Cond, PointsTo> CondPts;
|
|
308
|
+
typedef typename CondPts::iterator CondPtsIter;
|
|
309
|
+
typedef typename CondPts::const_iterator CondPtsConstIter;
|
|
310
|
+
typedef CondVar<Cond> SingleCondVar;
|
|
311
|
+
|
|
312
|
+
/// Constructor
|
|
313
|
+
//@{
|
|
314
|
+
CondPointsToSet()
|
|
315
|
+
{
|
|
316
|
+
}
|
|
317
|
+
CondPointsToSet(const Cond& cond, const PointsTo& pts)
|
|
318
|
+
{
|
|
319
|
+
_condPts[cond] |= pts;
|
|
320
|
+
}
|
|
321
|
+
//@}
|
|
322
|
+
|
|
323
|
+
/// Copy constructor
|
|
324
|
+
CondPointsToSet(const CondPointsToSet<Cond>& cptsSet)
|
|
325
|
+
|
|
326
|
+
{
|
|
327
|
+
_condPts = cptsSet.pointsTo();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/// Get Conditional PointsTo and standard points-to
|
|
331
|
+
//@{
|
|
332
|
+
inline CondPts &pointsTo(void)
|
|
333
|
+
{
|
|
334
|
+
return _condPts;
|
|
335
|
+
}
|
|
336
|
+
inline const CondPts &pointsTo(void) const
|
|
337
|
+
{
|
|
338
|
+
return _condPts;
|
|
339
|
+
}
|
|
340
|
+
inline const PointsTo &pointsTo(Cond cond) const
|
|
341
|
+
{
|
|
342
|
+
CondPtsConstIter it = _condPts.find(cond);
|
|
343
|
+
assert(it!=_condPts.end() && "do not have pts of such condition!");
|
|
344
|
+
return it->second;
|
|
345
|
+
}
|
|
346
|
+
inline bool hasPointsTo(Cond cond) const
|
|
347
|
+
{
|
|
348
|
+
return (_condPts.find(cond) != _condPts.end());
|
|
349
|
+
}
|
|
350
|
+
inline PointsTo &pointsTo(Cond cond)
|
|
351
|
+
{
|
|
352
|
+
return _condPts[cond];
|
|
353
|
+
}
|
|
354
|
+
//@}
|
|
355
|
+
|
|
356
|
+
/// iterators
|
|
357
|
+
//@{
|
|
358
|
+
inline CondPtsIter cptsBegin()
|
|
359
|
+
{
|
|
360
|
+
return _condPts.begin();
|
|
361
|
+
}
|
|
362
|
+
inline CondPtsIter cptsEnd()
|
|
363
|
+
{
|
|
364
|
+
return _condPts.end();
|
|
365
|
+
}
|
|
366
|
+
inline CondPtsConstIter cptsBegin() const
|
|
367
|
+
{
|
|
368
|
+
return _condPts.begin();
|
|
369
|
+
}
|
|
370
|
+
inline CondPtsConstIter cptsEnd() const
|
|
371
|
+
{
|
|
372
|
+
return _condPts.end();
|
|
373
|
+
}
|
|
374
|
+
//@}
|
|
375
|
+
|
|
376
|
+
inline void clear()
|
|
377
|
+
{
|
|
378
|
+
_condPts.clear();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
///Get number of points-to targets.
|
|
382
|
+
inline unsigned numElement() const
|
|
383
|
+
{
|
|
384
|
+
if (_condPts.empty())
|
|
385
|
+
return 0;
|
|
386
|
+
else
|
|
387
|
+
{
|
|
388
|
+
unsigned num = 0;
|
|
389
|
+
for (CondPtsConstIter it = cptsBegin(); it != cptsEnd(); it++)
|
|
390
|
+
{
|
|
391
|
+
PointsTo pts = it->second;
|
|
392
|
+
num += pts.count();
|
|
393
|
+
}
|
|
394
|
+
return num;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
/// Return true if no element in the set
|
|
398
|
+
inline bool empty() const
|
|
399
|
+
{
|
|
400
|
+
return numElement()==0;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
/// Overloading operators
|
|
405
|
+
//@{
|
|
406
|
+
inline CondPointsToSet<Cond>& operator=(
|
|
407
|
+
const CondPointsToSet<Cond>& other)
|
|
408
|
+
{
|
|
409
|
+
_condPts = other.pointsTo();
|
|
410
|
+
return *this;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/// Overloading operator ==
|
|
414
|
+
inline bool operator==(const CondPointsToSet<Cond>& rhs) const
|
|
415
|
+
{
|
|
416
|
+
// Always remember give the typename when define a template variable
|
|
417
|
+
if (pointsTo().size() != rhs.pointsTo().size())
|
|
418
|
+
return false;
|
|
419
|
+
CondPtsConstIter lit = cptsBegin(), elit = cptsEnd();
|
|
420
|
+
CondPtsConstIter rit = rhs.cptsBegin(), erit = rhs.cptsEnd();
|
|
421
|
+
for (; lit != elit && rit != erit; ++lit, ++rit)
|
|
422
|
+
{
|
|
423
|
+
const Cond& lc = lit->first;
|
|
424
|
+
const Cond& rc = rit->first;
|
|
425
|
+
if (lc != rc || lit->second != rit->second)
|
|
426
|
+
return false;
|
|
427
|
+
}
|
|
428
|
+
return true;
|
|
429
|
+
}
|
|
430
|
+
//@}
|
|
431
|
+
|
|
432
|
+
/// Two conditional points-to set are aliased when they access the same memory
|
|
433
|
+
/// location under the same condition
|
|
434
|
+
inline bool aliased(const CondPointsToSet<Cond>& rhs) const
|
|
435
|
+
{
|
|
436
|
+
if (pointsTo().empty() || rhs.pointsTo().empty())
|
|
437
|
+
return false;
|
|
438
|
+
else
|
|
439
|
+
{
|
|
440
|
+
CondPtsConstIter lit = cptsBegin(), elit = cptsEnd();
|
|
441
|
+
for (; lit != elit; ++lit)
|
|
442
|
+
{
|
|
443
|
+
const Cond& lc = lit->first;
|
|
444
|
+
const PointsTo& pts = lit->second;
|
|
445
|
+
CondPtsConstIter rit = rhs.pointsTo().find(lc);
|
|
446
|
+
if(rit !=rhs.pointsTo().end())
|
|
447
|
+
{
|
|
448
|
+
const PointsTo& rpts = rit->second;
|
|
449
|
+
if (pts.intersects(rpts))
|
|
450
|
+
return true;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/// Check whether this CondPointsToSet is a subset of RHS
|
|
458
|
+
inline bool isSubset(const CondPointsToSet<Cond>& rhs) const
|
|
459
|
+
{
|
|
460
|
+
if (pointsTo().size() > rhs.pointsTo().size())
|
|
461
|
+
return false;
|
|
462
|
+
else
|
|
463
|
+
{
|
|
464
|
+
CondPtsConstIter lit = cptsBegin(), elit = cptsEnd();
|
|
465
|
+
for (; lit != elit; ++lit)
|
|
466
|
+
{
|
|
467
|
+
const Cond& lc = lit->first;
|
|
468
|
+
CondPtsConstIter rit = rhs.pointsTo().find(lc);
|
|
469
|
+
if (rit == rhs.pointsTo().end())
|
|
470
|
+
return false;
|
|
471
|
+
else
|
|
472
|
+
{
|
|
473
|
+
const PointsTo& pts = lit->second;
|
|
474
|
+
const PointsTo& rpts = rit->second;
|
|
475
|
+
if (!rpts.contains(pts))
|
|
476
|
+
return false;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/// Return TRUE if this and RHS share any common element.
|
|
484
|
+
bool intersects(const CondPointsToSet<Cond>* rhs) const
|
|
485
|
+
{
|
|
486
|
+
/// if either cpts is empty, just return.
|
|
487
|
+
if (pointsTo().empty() && rhs->pointsTo().empty())
|
|
488
|
+
return false;
|
|
489
|
+
|
|
490
|
+
CondPtsConstIter it = rhs->cptsBegin(), eit = rhs->cptsEnd();
|
|
491
|
+
for (; it != eit; ++it)
|
|
492
|
+
{
|
|
493
|
+
const Cond& cond = it->first;
|
|
494
|
+
if (hasPointsTo(cond))
|
|
495
|
+
{
|
|
496
|
+
const PointsTo& rhs_pts= it->second;
|
|
497
|
+
const PointsTo& pts= pointsTo(cond);
|
|
498
|
+
if (pts.intersects(rhs_pts))
|
|
499
|
+
return true;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/// Result of cpts1 & ~cpts2 is stored into this bitmap.
|
|
507
|
+
void intersectWithComplement(const CondPointsToSet<Cond>& cpts1, const CondPointsToSet<Cond>& cpts2)
|
|
508
|
+
{
|
|
509
|
+
if (cpts1.pointsTo().empty())
|
|
510
|
+
{
|
|
511
|
+
clear();
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
else if (cpts2.pointsTo().empty())
|
|
515
|
+
{
|
|
516
|
+
(*this) = cpts1;
|
|
517
|
+
}
|
|
518
|
+
else
|
|
519
|
+
{
|
|
520
|
+
CondPtsConstIter it1 = cpts1.cptsBegin(), eit1 = cpts1.cptsEnd();
|
|
521
|
+
for (; it1 != eit1; ++it1)
|
|
522
|
+
{
|
|
523
|
+
const Cond& cond = it1->first;
|
|
524
|
+
const PointsTo& pts1 = it1->second;
|
|
525
|
+
PointsTo& pts = pointsTo(cond);
|
|
526
|
+
if (cpts2.hasPointsTo(cond))
|
|
527
|
+
{
|
|
528
|
+
const PointsTo& pts2 = cpts2.pointsTo(cond);
|
|
529
|
+
pts.intersectWithComplement(pts1, pts2);
|
|
530
|
+
}
|
|
531
|
+
else
|
|
532
|
+
{
|
|
533
|
+
pts = pts1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/// Result of cur & ~cpts1 is stored into this bitmap.
|
|
540
|
+
void intersectWithComplement(const CondPointsToSet<Cond>& cpts1)
|
|
541
|
+
{
|
|
542
|
+
/// if either cpts is empty, just return.
|
|
543
|
+
if (empty() || cpts1.pointsTo().empty())
|
|
544
|
+
{
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
else
|
|
548
|
+
{
|
|
549
|
+
CondPtsIter it = cptsBegin(), eit = cptsEnd();
|
|
550
|
+
for (; it != eit; ++it)
|
|
551
|
+
{
|
|
552
|
+
const Cond& cond = it->first;
|
|
553
|
+
PointsTo& pts = it->second;
|
|
554
|
+
if (cpts1.hasPointsTo(cond))
|
|
555
|
+
{
|
|
556
|
+
const PointsTo& pts1 = cpts1.pointsTo(cond);
|
|
557
|
+
pts.intersectWithComplement(pts1);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/// Overloading operator &=
|
|
564
|
+
inline bool operator &= (const CondPointsToSet<Cond>& rhs)
|
|
565
|
+
{
|
|
566
|
+
if (empty())
|
|
567
|
+
{
|
|
568
|
+
return false;
|
|
569
|
+
}
|
|
570
|
+
else if (rhs.empty())
|
|
571
|
+
{
|
|
572
|
+
clear();
|
|
573
|
+
return true;
|
|
574
|
+
}
|
|
575
|
+
else
|
|
576
|
+
{
|
|
577
|
+
bool changed = false;
|
|
578
|
+
for (CondPtsIter it = cptsBegin(), eit = cptsEnd(); it != eit; ++it)
|
|
579
|
+
{
|
|
580
|
+
const Cond& cond = it->first;
|
|
581
|
+
PointsTo& pts = it->second;
|
|
582
|
+
if (rhs.hasPointsTo(cond))
|
|
583
|
+
{
|
|
584
|
+
if (pts &= rhs.pointsTo(cond))
|
|
585
|
+
changed = true;
|
|
586
|
+
}
|
|
587
|
+
else
|
|
588
|
+
{
|
|
589
|
+
if (!pts.empty())
|
|
590
|
+
{
|
|
591
|
+
pts.clear();
|
|
592
|
+
changed = true;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return changed;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/// Overloading operator !=
|
|
601
|
+
inline bool operator!=(const CondPointsToSet<Cond>& rhs)
|
|
602
|
+
{
|
|
603
|
+
return !(*this == rhs);
|
|
604
|
+
}
|
|
605
|
+
//@}
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
/// Overloading operator |=
|
|
609
|
+
/// Merge CondPointsToSet of RHS into this one.
|
|
610
|
+
inline bool operator |= (const CondPointsToSet<Cond>& rhs)
|
|
611
|
+
{
|
|
612
|
+
bool changed = false;
|
|
613
|
+
CondPtsConstIter rhsIt = rhs.cptsBegin();
|
|
614
|
+
CondPtsConstIter rhsEit = rhs.cptsEnd();
|
|
615
|
+
for (; rhsIt != rhsEit; ++rhsIt)
|
|
616
|
+
{
|
|
617
|
+
const Cond& cond = rhsIt->first;
|
|
618
|
+
const PointsTo& rhsPts = rhsIt->second;
|
|
619
|
+
PointsTo& pts = pointsTo(cond);
|
|
620
|
+
if ((pts |= rhsPts))
|
|
621
|
+
changed = true;
|
|
622
|
+
}
|
|
623
|
+
return changed;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Compare two CondPointsToSet according to their points-to set size and
|
|
628
|
+
* points-to elements.
|
|
629
|
+
* 1. CondPointsToSet with smaller points-to set size is smaller than the other;
|
|
630
|
+
* 2. If the sizes are equal, comparing the conditions and real points-to targets in
|
|
631
|
+
* their points-to elements.
|
|
632
|
+
*/
|
|
633
|
+
// TODO: try to use an efficient method to compare two conditional points-to set.
|
|
634
|
+
inline bool operator< (const CondPointsToSet<Cond>& rhs) const
|
|
635
|
+
{
|
|
636
|
+
if (pointsTo().size() < rhs.pointsTo().size())
|
|
637
|
+
return true;
|
|
638
|
+
else if (pointsTo().size() == rhs.pointsTo().size())
|
|
639
|
+
{
|
|
640
|
+
CondPtsConstIter lit = cptsBegin(), elit = cptsEnd();
|
|
641
|
+
CondPtsConstIter rit = rhs.cptsBegin(), erit = rhs.cptsEnd();
|
|
642
|
+
for (; lit != elit && rit != erit; ++lit, ++rit)
|
|
643
|
+
{
|
|
644
|
+
const Cond& lc = lit->first;
|
|
645
|
+
const Cond& rc = rit->first;
|
|
646
|
+
if (lc < rc)
|
|
647
|
+
return true;
|
|
648
|
+
else if (lc == rc)
|
|
649
|
+
{
|
|
650
|
+
const PointsTo& lpts = lit->second;
|
|
651
|
+
const PointsTo& rpts = rit->second;
|
|
652
|
+
if (lpts.count() < rpts.count())
|
|
653
|
+
return true;
|
|
654
|
+
else if (lpts.count() == rpts.count())
|
|
655
|
+
{
|
|
656
|
+
PointsTo::iterator bit = lpts.begin();
|
|
657
|
+
PointsTo::iterator eit = lpts.end();
|
|
658
|
+
PointsTo::iterator rbit = rpts.begin();
|
|
659
|
+
PointsTo::iterator reit = rpts.end();
|
|
660
|
+
for (; bit != eit && rbit != reit; bit++, rbit++)
|
|
661
|
+
{
|
|
662
|
+
if (*bit < *rbit)
|
|
663
|
+
return true;
|
|
664
|
+
else if (*bit > *rbit)
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
else
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
else
|
|
672
|
+
return false;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/// Test and set
|
|
679
|
+
//@{
|
|
680
|
+
inline bool test_and_set(const SingleCondVar& var)
|
|
681
|
+
{
|
|
682
|
+
PointsTo& pts = pointsTo(var.get_cond());
|
|
683
|
+
return pts.test_and_set(var.get_id());
|
|
684
|
+
}
|
|
685
|
+
inline bool test(const SingleCondVar& var) const
|
|
686
|
+
{
|
|
687
|
+
if (hasPointsTo(var.get_cond()))
|
|
688
|
+
{
|
|
689
|
+
const PointsTo& pts = pointsTo(var.get_cond());
|
|
690
|
+
return pts.test(var.get_id());
|
|
691
|
+
}
|
|
692
|
+
return false;
|
|
693
|
+
}
|
|
694
|
+
inline void set(const SingleCondVar& var)
|
|
695
|
+
{
|
|
696
|
+
PointsTo& pts = pointsTo(var.get_cond());
|
|
697
|
+
pts.set(var.get_id());
|
|
698
|
+
}
|
|
699
|
+
inline void reset(const SingleCondVar& var)
|
|
700
|
+
{
|
|
701
|
+
if (hasPointsTo(var.get_cond()))
|
|
702
|
+
{
|
|
703
|
+
PointsTo& pts = pointsTo(var.get_cond());
|
|
704
|
+
pts.reset(var.get_id());
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
//@}
|
|
708
|
+
|
|
709
|
+
// Print all points-to targets
|
|
710
|
+
//@{
|
|
711
|
+
inline void dump(OutStream & O) const
|
|
712
|
+
{
|
|
713
|
+
CondPtsConstIter it = cptsBegin();
|
|
714
|
+
CondPtsConstIter eit = cptsEnd();
|
|
715
|
+
for (; it != eit; it++)
|
|
716
|
+
{
|
|
717
|
+
const PointsTo& pts = it->second;
|
|
718
|
+
O << "pts{";
|
|
719
|
+
SVFUtil::dumpSet(pts, O);
|
|
720
|
+
O << "}";
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
inline std::string dumpStr() const
|
|
724
|
+
{
|
|
725
|
+
std::string str;
|
|
726
|
+
CondPtsConstIter it = cptsBegin();
|
|
727
|
+
CondPtsConstIter eit = cptsEnd();
|
|
728
|
+
for (; it != eit; it++)
|
|
729
|
+
{
|
|
730
|
+
const PointsTo& pts = it->second;
|
|
731
|
+
str += "pts{";
|
|
732
|
+
for (PointsTo::iterator ii = pts.begin(), ie = pts.end();
|
|
733
|
+
ii != ie; ii++)
|
|
734
|
+
{
|
|
735
|
+
char int2str[16];
|
|
736
|
+
snprintf(int2str, sizeof(int2str), "%d", *ii);
|
|
737
|
+
str += int2str;
|
|
738
|
+
str += " ";
|
|
739
|
+
}
|
|
740
|
+
str += "}";
|
|
741
|
+
}
|
|
742
|
+
return str;
|
|
743
|
+
}
|
|
744
|
+
//@}
|
|
745
|
+
|
|
746
|
+
private:
|
|
747
|
+
|
|
748
|
+
/// Conditional Points-to Set Iterator
|
|
749
|
+
class CondPtsSetIterator
|
|
750
|
+
{
|
|
751
|
+
public:
|
|
752
|
+
CondPtsSetIterator(CondPointsToSet<Cond> &n, bool ae = false)
|
|
753
|
+
: _curIter(n.cptsBegin()), _endIter(n.cptsEnd()),
|
|
754
|
+
_ptIter(_curIter->second.begin()), _ptEndIter(_curIter->second.end()), atEnd(ae) {}
|
|
755
|
+
~CondPtsSetIterator() {}
|
|
756
|
+
bool operator != (int val)
|
|
757
|
+
{
|
|
758
|
+
return _curIter != _endIter;
|
|
759
|
+
}
|
|
760
|
+
/// Operator overloading
|
|
761
|
+
//@{
|
|
762
|
+
bool operator==(const CondPtsSetIterator &RHS) const
|
|
763
|
+
{
|
|
764
|
+
// If they are both at the end, ignore the rest of the fields.
|
|
765
|
+
if (atEnd && RHS.atEnd)
|
|
766
|
+
return true;
|
|
767
|
+
// Otherwise they are the same if they have the same condVar
|
|
768
|
+
return atEnd == RHS.atEnd && RHS._curIter == _curIter && RHS._ptIter == _ptIter;
|
|
769
|
+
}
|
|
770
|
+
bool operator!=(const CondPtsSetIterator &RHS) const
|
|
771
|
+
{
|
|
772
|
+
return !(*this == RHS);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
void operator ++(void)
|
|
776
|
+
{
|
|
777
|
+
if(atEnd == true)
|
|
778
|
+
return;
|
|
779
|
+
|
|
780
|
+
if(_ptIter==_ptEndIter)
|
|
781
|
+
{
|
|
782
|
+
if(_curIter == _endIter)
|
|
783
|
+
{
|
|
784
|
+
atEnd = true;
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
_curIter++;
|
|
788
|
+
_ptIter = _curIter->second.begin();
|
|
789
|
+
_ptIter = _curIter->second.end();
|
|
790
|
+
}
|
|
791
|
+
else
|
|
792
|
+
_ptIter++;
|
|
793
|
+
}
|
|
794
|
+
SingleCondVar operator *(void)
|
|
795
|
+
{
|
|
796
|
+
SingleCondVar temp_var(cond(), *_ptIter);
|
|
797
|
+
return temp_var;
|
|
798
|
+
}
|
|
799
|
+
//@}
|
|
800
|
+
|
|
801
|
+
Cond cond(void)
|
|
802
|
+
{
|
|
803
|
+
return _curIter->first;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
private:
|
|
807
|
+
typename CondPointsToSet<Cond>::CondPtsIter _curIter;
|
|
808
|
+
typename CondPointsToSet<Cond>::CondPtsIter _endIter;
|
|
809
|
+
PointsTo::iterator _ptIter;
|
|
810
|
+
PointsTo::iterator _ptEndIter;
|
|
811
|
+
bool atEnd;
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
public:
|
|
815
|
+
typedef CondPtsSetIterator iterator;
|
|
816
|
+
/// iterators
|
|
817
|
+
//@{
|
|
818
|
+
inline iterator begin()
|
|
819
|
+
{
|
|
820
|
+
return iterator(this);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
inline iterator end()
|
|
824
|
+
{
|
|
825
|
+
return iterator(this,true);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
inline iterator begin() const
|
|
829
|
+
{
|
|
830
|
+
return iterator(this);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
inline iterator end() const
|
|
834
|
+
{
|
|
835
|
+
return iterator(this,true);
|
|
836
|
+
}
|
|
837
|
+
//@}
|
|
838
|
+
|
|
839
|
+
private:
|
|
840
|
+
CondPts _condPts;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
} // End namespace SVF
|
|
844
|
+
|
|
845
|
+
/// Specialise hash for CondVar
|
|
846
|
+
template <typename Cond>
|
|
847
|
+
struct std::hash<const SVF::CondVar<Cond>>
|
|
848
|
+
{
|
|
849
|
+
size_t operator()(const SVF::CondVar<Cond> &cv) const
|
|
850
|
+
{
|
|
851
|
+
std::hash<Cond> h;
|
|
852
|
+
return h(cv.get_cond());
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
template <typename Cond>
|
|
857
|
+
struct std::hash<SVF::CondVar<Cond>>
|
|
858
|
+
{
|
|
859
|
+
size_t operator()(const SVF::CondVar<Cond> &cv) const
|
|
860
|
+
{
|
|
861
|
+
std::hash<Cond> h;
|
|
862
|
+
return h(cv.get_cond());
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
template <typename Element>
|
|
867
|
+
struct std::hash<SVF::CondStdSet<Element>>
|
|
868
|
+
{
|
|
869
|
+
size_t operator()(const SVF::CondStdSet<Element> &css) const
|
|
870
|
+
{
|
|
871
|
+
// TODO: this is not a very good hash, but we probably won't be
|
|
872
|
+
// using it for now. Needed for other templates to compile...
|
|
873
|
+
SVF::Hash<std::pair<Element, unsigned>> h;
|
|
874
|
+
return h(std::make_pair(*css.begin(), css.size()));
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
#endif /* CONDVAR_H_ */
|