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,188 @@
|
|
|
1
|
+
//===- ThreadAPI.h -- API for threads-----------------------------------------//
|
|
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
|
+
* ThreadAPI.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: Jan 21, 2014
|
|
27
|
+
* Author: Yulei Sui, dye
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef THREADAPI_H_
|
|
31
|
+
#define THREADAPI_H_
|
|
32
|
+
|
|
33
|
+
#include "SVFIR/SVFValue.h"
|
|
34
|
+
|
|
35
|
+
namespace SVF
|
|
36
|
+
{
|
|
37
|
+
|
|
38
|
+
class ICFGNode;
|
|
39
|
+
class CallICFGNode;
|
|
40
|
+
class SVFVar;
|
|
41
|
+
class ValVar;
|
|
42
|
+
class ObjVar;
|
|
43
|
+
class FunObjVar;
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* ThreadAPI class contains interfaces for pthread programs
|
|
47
|
+
*/
|
|
48
|
+
class ThreadAPI
|
|
49
|
+
{
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
enum TD_TYPE
|
|
53
|
+
{
|
|
54
|
+
TD_DUMMY = 0, /// dummy type
|
|
55
|
+
TD_FORK, /// create a new thread
|
|
56
|
+
TD_JOIN, /// wait for a thread to join
|
|
57
|
+
TD_DETACH, /// detach a thread directly instead wait for it to join
|
|
58
|
+
TD_ACQUIRE, /// acquire a lock
|
|
59
|
+
TD_TRY_ACQUIRE, /// try to acquire a lock
|
|
60
|
+
TD_RELEASE, /// release a lock
|
|
61
|
+
TD_EXIT, /// exit/kill a thread
|
|
62
|
+
TD_CANCEL, /// cancel a thread by another
|
|
63
|
+
TD_COND_WAIT, /// wait a condition
|
|
64
|
+
TD_COND_SIGNAL, /// signal a condition
|
|
65
|
+
TD_COND_BROADCAST, /// broadcast a condition
|
|
66
|
+
TD_MUTEX_INI, /// initial a mutex variable
|
|
67
|
+
TD_MUTEX_DESTROY, /// initial a mutex variable
|
|
68
|
+
TD_CONDVAR_INI, /// initial a mutex variable
|
|
69
|
+
TD_CONDVAR_DESTROY, /// initial a mutex variable
|
|
70
|
+
TD_BAR_INIT, /// Barrier init
|
|
71
|
+
TD_BAR_WAIT, /// Barrier wait
|
|
72
|
+
HARE_PAR_FOR
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
typedef Map<std::string, TD_TYPE> TDAPIMap;
|
|
76
|
+
|
|
77
|
+
private:
|
|
78
|
+
/// API map, from a string to threadAPI type
|
|
79
|
+
TDAPIMap tdAPIMap;
|
|
80
|
+
|
|
81
|
+
/// Constructor
|
|
82
|
+
ThreadAPI ()
|
|
83
|
+
{
|
|
84
|
+
init();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/// Initialize the map
|
|
88
|
+
void init();
|
|
89
|
+
|
|
90
|
+
/// Static reference
|
|
91
|
+
static ThreadAPI* tdAPI;
|
|
92
|
+
|
|
93
|
+
/// Get the function type if it is a threadAPI function
|
|
94
|
+
TD_TYPE getType(const FunObjVar* F) const;
|
|
95
|
+
|
|
96
|
+
public:
|
|
97
|
+
/// Return a static reference
|
|
98
|
+
static ThreadAPI* getThreadAPI()
|
|
99
|
+
{
|
|
100
|
+
if(tdAPI == nullptr)
|
|
101
|
+
{
|
|
102
|
+
tdAPI = new ThreadAPI();
|
|
103
|
+
}
|
|
104
|
+
return tdAPI;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static void destroy()
|
|
108
|
+
{
|
|
109
|
+
if(tdAPI != nullptr)
|
|
110
|
+
{
|
|
111
|
+
delete tdAPI;
|
|
112
|
+
tdAPI = nullptr;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// Return arguments/attributes of pthread_create / hare_parallel_for
|
|
117
|
+
//@{
|
|
118
|
+
/// Return the first argument of the call,
|
|
119
|
+
/// Note that, it is the pthread_t pointer
|
|
120
|
+
const ValVar* getForkedThread(const CallICFGNode *inst) const;
|
|
121
|
+
/// Return the third argument of the call,
|
|
122
|
+
/// Note that, it could be function type or a void* pointer
|
|
123
|
+
const ValVar* getForkedFun(const CallICFGNode *inst) const;
|
|
124
|
+
|
|
125
|
+
/// Return the forth argument of the call,
|
|
126
|
+
/// Note that, it is the sole argument of start routine ( a void* pointer )
|
|
127
|
+
const ValVar* getActualParmAtForkSite(const CallICFGNode *inst) const;
|
|
128
|
+
|
|
129
|
+
/// Return the formal parm of forked function (the first arg in pthread)
|
|
130
|
+
const SVFVar* getFormalParmOfForkedFun(const FunObjVar* F) const;
|
|
131
|
+
//@}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/// Return true if this call create a new thread
|
|
136
|
+
//@{
|
|
137
|
+
bool isTDFork(const CallICFGNode *inst) const;
|
|
138
|
+
//@}
|
|
139
|
+
|
|
140
|
+
/// Return true if this call wait for a worker thread
|
|
141
|
+
//@{
|
|
142
|
+
bool isTDJoin(const CallICFGNode *inst) const;
|
|
143
|
+
//@}
|
|
144
|
+
|
|
145
|
+
/// Return arguments/attributes of pthread_join
|
|
146
|
+
//@{
|
|
147
|
+
/// Return the first argument of the call,
|
|
148
|
+
/// Note that, it is the pthread_t pointer
|
|
149
|
+
const SVFVar* getJoinedThread(const CallICFGNode *inst) const;
|
|
150
|
+
/// Return the send argument of the call,
|
|
151
|
+
/// Note that, it is the pthread_t pointer
|
|
152
|
+
const SVFVar* getRetParmAtJoinedSite(const CallICFGNode *inst) const;
|
|
153
|
+
//@}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
/// Return true if this call exits/terminate a thread
|
|
157
|
+
//@{
|
|
158
|
+
bool isTDExit(const CallICFGNode *inst) const;
|
|
159
|
+
//@}
|
|
160
|
+
|
|
161
|
+
/// Return true if this call acquire a lock
|
|
162
|
+
//@{
|
|
163
|
+
bool isTDAcquire(const CallICFGNode* inst) const;
|
|
164
|
+
//@}
|
|
165
|
+
|
|
166
|
+
/// Return true if this call release a lock
|
|
167
|
+
//@{
|
|
168
|
+
bool isTDRelease(const CallICFGNode *inst) const;
|
|
169
|
+
//@}
|
|
170
|
+
|
|
171
|
+
/// Return lock value
|
|
172
|
+
//@{
|
|
173
|
+
/// First argument of pthread_mutex_lock/pthread_mutex_unlock
|
|
174
|
+
const SVFVar* getLockVal(const ICFGNode *inst) const;
|
|
175
|
+
//@}
|
|
176
|
+
|
|
177
|
+
/// Return true if this call waits for a barrier
|
|
178
|
+
//@{
|
|
179
|
+
bool isTDBarWait(const CallICFGNode *inst) const;
|
|
180
|
+
//@}
|
|
181
|
+
|
|
182
|
+
void performAPIStat();
|
|
183
|
+
void statInit(Map<std::string, u32_t>& tdAPIStatMap);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
} // End namespace SVF
|
|
187
|
+
|
|
188
|
+
#endif /* THREADAPI_H_ */
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
//===- WorkList.h -- Internal worklist used in SVF---------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2017> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU Affero General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* @file: WorkList.h
|
|
25
|
+
* @author: yesen
|
|
26
|
+
* @date: 06/12/2013
|
|
27
|
+
* @version: 1.0
|
|
28
|
+
*
|
|
29
|
+
* @section LICENSE
|
|
30
|
+
*
|
|
31
|
+
* @section DESCRIPTION
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#ifndef WORKLIST_H_
|
|
37
|
+
#define WORKLIST_H_
|
|
38
|
+
|
|
39
|
+
#include "SVFIR/SVFValue.h"
|
|
40
|
+
|
|
41
|
+
#include <assert.h>
|
|
42
|
+
#include <cstdlib>
|
|
43
|
+
#include <vector>
|
|
44
|
+
#include <deque>
|
|
45
|
+
#include <set>
|
|
46
|
+
|
|
47
|
+
namespace SVF
|
|
48
|
+
{
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Worklist with "first come first go" order.
|
|
52
|
+
* New nodes pushed at back and popped from front.
|
|
53
|
+
* Elements in the list are unique as they're recorded by Set.
|
|
54
|
+
*/
|
|
55
|
+
template<class Data>
|
|
56
|
+
class List
|
|
57
|
+
{
|
|
58
|
+
class ListNode
|
|
59
|
+
{
|
|
60
|
+
public:
|
|
61
|
+
ListNode(const Data &d)
|
|
62
|
+
{
|
|
63
|
+
data = d;
|
|
64
|
+
next = nullptr;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
~ListNode() {}
|
|
68
|
+
|
|
69
|
+
Data data;
|
|
70
|
+
ListNode *next;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
typedef Set<Data> DataSet;
|
|
74
|
+
typedef ListNode Node;
|
|
75
|
+
|
|
76
|
+
public:
|
|
77
|
+
List()
|
|
78
|
+
{
|
|
79
|
+
head = nullptr;
|
|
80
|
+
tail = nullptr;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
~List() {}
|
|
84
|
+
|
|
85
|
+
inline bool empty() const
|
|
86
|
+
{
|
|
87
|
+
return (head == nullptr);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
inline bool find(const Data &data) const
|
|
91
|
+
{
|
|
92
|
+
return nodeSet.find(data) != nodeSet.end();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
void push(const Data &data)
|
|
96
|
+
{
|
|
97
|
+
if (nodeSet.find(data) == nodeSet.end())
|
|
98
|
+
{
|
|
99
|
+
Node *new_node = new Node(data);
|
|
100
|
+
if (head == nullptr)
|
|
101
|
+
head = new_node;// the list is empty
|
|
102
|
+
else
|
|
103
|
+
tail->next = new_node;
|
|
104
|
+
tail = new_node;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
Data pop()
|
|
109
|
+
{
|
|
110
|
+
assert(head != nullptr && "list is empty");
|
|
111
|
+
/// get node from list head
|
|
112
|
+
Node *head_node = head;
|
|
113
|
+
|
|
114
|
+
/// change list head to the next node
|
|
115
|
+
head = head->next;
|
|
116
|
+
if (head == nullptr)
|
|
117
|
+
tail = nullptr; /// the last node is popped.
|
|
118
|
+
|
|
119
|
+
Data data = head_node->data;
|
|
120
|
+
nodeSet.erase(data);
|
|
121
|
+
delete head_node;
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private:
|
|
126
|
+
DataSet nodeSet;
|
|
127
|
+
Node *head;
|
|
128
|
+
Node *tail;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Worklist with "first in first out" order.
|
|
133
|
+
* New nodes will be pushed at back and popped from front.
|
|
134
|
+
* Elements in the list are unique as they're recorded by Set.
|
|
135
|
+
*/
|
|
136
|
+
template<class Data>
|
|
137
|
+
class FIFOWorkList
|
|
138
|
+
{
|
|
139
|
+
typedef Set<Data> DataSet;
|
|
140
|
+
typedef std::deque<Data> DataDeque;
|
|
141
|
+
public:
|
|
142
|
+
FIFOWorkList() {}
|
|
143
|
+
|
|
144
|
+
~FIFOWorkList() {}
|
|
145
|
+
|
|
146
|
+
inline bool empty() const
|
|
147
|
+
{
|
|
148
|
+
return data_list.empty();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
inline u32_t size() const
|
|
152
|
+
{
|
|
153
|
+
assert(data_list.size() == data_set.size() && "list and set must be the same size!");
|
|
154
|
+
return data_list.size();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
inline bool find(const Data &data) const
|
|
158
|
+
{
|
|
159
|
+
return data_set.find(data) != data_set.end();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Push a data into the work list.
|
|
164
|
+
*/
|
|
165
|
+
inline bool push(const Data &data)
|
|
166
|
+
{
|
|
167
|
+
if (!find(data))
|
|
168
|
+
{
|
|
169
|
+
data_list.push_back(data);
|
|
170
|
+
data_set.insert(data);
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
else
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Remove a data from the END of work list, no return value
|
|
179
|
+
*/
|
|
180
|
+
inline void removeFront()
|
|
181
|
+
{
|
|
182
|
+
assert(!empty() && "work list is empty");
|
|
183
|
+
data_set.erase(front());
|
|
184
|
+
data_list.pop_front();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Get reference of top data from the END of work list.
|
|
189
|
+
*/
|
|
190
|
+
inline Data &front()
|
|
191
|
+
{
|
|
192
|
+
assert(!empty() && "work list is empty");
|
|
193
|
+
Data &data = data_list.front();
|
|
194
|
+
return data;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Pop a data from the END of work list.
|
|
199
|
+
*/
|
|
200
|
+
inline Data pop()
|
|
201
|
+
{
|
|
202
|
+
assert(!empty() && "work list is empty");
|
|
203
|
+
Data data = data_list.front();
|
|
204
|
+
data_list.pop_front();
|
|
205
|
+
data_set.erase(data);
|
|
206
|
+
return data;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/*!
|
|
210
|
+
* Clear all the data
|
|
211
|
+
*/
|
|
212
|
+
inline void clear()
|
|
213
|
+
{
|
|
214
|
+
data_list.clear();
|
|
215
|
+
data_set.clear();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private:
|
|
219
|
+
DataSet data_set; ///< store all data in the work list.
|
|
220
|
+
DataDeque data_list; ///< work list using std::vector.
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Worklist with "first in last out" order.
|
|
225
|
+
* New nodes will be pushed at back and popped from back.
|
|
226
|
+
* Elements in the list are unique as they're recorded by Set.
|
|
227
|
+
*/
|
|
228
|
+
template<class Data>
|
|
229
|
+
class FILOWorkList
|
|
230
|
+
{
|
|
231
|
+
typedef Set<Data> DataSet;
|
|
232
|
+
typedef std::vector<Data> DataVector;
|
|
233
|
+
public:
|
|
234
|
+
FILOWorkList() {}
|
|
235
|
+
|
|
236
|
+
~FILOWorkList() {}
|
|
237
|
+
|
|
238
|
+
inline bool empty() const
|
|
239
|
+
{
|
|
240
|
+
return data_list.empty();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
inline u32_t size() const
|
|
244
|
+
{
|
|
245
|
+
assert(data_list.size() == data_set.size() && "list and set must be the same size!");
|
|
246
|
+
return data_list.size();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
inline bool find(const Data &data) const
|
|
250
|
+
{
|
|
251
|
+
return data_set.find(data) != data_set.end();;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Push a data into the work list.
|
|
256
|
+
*/
|
|
257
|
+
inline bool push(const Data &data)
|
|
258
|
+
{
|
|
259
|
+
if (!find(data))
|
|
260
|
+
{
|
|
261
|
+
data_list.push_back(data);
|
|
262
|
+
data_set.insert(data);
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
else
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Pop a data from the END of work list.
|
|
271
|
+
*/
|
|
272
|
+
inline Data pop()
|
|
273
|
+
{
|
|
274
|
+
assert(!empty() && "work list is empty");
|
|
275
|
+
Data data = data_list.back();
|
|
276
|
+
data_list.pop_back();
|
|
277
|
+
data_set.erase(data);
|
|
278
|
+
return data;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Remove a data from the END of work list, no return value
|
|
283
|
+
*/
|
|
284
|
+
inline void removeBack()
|
|
285
|
+
{
|
|
286
|
+
assert(!empty() && "work list is empty");
|
|
287
|
+
data_set.erase(back());
|
|
288
|
+
data_list.pop_back();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Get reference of top data from the END of work list.
|
|
293
|
+
*/
|
|
294
|
+
inline Data &back()
|
|
295
|
+
{
|
|
296
|
+
assert(!empty() && "work list is empty");
|
|
297
|
+
Data &data = data_list.back();
|
|
298
|
+
return data;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/*!
|
|
302
|
+
* Clear all the data
|
|
303
|
+
*/
|
|
304
|
+
inline void clear()
|
|
305
|
+
{
|
|
306
|
+
data_list.clear();
|
|
307
|
+
data_set.clear();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
private:
|
|
311
|
+
DataSet data_set; ///< store all data in the work list.
|
|
312
|
+
DataVector data_list; ///< work list using std::vector.
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
} // End namespace SVF
|
|
316
|
+
|
|
317
|
+
#endif /* WORKLIST_H_ */
|