svf-lib 1.0.1376 → 1.0.1377
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-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/package.json +1 -1
- package/SVF-linux/svf/include/include/AbstractExecution/AbstractValue.h +0 -79
- package/SVF-linux/svf/include/include/AbstractExecution/AddressValue.h +0 -210
- package/SVF-linux/svf/include/include/AbstractExecution/ExeState.h +0 -223
- package/SVF-linux/svf/include/include/AbstractExecution/IntervalExeState.h +0 -425
- package/SVF-linux/svf/include/include/AbstractExecution/IntervalValue.h +0 -868
- package/SVF-linux/svf/include/include/AbstractExecution/NumericLiteral.h +0 -406
- package/SVF-linux/svf/include/include/AbstractExecution/RelExeState.h +0 -225
- package/SVF-linux/svf/include/include/AbstractExecution/RelationSolver.h +0 -68
- package/SVF-linux/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +0 -186
- package/SVF-linux/svf/include/include/AbstractExecution/WTO.h +0 -845
- package/SVF-linux/svf/include/include/CFL/CFGNormalizer.h +0 -84
- package/SVF-linux/svf/include/include/CFL/CFLAlias.h +0 -176
- package/SVF-linux/svf/include/include/CFL/CFLBase.h +0 -115
- package/SVF-linux/svf/include/include/CFL/CFLData.h +0 -316
- package/SVF-linux/svf/include/include/CFL/CFLDataBuilder.h +0 -91
- package/SVF-linux/svf/include/include/CFL/CFLGramGraphChecker.h +0 -74
- package/SVF-linux/svf/include/include/CFL/CFLGrammar.h +0 -468
- package/SVF-linux/svf/include/include/CFL/CFLGrammar.txt +0 -15
- package/SVF-linux/svf/include/include/CFL/CFLGraphBuilder.h +0 -193
- package/SVF-linux/svf/include/include/CFL/CFLSolver.h +0 -136
- package/SVF-linux/svf/include/include/CFL/CFLStat.h +0 -67
- package/SVF-linux/svf/include/include/CFL/CFLVF.h +0 -65
- package/SVF-linux/svf/include/include/CFL/GrammarBuilder.h +0 -100
- package/SVF-linux/svf/include/include/CFL/PEGGrammar.txt +0 -11
- package/SVF-linux/svf/include/include/CFL/VFG.txt +0 -7
- package/SVF-linux/svf/include/include/DDA/ContextDDA.h +0 -230
- package/SVF-linux/svf/include/include/DDA/DDAClient.h +0 -168
- package/SVF-linux/svf/include/include/DDA/DDAPass.h +0 -99
- package/SVF-linux/svf/include/include/DDA/DDAStat.h +0 -138
- package/SVF-linux/svf/include/include/DDA/DDAVFSolver.h +0 -789
- package/SVF-linux/svf/include/include/DDA/FlowDDA.h +0 -178
- package/SVF-linux/svf/include/include/FastCluster/LICENSE.TXT +0 -13
- package/SVF-linux/svf/include/include/FastCluster/fastcluster.h +0 -80
- package/SVF-linux/svf/include/include/Graphs/CFLGraph.h +0 -215
- package/SVF-linux/svf/include/include/Graphs/CHG.h +0 -351
- package/SVF-linux/svf/include/include/Graphs/ConsG.h +0 -408
- package/SVF-linux/svf/include/include/Graphs/ConsGEdge.h +0 -353
- package/SVF-linux/svf/include/include/Graphs/ConsGNode.h +0 -391
- package/SVF-linux/svf/include/include/Graphs/DOTGraphTraits.h +0 -188
- package/SVF-linux/svf/include/include/Graphs/GenericGraph.h +0 -620
- package/SVF-linux/svf/include/include/Graphs/GraphPrinter.h +0 -111
- package/SVF-linux/svf/include/include/Graphs/GraphTraits.h +0 -150
- package/SVF-linux/svf/include/include/Graphs/GraphWriter.h +0 -380
- package/SVF-linux/svf/include/include/Graphs/ICFG.h +0 -331
- package/SVF-linux/svf/include/include/Graphs/ICFGEdge.h +0 -264
- package/SVF-linux/svf/include/include/Graphs/ICFGNode.h +0 -523
- package/SVF-linux/svf/include/include/Graphs/ICFGStat.h +0 -164
- package/SVF-linux/svf/include/include/Graphs/IRGraph.h +0 -243
- package/SVF-linux/svf/include/include/Graphs/PTACallGraph.h +0 -471
- package/SVF-linux/svf/include/include/Graphs/SVFG.h +0 -490
- package/SVF-linux/svf/include/include/Graphs/SVFGEdge.h +0 -237
- package/SVF-linux/svf/include/include/Graphs/SVFGNode.h +0 -513
- package/SVF-linux/svf/include/include/Graphs/SVFGOPT.h +0 -362
- package/SVF-linux/svf/include/include/Graphs/SVFGStat.h +0 -273
- package/SVF-linux/svf/include/include/Graphs/ThreadCallGraph.h +0 -422
- package/SVF-linux/svf/include/include/Graphs/VFG.h +0 -664
- package/SVF-linux/svf/include/include/Graphs/VFGEdge.h +0 -295
- package/SVF-linux/svf/include/include/Graphs/VFGNode.h +0 -1197
- package/SVF-linux/svf/include/include/MSSA/MSSAMuChi.h +0 -722
- package/SVF-linux/svf/include/include/MSSA/MemPartition.h +0 -169
- package/SVF-linux/svf/include/include/MSSA/MemRegion.h +0 -491
- package/SVF-linux/svf/include/include/MSSA/MemSSA.h +0 -452
- package/SVF-linux/svf/include/include/MSSA/SVFGBuilder.h +0 -98
- package/SVF-linux/svf/include/include/MTA/FSMPTA.h +0 -270
- package/SVF-linux/svf/include/include/MTA/LockAnalysis.h +0 -517
- package/SVF-linux/svf/include/include/MTA/MHP.h +0 -565
- package/SVF-linux/svf/include/include/MTA/MTA.h +0 -101
- package/SVF-linux/svf/include/include/MTA/MTAResultValidator.h +0 -448
- package/SVF-linux/svf/include/include/MTA/MTAStat.h +0 -74
- package/SVF-linux/svf/include/include/MTA/PCG.h +0 -229
- package/SVF-linux/svf/include/include/MTA/TCT.h +0 -599
- package/SVF-linux/svf/include/include/MemoryModel/AbstractPointsToDS.h +0 -316
- package/SVF-linux/svf/include/include/MemoryModel/ConditionalPT.h +0 -878
- package/SVF-linux/svf/include/include/MemoryModel/LocationSet.h +0 -148
- package/SVF-linux/svf/include/include/MemoryModel/MutablePointsToDS.h +0 -1025
- package/SVF-linux/svf/include/include/MemoryModel/PersistentPointsToCache.h +0 -463
- package/SVF-linux/svf/include/include/MemoryModel/PersistentPointsToDS.h +0 -955
- package/SVF-linux/svf/include/include/MemoryModel/PointerAnalysis.h +0 -452
- package/SVF-linux/svf/include/include/MemoryModel/PointerAnalysisImpl.h +0 -590
- package/SVF-linux/svf/include/include/MemoryModel/PointsTo.h +0 -255
- package/SVF-linux/svf/include/include/MemoryModel/SVFLoop.h +0 -164
- package/SVF-linux/svf/include/include/SABER/DoubleFreeChecker.h +0 -76
- package/SVF-linux/svf/include/include/SABER/FileChecker.h +0 -82
- package/SVF-linux/svf/include/include/SABER/LeakChecker.h +0 -124
- package/SVF-linux/svf/include/include/SABER/ProgSlice.h +0 -313
- package/SVF-linux/svf/include/include/SABER/SaberCheckerAPI.h +0 -166
- package/SVF-linux/svf/include/include/SABER/SaberCondAllocator.h +0 -310
- package/SVF-linux/svf/include/include/SABER/SaberSVFGBuilder.h +0 -104
- package/SVF-linux/svf/include/include/SABER/SrcSnkDDA.h +0 -321
- package/SVF-linux/svf/include/include/SABER/SrcSnkSolver.h +0 -186
- package/SVF-linux/svf/include/include/SVFIR/PAGBuilderFromFile.h +0 -80
- package/SVF-linux/svf/include/include/SVFIR/SVFIR.h +0 -659
- package/SVF-linux/svf/include/include/SVFIR/SVFModule.h +0 -233
- package/SVF-linux/svf/include/include/SVFIR/SVFStatements.h +0 -1136
- package/SVF-linux/svf/include/include/SVFIR/SVFType.h +0 -527
- package/SVF-linux/svf/include/include/SVFIR/SVFValue.h +0 -1120
- package/SVF-linux/svf/include/include/SVFIR/SVFVariables.h +0 -721
- package/SVF-linux/svf/include/include/SVFIR/SymbolTableInfo.h +0 -597
- package/SVF-linux/svf/include/include/Util/Annotator.h +0 -180
- package/SVF-linux/svf/include/include/Util/BitVector.h +0 -55
- package/SVF-linux/svf/include/include/Util/CallGraphBuilder.h +0 -74
- package/SVF-linux/svf/include/include/Util/Casting.h +0 -426
- package/SVF-linux/svf/include/include/Util/CommandLine.h +0 -530
- package/SVF-linux/svf/include/include/Util/CoreBitVector.h +0 -214
- package/SVF-linux/svf/include/include/Util/CppUtil.h +0 -81
- package/SVF-linux/svf/include/include/Util/CxtStmt.h +0 -501
- package/SVF-linux/svf/include/include/Util/DPItem.h +0 -618
- package/SVF-linux/svf/include/include/Util/ExtAPI.h +0 -339
- package/SVF-linux/svf/include/include/Util/ExtAPI.json +0 -5707
- package/SVF-linux/svf/include/include/Util/GraphReachSolver.h +0 -186
- package/SVF-linux/svf/include/include/Util/NodeIDAllocator.h +0 -194
- package/SVF-linux/svf/include/include/Util/Options.h +0 -266
- package/SVF-linux/svf/include/include/Util/PTAStat.h +0 -65
- package/SVF-linux/svf/include/include/Util/SCC.h +0 -354
- package/SVF-linux/svf/include/include/Util/SVFStat.h +0 -100
- package/SVF-linux/svf/include/include/Util/SVFUtil.h +0 -660
- package/SVF-linux/svf/include/include/Util/SparseBitVector.h +0 -1202
- package/SVF-linux/svf/include/include/Util/ThreadAPI.h +0 -330
- package/SVF-linux/svf/include/include/Util/WorkList.h +0 -317
- package/SVF-linux/svf/include/include/Util/Z3Expr.h +0 -318
- package/SVF-linux/svf/include/include/Util/cJSON.h +0 -300
- package/SVF-linux/svf/include/include/Util/iterator.h +0 -407
- package/SVF-linux/svf/include/include/Util/iterator_range.h +0 -76
- package/SVF-linux/svf/include/include/WPA/Andersen.h +0 -416
- package/SVF-linux/svf/include/include/WPA/AndersenPWC.h +0 -160
- package/SVF-linux/svf/include/include/WPA/CSC.h +0 -95
- package/SVF-linux/svf/include/include/WPA/FlowSensitive.h +0 -317
- package/SVF-linux/svf/include/include/WPA/Steensgaard.h +0 -126
- package/SVF-linux/svf/include/include/WPA/TypeAnalysis.h +0 -83
- package/SVF-linux/svf/include/include/WPA/VersionedFlowSensitive.h +0 -287
- package/SVF-linux/svf/include/include/WPA/WPAFSSolver.h +0 -254
- package/SVF-linux/svf/include/include/WPA/WPAPass.h +0 -119
- package/SVF-linux/svf/include/include/WPA/WPASolver.h +0 -205
- package/SVF-linux/svf/include/include/WPA/WPAStat.h +0 -222
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +0 -250
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +0 -94
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +0 -73
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +0 -484
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +0 -183
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +0 -106
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +0 -61
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +0 -360
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +0 -466
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +0 -417
- package/SVF-linux/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +0 -110
- package/SVF-osx/svf/include/include/AbstractExecution/AbstractValue.h +0 -79
- package/SVF-osx/svf/include/include/AbstractExecution/AddressValue.h +0 -210
- package/SVF-osx/svf/include/include/AbstractExecution/ExeState.h +0 -223
- package/SVF-osx/svf/include/include/AbstractExecution/IntervalExeState.h +0 -425
- package/SVF-osx/svf/include/include/AbstractExecution/IntervalValue.h +0 -868
- package/SVF-osx/svf/include/include/AbstractExecution/NumericLiteral.h +0 -406
- package/SVF-osx/svf/include/include/AbstractExecution/RelExeState.h +0 -225
- package/SVF-osx/svf/include/include/AbstractExecution/RelationSolver.h +0 -68
- package/SVF-osx/svf/include/include/AbstractExecution/SVFIR2ItvExeState.h +0 -186
- package/SVF-osx/svf/include/include/AbstractExecution/WTO.h +0 -845
- package/SVF-osx/svf/include/include/CFL/CFGNormalizer.h +0 -84
- package/SVF-osx/svf/include/include/CFL/CFLAlias.h +0 -176
- package/SVF-osx/svf/include/include/CFL/CFLBase.h +0 -115
- package/SVF-osx/svf/include/include/CFL/CFLData.h +0 -316
- package/SVF-osx/svf/include/include/CFL/CFLDataBuilder.h +0 -91
- package/SVF-osx/svf/include/include/CFL/CFLGramGraphChecker.h +0 -74
- package/SVF-osx/svf/include/include/CFL/CFLGrammar.h +0 -468
- package/SVF-osx/svf/include/include/CFL/CFLGrammar.txt +0 -15
- package/SVF-osx/svf/include/include/CFL/CFLGraphBuilder.h +0 -193
- package/SVF-osx/svf/include/include/CFL/CFLSolver.h +0 -136
- package/SVF-osx/svf/include/include/CFL/CFLStat.h +0 -67
- package/SVF-osx/svf/include/include/CFL/CFLVF.h +0 -65
- package/SVF-osx/svf/include/include/CFL/GrammarBuilder.h +0 -100
- package/SVF-osx/svf/include/include/CFL/PEGGrammar.txt +0 -11
- package/SVF-osx/svf/include/include/CFL/VFG.txt +0 -7
- package/SVF-osx/svf/include/include/DDA/ContextDDA.h +0 -230
- package/SVF-osx/svf/include/include/DDA/DDAClient.h +0 -168
- package/SVF-osx/svf/include/include/DDA/DDAPass.h +0 -99
- package/SVF-osx/svf/include/include/DDA/DDAStat.h +0 -138
- package/SVF-osx/svf/include/include/DDA/DDAVFSolver.h +0 -789
- package/SVF-osx/svf/include/include/DDA/FlowDDA.h +0 -178
- package/SVF-osx/svf/include/include/FastCluster/LICENSE.TXT +0 -13
- package/SVF-osx/svf/include/include/FastCluster/fastcluster.h +0 -80
- package/SVF-osx/svf/include/include/Graphs/CFLGraph.h +0 -215
- package/SVF-osx/svf/include/include/Graphs/CHG.h +0 -351
- package/SVF-osx/svf/include/include/Graphs/ConsG.h +0 -408
- package/SVF-osx/svf/include/include/Graphs/ConsGEdge.h +0 -353
- package/SVF-osx/svf/include/include/Graphs/ConsGNode.h +0 -391
- package/SVF-osx/svf/include/include/Graphs/DOTGraphTraits.h +0 -188
- package/SVF-osx/svf/include/include/Graphs/GenericGraph.h +0 -620
- package/SVF-osx/svf/include/include/Graphs/GraphPrinter.h +0 -111
- package/SVF-osx/svf/include/include/Graphs/GraphTraits.h +0 -150
- package/SVF-osx/svf/include/include/Graphs/GraphWriter.h +0 -380
- package/SVF-osx/svf/include/include/Graphs/ICFG.h +0 -331
- package/SVF-osx/svf/include/include/Graphs/ICFGEdge.h +0 -264
- package/SVF-osx/svf/include/include/Graphs/ICFGNode.h +0 -523
- package/SVF-osx/svf/include/include/Graphs/ICFGStat.h +0 -164
- package/SVF-osx/svf/include/include/Graphs/IRGraph.h +0 -243
- package/SVF-osx/svf/include/include/Graphs/PTACallGraph.h +0 -471
- package/SVF-osx/svf/include/include/Graphs/SVFG.h +0 -490
- package/SVF-osx/svf/include/include/Graphs/SVFGEdge.h +0 -237
- package/SVF-osx/svf/include/include/Graphs/SVFGNode.h +0 -513
- package/SVF-osx/svf/include/include/Graphs/SVFGOPT.h +0 -362
- package/SVF-osx/svf/include/include/Graphs/SVFGStat.h +0 -273
- package/SVF-osx/svf/include/include/Graphs/ThreadCallGraph.h +0 -422
- package/SVF-osx/svf/include/include/Graphs/VFG.h +0 -664
- package/SVF-osx/svf/include/include/Graphs/VFGEdge.h +0 -295
- package/SVF-osx/svf/include/include/Graphs/VFGNode.h +0 -1197
- package/SVF-osx/svf/include/include/MSSA/MSSAMuChi.h +0 -722
- package/SVF-osx/svf/include/include/MSSA/MemPartition.h +0 -169
- package/SVF-osx/svf/include/include/MSSA/MemRegion.h +0 -491
- package/SVF-osx/svf/include/include/MSSA/MemSSA.h +0 -452
- package/SVF-osx/svf/include/include/MSSA/SVFGBuilder.h +0 -98
- package/SVF-osx/svf/include/include/MTA/FSMPTA.h +0 -270
- package/SVF-osx/svf/include/include/MTA/LockAnalysis.h +0 -517
- package/SVF-osx/svf/include/include/MTA/MHP.h +0 -565
- package/SVF-osx/svf/include/include/MTA/MTA.h +0 -101
- package/SVF-osx/svf/include/include/MTA/MTAResultValidator.h +0 -448
- package/SVF-osx/svf/include/include/MTA/MTAStat.h +0 -74
- package/SVF-osx/svf/include/include/MTA/PCG.h +0 -229
- package/SVF-osx/svf/include/include/MTA/TCT.h +0 -599
- package/SVF-osx/svf/include/include/MemoryModel/AbstractPointsToDS.h +0 -316
- package/SVF-osx/svf/include/include/MemoryModel/ConditionalPT.h +0 -878
- package/SVF-osx/svf/include/include/MemoryModel/LocationSet.h +0 -148
- package/SVF-osx/svf/include/include/MemoryModel/MutablePointsToDS.h +0 -1025
- package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToCache.h +0 -463
- package/SVF-osx/svf/include/include/MemoryModel/PersistentPointsToDS.h +0 -955
- package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysis.h +0 -452
- package/SVF-osx/svf/include/include/MemoryModel/PointerAnalysisImpl.h +0 -590
- package/SVF-osx/svf/include/include/MemoryModel/PointsTo.h +0 -255
- package/SVF-osx/svf/include/include/MemoryModel/SVFLoop.h +0 -164
- package/SVF-osx/svf/include/include/SABER/DoubleFreeChecker.h +0 -76
- package/SVF-osx/svf/include/include/SABER/FileChecker.h +0 -82
- package/SVF-osx/svf/include/include/SABER/LeakChecker.h +0 -124
- package/SVF-osx/svf/include/include/SABER/ProgSlice.h +0 -313
- package/SVF-osx/svf/include/include/SABER/SaberCheckerAPI.h +0 -166
- package/SVF-osx/svf/include/include/SABER/SaberCondAllocator.h +0 -310
- package/SVF-osx/svf/include/include/SABER/SaberSVFGBuilder.h +0 -104
- package/SVF-osx/svf/include/include/SABER/SrcSnkDDA.h +0 -321
- package/SVF-osx/svf/include/include/SABER/SrcSnkSolver.h +0 -186
- package/SVF-osx/svf/include/include/SVFIR/PAGBuilderFromFile.h +0 -80
- package/SVF-osx/svf/include/include/SVFIR/SVFIR.h +0 -659
- package/SVF-osx/svf/include/include/SVFIR/SVFModule.h +0 -233
- package/SVF-osx/svf/include/include/SVFIR/SVFStatements.h +0 -1136
- package/SVF-osx/svf/include/include/SVFIR/SVFType.h +0 -527
- package/SVF-osx/svf/include/include/SVFIR/SVFValue.h +0 -1120
- package/SVF-osx/svf/include/include/SVFIR/SVFVariables.h +0 -721
- package/SVF-osx/svf/include/include/SVFIR/SymbolTableInfo.h +0 -597
- package/SVF-osx/svf/include/include/Util/Annotator.h +0 -180
- package/SVF-osx/svf/include/include/Util/BitVector.h +0 -55
- package/SVF-osx/svf/include/include/Util/CallGraphBuilder.h +0 -74
- package/SVF-osx/svf/include/include/Util/Casting.h +0 -426
- package/SVF-osx/svf/include/include/Util/CommandLine.h +0 -530
- package/SVF-osx/svf/include/include/Util/CoreBitVector.h +0 -214
- package/SVF-osx/svf/include/include/Util/CppUtil.h +0 -81
- package/SVF-osx/svf/include/include/Util/CxtStmt.h +0 -501
- package/SVF-osx/svf/include/include/Util/DPItem.h +0 -618
- package/SVF-osx/svf/include/include/Util/ExtAPI.h +0 -339
- package/SVF-osx/svf/include/include/Util/ExtAPI.json +0 -5707
- package/SVF-osx/svf/include/include/Util/GraphReachSolver.h +0 -186
- package/SVF-osx/svf/include/include/Util/NodeIDAllocator.h +0 -194
- package/SVF-osx/svf/include/include/Util/Options.h +0 -266
- package/SVF-osx/svf/include/include/Util/PTAStat.h +0 -65
- package/SVF-osx/svf/include/include/Util/SCC.h +0 -354
- package/SVF-osx/svf/include/include/Util/SVFStat.h +0 -100
- package/SVF-osx/svf/include/include/Util/SVFUtil.h +0 -660
- package/SVF-osx/svf/include/include/Util/SparseBitVector.h +0 -1202
- package/SVF-osx/svf/include/include/Util/ThreadAPI.h +0 -330
- package/SVF-osx/svf/include/include/Util/WorkList.h +0 -317
- package/SVF-osx/svf/include/include/Util/Z3Expr.h +0 -318
- package/SVF-osx/svf/include/include/Util/cJSON.h +0 -300
- package/SVF-osx/svf/include/include/Util/iterator.h +0 -407
- package/SVF-osx/svf/include/include/Util/iterator_range.h +0 -76
- package/SVF-osx/svf/include/include/WPA/Andersen.h +0 -416
- package/SVF-osx/svf/include/include/WPA/AndersenPWC.h +0 -160
- package/SVF-osx/svf/include/include/WPA/CSC.h +0 -95
- package/SVF-osx/svf/include/include/WPA/FlowSensitive.h +0 -317
- package/SVF-osx/svf/include/include/WPA/Steensgaard.h +0 -126
- package/SVF-osx/svf/include/include/WPA/TypeAnalysis.h +0 -83
- package/SVF-osx/svf/include/include/WPA/VersionedFlowSensitive.h +0 -287
- package/SVF-osx/svf/include/include/WPA/WPAFSSolver.h +0 -254
- package/SVF-osx/svf/include/include/WPA/WPAPass.h +0 -119
- package/SVF-osx/svf/include/include/WPA/WPASolver.h +0 -205
- package/SVF-osx/svf/include/include/WPA/WPAStat.h +0 -222
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BasicTypes.h +0 -250
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/BreakConstantExpr.h +0 -94
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/CHGBuilder.h +0 -73
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/DCHG.h +0 -484
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/GEPTypeBridgeIterator.h +0 -183
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/ICFGBuilder.h +0 -106
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMLoopAnalysis.h +0 -61
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMModule.h +0 -360
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/LLVMUtil.h +0 -466
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SVFIRBuilder.h +0 -417
- package/SVF-osx/svf-llvm/include/SVF-LLVM/SVF-LLVM/SymbolTableBuilder.h +0 -110
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//===----- CFGNormalizer.h -- Context Free Grammar Normalizer--------------//
|
|
2
|
-
//
|
|
3
|
-
// SVF: Static Value-Flow Analysis
|
|
4
|
-
//
|
|
5
|
-
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// This program is free software: you can redistribute it and/or modify
|
|
9
|
-
// it under the terms of the GNU 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 General Public License for more details.
|
|
17
|
-
|
|
18
|
-
// You should have received a copy of the GNU General Public License
|
|
19
|
-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
//
|
|
21
|
-
//===----------------------------------------------------------------------===//
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* CFGNormalizer.h
|
|
25
|
-
*
|
|
26
|
-
* Created on: April 19 , 2022
|
|
27
|
-
* Author: Pei Xu
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
#ifndef INCLUDE_CFL_CFGNORMALIZER_H_
|
|
31
|
-
#define INCLUDE_CFL_CFGNORMALIZER_H_
|
|
32
|
-
|
|
33
|
-
#include "CFLGrammar.h"
|
|
34
|
-
|
|
35
|
-
namespace SVF
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
/*!
|
|
39
|
-
* Generate Normalized Grammar (backus naur form) from a grammarbase (Extended extended Backus–Naur form )
|
|
40
|
-
*
|
|
41
|
-
* To Do:
|
|
42
|
-
* Error Notice for ill formed production,
|
|
43
|
-
* e.g. not end with ';' and '*' not preceding with '()' and extra space before ';'
|
|
44
|
-
* '|' sign support
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
class CFGNormalizer
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
public:
|
|
51
|
-
CFGNormalizer()
|
|
52
|
-
{
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/// Binary Normal Form(BNF) normalization with variable attribute expanded
|
|
56
|
-
CFLGrammar* normalize(GrammarBase *generalGrammar);
|
|
57
|
-
|
|
58
|
-
/// Expand every variable attribute in rawProductions of grammarbase
|
|
59
|
-
CFLGrammar* fillAttribute(CFLGrammar *grammar, const Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& kind2AttrsMap);
|
|
60
|
-
|
|
61
|
-
private:
|
|
62
|
-
/// Add nonterminal to tranfer long rules to binary rules
|
|
63
|
-
void ebnf_bin(CFLGrammar *grammar);
|
|
64
|
-
|
|
65
|
-
void ebnfSignReplace(char sign, CFLGrammar *grammar);
|
|
66
|
-
|
|
67
|
-
void barReplace(CFLGrammar *grammar);
|
|
68
|
-
|
|
69
|
-
void insertToCFLGrammar(CFLGrammar *grammar, GrammarBase::Production &prod);
|
|
70
|
-
|
|
71
|
-
int ebnfBracketMatch(GrammarBase::Production& prod, int i, CFLGrammar *grammar) ;
|
|
72
|
-
|
|
73
|
-
GrammarBase::Symbol check_head(GrammarBase::SymbolMap<GrammarBase::Symbol, GrammarBase::Productions>& grammar, GrammarBase::Production& rule);
|
|
74
|
-
|
|
75
|
-
void strTrans(std::string strPro, CFLGrammar *grammar, GrammarBase::Production& normalProd);
|
|
76
|
-
|
|
77
|
-
void getFilledProductions(GrammarBase::Production &prod,const NodeSet& nodeSet, CFLGrammar *grammar, GrammarBase::Productions& normalProds);
|
|
78
|
-
|
|
79
|
-
void removeFirstSymbol(CFLGrammar *grammar);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
} // End namespace SVF
|
|
83
|
-
|
|
84
|
-
#endif /* INCLUDE_CFL_CFGNORMALIZER_H_*/
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
//===----- CFLAlias.h -- CFL Alias Analysis Client--------------//
|
|
2
|
-
//
|
|
3
|
-
// SVF: Static Value-Flow Analysis
|
|
4
|
-
//
|
|
5
|
-
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// This program is free software: you can redistribute it and/or modify
|
|
9
|
-
// it under the terms of the GNU 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 General Public License for more details.
|
|
17
|
-
|
|
18
|
-
// You should have received a copy of the GNU General Public License
|
|
19
|
-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
//
|
|
21
|
-
//===----------------------------------------------------------------------===//
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* CFLAlias.h
|
|
25
|
-
*
|
|
26
|
-
* Created on: March 5, 2022
|
|
27
|
-
* Author: Yulei Sui
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
#ifndef INCLUDE_CFL_CFLALIAS_H_
|
|
31
|
-
#define INCLUDE_CFL_CFLALIAS_H_
|
|
32
|
-
|
|
33
|
-
#include "CFL/CFLBase.h"
|
|
34
|
-
#include "CFL/CFLStat.h"
|
|
35
|
-
#include "CFL/CFLData.h"
|
|
36
|
-
#include "CFL/CFLDataBuilder.h"
|
|
37
|
-
|
|
38
|
-
namespace SVF
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
class CFLStat;
|
|
42
|
-
|
|
43
|
-
class CFLAlias : public CFLBase
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
public:
|
|
47
|
-
typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
|
|
48
|
-
|
|
49
|
-
CFLAlias(SVFIR* ir) : CFLBase(ir, PointerAnalysis::CFLFICI_WPA)
|
|
50
|
-
{
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/// Initialize the grammar, graph, solver
|
|
54
|
-
virtual void initialize();
|
|
55
|
-
|
|
56
|
-
/// Print grammar and graph
|
|
57
|
-
virtual void finalize();
|
|
58
|
-
|
|
59
|
-
/// Solving CFL Reachability
|
|
60
|
-
virtual void solve();
|
|
61
|
-
|
|
62
|
-
/// Interface exposed to users of our Alias analysis, given Value infos
|
|
63
|
-
virtual AliasResult alias(const SVFValue* v1, const SVFValue* v2)
|
|
64
|
-
{
|
|
65
|
-
NodeID n1 = svfir->getValueNode(v1);
|
|
66
|
-
NodeID n2 = svfir->getValueNode(v2);
|
|
67
|
-
return alias(n1,n2);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/// Interface exposed to users of our Alias analysis, given PAGNodeID
|
|
71
|
-
virtual AliasResult alias(NodeID node1, NodeID node2)
|
|
72
|
-
{
|
|
73
|
-
if(graph->hasEdge(graph->getGNode(node1), graph->getGNode(node2), graph->startKind))
|
|
74
|
-
return AliasResult::MayAlias;
|
|
75
|
-
else
|
|
76
|
-
return AliasResult::NoAlias;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/// Get points-to targets of a pointer. V In this context
|
|
80
|
-
virtual const PointsTo& getCFLPts(NodeID ptr)
|
|
81
|
-
{
|
|
82
|
-
/// Check V Dst of ptr.
|
|
83
|
-
CFLNode *funNode = graph->getGNode(ptr);
|
|
84
|
-
for(auto outedge = funNode->getOutEdges().begin(); outedge!=funNode->getOutEdges().end(); outedge++)
|
|
85
|
-
{
|
|
86
|
-
if((*outedge)->getEdgeKind() == graph->getStartKind())
|
|
87
|
-
{
|
|
88
|
-
// Need to Find dst addr src
|
|
89
|
-
CFLNode *vNode = graph->getGNode((*outedge)->getDstID());
|
|
90
|
-
addPts(ptr, svfir->getBaseValVar((*outedge)->getDstID()));
|
|
91
|
-
for(auto inEdge = vNode->getInEdges().begin(); inEdge!=vNode->getInEdges().end(); inEdge++)
|
|
92
|
-
{
|
|
93
|
-
if((*inEdge)->getEdgeKind() == 0)
|
|
94
|
-
{
|
|
95
|
-
addPts(ptr, (*inEdge)->getSrcID());
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return getPts(ptr);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/// Need Original one for virtual table
|
|
104
|
-
|
|
105
|
-
/// Add copy edge on constraint graph
|
|
106
|
-
virtual inline bool addCopyEdge(NodeID src, NodeID dst)
|
|
107
|
-
{
|
|
108
|
-
const CFLEdge *edge = graph->hasEdge(graph->getGNode(src),graph->getGNode(dst), 1);
|
|
109
|
-
if (edge != nullptr )
|
|
110
|
-
{
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
CFLGrammar::Kind copyKind = grammar->str2Kind("copy");
|
|
114
|
-
CFLGrammar::Kind copybarKind = grammar->str2Kind("copybar");
|
|
115
|
-
solver->pushIntoWorklist(graph->addCFLEdge(graph->getGNode(src),graph->getGNode(dst), copyKind));
|
|
116
|
-
solver->pushIntoWorklist(graph->addCFLEdge(graph->getGNode(dst),graph->getGNode(src), copybarKind));
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// Given an object, get all the nodes having whose pointsto contains the object
|
|
121
|
-
virtual const NodeSet& getRevPts(NodeID nodeId)
|
|
122
|
-
{
|
|
123
|
-
/// Check Outgoing flowtobar edge dst of ptr
|
|
124
|
-
abort(); // to be implemented
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/// Update call graph for the input indirect callsites
|
|
128
|
-
virtual bool updateCallGraph(const CallSiteToFunPtrMap& callsites);
|
|
129
|
-
|
|
130
|
-
/// On the fly call graph construction
|
|
131
|
-
virtual void onTheFlyCallGraphSolve(const CallSiteToFunPtrMap& callsites, CallEdgeMap& newEdges);
|
|
132
|
-
|
|
133
|
-
/// Connect formal and actual parameters for indirect callsites
|
|
134
|
-
void connectCaller2CalleeParams(CallSite cs, const SVFFunction* F);
|
|
135
|
-
|
|
136
|
-
void heapAllocatorViaIndCall(CallSite cs);
|
|
137
|
-
|
|
138
|
-
private:
|
|
139
|
-
CallSite2DummyValPN callsite2DummyValPN; ///< Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
class POCRAlias : public CFLAlias
|
|
143
|
-
{
|
|
144
|
-
public:
|
|
145
|
-
static double timeOfBuildCFLData; // Time of building CFLData from CFLGraph
|
|
146
|
-
|
|
147
|
-
POCRAlias(SVFIR* ir) : CFLAlias(ir)
|
|
148
|
-
{
|
|
149
|
-
if (!_cflData)
|
|
150
|
-
_cflData = new CFLData();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/// Destructor
|
|
154
|
-
virtual ~POCRAlias()
|
|
155
|
-
{
|
|
156
|
-
delete _cflData;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
CFLData* cflData()
|
|
160
|
-
{
|
|
161
|
-
return _cflData;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/// Initialize the grammar, graph, CFLData, solver
|
|
165
|
-
virtual void initialize();
|
|
166
|
-
|
|
167
|
-
/// Init CFLData
|
|
168
|
-
virtual void buildCFLData();
|
|
169
|
-
|
|
170
|
-
private:
|
|
171
|
-
/// Graph dataset
|
|
172
|
-
CFLData* _cflData;
|
|
173
|
-
};
|
|
174
|
-
} // End namespace SVF
|
|
175
|
-
|
|
176
|
-
#endif /* INCLUDE_CFL_CFLALIAS_H_*/
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
//===----- CFLBase.h -- CFL Analysis Client Base--------------//
|
|
2
|
-
//
|
|
3
|
-
// SVF: Static Value-Flow Analysis
|
|
4
|
-
//
|
|
5
|
-
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// This program is free software: you can redistribute it and/or modify
|
|
9
|
-
// it under the terms of the GNU 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 General Public License for more details.
|
|
17
|
-
|
|
18
|
-
// You should have received a copy of the GNU General Public License
|
|
19
|
-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
//
|
|
21
|
-
//===----------------------------------------------------------------------===//
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* CFLBase.h
|
|
25
|
-
*
|
|
26
|
-
* Created on: Oct 12, 2022
|
|
27
|
-
* Author: Pei Xu
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
#ifndef INCLUDE_CFL_CFLBASE_H_
|
|
31
|
-
#define INCLUDE_CFL_CFLBASE_H_
|
|
32
|
-
|
|
33
|
-
#include "CFL/CFLSolver.h"
|
|
34
|
-
#include "CFL/CFGNormalizer.h"
|
|
35
|
-
#include "CFL/GrammarBuilder.h"
|
|
36
|
-
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
-
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
-
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
-
#include "Graphs/ConsG.h"
|
|
40
|
-
#include "Util/Options.h"
|
|
41
|
-
#include "SVFIR/SVFType.h"
|
|
42
|
-
|
|
43
|
-
namespace SVF
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
class CFLStat;
|
|
47
|
-
|
|
48
|
-
/// CFL Client Base Class
|
|
49
|
-
class CFLBase : public BVDataPTAImpl
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
public:
|
|
53
|
-
CFLBase(SVFIR* ir, PointerAnalysis::PTATY pty) : BVDataPTAImpl(ir, pty), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
|
|
54
|
-
{
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/// Destructor
|
|
58
|
-
virtual ~CFLBase()
|
|
59
|
-
{
|
|
60
|
-
delete solver;
|
|
61
|
-
delete grammarBase;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/// Build Grammar from text file
|
|
65
|
-
virtual void buildCFLGrammar();
|
|
66
|
-
|
|
67
|
-
/// Build CFLGraph based on Option
|
|
68
|
-
virtual void buildCFLGraph();
|
|
69
|
-
|
|
70
|
-
/// Normalize grammar
|
|
71
|
-
virtual void normalizeCFLGrammar();
|
|
72
|
-
|
|
73
|
-
/// Get CFL graph
|
|
74
|
-
CFLGraph* getCFLGraph();
|
|
75
|
-
|
|
76
|
-
/// Count the num of Nonterminal Edges
|
|
77
|
-
virtual void countSumEdges();
|
|
78
|
-
|
|
79
|
-
/// Solving CFL Reachability
|
|
80
|
-
virtual void solve();
|
|
81
|
-
|
|
82
|
-
/// Finalize extra stat info passing
|
|
83
|
-
virtual void finalize();
|
|
84
|
-
|
|
85
|
-
/// Perform analyze (main part of CFLR Analysis)
|
|
86
|
-
virtual void analyze();
|
|
87
|
-
|
|
88
|
-
/// Statistics
|
|
89
|
-
//@{
|
|
90
|
-
// Grammar
|
|
91
|
-
static double timeOfBuildCFLGrammar; // Time of building grammarBase from text file
|
|
92
|
-
static double timeOfNormalizeGrammar; // Time of normalizing grammarBase to CFLGrammar
|
|
93
|
-
// Graph
|
|
94
|
-
static double timeOfBuildCFLGraph; // Time of building CFLGraph
|
|
95
|
-
static double numOfTerminalEdges; // Number of terminal labeled edges
|
|
96
|
-
static double numOfTemporaryNonterminalEdges; // Number of temporary (ie. X0, X1..) nonterminal labeled edges
|
|
97
|
-
static double numOfNonterminalEdges; // Number of nonterminal labeled edges
|
|
98
|
-
static double numOfStartEdges; // Number of start nonterminal labeled edges
|
|
99
|
-
// Solver
|
|
100
|
-
static double numOfIteration; // Number solving Iteration
|
|
101
|
-
static double numOfChecks; // Number of checks
|
|
102
|
-
static double timeOfSolving; // time of solving CFL Reachability
|
|
103
|
-
//@}
|
|
104
|
-
|
|
105
|
-
protected:
|
|
106
|
-
SVFIR* svfir;
|
|
107
|
-
CFLGraph* graph;
|
|
108
|
-
GrammarBase* grammarBase;
|
|
109
|
-
CFLGrammar* grammar;
|
|
110
|
-
CFLSolver* solver;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
} // End namespace SVF
|
|
114
|
-
|
|
115
|
-
#endif /* INCLUDE_CFL_CFLBASE_H_*/
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
//===----- CFLData.h -- Context Free Language Reachability Graph Data Structure--------------//
|
|
2
|
-
//
|
|
3
|
-
// SVF: Static Value-Flow Analysis
|
|
4
|
-
//
|
|
5
|
-
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// This program is free software: you can redistribute it and/or modify
|
|
9
|
-
// it under the terms of the GNU 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 General Public License for more details.
|
|
17
|
-
|
|
18
|
-
// You should have received a copy of the GNU General Public License
|
|
19
|
-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
//
|
|
21
|
-
//===----------------------------------------------------------------------===//
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* CFLData.h
|
|
25
|
-
*
|
|
26
|
-
* Created on: Nov 22, 2019
|
|
27
|
-
* Author: Yuxiang Lei
|
|
28
|
-
*
|
|
29
|
-
* The implementation is based on
|
|
30
|
-
* Yuxiang Lei, Yulei Sui, Shuo Ding, and Qirun Zhang.
|
|
31
|
-
* Taming Transitive Redundancy for Context-Free Language Reachability.
|
|
32
|
-
* ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
#ifndef INCLUDE_CFL_CFGDATA_H_
|
|
36
|
-
#define INCLUDE_CFL_CFGDATA_H_
|
|
37
|
-
|
|
38
|
-
#include "Util/WorkList.h"
|
|
39
|
-
#include "CFL/CFLGrammar.h"
|
|
40
|
-
|
|
41
|
-
namespace SVF
|
|
42
|
-
{
|
|
43
|
-
typedef GrammarBase::Symbol Label;
|
|
44
|
-
/*!
|
|
45
|
-
* Adjacency-list graph representation
|
|
46
|
-
*/
|
|
47
|
-
class CFLData
|
|
48
|
-
{
|
|
49
|
-
public:
|
|
50
|
-
typedef std::map<const Label, NodeBS> TypeMap; // Label with SparseBitVector of NodeID
|
|
51
|
-
typedef std::unordered_map<NodeID, TypeMap> DataMap; // Each Node has a TypeMap
|
|
52
|
-
typedef typename DataMap::iterator iterator; // iterator for each node
|
|
53
|
-
typedef typename DataMap::const_iterator const_iterator; // const iterator
|
|
54
|
-
|
|
55
|
-
protected:
|
|
56
|
-
DataMap succMap; // succ map for nodes contains Label: Edgeset
|
|
57
|
-
DataMap predMap; // pred map for nodes contains Label: edgeset
|
|
58
|
-
const NodeBS emptyData; // ??
|
|
59
|
-
NodeBS diff; // ??
|
|
60
|
-
|
|
61
|
-
// union/add data
|
|
62
|
-
//@{
|
|
63
|
-
inline bool addPred(const NodeID key, const NodeID src, const Label ty)
|
|
64
|
-
{
|
|
65
|
-
return predMap[key][ty].test_and_set(src);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
inline bool addSucc(const NodeID key, const NodeID dst, const Label ty)
|
|
69
|
-
{
|
|
70
|
-
return succMap[key][ty].test_and_set(dst);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
inline bool addPreds(const NodeID key, const NodeBS& data, const Label ty)
|
|
74
|
-
{
|
|
75
|
-
if (data.empty())
|
|
76
|
-
return false;
|
|
77
|
-
return predMap[key][ty] |= data; // union of sparsebitvector (add to LHS)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
inline bool addSuccs(const NodeID key, const NodeBS& data, const Label ty)
|
|
81
|
-
{
|
|
82
|
-
if (data.empty())
|
|
83
|
-
return false;
|
|
84
|
-
return succMap[key][ty] |= data; // // union of sparsebitvector (add to LHS)
|
|
85
|
-
}
|
|
86
|
-
//@}
|
|
87
|
-
|
|
88
|
-
public:
|
|
89
|
-
// Constructor
|
|
90
|
-
CFLData()
|
|
91
|
-
{}
|
|
92
|
-
|
|
93
|
-
// Destructor
|
|
94
|
-
virtual ~CFLData()
|
|
95
|
-
{}
|
|
96
|
-
|
|
97
|
-
virtual void clear()
|
|
98
|
-
{
|
|
99
|
-
succMap.clear();
|
|
100
|
-
predMap.clear();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
inline const_iterator begin() const
|
|
104
|
-
{
|
|
105
|
-
return succMap.begin();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
inline const_iterator end() const
|
|
109
|
-
{
|
|
110
|
-
return succMap.end();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
inline iterator begin()
|
|
114
|
-
{
|
|
115
|
-
return succMap.begin();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
inline iterator end()
|
|
119
|
-
{
|
|
120
|
-
return succMap.end();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
inline DataMap& getSuccMap()
|
|
124
|
-
{
|
|
125
|
-
return succMap;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
inline DataMap& getPredMap()
|
|
129
|
-
{
|
|
130
|
-
return predMap;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
inline TypeMap& getSuccMap(const NodeID key)
|
|
134
|
-
{
|
|
135
|
-
return succMap[key];
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
inline TypeMap& getPredMap(const NodeID key)
|
|
139
|
-
{
|
|
140
|
-
return predMap[key];
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
inline NodeBS& getSuccs(const NodeID key, const Label ty)
|
|
144
|
-
{
|
|
145
|
-
return succMap[key][ty];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
inline NodeBS& getPreds(const NodeID key, const Label ty)
|
|
149
|
-
{
|
|
150
|
-
return predMap[key][ty];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Alias data operations
|
|
154
|
-
//@{
|
|
155
|
-
inline bool addEdge(const NodeID src, const NodeID dst, const Label ty)
|
|
156
|
-
{
|
|
157
|
-
addSucc(src, dst, ty);
|
|
158
|
-
return addPred(dst, src, ty);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/// add edges and return the set of added edges (dst) for src
|
|
162
|
-
inline NodeBS addEdges(const NodeID src, const NodeBS& dstData, const Label ty)
|
|
163
|
-
{
|
|
164
|
-
NodeBS newDsts;
|
|
165
|
-
if (addSuccs(src, dstData, ty))
|
|
166
|
-
{
|
|
167
|
-
for (const NodeID datum: dstData)
|
|
168
|
-
if (addPred(datum, src, ty))
|
|
169
|
-
newDsts.set(datum);
|
|
170
|
-
}
|
|
171
|
-
return newDsts;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/// add edges and return the set of added edges (src) for dst
|
|
175
|
-
inline NodeBS addEdges(const NodeBS& srcData, const NodeID dst, const Label ty)
|
|
176
|
-
{
|
|
177
|
-
NodeBS newSrcs;
|
|
178
|
-
if (addPreds(dst, srcData, ty))
|
|
179
|
-
{
|
|
180
|
-
for (const NodeID datum: srcData)
|
|
181
|
-
if (addSucc(datum, dst, ty))
|
|
182
|
-
newSrcs.set(datum);
|
|
183
|
-
}
|
|
184
|
-
return newSrcs;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/// find src -> find src[ty] -> find dst in set
|
|
188
|
-
inline bool hasEdge(const NodeID src, const NodeID dst, const Label ty)
|
|
189
|
-
{
|
|
190
|
-
const_iterator iter1 = succMap.find(src);
|
|
191
|
-
if (iter1 == succMap.end())
|
|
192
|
-
return false;
|
|
193
|
-
|
|
194
|
-
auto iter2 = iter1->second.find(ty);
|
|
195
|
-
if (iter2 == iter1->second.end())
|
|
196
|
-
return false;
|
|
197
|
-
|
|
198
|
-
return iter2->second.test(dst);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* This is a dataset version, to be modified to a cflData version */
|
|
202
|
-
inline void clearEdges(const NodeID key)
|
|
203
|
-
{
|
|
204
|
-
succMap[key].clear();
|
|
205
|
-
predMap[key].clear();
|
|
206
|
-
}
|
|
207
|
-
//@}
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
/*!
|
|
212
|
-
* Hybrid graph representation for transitive relations
|
|
213
|
-
*/
|
|
214
|
-
class HybridData
|
|
215
|
-
{
|
|
216
|
-
public:
|
|
217
|
-
struct TreeNode
|
|
218
|
-
{
|
|
219
|
-
NodeID id;
|
|
220
|
-
std::unordered_set<TreeNode*> children;
|
|
221
|
-
|
|
222
|
-
TreeNode(NodeID nId) : id(nId)
|
|
223
|
-
{}
|
|
224
|
-
|
|
225
|
-
~TreeNode()
|
|
226
|
-
{
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
inline bool operator==(const TreeNode& rhs) const
|
|
230
|
-
{
|
|
231
|
-
return id == rhs.id;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
inline bool operator<(const TreeNode& rhs) const
|
|
235
|
-
{
|
|
236
|
-
return id < rhs.id;
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
public:
|
|
242
|
-
Map<NodeID, std::unordered_map<NodeID, TreeNode*>> indMap; // indMap[v][u] points to node v in tree(u)
|
|
243
|
-
|
|
244
|
-
HybridData()
|
|
245
|
-
{}
|
|
246
|
-
|
|
247
|
-
~HybridData()
|
|
248
|
-
{
|
|
249
|
-
for (auto iter1: indMap)
|
|
250
|
-
{
|
|
251
|
-
for (auto iter2: iter1.second)
|
|
252
|
-
{
|
|
253
|
-
delete iter2.second;
|
|
254
|
-
iter2.second = NULL;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
bool hasInd(NodeID src, NodeID dst)
|
|
260
|
-
{
|
|
261
|
-
auto it = indMap.find(dst);
|
|
262
|
-
if (it == indMap.end())
|
|
263
|
-
return false;
|
|
264
|
-
return (it->second.find(src) != it->second.end());
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/// Add a node dst to tree(src)
|
|
268
|
-
TreeNode* addInd(NodeID src, NodeID dst)
|
|
269
|
-
{
|
|
270
|
-
auto resIns = indMap[dst].insert(std::make_pair(src, new TreeNode(dst)));
|
|
271
|
-
if (resIns.second)
|
|
272
|
-
return resIns.first->second;
|
|
273
|
-
return nullptr;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/// Get the node dst in tree(src)
|
|
277
|
-
TreeNode* getNode(NodeID src, NodeID dst)
|
|
278
|
-
{
|
|
279
|
-
return indMap[dst][src];
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/// add v into desc(x) as a child of u
|
|
283
|
-
void insertEdge(TreeNode* u, TreeNode* v)
|
|
284
|
-
{
|
|
285
|
-
u->children.insert(v);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
void addArc(NodeID src, NodeID dst)
|
|
289
|
-
{
|
|
290
|
-
if (!hasInd(src, dst))
|
|
291
|
-
{
|
|
292
|
-
for (auto iter: indMap[src])
|
|
293
|
-
{
|
|
294
|
-
meld(iter.first, getNode(iter.first, src), getNode(dst, dst));
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
void meld(NodeID x, TreeNode* uNode, TreeNode* vNode)
|
|
300
|
-
{
|
|
301
|
-
TreeNode* newVNode = addInd(x, vNode->id);
|
|
302
|
-
if (!newVNode)
|
|
303
|
-
return;
|
|
304
|
-
|
|
305
|
-
insertEdge(uNode, newVNode);
|
|
306
|
-
for (TreeNode* vChild: vNode->children)
|
|
307
|
-
{
|
|
308
|
-
meld(x, newVNode, vChild);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
} // end namespace SVF
|
|
315
|
-
|
|
316
|
-
#endif
|