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,1266 @@
|
|
|
1
|
+
//===- VFGNode.h ----------------------------------------------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2018> <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
|
+
* VFGNode.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: 18 Sep. 2018
|
|
27
|
+
* Author: Yulei Sui
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef INCLUDE_UTIL_VFGNODE_H_
|
|
31
|
+
#define INCLUDE_UTIL_VFGNODE_H_
|
|
32
|
+
|
|
33
|
+
#include "Graphs/GenericGraph.h"
|
|
34
|
+
#include "Graphs/SVFGEdge.h"
|
|
35
|
+
#include "Graphs/ICFGNode.h"
|
|
36
|
+
#include "SVFIR/SVFIR.h"
|
|
37
|
+
|
|
38
|
+
namespace SVF
|
|
39
|
+
{
|
|
40
|
+
|
|
41
|
+
/*!
|
|
42
|
+
* Interprocedural control-flow graph node, representing different kinds of program statements
|
|
43
|
+
* including top-level pointers (ValVar) and address-taken objects (ObjVar)
|
|
44
|
+
*/
|
|
45
|
+
typedef GenericNode<VFGNode,VFGEdge> GenericVFGNodeTy;
|
|
46
|
+
class VFGNode : public GenericVFGNodeTy
|
|
47
|
+
{
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/// 25 kinds of ICFG node
|
|
51
|
+
/// Gep represents offset edge for field sensitivity
|
|
52
|
+
typedef GNodeK VFGNodeK;
|
|
53
|
+
|
|
54
|
+
typedef VFGEdge::VFGEdgeSetTy::iterator iterator;
|
|
55
|
+
typedef VFGEdge::VFGEdgeSetTy::const_iterator const_iterator;
|
|
56
|
+
typedef Set<const CallPE*> CallPESet;
|
|
57
|
+
typedef Set<const RetPE*> RetPESet;
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
/// Constructor
|
|
61
|
+
VFGNode(NodeID i, VFGNodeK k): GenericVFGNodeTy(i,k), icfgNode(nullptr)
|
|
62
|
+
{
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// Return corresponding ICFG node
|
|
67
|
+
virtual const ICFGNode* getICFGNode() const
|
|
68
|
+
{
|
|
69
|
+
return icfgNode;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/// Set corresponding ICFG node
|
|
73
|
+
virtual void setICFGNode(const ICFGNode* node )
|
|
74
|
+
{
|
|
75
|
+
icfgNode = node;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// Get the function of this SVFGNode
|
|
79
|
+
virtual const FunObjVar* getFun() const
|
|
80
|
+
{
|
|
81
|
+
return icfgNode->getFun();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// Return the corresponding LLVM value, if possible, nullptr otherwise.
|
|
85
|
+
virtual const SVFVar* getValue() const
|
|
86
|
+
{
|
|
87
|
+
return nullptr;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/// Return the left hand side SVF Vars
|
|
91
|
+
virtual const NodeBS getDefSVFVars() const = 0;
|
|
92
|
+
|
|
93
|
+
/// Overloading operator << for dumping ICFG node ID
|
|
94
|
+
//@{
|
|
95
|
+
friend OutStream& operator<< (OutStream &o, const VFGNode &node)
|
|
96
|
+
{
|
|
97
|
+
o << node.toString();
|
|
98
|
+
return o;
|
|
99
|
+
}
|
|
100
|
+
//@}
|
|
101
|
+
|
|
102
|
+
virtual const std::string toString() const;
|
|
103
|
+
|
|
104
|
+
static inline bool classof(const VFGNode *)
|
|
105
|
+
{
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static inline bool classof(const GenericVFGNodeTy * node)
|
|
110
|
+
{
|
|
111
|
+
return isVFGNodeKinds(node->getNodeKind());
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
static inline bool classof(const SVFValue* node)
|
|
116
|
+
{
|
|
117
|
+
return isVFGNodeKinds(node->getNodeKind());
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
protected:
|
|
121
|
+
const ICFGNode* icfgNode;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/*!
|
|
125
|
+
* ICFG node stands for a program statement
|
|
126
|
+
*/
|
|
127
|
+
class StmtVFGNode : public VFGNode
|
|
128
|
+
{
|
|
129
|
+
|
|
130
|
+
private:
|
|
131
|
+
const PAGEdge* pagEdge;
|
|
132
|
+
|
|
133
|
+
public:
|
|
134
|
+
/// Constructor
|
|
135
|
+
StmtVFGNode(NodeID id, const PAGEdge* e, VFGNodeK k): VFGNode(id,k), pagEdge(e)
|
|
136
|
+
{
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/// Whether this node is used for pointer analysis. Both src and dst PAGNodes are of ptr type.
|
|
140
|
+
inline bool isPTANode() const
|
|
141
|
+
{
|
|
142
|
+
return pagEdge->isPTAEdge();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/// PAGNode and PAGEdge
|
|
146
|
+
///@{
|
|
147
|
+
inline const PAGEdge* getPAGEdge() const
|
|
148
|
+
{
|
|
149
|
+
return pagEdge;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
inline NodeID getPAGSrcNodeID() const
|
|
153
|
+
{
|
|
154
|
+
return pagEdge->getSrcID();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
inline NodeID getPAGDstNodeID() const
|
|
158
|
+
{
|
|
159
|
+
return pagEdge->getDstID();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
inline PAGNode* getPAGSrcNode() const
|
|
163
|
+
{
|
|
164
|
+
return pagEdge->getSrcNode();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
inline PAGNode* getPAGDstNode() const
|
|
168
|
+
{
|
|
169
|
+
return pagEdge->getDstNode();
|
|
170
|
+
}
|
|
171
|
+
//@}
|
|
172
|
+
|
|
173
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
174
|
+
//@{
|
|
175
|
+
static inline bool classof(const StmtVFGNode *)
|
|
176
|
+
{
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
static inline bool classof(const VFGNode *node)
|
|
180
|
+
{
|
|
181
|
+
return isStmtVFGNodeKinds(node->getNodeKind());
|
|
182
|
+
}
|
|
183
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
184
|
+
{
|
|
185
|
+
return isStmtVFGNodeKinds(node->getNodeKind());
|
|
186
|
+
}
|
|
187
|
+
static inline bool classof(const SVFValue*node)
|
|
188
|
+
{
|
|
189
|
+
return isStmtVFGNodeKinds(node->getNodeKind());
|
|
190
|
+
}
|
|
191
|
+
//@}
|
|
192
|
+
|
|
193
|
+
const SVFVar* getValue() const override;
|
|
194
|
+
const std::string toString() const override;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/*!
|
|
198
|
+
* VFGNode for loads
|
|
199
|
+
*/
|
|
200
|
+
class LoadVFGNode: public StmtVFGNode
|
|
201
|
+
{
|
|
202
|
+
private:
|
|
203
|
+
LoadVFGNode(); ///< place holder
|
|
204
|
+
LoadVFGNode(const LoadVFGNode &); ///< place holder
|
|
205
|
+
void operator=(const LoadVFGNode &); ///< place holder
|
|
206
|
+
|
|
207
|
+
public:
|
|
208
|
+
/// Constructor
|
|
209
|
+
LoadVFGNode(NodeID id, const LoadStmt* edge): StmtVFGNode(id, edge,Load)
|
|
210
|
+
{
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
214
|
+
//@{
|
|
215
|
+
static inline bool classof(const LoadVFGNode *)
|
|
216
|
+
{
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
static inline bool classof(const StmtVFGNode *node)
|
|
220
|
+
{
|
|
221
|
+
return node->getNodeKind() == Load;
|
|
222
|
+
}
|
|
223
|
+
static inline bool classof(const VFGNode *node)
|
|
224
|
+
{
|
|
225
|
+
return node->getNodeKind() == Load;
|
|
226
|
+
}
|
|
227
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
228
|
+
{
|
|
229
|
+
return node->getNodeKind() == Load;
|
|
230
|
+
}
|
|
231
|
+
static inline bool classof(const SVFValue*node)
|
|
232
|
+
{
|
|
233
|
+
return node->getNodeKind() == Load;
|
|
234
|
+
}
|
|
235
|
+
//@}
|
|
236
|
+
|
|
237
|
+
const NodeBS getDefSVFVars() const override;
|
|
238
|
+
|
|
239
|
+
const std::string toString() const override;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/*!
|
|
243
|
+
* VFGNode for stores
|
|
244
|
+
*/
|
|
245
|
+
class StoreVFGNode: public StmtVFGNode
|
|
246
|
+
{
|
|
247
|
+
private:
|
|
248
|
+
StoreVFGNode(); ///< place holder
|
|
249
|
+
StoreVFGNode(const StoreVFGNode &); ///< place holder
|
|
250
|
+
void operator=(const StoreVFGNode &); ///< place holder
|
|
251
|
+
|
|
252
|
+
public:
|
|
253
|
+
/// Constructor
|
|
254
|
+
StoreVFGNode(NodeID id,const StoreStmt* edge): StmtVFGNode(id,edge,Store)
|
|
255
|
+
{
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
259
|
+
//@{
|
|
260
|
+
static inline bool classof(const StoreVFGNode *)
|
|
261
|
+
{
|
|
262
|
+
return true;
|
|
263
|
+
}
|
|
264
|
+
static inline bool classof(const StmtVFGNode *node)
|
|
265
|
+
{
|
|
266
|
+
return node->getNodeKind() == Store;
|
|
267
|
+
}
|
|
268
|
+
static inline bool classof(const VFGNode *node)
|
|
269
|
+
{
|
|
270
|
+
return node->getNodeKind() == Store;
|
|
271
|
+
}
|
|
272
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
273
|
+
{
|
|
274
|
+
return node->getNodeKind() == Store;
|
|
275
|
+
}
|
|
276
|
+
static inline bool classof(const SVFValue*node)
|
|
277
|
+
{
|
|
278
|
+
return node->getNodeKind() == Store;
|
|
279
|
+
}
|
|
280
|
+
//@}
|
|
281
|
+
|
|
282
|
+
const NodeBS getDefSVFVars() const override;
|
|
283
|
+
|
|
284
|
+
const std::string toString() const override;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/*!
|
|
288
|
+
* VFGNode for copies
|
|
289
|
+
*/
|
|
290
|
+
class CopyVFGNode: public StmtVFGNode
|
|
291
|
+
{
|
|
292
|
+
private:
|
|
293
|
+
CopyVFGNode(); ///< place holder
|
|
294
|
+
CopyVFGNode(const CopyVFGNode &); ///< place holder
|
|
295
|
+
void operator=(const CopyVFGNode &); ///< place holder
|
|
296
|
+
|
|
297
|
+
public:
|
|
298
|
+
/// Constructor
|
|
299
|
+
CopyVFGNode(NodeID id,const CopyStmt* copy): StmtVFGNode(id,copy,Copy)
|
|
300
|
+
{
|
|
301
|
+
|
|
302
|
+
}
|
|
303
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
304
|
+
//@{
|
|
305
|
+
static inline bool classof(const CopyVFGNode *)
|
|
306
|
+
{
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
static inline bool classof(const StmtVFGNode *node)
|
|
310
|
+
{
|
|
311
|
+
return node->getNodeKind() == Copy;
|
|
312
|
+
}
|
|
313
|
+
static inline bool classof(const VFGNode *node)
|
|
314
|
+
{
|
|
315
|
+
return node->getNodeKind() == Copy;
|
|
316
|
+
}
|
|
317
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
318
|
+
{
|
|
319
|
+
return node->getNodeKind() == Copy;
|
|
320
|
+
}
|
|
321
|
+
static inline bool classof(const SVFValue*node)
|
|
322
|
+
{
|
|
323
|
+
return node->getNodeKind() == Copy;
|
|
324
|
+
}
|
|
325
|
+
//@}
|
|
326
|
+
|
|
327
|
+
const NodeBS getDefSVFVars() const override;
|
|
328
|
+
|
|
329
|
+
const std::string toString() const override;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/*!
|
|
334
|
+
* VFGNode for compare instruction, e.g., bool b = (a!=c);
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
class CmpVFGNode: public VFGNode
|
|
338
|
+
{
|
|
339
|
+
public:
|
|
340
|
+
typedef Map<u32_t,const PAGNode*> OPVers;
|
|
341
|
+
protected:
|
|
342
|
+
const PAGNode* res;
|
|
343
|
+
OPVers opVers;
|
|
344
|
+
|
|
345
|
+
private:
|
|
346
|
+
CmpVFGNode(); ///< place holder
|
|
347
|
+
CmpVFGNode(const CmpVFGNode &); ///< place holder
|
|
348
|
+
void operator=(const CmpVFGNode &); ///< place holder
|
|
349
|
+
|
|
350
|
+
public:
|
|
351
|
+
/// Constructor
|
|
352
|
+
CmpVFGNode(NodeID id,const PAGNode* r): VFGNode(id,Cmp), res(r) { }
|
|
353
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
354
|
+
//@{
|
|
355
|
+
static inline bool classof(const CmpVFGNode *)
|
|
356
|
+
{
|
|
357
|
+
return true;
|
|
358
|
+
}
|
|
359
|
+
static inline bool classof(const VFGNode *node)
|
|
360
|
+
{
|
|
361
|
+
return node->getNodeKind() == Cmp;
|
|
362
|
+
}
|
|
363
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
364
|
+
{
|
|
365
|
+
return node->getNodeKind() == Cmp;
|
|
366
|
+
}
|
|
367
|
+
static inline bool classof(const SVFValue*node)
|
|
368
|
+
{
|
|
369
|
+
return node->getNodeKind() == Cmp;
|
|
370
|
+
}
|
|
371
|
+
//@}
|
|
372
|
+
/// Operands at a BinaryNode
|
|
373
|
+
//@{
|
|
374
|
+
inline const PAGNode* getOpVer(u32_t pos) const
|
|
375
|
+
{
|
|
376
|
+
OPVers::const_iterator it = opVers.find(pos);
|
|
377
|
+
assert(it!=opVers.end() && "version is nullptr, did not rename?");
|
|
378
|
+
return it->second;
|
|
379
|
+
}
|
|
380
|
+
inline void setOpVer(u32_t pos, const PAGNode* node)
|
|
381
|
+
{
|
|
382
|
+
opVers[pos] = node;
|
|
383
|
+
}
|
|
384
|
+
inline const PAGNode* getRes() const
|
|
385
|
+
{
|
|
386
|
+
return res;
|
|
387
|
+
}
|
|
388
|
+
inline u32_t getOpVerNum() const
|
|
389
|
+
{
|
|
390
|
+
return opVers.size();
|
|
391
|
+
}
|
|
392
|
+
inline OPVers::const_iterator opVerBegin() const
|
|
393
|
+
{
|
|
394
|
+
return opVers.begin();
|
|
395
|
+
}
|
|
396
|
+
inline OPVers::const_iterator opVerEnd() const
|
|
397
|
+
{
|
|
398
|
+
return opVers.end();
|
|
399
|
+
}
|
|
400
|
+
//@}
|
|
401
|
+
|
|
402
|
+
const NodeBS getDefSVFVars() const override;
|
|
403
|
+
|
|
404
|
+
const SVFVar* getValue() const override;
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
const std::string toString() const override;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
/*!
|
|
412
|
+
* VFGNode for binary operator instructions, e.g., a = b + c;
|
|
413
|
+
*/
|
|
414
|
+
class BinaryOPVFGNode: public VFGNode
|
|
415
|
+
{
|
|
416
|
+
public:
|
|
417
|
+
typedef Map<u32_t,const PAGNode*> OPVers;
|
|
418
|
+
protected:
|
|
419
|
+
const PAGNode* res;
|
|
420
|
+
OPVers opVers;
|
|
421
|
+
|
|
422
|
+
private:
|
|
423
|
+
BinaryOPVFGNode(); ///< place holder
|
|
424
|
+
BinaryOPVFGNode(const BinaryOPVFGNode &); ///< place holder
|
|
425
|
+
void operator=(const BinaryOPVFGNode &); ///< place holder
|
|
426
|
+
|
|
427
|
+
public:
|
|
428
|
+
/// Constructor
|
|
429
|
+
BinaryOPVFGNode(NodeID id,const PAGNode* r): VFGNode(id,BinaryOp), res(r) { }
|
|
430
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
431
|
+
//@{
|
|
432
|
+
static inline bool classof(const BinaryOPVFGNode *)
|
|
433
|
+
{
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
static inline bool classof(const VFGNode *node)
|
|
437
|
+
{
|
|
438
|
+
return node->getNodeKind() == BinaryOp;
|
|
439
|
+
}
|
|
440
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
441
|
+
{
|
|
442
|
+
return node->getNodeKind() == BinaryOp;
|
|
443
|
+
}
|
|
444
|
+
static inline bool classof(const SVFValue*node)
|
|
445
|
+
{
|
|
446
|
+
return node->getNodeKind() == BinaryOp;
|
|
447
|
+
}
|
|
448
|
+
//@}
|
|
449
|
+
/// Operands at a BinaryNode
|
|
450
|
+
//@{
|
|
451
|
+
inline const PAGNode* getOpVer(u32_t pos) const
|
|
452
|
+
{
|
|
453
|
+
OPVers::const_iterator it = opVers.find(pos);
|
|
454
|
+
assert(it!=opVers.end() && "version is nullptr, did not rename?");
|
|
455
|
+
return it->second;
|
|
456
|
+
}
|
|
457
|
+
inline void setOpVer(u32_t pos, const PAGNode* node)
|
|
458
|
+
{
|
|
459
|
+
opVers[pos] = node;
|
|
460
|
+
}
|
|
461
|
+
inline const PAGNode* getRes() const
|
|
462
|
+
{
|
|
463
|
+
return res;
|
|
464
|
+
}
|
|
465
|
+
inline u32_t getOpVerNum() const
|
|
466
|
+
{
|
|
467
|
+
return opVers.size();
|
|
468
|
+
}
|
|
469
|
+
inline OPVers::const_iterator opVerBegin() const
|
|
470
|
+
{
|
|
471
|
+
return opVers.begin();
|
|
472
|
+
}
|
|
473
|
+
inline OPVers::const_iterator opVerEnd() const
|
|
474
|
+
{
|
|
475
|
+
return opVers.end();
|
|
476
|
+
}
|
|
477
|
+
//@}
|
|
478
|
+
|
|
479
|
+
const NodeBS getDefSVFVars() const override;
|
|
480
|
+
|
|
481
|
+
const SVFVar* getValue() const override;
|
|
482
|
+
const std::string toString() const override;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
/*!
|
|
486
|
+
* VFGNode for unary operator instructions, e.g., a = -b;
|
|
487
|
+
*/
|
|
488
|
+
class UnaryOPVFGNode: public VFGNode
|
|
489
|
+
{
|
|
490
|
+
public:
|
|
491
|
+
typedef Map<u32_t,const PAGNode*> OPVers;
|
|
492
|
+
protected:
|
|
493
|
+
const PAGNode* res;
|
|
494
|
+
OPVers opVers;
|
|
495
|
+
|
|
496
|
+
private:
|
|
497
|
+
UnaryOPVFGNode(); ///< place holder
|
|
498
|
+
UnaryOPVFGNode(const UnaryOPVFGNode &); ///< place holder
|
|
499
|
+
void operator=(const UnaryOPVFGNode &); ///< place holder
|
|
500
|
+
|
|
501
|
+
public:
|
|
502
|
+
/// Constructor
|
|
503
|
+
UnaryOPVFGNode(NodeID id, const PAGNode *r) : VFGNode(id, UnaryOp), res(r) { }
|
|
504
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
505
|
+
//@{
|
|
506
|
+
static inline bool classof(const UnaryOPVFGNode *)
|
|
507
|
+
{
|
|
508
|
+
return true;
|
|
509
|
+
}
|
|
510
|
+
static inline bool classof(const VFGNode *node)
|
|
511
|
+
{
|
|
512
|
+
return node->getNodeKind() == UnaryOp;
|
|
513
|
+
}
|
|
514
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
515
|
+
{
|
|
516
|
+
return node->getNodeKind() == UnaryOp;
|
|
517
|
+
}
|
|
518
|
+
static inline bool classof(const SVFValue*node)
|
|
519
|
+
{
|
|
520
|
+
return node->getNodeKind() == UnaryOp;
|
|
521
|
+
}
|
|
522
|
+
//@}
|
|
523
|
+
/// Operands at a UnaryNode
|
|
524
|
+
//@{
|
|
525
|
+
inline const PAGNode* getOpVer(u32_t pos) const
|
|
526
|
+
{
|
|
527
|
+
OPVers::const_iterator it = opVers.find(pos);
|
|
528
|
+
assert(it!=opVers.end() && "version is nullptr, did not rename?");
|
|
529
|
+
return it->second;
|
|
530
|
+
}
|
|
531
|
+
inline void setOpVer(u32_t pos, const PAGNode* node)
|
|
532
|
+
{
|
|
533
|
+
opVers[pos] = node;
|
|
534
|
+
}
|
|
535
|
+
inline const PAGNode* getRes() const
|
|
536
|
+
{
|
|
537
|
+
return res;
|
|
538
|
+
}
|
|
539
|
+
inline const PAGNode* getOpVar() const
|
|
540
|
+
{
|
|
541
|
+
assert(getOpVerNum()==1 && "UnaryNode can only have one operand!");
|
|
542
|
+
return getOpVer(0);
|
|
543
|
+
}
|
|
544
|
+
inline u32_t getOpVerNum() const
|
|
545
|
+
{
|
|
546
|
+
return opVers.size();
|
|
547
|
+
}
|
|
548
|
+
inline OPVers::const_iterator opVerBegin() const
|
|
549
|
+
{
|
|
550
|
+
return opVers.begin();
|
|
551
|
+
}
|
|
552
|
+
inline OPVers::const_iterator opVerEnd() const
|
|
553
|
+
{
|
|
554
|
+
return opVers.end();
|
|
555
|
+
}
|
|
556
|
+
//@}
|
|
557
|
+
|
|
558
|
+
const NodeBS getDefSVFVars() const override;
|
|
559
|
+
|
|
560
|
+
virtual const std::string toString() const override;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
/*
|
|
564
|
+
* Branch VFGNode including if/else and switch statements
|
|
565
|
+
*/
|
|
566
|
+
class BranchVFGNode: public VFGNode
|
|
567
|
+
{
|
|
568
|
+
private:
|
|
569
|
+
BranchVFGNode(); ///< place holder
|
|
570
|
+
BranchVFGNode(const BranchVFGNode &); ///< place holder
|
|
571
|
+
void operator=(const BranchVFGNode &); ///< place holder
|
|
572
|
+
const BranchStmt* brstmt;
|
|
573
|
+
public:
|
|
574
|
+
/// Constructor
|
|
575
|
+
BranchVFGNode(NodeID id, const BranchStmt* r) : VFGNode(id, Branch), brstmt(r) { }
|
|
576
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
577
|
+
//@{
|
|
578
|
+
static inline bool classof(const BranchVFGNode *)
|
|
579
|
+
{
|
|
580
|
+
return true;
|
|
581
|
+
}
|
|
582
|
+
static inline bool classof(const VFGNode *node)
|
|
583
|
+
{
|
|
584
|
+
return node->getNodeKind() == Branch;
|
|
585
|
+
}
|
|
586
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
587
|
+
{
|
|
588
|
+
return node->getNodeKind() == Branch;
|
|
589
|
+
}
|
|
590
|
+
static inline bool classof(const SVFValue*node)
|
|
591
|
+
{
|
|
592
|
+
return node->getNodeKind() == Branch;
|
|
593
|
+
}
|
|
594
|
+
//@}
|
|
595
|
+
|
|
596
|
+
/// Return the branch statement
|
|
597
|
+
const BranchStmt* getBranchStmt() const
|
|
598
|
+
{
|
|
599
|
+
return brstmt;
|
|
600
|
+
}
|
|
601
|
+
/// Successors of this branch statement
|
|
602
|
+
///@{
|
|
603
|
+
u32_t getNumSuccessors() const
|
|
604
|
+
{
|
|
605
|
+
return brstmt->getNumSuccessors();
|
|
606
|
+
}
|
|
607
|
+
const BranchStmt::SuccAndCondPairVec& getSuccessors() const
|
|
608
|
+
{
|
|
609
|
+
return brstmt->getSuccessors();
|
|
610
|
+
}
|
|
611
|
+
const ICFGNode* getSuccessor (u32_t i) const
|
|
612
|
+
{
|
|
613
|
+
return brstmt->getSuccessor(i);
|
|
614
|
+
}
|
|
615
|
+
///@}
|
|
616
|
+
|
|
617
|
+
const NodeBS getDefSVFVars() const override;
|
|
618
|
+
|
|
619
|
+
virtual const std::string toString() const override;
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
/*!
|
|
623
|
+
* VFGNode for Gep
|
|
624
|
+
*/
|
|
625
|
+
class GepVFGNode: public StmtVFGNode
|
|
626
|
+
{
|
|
627
|
+
private:
|
|
628
|
+
GepVFGNode(); ///< place holder
|
|
629
|
+
GepVFGNode(const GepVFGNode &); ///< place holder
|
|
630
|
+
void operator=(const GepVFGNode &); ///< place holder
|
|
631
|
+
|
|
632
|
+
public:
|
|
633
|
+
/// Constructor
|
|
634
|
+
GepVFGNode(NodeID id,const GepStmt* edge): StmtVFGNode(id,edge,Gep)
|
|
635
|
+
{
|
|
636
|
+
|
|
637
|
+
}
|
|
638
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
639
|
+
//@{
|
|
640
|
+
static inline bool classof(const GepVFGNode *)
|
|
641
|
+
{
|
|
642
|
+
return true;
|
|
643
|
+
}
|
|
644
|
+
static inline bool classof(const StmtVFGNode *node)
|
|
645
|
+
{
|
|
646
|
+
return node->getNodeKind() == Gep;
|
|
647
|
+
}
|
|
648
|
+
static inline bool classof(const VFGNode *node)
|
|
649
|
+
{
|
|
650
|
+
return node->getNodeKind() == Gep;
|
|
651
|
+
}
|
|
652
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
653
|
+
{
|
|
654
|
+
return node->getNodeKind() == Gep;
|
|
655
|
+
}
|
|
656
|
+
static inline bool classof(const SVFValue*node)
|
|
657
|
+
{
|
|
658
|
+
return node->getNodeKind() == Gep;
|
|
659
|
+
}
|
|
660
|
+
//@}
|
|
661
|
+
|
|
662
|
+
const NodeBS getDefSVFVars() const override;
|
|
663
|
+
|
|
664
|
+
const std::string toString() const override;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
/*
|
|
668
|
+
* ICFG Node stands for a top level pointer ssa phi node or a formal parameter or a return parameter
|
|
669
|
+
*/
|
|
670
|
+
class PHIVFGNode : public VFGNode
|
|
671
|
+
{
|
|
672
|
+
|
|
673
|
+
public:
|
|
674
|
+
typedef Map<u32_t,const PAGNode*> OPVers;
|
|
675
|
+
protected:
|
|
676
|
+
const PAGNode* res;
|
|
677
|
+
OPVers opVers;
|
|
678
|
+
|
|
679
|
+
public:
|
|
680
|
+
/// Constructor
|
|
681
|
+
PHIVFGNode(NodeID id, const PAGNode* r,VFGNodeK k = TPhi);
|
|
682
|
+
|
|
683
|
+
/// Whether this phi node is of pointer type (used for pointer analysis).
|
|
684
|
+
inline bool isPTANode() const
|
|
685
|
+
{
|
|
686
|
+
return res->isPointer();
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/// Operands at a llvm PHINode
|
|
690
|
+
//@{
|
|
691
|
+
inline const PAGNode* getOpVer(u32_t pos) const
|
|
692
|
+
{
|
|
693
|
+
OPVers::const_iterator it = opVers.find(pos);
|
|
694
|
+
assert(it!=opVers.end() && "version is nullptr, did not rename?");
|
|
695
|
+
return it->second;
|
|
696
|
+
}
|
|
697
|
+
inline void setOpVer(u32_t pos, const PAGNode* node)
|
|
698
|
+
{
|
|
699
|
+
opVers[pos] = node;
|
|
700
|
+
}
|
|
701
|
+
inline const PAGNode* getRes() const
|
|
702
|
+
{
|
|
703
|
+
return res;
|
|
704
|
+
}
|
|
705
|
+
inline u32_t getOpVerNum() const
|
|
706
|
+
{
|
|
707
|
+
return opVers.size();
|
|
708
|
+
}
|
|
709
|
+
inline OPVers::const_iterator opVerBegin() const
|
|
710
|
+
{
|
|
711
|
+
return opVers.begin();
|
|
712
|
+
}
|
|
713
|
+
inline OPVers::const_iterator opVerEnd() const
|
|
714
|
+
{
|
|
715
|
+
return opVers.end();
|
|
716
|
+
}
|
|
717
|
+
//@}
|
|
718
|
+
|
|
719
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
720
|
+
//@{
|
|
721
|
+
static inline bool classof(const PHIVFGNode *)
|
|
722
|
+
{
|
|
723
|
+
return true;
|
|
724
|
+
}
|
|
725
|
+
static inline bool classof(const VFGNode *node)
|
|
726
|
+
{
|
|
727
|
+
return isPHIVFGNodeKinds(node->getNodeKind());
|
|
728
|
+
}
|
|
729
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
730
|
+
{
|
|
731
|
+
return isPHIVFGNodeKinds(node->getNodeKind());
|
|
732
|
+
}
|
|
733
|
+
static inline bool classof(const SVFValue*node)
|
|
734
|
+
{
|
|
735
|
+
return isPHIVFGNodeKinds(node->getNodeKind());
|
|
736
|
+
}
|
|
737
|
+
//@}
|
|
738
|
+
|
|
739
|
+
const NodeBS getDefSVFVars() const override;
|
|
740
|
+
|
|
741
|
+
const SVFVar* getValue() const override;
|
|
742
|
+
const std::string toString() const override;
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
/*
|
|
747
|
+
* Intra LLVM PHI Node
|
|
748
|
+
*/
|
|
749
|
+
class IntraPHIVFGNode : public PHIVFGNode
|
|
750
|
+
{
|
|
751
|
+
|
|
752
|
+
public:
|
|
753
|
+
typedef Map<u32_t,const ICFGNode*> OPIncomingBBs;
|
|
754
|
+
|
|
755
|
+
private:
|
|
756
|
+
OPIncomingBBs opIncomingBBs;
|
|
757
|
+
public:
|
|
758
|
+
/// Constructor
|
|
759
|
+
IntraPHIVFGNode(NodeID id, const PAGNode* r): PHIVFGNode(id, r, TIntraPhi)
|
|
760
|
+
{
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
inline const ICFGNode* getOpIncomingBB(u32_t pos) const
|
|
764
|
+
{
|
|
765
|
+
OPIncomingBBs::const_iterator it = opIncomingBBs.find(pos);
|
|
766
|
+
assert(it!=opIncomingBBs.end() && "version is nullptr, did not rename?");
|
|
767
|
+
return it->second;
|
|
768
|
+
}
|
|
769
|
+
inline void setOpVerAndBB(u32_t pos, const PAGNode* node, const ICFGNode* bb)
|
|
770
|
+
{
|
|
771
|
+
opVers[pos] = node;
|
|
772
|
+
opIncomingBBs[pos] = bb;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
776
|
+
//@{
|
|
777
|
+
static inline bool classof(const IntraPHIVFGNode*)
|
|
778
|
+
{
|
|
779
|
+
return true;
|
|
780
|
+
}
|
|
781
|
+
static inline bool classof(const PHIVFGNode *node)
|
|
782
|
+
{
|
|
783
|
+
return node->getNodeKind() == TIntraPhi;
|
|
784
|
+
}
|
|
785
|
+
static inline bool classof(const VFGNode *node)
|
|
786
|
+
{
|
|
787
|
+
return node->getNodeKind() == TIntraPhi;
|
|
788
|
+
}
|
|
789
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
790
|
+
{
|
|
791
|
+
return node->getNodeKind() == TIntraPhi;
|
|
792
|
+
}
|
|
793
|
+
static inline bool classof(const SVFValue*node)
|
|
794
|
+
{
|
|
795
|
+
return node->getNodeKind() == TIntraPhi;
|
|
796
|
+
}
|
|
797
|
+
//@}
|
|
798
|
+
|
|
799
|
+
const std::string toString() const override;
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
class AddrVFGNode: public StmtVFGNode
|
|
804
|
+
{
|
|
805
|
+
private:
|
|
806
|
+
AddrVFGNode(); ///< place holder
|
|
807
|
+
AddrVFGNode(const AddrVFGNode &); ///< place holder
|
|
808
|
+
void operator=(const AddrVFGNode &); ///< place holder
|
|
809
|
+
|
|
810
|
+
public:
|
|
811
|
+
/// Constructor
|
|
812
|
+
AddrVFGNode(NodeID id, const AddrStmt* edge): StmtVFGNode(id, edge,Addr)
|
|
813
|
+
{
|
|
814
|
+
|
|
815
|
+
}
|
|
816
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
817
|
+
//@{
|
|
818
|
+
static inline bool classof(const AddrVFGNode *)
|
|
819
|
+
{
|
|
820
|
+
return true;
|
|
821
|
+
}
|
|
822
|
+
static inline bool classof(const StmtVFGNode *node)
|
|
823
|
+
{
|
|
824
|
+
return node->getNodeKind() == Addr;
|
|
825
|
+
}
|
|
826
|
+
static inline bool classof(const VFGNode *node)
|
|
827
|
+
{
|
|
828
|
+
return node->getNodeKind() == Addr;
|
|
829
|
+
}
|
|
830
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
831
|
+
{
|
|
832
|
+
return node->getNodeKind() == Addr;
|
|
833
|
+
}
|
|
834
|
+
static inline bool classof(const SVFValue*node)
|
|
835
|
+
{
|
|
836
|
+
return node->getNodeKind() == Addr;
|
|
837
|
+
}
|
|
838
|
+
//@}
|
|
839
|
+
|
|
840
|
+
const NodeBS getDefSVFVars() const override;
|
|
841
|
+
|
|
842
|
+
const std::string toString() const override;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
class ArgumentVFGNode : public VFGNode
|
|
847
|
+
{
|
|
848
|
+
|
|
849
|
+
protected:
|
|
850
|
+
const PAGNode* param;
|
|
851
|
+
|
|
852
|
+
public:
|
|
853
|
+
/// Constructor
|
|
854
|
+
ArgumentVFGNode(NodeID id, const PAGNode* p, VFGNodeK k): VFGNode(id,k), param(p)
|
|
855
|
+
{
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/// Whether this argument node is of pointer type (used for pointer analysis).
|
|
859
|
+
inline bool isPTANode() const
|
|
860
|
+
{
|
|
861
|
+
return param->isPointer();
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
865
|
+
//@{
|
|
866
|
+
static inline bool classof(const ArgumentVFGNode *)
|
|
867
|
+
{
|
|
868
|
+
return true;
|
|
869
|
+
}
|
|
870
|
+
static inline bool classof(const VFGNode *node)
|
|
871
|
+
{
|
|
872
|
+
return isArgumentVFGNodeKinds(node->getNodeKind());
|
|
873
|
+
}
|
|
874
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
875
|
+
{
|
|
876
|
+
return isArgumentVFGNodeKinds(node->getNodeKind());
|
|
877
|
+
}
|
|
878
|
+
static inline bool classof(const SVFValue*node)
|
|
879
|
+
{
|
|
880
|
+
return isArgumentVFGNodeKinds(node->getNodeKind());
|
|
881
|
+
}
|
|
882
|
+
//@}
|
|
883
|
+
|
|
884
|
+
const SVFVar* getValue() const override;
|
|
885
|
+
const std::string toString() const override;
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
/*
|
|
889
|
+
* ICFG Node stands for actual parameter node (top level pointers)
|
|
890
|
+
*/
|
|
891
|
+
class ActualParmVFGNode : public ArgumentVFGNode
|
|
892
|
+
{
|
|
893
|
+
private:
|
|
894
|
+
const CallICFGNode* cs;
|
|
895
|
+
public:
|
|
896
|
+
/// Constructor
|
|
897
|
+
ActualParmVFGNode(NodeID id, const PAGNode* n, const CallICFGNode* c) :
|
|
898
|
+
ArgumentVFGNode(id, n, AParm), cs(c)
|
|
899
|
+
{
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/// Return callsite
|
|
903
|
+
inline const CallICFGNode* getCallSite() const
|
|
904
|
+
{
|
|
905
|
+
return cs;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/// Return parameter
|
|
909
|
+
inline const PAGNode* getParam() const
|
|
910
|
+
{
|
|
911
|
+
return param;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
915
|
+
//@{
|
|
916
|
+
static inline bool classof(const ActualParmVFGNode *)
|
|
917
|
+
{
|
|
918
|
+
return true;
|
|
919
|
+
}
|
|
920
|
+
static inline bool classof(const ArgumentVFGNode *node)
|
|
921
|
+
{
|
|
922
|
+
return node->getNodeKind() == AParm;
|
|
923
|
+
}
|
|
924
|
+
static inline bool classof(const VFGNode *node)
|
|
925
|
+
{
|
|
926
|
+
return node->getNodeKind() == AParm;
|
|
927
|
+
}
|
|
928
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
929
|
+
{
|
|
930
|
+
return node->getNodeKind() == AParm;
|
|
931
|
+
}
|
|
932
|
+
static inline bool classof(const SVFValue*node)
|
|
933
|
+
{
|
|
934
|
+
return node->getNodeKind() == AParm;
|
|
935
|
+
}
|
|
936
|
+
//@}
|
|
937
|
+
|
|
938
|
+
const NodeBS getDefSVFVars() const override;
|
|
939
|
+
|
|
940
|
+
const std::string toString() const override;
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
/*
|
|
945
|
+
* ICFG Node stands for formal parameter node (top level pointers)
|
|
946
|
+
*/
|
|
947
|
+
class FormalParmVFGNode : public ArgumentVFGNode
|
|
948
|
+
{
|
|
949
|
+
private:
|
|
950
|
+
const FunObjVar* fun;
|
|
951
|
+
CallPESet callPEs;
|
|
952
|
+
|
|
953
|
+
public:
|
|
954
|
+
/// Constructor
|
|
955
|
+
FormalParmVFGNode(NodeID id, const PAGNode* n, const FunObjVar* f):
|
|
956
|
+
ArgumentVFGNode(id, n, FParm), fun(f)
|
|
957
|
+
{
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
/// Return parameter
|
|
961
|
+
inline const PAGNode* getParam() const
|
|
962
|
+
{
|
|
963
|
+
return param;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/// Return function
|
|
967
|
+
inline const FunObjVar* getFun() const override
|
|
968
|
+
{
|
|
969
|
+
return fun;
|
|
970
|
+
}
|
|
971
|
+
/// Return call edge
|
|
972
|
+
inline void addCallPE(const CallPE* call)
|
|
973
|
+
{
|
|
974
|
+
callPEs.insert(call);
|
|
975
|
+
}
|
|
976
|
+
/// Call edge iterator
|
|
977
|
+
///@{
|
|
978
|
+
inline CallPESet::const_iterator callPEBegin() const
|
|
979
|
+
{
|
|
980
|
+
return callPEs.begin();
|
|
981
|
+
}
|
|
982
|
+
inline CallPESet::const_iterator callPEEnd() const
|
|
983
|
+
{
|
|
984
|
+
return callPEs.end();
|
|
985
|
+
}
|
|
986
|
+
//@}
|
|
987
|
+
|
|
988
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
989
|
+
//@{
|
|
990
|
+
static inline bool classof(const FormalParmVFGNode *)
|
|
991
|
+
{
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
static inline bool classof(const VFGNode *node)
|
|
995
|
+
{
|
|
996
|
+
return node->getNodeKind() == FParm;
|
|
997
|
+
}
|
|
998
|
+
static inline bool classof(const ArgumentVFGNode *node)
|
|
999
|
+
{
|
|
1000
|
+
return node->getNodeKind() == FParm;
|
|
1001
|
+
}
|
|
1002
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
1003
|
+
{
|
|
1004
|
+
return node->getNodeKind() == FParm;
|
|
1005
|
+
}
|
|
1006
|
+
static inline bool classof(const SVFValue*node)
|
|
1007
|
+
{
|
|
1008
|
+
return node->getNodeKind() == FParm;
|
|
1009
|
+
}
|
|
1010
|
+
//@}
|
|
1011
|
+
|
|
1012
|
+
const NodeBS getDefSVFVars() const override;
|
|
1013
|
+
|
|
1014
|
+
const std::string toString() const override;
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
/*!
|
|
1018
|
+
* Callsite receive parameter
|
|
1019
|
+
*/
|
|
1020
|
+
class ActualRetVFGNode: public ArgumentVFGNode
|
|
1021
|
+
{
|
|
1022
|
+
private:
|
|
1023
|
+
const CallICFGNode* cs;
|
|
1024
|
+
|
|
1025
|
+
ActualRetVFGNode(); ///< place holder
|
|
1026
|
+
ActualRetVFGNode(const ActualRetVFGNode &); ///< place holder
|
|
1027
|
+
void operator=(const ActualRetVFGNode &); ///< place holder
|
|
1028
|
+
|
|
1029
|
+
public:
|
|
1030
|
+
/// Constructor
|
|
1031
|
+
ActualRetVFGNode(NodeID id, const PAGNode* n, const CallICFGNode* c) :
|
|
1032
|
+
ArgumentVFGNode(id, n, ARet), cs(c)
|
|
1033
|
+
{
|
|
1034
|
+
}
|
|
1035
|
+
/// Return callsite
|
|
1036
|
+
inline const CallICFGNode* getCallSite() const
|
|
1037
|
+
{
|
|
1038
|
+
return cs;
|
|
1039
|
+
}
|
|
1040
|
+
/// Receive parameter at callsite
|
|
1041
|
+
inline const FunObjVar* getCaller() const
|
|
1042
|
+
{
|
|
1043
|
+
return cs->getCaller();
|
|
1044
|
+
}
|
|
1045
|
+
/// Receive parameter at callsite
|
|
1046
|
+
inline const PAGNode* getRev() const
|
|
1047
|
+
{
|
|
1048
|
+
return param;
|
|
1049
|
+
}
|
|
1050
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1051
|
+
//@{
|
|
1052
|
+
static inline bool classof(const ActualRetVFGNode *)
|
|
1053
|
+
{
|
|
1054
|
+
return true;
|
|
1055
|
+
}
|
|
1056
|
+
static inline bool classof(const ArgumentVFGNode *node)
|
|
1057
|
+
{
|
|
1058
|
+
return node->getNodeKind() == ARet;
|
|
1059
|
+
}
|
|
1060
|
+
static inline bool classof(const VFGNode *node)
|
|
1061
|
+
{
|
|
1062
|
+
return node->getNodeKind() == ARet;
|
|
1063
|
+
}
|
|
1064
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
1065
|
+
{
|
|
1066
|
+
return node->getNodeKind() == ARet;
|
|
1067
|
+
}
|
|
1068
|
+
static inline bool classof(const SVFValue*node)
|
|
1069
|
+
{
|
|
1070
|
+
return node->getNodeKind() == ARet;
|
|
1071
|
+
}
|
|
1072
|
+
//@}
|
|
1073
|
+
|
|
1074
|
+
const NodeBS getDefSVFVars() const override;
|
|
1075
|
+
|
|
1076
|
+
const std::string toString() const override;
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
/*!
|
|
1080
|
+
* Callee return ICFG node
|
|
1081
|
+
*/
|
|
1082
|
+
class FormalRetVFGNode: public ArgumentVFGNode
|
|
1083
|
+
{
|
|
1084
|
+
private:
|
|
1085
|
+
const FunObjVar* fun;
|
|
1086
|
+
RetPESet retPEs;
|
|
1087
|
+
|
|
1088
|
+
FormalRetVFGNode(); ///< place holder
|
|
1089
|
+
FormalRetVFGNode(const FormalRetVFGNode &); ///< place holder
|
|
1090
|
+
void operator=(const FormalRetVFGNode &); ///< place holder
|
|
1091
|
+
|
|
1092
|
+
public:
|
|
1093
|
+
/// Constructor
|
|
1094
|
+
FormalRetVFGNode(NodeID id, const PAGNode* n, const FunObjVar* f);
|
|
1095
|
+
|
|
1096
|
+
/// Return value at callee
|
|
1097
|
+
inline const PAGNode* getRet() const
|
|
1098
|
+
{
|
|
1099
|
+
return param;
|
|
1100
|
+
}
|
|
1101
|
+
/// Function
|
|
1102
|
+
inline const FunObjVar* getFun() const override
|
|
1103
|
+
{
|
|
1104
|
+
return fun;
|
|
1105
|
+
}
|
|
1106
|
+
/// RetPE
|
|
1107
|
+
inline void addRetPE(const RetPE* retPE)
|
|
1108
|
+
{
|
|
1109
|
+
retPEs.insert(retPE);
|
|
1110
|
+
}
|
|
1111
|
+
/// RetPE iterators
|
|
1112
|
+
inline RetPESet::const_iterator retPEBegin() const
|
|
1113
|
+
{
|
|
1114
|
+
return retPEs.begin();
|
|
1115
|
+
}
|
|
1116
|
+
inline RetPESet::const_iterator retPEEnd() const
|
|
1117
|
+
{
|
|
1118
|
+
return retPEs.end();
|
|
1119
|
+
}
|
|
1120
|
+
///Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1121
|
+
//@{
|
|
1122
|
+
static inline bool classof(const FormalRetVFGNode )
|
|
1123
|
+
{
|
|
1124
|
+
return true;
|
|
1125
|
+
}
|
|
1126
|
+
static inline bool classof(const VFGNode *node)
|
|
1127
|
+
{
|
|
1128
|
+
return node->getNodeKind() == FRet;
|
|
1129
|
+
}
|
|
1130
|
+
static inline bool classof(const ArgumentVFGNode *node)
|
|
1131
|
+
{
|
|
1132
|
+
return node->getNodeKind() == FRet;
|
|
1133
|
+
}
|
|
1134
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
1135
|
+
{
|
|
1136
|
+
return node->getNodeKind() == FRet;
|
|
1137
|
+
}
|
|
1138
|
+
static inline bool classof(const SVFValue*node)
|
|
1139
|
+
{
|
|
1140
|
+
return node->getNodeKind() == FRet;
|
|
1141
|
+
}
|
|
1142
|
+
//@}
|
|
1143
|
+
|
|
1144
|
+
const NodeBS getDefSVFVars() const override;
|
|
1145
|
+
|
|
1146
|
+
const std::string toString() const override;
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
/*
|
|
1150
|
+
* Inter LLVM PHI node (formal parameter)
|
|
1151
|
+
*/
|
|
1152
|
+
class InterPHIVFGNode : public PHIVFGNode
|
|
1153
|
+
{
|
|
1154
|
+
|
|
1155
|
+
public:
|
|
1156
|
+
/// Constructor interPHI for formal parameter
|
|
1157
|
+
InterPHIVFGNode(NodeID id, const FormalParmVFGNode* fp) : PHIVFGNode(id, fp->getParam(), TInterPhi),fun(fp->getFun()),callInst(nullptr) {}
|
|
1158
|
+
/// Constructor interPHI for actual return
|
|
1159
|
+
InterPHIVFGNode(NodeID id, const ActualRetVFGNode* ar) : PHIVFGNode(id, ar->getRev(), TInterPhi), fun(ar->getCaller()),callInst(ar->getCallSite()) {}
|
|
1160
|
+
|
|
1161
|
+
inline bool isFormalParmPHI() const
|
|
1162
|
+
{
|
|
1163
|
+
return (fun!=nullptr) && (callInst == nullptr);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
inline bool isActualRetPHI() const
|
|
1167
|
+
{
|
|
1168
|
+
return (fun!=nullptr) && (callInst != nullptr);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
inline const FunObjVar* getFun() const override
|
|
1172
|
+
{
|
|
1173
|
+
assert((isFormalParmPHI() || isActualRetPHI()) && "expect a formal parameter phi");
|
|
1174
|
+
return fun;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
inline const CallICFGNode* getCallSite() const
|
|
1178
|
+
{
|
|
1179
|
+
assert(isActualRetPHI() && "expect a actual return phi");
|
|
1180
|
+
return callInst;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1184
|
+
//@{
|
|
1185
|
+
static inline bool classof(const InterPHIVFGNode*)
|
|
1186
|
+
{
|
|
1187
|
+
return true;
|
|
1188
|
+
}
|
|
1189
|
+
static inline bool classof(const PHIVFGNode *node)
|
|
1190
|
+
{
|
|
1191
|
+
return node->getNodeKind() == TInterPhi;
|
|
1192
|
+
}
|
|
1193
|
+
static inline bool classof(const VFGNode *node)
|
|
1194
|
+
{
|
|
1195
|
+
return node->getNodeKind() == TInterPhi;
|
|
1196
|
+
}
|
|
1197
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
1198
|
+
{
|
|
1199
|
+
return node->getNodeKind() == TInterPhi;
|
|
1200
|
+
}
|
|
1201
|
+
static inline bool classof(const SVFValue*node)
|
|
1202
|
+
{
|
|
1203
|
+
return node->getNodeKind() == TInterPhi;
|
|
1204
|
+
}
|
|
1205
|
+
//@}
|
|
1206
|
+
|
|
1207
|
+
const std::string toString() const override;
|
|
1208
|
+
|
|
1209
|
+
private:
|
|
1210
|
+
const FunObjVar* fun;
|
|
1211
|
+
const CallICFGNode* callInst;
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
/*!
|
|
1217
|
+
* Dummy Definition for undef and null pointers
|
|
1218
|
+
*/
|
|
1219
|
+
class NullPtrVFGNode : public VFGNode
|
|
1220
|
+
{
|
|
1221
|
+
private:
|
|
1222
|
+
const PAGNode* node;
|
|
1223
|
+
public:
|
|
1224
|
+
/// Constructor
|
|
1225
|
+
NullPtrVFGNode(NodeID id, const PAGNode* n) : VFGNode(id,NPtr), node(n)
|
|
1226
|
+
{
|
|
1227
|
+
|
|
1228
|
+
}
|
|
1229
|
+
/// Whether this node is of pointer type (used for pointer analysis).
|
|
1230
|
+
inline bool isPTANode() const
|
|
1231
|
+
{
|
|
1232
|
+
return node->isPointer();
|
|
1233
|
+
}
|
|
1234
|
+
/// Return corresponding PAGNode
|
|
1235
|
+
const PAGNode* getPAGNode() const
|
|
1236
|
+
{
|
|
1237
|
+
return node;
|
|
1238
|
+
}
|
|
1239
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1240
|
+
//@{
|
|
1241
|
+
static inline bool classof(const NullPtrVFGNode *)
|
|
1242
|
+
{
|
|
1243
|
+
return true;
|
|
1244
|
+
}
|
|
1245
|
+
static inline bool classof(const VFGNode *node)
|
|
1246
|
+
{
|
|
1247
|
+
return node->getNodeKind() == NPtr;
|
|
1248
|
+
}
|
|
1249
|
+
static inline bool classof(const GenericVFGNodeTy *node)
|
|
1250
|
+
{
|
|
1251
|
+
return node->getNodeKind() == NPtr;
|
|
1252
|
+
}
|
|
1253
|
+
static inline bool classof(const SVFValue*node)
|
|
1254
|
+
{
|
|
1255
|
+
return node->getNodeKind() == NPtr;
|
|
1256
|
+
}
|
|
1257
|
+
//@}
|
|
1258
|
+
|
|
1259
|
+
const NodeBS getDefSVFVars() const override;
|
|
1260
|
+
|
|
1261
|
+
const std::string toString() const override;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
} // End namespace SVF
|
|
1265
|
+
|
|
1266
|
+
#endif /* INCLUDE_UTIL_VFGNODE_H_ */
|