svf-tools 1.0.464 → 1.0.467
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-doxygen/html/html/AndersenSCD_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/Andersen_8h_source.html +2 -2
- package/SVF-doxygen/html/html/Annotator_8h_source.html +3 -3
- package/SVF-doxygen/html/html/BDDExpr_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/BDDExpr_8h_source.html +1 -1
- package/SVF-doxygen/html/html/BreakConstantExpr_8cpp.html +6 -6
- package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/BreakConstantExpr_8h_source.html +3 -3
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +4 -4
- package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +5 -5
- package/SVF-doxygen/html/html/CHG_8cpp.html +2 -2
- package/SVF-doxygen/html/html/CHG_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/CHG_8h_source.html +3 -3
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +21 -20
- package/SVF-doxygen/html/html/CPPUtil_8h_source.html +3 -3
- package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ConditionalPT_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +2 -2
- package/SVF-doxygen/html/html/CxtStmt_8h_source.html +4 -4
- package/SVF-doxygen/html/html/DCHG_8cpp_source.html +12 -12
- package/SVF-doxygen/html/html/DCHG_8h_source.html +5 -5
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/DDAPass_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DPItem_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/DataFlowUtil_8h_source.html +8 -8
- package/SVF-doxygen/html/html/ExeState_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +3 -3
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/FileChecker_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +3 -3
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGNode_8h_source.html +3 -3
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ICFG_8h_source.html +3 -3
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +9 -9
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +3 -3
- package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/LLVMModule_8h_source.html +6 -6
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +24 -23
- package/SVF-doxygen/html/html/LLVMUtil_8h.html +2 -0
- package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +61 -60
- package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/LeakChecker_8h_source.html +1 -1
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +7 -6
- package/SVF-doxygen/html/html/LocationSet_8h_source.html +2 -2
- package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/LockAnalysis_8h_source.html +4 -4
- package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +2 -2
- package/SVF-doxygen/html/html/MHP_8cpp.html +1 -1
- package/SVF-doxygen/html/html/MHP_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/MHP_8h_source.html +5 -5
- package/SVF-doxygen/html/html/MSSAMuChi_8h.html +7 -1
- package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +4 -3
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +5 -5
- package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +6 -6
- package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/MTA_8h_source.html +2 -2
- package/SVF-doxygen/html/html/MemPartition_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemPartition_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +18 -9
- package/SVF-doxygen/html/html/MemRegion_8h_source.html +3 -3
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/MemSSA_8h_source.html +4 -4
- package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Options_8cpp_source.html +50 -48
- package/SVF-doxygen/html/html/Options_8h_source.html +51 -49
- package/SVF-doxygen/html/html/PCG_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/PCG_8h_source.html +3 -3
- package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/PathCondAllocator_8cpp_source.html +12 -12
- package/SVF-doxygen/html/html/PathCondAllocator_8h_source.html +7 -7
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +15 -14
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ProgSlice_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ProgSlice_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFGBuilder_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFGNode_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFGReadWrite_8cpp.html +86 -0
- package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +125 -0
- package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +53 -48
- package/SVF-doxygen/html/html/SVFG_8h_source.html +42 -39
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +53 -52
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +13 -13
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFModule_8h_source.html +4 -4
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +13 -13
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +9 -9
- package/SVF-doxygen/html/html/SVFVariables_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +6 -6
- package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SrcSnkDDA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +35 -34
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +5 -5
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +14 -13
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +6 -6
- package/SVF-doxygen/html/html/TCT_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/TCT_8h_source.html +10 -10
- package/SVF-doxygen/html/html/ThreadAPI_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +6 -6
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ThreadCallGraph_8h_source.html +2 -2
- package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +2 -2
- package/SVF-doxygen/html/html/Util_2BasicTypes_8h_source.html +77 -77
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +3 -3
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/WPAPass_8h_source.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualParmVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualRetVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1Annotator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BDDExprManager.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +31 -31
- package/SVF-doxygen/html/html/classSVF_1_1CHGraph.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1CallCFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallSite.html +41 -41
- package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CondStdSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CondVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ContextCond.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1CopyStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CxtProc.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CxtStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CxtThread.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DCHGraph.html +13 -13
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DirectSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DistinctMRG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyValVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ExeState.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +21 -21
- package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalParmVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalRetVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FunEntryICFGNode.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FunExitICFGNode.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GlobalICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1ICFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1IndirectSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterDisjointMRG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterMSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraDisjointMRG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraMSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IteratedDominanceFrontier.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +10 -8
- package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1MHP.html +26 -26
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1MRSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +28 -28
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1MemSSADF.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MergeFunctionRets.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Options-members.html +28 -26
- package/SVF-doxygen/html/html/classSVF_1_1Options.html +101 -49
- package/SVF-doxygen/html/html/classSVF_1_1PCG.html +19 -19
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTACFInfoBuilder.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraph.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraphEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraphNode.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +14 -13
- package/SVF-doxygen/html/html/classSVF_1_1PathCondAllocator.html +25 -25
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1ProgSlice.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1RetCFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFBasicBlock.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SVFFunction.html +27 -27
- package/SVF-doxygen/html/html/classSVF_1_1SVFG-members.html +91 -88
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +302 -116
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT-members.html +100 -97
- package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +18 -12
- package/SVF-doxygen/html/html/classSVF_1_1SVFGStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFGlobal.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +110 -107
- package/SVF-doxygen/html/html/classSVF_1_1SVFStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1SaberAnnotator.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1StmtVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +44 -42
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +19 -18
- package/SVF-doxygen/html/html/classSVF_1_1TCT.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraphBuilder.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ThreadForkEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadJoinEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadMHPIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1VFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ValVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +12 -12
- package/SVF-doxygen/html/html/classllvm_1_1generic__bridge__gep__type__iterator.html +3 -3
- package/SVF-doxygen/html/html/dir_1870ebf480d659cc38d2dd7ac3aa8993.html +2 -0
- package/SVF-doxygen/html/html/files.html +4 -3
- package/SVF-doxygen/html/html/functions_c.html +5 -9
- package/SVF-doxygen/html/html/functions_func_g.html +7 -4
- package/SVF-doxygen/html/html/functions_func_r.html +7 -4
- package/SVF-doxygen/html/html/functions_func_w.html +1 -0
- package/SVF-doxygen/html/html/functions_g.html +9 -6
- package/SVF-doxygen/html/html/functions_i.html +3 -3
- package/SVF-doxygen/html/html/functions_l.html +8 -8
- package/SVF-doxygen/html/html/functions_o.html +14 -14
- package/SVF-doxygen/html/html/functions_p.html +10 -14
- package/SVF-doxygen/html/html/functions_r.html +11 -7
- package/SVF-doxygen/html/html/functions_s.html +14 -12
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars_r.html +3 -0
- package/SVF-doxygen/html/html/functions_vars_w.html +3 -0
- package/SVF-doxygen/html/html/functions_w.html +4 -0
- package/SVF-doxygen/html/html/globals_s.html +7 -3
- package/SVF-doxygen/html/html/namespaceSVF.html +80 -41
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +233 -199
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +38 -36
- package/SVF-doxygen/html/html/namespacemembers_func.html +4 -1
- package/SVF-doxygen/html/html/namespacemembers_g.html +8 -5
- package/SVF-doxygen/html/html/namespacemembers_o.html +1 -1
- package/SVF-doxygen/html/html/search/all_10.js +3 -3
- package/SVF-doxygen/html/html/search/all_12.js +4 -2
- package/SVF-doxygen/html/html/search/all_13.js +10 -9
- package/SVF-doxygen/html/html/search/all_14.js +3 -3
- package/SVF-doxygen/html/html/search/all_16.js +2 -2
- package/SVF-doxygen/html/html/search/all_17.js +2 -1
- package/SVF-doxygen/html/html/search/all_3.js +1 -1
- package/SVF-doxygen/html/html/search/all_7.js +2 -0
- package/SVF-doxygen/html/html/search/all_9.js +1 -1
- package/SVF-doxygen/html/html/search/all_b.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +3 -3
- package/SVF-doxygen/html/html/search/all_d.js +2 -2
- package/SVF-doxygen/html/html/search/all_e.js +3 -3
- package/SVF-doxygen/html/html/search/all_f.js +3 -3
- package/SVF-doxygen/html/html/search/files_d.js +1 -0
- package/SVF-doxygen/html/html/search/functions_14.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +2 -0
- package/SVF-doxygen/html/html/search/functions_d.js +1 -1
- package/SVF-doxygen/html/html/search/functions_f.js +1 -0
- package/SVF-doxygen/html/html/search/variables_12.js +1 -0
- package/SVF-doxygen/html/html/search/variables_14.js +1 -1
- package/SVF-doxygen/html/html/search/variables_17.js +2 -1
- package/SVF-doxygen/html/html/search/variables_e.js +3 -3
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +3 -3
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01PTACallGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01SVFG_01_5_01_4.html +24 -24
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01VFG_01_5_01_4.html +4 -4
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1SVFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1CallSite_01_4.html +3 -3
- package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1CxtProc_01_4.html +1 -1
- package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1CxtStmt_01_4.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +3 -3
- package/include/Graphs/SVFG.h +4 -0
- package/include/MSSA/MSSAMuChi.h +1 -0
- package/include/SVF-FE/LLVMUtil.h +11 -1
- package/include/Util/BasicTypes.h +4 -0
- package/include/Util/Options.h +3 -0
- package/lib/Graphs/SVFG.cpp +31 -27
- package/lib/Graphs/SVFGReadWrite.cpp +478 -0
- package/lib/MSSA/MemRegion.cpp +7 -0
- package/lib/MemoryModel/LocationSet.cpp +2 -2
- package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
- package/lib/MemoryModel/SymbolTableInfo.cpp +1 -1
- package/lib/SVF-FE/BreakConstantExpr.cpp +3 -1
- package/lib/SVF-FE/CPPUtil.cpp +2 -2
- package/lib/SVF-FE/LLVMUtil.cpp +2 -2
- package/lib/SVF-FE/SVFIRBuilder.cpp +3 -3
- package/lib/SVF-FE/SymbolTableBuilder.cpp +2 -2
- package/lib/Util/Options.cpp +11 -0
- package/lib/Util/PTAStat.cpp +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
//===- SVFGReadWrite.cpp -- SVFG read & write-----------------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2017> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU 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
|
+
* SVFGReadWrite.cpp
|
|
25
|
+
*
|
|
26
|
+
* Created on: May 21, 2022
|
|
27
|
+
* Author: Jeffrey Ma
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include "Util/SVFModule.h"
|
|
31
|
+
#include "SVF-FE/LLVMUtil.h"
|
|
32
|
+
#include "Graphs/SVFG.h"
|
|
33
|
+
#include "Graphs/SVFGStat.h"
|
|
34
|
+
#include "MemoryModel/PointerAnalysisImpl.h"
|
|
35
|
+
#include <fstream>
|
|
36
|
+
#include "Util/Options.h"
|
|
37
|
+
|
|
38
|
+
using namespace SVF;
|
|
39
|
+
using namespace SVFUtil;
|
|
40
|
+
|
|
41
|
+
// Format of file
|
|
42
|
+
// __Nodes__
|
|
43
|
+
// SVFGNodeID: <id> >= <node type> >= MVER: {MRVERID: <id> MemRegion: pts{<pts> } MRVERSION: <version> MSSADef: <version>, pts{<pts> }} >= ICFGNodeID: <id>
|
|
44
|
+
// __Edges__
|
|
45
|
+
// srcSVFGNodeID: <id> => dstSVFGNodeID: <id> >= <edge type> | MVER: {MRVERID: <id> MemRegion: pts{<pts> } MRVERSION: <version> MSSADef: <version>, pts{<pts> }}
|
|
46
|
+
void SVFG::writeToFile(const string& filename)
|
|
47
|
+
{
|
|
48
|
+
outs() << "Writing SVFG analysis to '" << filename << "'...";
|
|
49
|
+
error_code err;
|
|
50
|
+
std::fstream f(filename.c_str(), std::ios_base::out);
|
|
51
|
+
if (!f.good())
|
|
52
|
+
{
|
|
53
|
+
outs() << " error opening file for writing!\n";
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
f << "__Nodes__\n";
|
|
57
|
+
// Iterate over nodes and write to file
|
|
58
|
+
for(iterator it = begin(), eit = end(); it!=eit; ++it)
|
|
59
|
+
{
|
|
60
|
+
NodeID nodeId = it->first;
|
|
61
|
+
const SVFGNode* node = it->second;
|
|
62
|
+
if(const FormalINSVFGNode* formalIn = SVFUtil::dyn_cast<FormalINSVFGNode>(node))
|
|
63
|
+
{
|
|
64
|
+
//node
|
|
65
|
+
f << "SVFGNodeID: " << nodeId << " >= " << "FormalINSVFGNode";
|
|
66
|
+
f << " >= MVER: {";
|
|
67
|
+
f << *formalIn->getMRVer() << "} >= ICFGNodeID: " << formalIn->getFunEntryNode()->getId() << "\n";
|
|
68
|
+
}
|
|
69
|
+
else if(const FormalOUTSVFGNode* formalOut = SVFUtil::dyn_cast<FormalOUTSVFGNode>(node))
|
|
70
|
+
{
|
|
71
|
+
//node
|
|
72
|
+
f << "SVFGNodeID: " << nodeId << " >= " << "FormalOUTSVFGNode";
|
|
73
|
+
f << " >= MVER: {";
|
|
74
|
+
f << *formalOut->getMRVer() << "} >= ICFGNodeID: " << formalOut->getFunExitNode()->getId() << "\n";
|
|
75
|
+
}
|
|
76
|
+
else if(const ActualINSVFGNode* actualIn = SVFUtil::dyn_cast<ActualINSVFGNode>(node))
|
|
77
|
+
{
|
|
78
|
+
//node
|
|
79
|
+
f << "SVFGNodeID: " << nodeId << " >= " << "ActualINSVFGNode";
|
|
80
|
+
f << " >= MVER: {";
|
|
81
|
+
f << *actualIn->getMRVer() << "} >= ICFGNodeID: " << actualIn->getCallSite()->getId() << "\n";
|
|
82
|
+
}
|
|
83
|
+
else if(const ActualOUTSVFGNode* actualOut = SVFUtil::dyn_cast<ActualOUTSVFGNode>(node))
|
|
84
|
+
{
|
|
85
|
+
//node
|
|
86
|
+
f << "SVFGNodeID: " << nodeId << " >= " << "ActualOUTSVFGNode" << " >= MVER: {";
|
|
87
|
+
f << *actualOut->getMRVer() << "} >= ICFGNodeID: " << actualOut->getCallSite()->getId() << "\n";
|
|
88
|
+
}
|
|
89
|
+
else if(const MSSAPHISVFGNode* phiNode = SVFUtil::dyn_cast<MSSAPHISVFGNode>(node))
|
|
90
|
+
{
|
|
91
|
+
//node
|
|
92
|
+
f << "SVFGNodeID: " << nodeId << " >= " << "PHISVFGNode";
|
|
93
|
+
unordered_map<u32_t,const MRVer*> opvers;
|
|
94
|
+
for (MemSSA::PHI::OPVers::const_iterator it = phiNode->opVerBegin(), eit = phiNode->opVerEnd();
|
|
95
|
+
it != eit; it++)
|
|
96
|
+
{
|
|
97
|
+
opvers.insert(make_pair(it->first, it->second));
|
|
98
|
+
}
|
|
99
|
+
// opvers
|
|
100
|
+
f << " >= MVER: {";
|
|
101
|
+
f << *phiNode->getResVer();
|
|
102
|
+
f << "} >= ICFGNodeID: " << pag->getICFG()->getICFGNode(&(phiNode->getICFGNode()->getBB()->front()))->getId();
|
|
103
|
+
f << " >= OPVers: {";
|
|
104
|
+
for (auto x: opvers)
|
|
105
|
+
{
|
|
106
|
+
const MRVer* op = x.second;
|
|
107
|
+
f << "{" << *op << "}" << ",";
|
|
108
|
+
}
|
|
109
|
+
f << "}\n";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
f << "\n\n__Edges__\n";
|
|
114
|
+
// Iterate over edges and write to file
|
|
115
|
+
for(iterator it = begin(), eit = end(); it!=eit; ++it)
|
|
116
|
+
{
|
|
117
|
+
NodeID nodeId = it->first;
|
|
118
|
+
const SVFGNode* node = it->second;
|
|
119
|
+
if(const LoadSVFGNode* loadNode = SVFUtil::dyn_cast<LoadSVFGNode>(node))
|
|
120
|
+
{
|
|
121
|
+
MUSet& muSet = mssa->getMUSet(SVFUtil::cast<LoadStmt>(loadNode->getPAGEdge()));
|
|
122
|
+
for(MUSet::iterator it = muSet.begin(), eit = muSet.end(); it!=eit; ++it)
|
|
123
|
+
{
|
|
124
|
+
if(LOADMU* mu = SVFUtil::dyn_cast<LOADMU>(*it))
|
|
125
|
+
{
|
|
126
|
+
NodeID def = getDef(mu->getMRVer());
|
|
127
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= LoadNode | MVER: {"<< *mu->getMRVer() << "}" << "\n";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if(const StoreSVFGNode* storeNode = SVFUtil::dyn_cast<StoreSVFGNode>(node))
|
|
132
|
+
{
|
|
133
|
+
CHISet& chiSet = mssa->getCHISet(SVFUtil::cast<StoreStmt>(storeNode->getPAGEdge()));
|
|
134
|
+
for(CHISet::iterator it = chiSet.begin(), eit = chiSet.end(); it!=eit; ++it)
|
|
135
|
+
{
|
|
136
|
+
if(STORECHI* chi = SVFUtil::dyn_cast<STORECHI>(*it))
|
|
137
|
+
{
|
|
138
|
+
NodeID def = getDef(chi->getOpVer());
|
|
139
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= StoreNode | MVER: {"<< *chi->getOpVer() << "}" << "\n";
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else if(const FormalINSVFGNode* formalIn = SVFUtil::dyn_cast<FormalINSVFGNode>(node))
|
|
144
|
+
{
|
|
145
|
+
PTACallGraphEdge::CallInstSet callInstSet;
|
|
146
|
+
mssa->getPTA()->getPTACallGraph()->getDirCallSitesInvokingCallee(formalIn->getFun(),callInstSet);
|
|
147
|
+
for(PTACallGraphEdge::CallInstSet::iterator it = callInstSet.begin(), eit = callInstSet.end(); it!=eit; ++it)
|
|
148
|
+
{
|
|
149
|
+
const CallICFGNode* cs = *it;
|
|
150
|
+
if(!mssa->hasMU(cs))
|
|
151
|
+
continue;
|
|
152
|
+
ActualINSVFGNodeSet& actualIns = getActualINSVFGNodes(cs);
|
|
153
|
+
for(ActualINSVFGNodeSet::iterator ait = actualIns.begin(), aeit = actualIns.end(); ait!=aeit; ++ait)
|
|
154
|
+
{
|
|
155
|
+
const ActualINSVFGNode* actualIn = SVFUtil::cast<ActualINSVFGNode>(getSVFGNode(*ait));
|
|
156
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << actualIn->getId() << " >= FormalINSVFGNode" << "\n";
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else if(const FormalOUTSVFGNode* formalOut = SVFUtil::dyn_cast<FormalOUTSVFGNode>(node))
|
|
161
|
+
{
|
|
162
|
+
PTACallGraphEdge::CallInstSet callInstSet;
|
|
163
|
+
mssa->getPTA()->getPTACallGraph()->getDirCallSitesInvokingCallee(formalOut->getFun(),callInstSet);
|
|
164
|
+
for(PTACallGraphEdge::CallInstSet::iterator it = callInstSet.begin(), eit = callInstSet.end(); it!=eit; ++it)
|
|
165
|
+
{
|
|
166
|
+
const CallICFGNode* cs = *it;
|
|
167
|
+
if(!mssa->hasCHI(cs))
|
|
168
|
+
continue;
|
|
169
|
+
ActualOUTSVFGNodeSet& actualOuts = getActualOUTSVFGNodes(cs);
|
|
170
|
+
for(ActualOUTSVFGNodeSet::iterator ait = actualOuts.begin(), aeit = actualOuts.end(); ait!=aeit; ++ait)
|
|
171
|
+
{
|
|
172
|
+
const ActualOUTSVFGNode* actualOut = SVFUtil::cast<ActualOUTSVFGNode>(getSVFGNode(*ait));
|
|
173
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << actualOut->getId() << " >= FormalOUTSVFGNode" << "\n";
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
NodeID def = getDef(formalOut->getMRVer());
|
|
177
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= FormalOUTSVFGNode | intra" << "\n";
|
|
178
|
+
}
|
|
179
|
+
else if(const ActualINSVFGNode* actualIn = SVFUtil::dyn_cast<ActualINSVFGNode>(node))
|
|
180
|
+
{
|
|
181
|
+
NodeID def = getDef(actualIn->getMRVer());
|
|
182
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= ActualINSVFGNode" << "\n";
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
else if(const MSSAPHISVFGNode* phiNode = SVFUtil::dyn_cast<MSSAPHISVFGNode>(node))
|
|
186
|
+
{
|
|
187
|
+
for (MemSSA::PHI::OPVers::const_iterator it = phiNode->opVerBegin(), eit = phiNode->opVerEnd();
|
|
188
|
+
it != eit; it++)
|
|
189
|
+
{
|
|
190
|
+
const MRVer* op = it->second;
|
|
191
|
+
NodeID def = getDef(op);
|
|
192
|
+
f << "srcSVFGNodeID: " << nodeId << " => " << "dstSVFGNodeID: " << def << " >= PHISVFGNode | MVER: {"<< *op << "}" << "\n";
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// Job finish and close file
|
|
197
|
+
f.close();
|
|
198
|
+
if (f.good())
|
|
199
|
+
{
|
|
200
|
+
outs() << "\n";
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
void SVFG::readFile(const string& filename)
|
|
206
|
+
{
|
|
207
|
+
outs() << "Loading SVFG analysis results from '" << filename << "'...";
|
|
208
|
+
ifstream F(filename.c_str());
|
|
209
|
+
if (!F.is_open())
|
|
210
|
+
{
|
|
211
|
+
outs() << " error opening file for reading!\n";
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
PAGEdge::PAGEdgeSetTy& stores = getPAGEdgeSet(PAGEdge::Store);
|
|
216
|
+
for (PAGEdge::PAGEdgeSetTy::iterator iter = stores.begin(), eiter =
|
|
217
|
+
stores.end(); iter != eiter; ++iter)
|
|
218
|
+
{
|
|
219
|
+
StoreStmt* store = SVFUtil::cast<StoreStmt>(*iter);
|
|
220
|
+
const StmtSVFGNode* sNode = getStmtVFGNode(store);
|
|
221
|
+
for(CHISet::iterator pi = mssa->getCHISet(store).begin(), epi = mssa->getCHISet(store).end(); pi!=epi; ++pi)
|
|
222
|
+
setDef((*pi)->getResVer(),sNode);
|
|
223
|
+
}
|
|
224
|
+
//outer loop through each line in the file
|
|
225
|
+
string line;
|
|
226
|
+
// add nodes
|
|
227
|
+
stat->ATVFNodeStart();
|
|
228
|
+
while (F.good())
|
|
229
|
+
{
|
|
230
|
+
getline(F, line);
|
|
231
|
+
if (line.empty())
|
|
232
|
+
continue;
|
|
233
|
+
if (line.find("__Edges__") != std::string::npos)
|
|
234
|
+
break;
|
|
235
|
+
|
|
236
|
+
std::string s = line;
|
|
237
|
+
std::string delimiter = " >= ";
|
|
238
|
+
string temp;
|
|
239
|
+
int index = 0;
|
|
240
|
+
//implement delimiter to split string using ">="
|
|
241
|
+
size_t next = 0;
|
|
242
|
+
size_t last = 0;
|
|
243
|
+
size_t outer_last = 0;
|
|
244
|
+
size_t nextTemp; //size_t lastTemp;
|
|
245
|
+
NodeID id = 0;
|
|
246
|
+
string type;
|
|
247
|
+
string MR;
|
|
248
|
+
string basicBlock;
|
|
249
|
+
string opVer;
|
|
250
|
+
//inner loop through to get each element in the line
|
|
251
|
+
while ((next = s.find(delimiter, last)) != string::npos)
|
|
252
|
+
{
|
|
253
|
+
temp = s.substr(last, next-last);
|
|
254
|
+
last = next + 4;
|
|
255
|
+
outer_last = next + 4;
|
|
256
|
+
if(index == 0)
|
|
257
|
+
{
|
|
258
|
+
nextTemp = temp.find("SVFGNodeID: ") + 12;
|
|
259
|
+
id = atoi(temp.substr(nextTemp).c_str());
|
|
260
|
+
}
|
|
261
|
+
if(index == 1)
|
|
262
|
+
{
|
|
263
|
+
type = temp;
|
|
264
|
+
}
|
|
265
|
+
if(index > 1)
|
|
266
|
+
{
|
|
267
|
+
if(index == 2)
|
|
268
|
+
{
|
|
269
|
+
MR = temp;
|
|
270
|
+
}
|
|
271
|
+
if(index == 3)
|
|
272
|
+
{
|
|
273
|
+
basicBlock = temp;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
index++;
|
|
277
|
+
}
|
|
278
|
+
MRVer* tempMRVer;
|
|
279
|
+
if(!MR.empty())
|
|
280
|
+
{
|
|
281
|
+
tempMRVer = getMRVERFromString(MR);
|
|
282
|
+
}
|
|
283
|
+
else
|
|
284
|
+
{
|
|
285
|
+
tempMRVer = getMRVERFromString("");
|
|
286
|
+
}
|
|
287
|
+
//add nodes using the variables we extracted
|
|
288
|
+
if(type == "FormalINSVFGNode")
|
|
289
|
+
{
|
|
290
|
+
outer_last = s.find("ICFGNodeID: ") + 12;
|
|
291
|
+
NodeID FunID = atoi(s.substr(outer_last).c_str());
|
|
292
|
+
addFormalINSVFGNode(SVFUtil::dyn_cast<FunEntryICFGNode>(pag->getICFG()->getICFGNode(FunID)), tempMRVer, id);
|
|
293
|
+
}
|
|
294
|
+
else if(type == "FormalOUTSVFGNode")
|
|
295
|
+
{
|
|
296
|
+
outer_last = s.find("ICFGNodeID: ") + 12;
|
|
297
|
+
NodeID FunID = atoi(s.substr(outer_last).c_str());
|
|
298
|
+
addFormalOUTSVFGNode(SVFUtil::dyn_cast<FunExitICFGNode>(pag->getICFG()->getICFGNode(FunID)), tempMRVer, id);
|
|
299
|
+
}
|
|
300
|
+
else if(type == "ActualINSVFGNode")
|
|
301
|
+
{
|
|
302
|
+
outer_last = s.find("ICFGNodeID: ") + 12;
|
|
303
|
+
NodeID CallSiteID = atoi(s.substr(outer_last).c_str());
|
|
304
|
+
addActualINSVFGNode(SVFUtil::dyn_cast<CallICFGNode>(pag->getICFG()->getICFGNode(CallSiteID)), tempMRVer, id);
|
|
305
|
+
}
|
|
306
|
+
else if(type == "ActualOUTSVFGNode")
|
|
307
|
+
{
|
|
308
|
+
outer_last = s.find("ICFGNodeID: ") + 12;
|
|
309
|
+
NodeID CallSiteID = atoi(s.substr(outer_last).c_str());
|
|
310
|
+
addActualOUTSVFGNode(SVFUtil::dyn_cast<CallICFGNode>(pag->getICFG()->getICFGNode(CallSiteID)), tempMRVer, id);
|
|
311
|
+
}
|
|
312
|
+
else if (type == "PHISVFGNode")
|
|
313
|
+
{
|
|
314
|
+
opVer = s.substr(outer_last);
|
|
315
|
+
next = opVer.find("{") + 1;
|
|
316
|
+
last = opVer.find(",}");
|
|
317
|
+
temp = opVer.substr(next, last);
|
|
318
|
+
Map<u32_t,const MRVer*> OPVers;
|
|
319
|
+
int index = 0;
|
|
320
|
+
while ((next = temp.find("{") + 1) != string::npos)
|
|
321
|
+
{
|
|
322
|
+
if (temp == ",}")
|
|
323
|
+
break;
|
|
324
|
+
last = temp.find("},");
|
|
325
|
+
string temp1;
|
|
326
|
+
temp1 = temp.substr(next, last-next);
|
|
327
|
+
MRVer* tempOPVer = getMRVERFromString(temp1);
|
|
328
|
+
OPVers.insert(make_pair(index, tempOPVer));
|
|
329
|
+
temp = temp.substr(last + 1);
|
|
330
|
+
index++;
|
|
331
|
+
}
|
|
332
|
+
next = basicBlock.find("ICFGNodeID: ") + 12;
|
|
333
|
+
temp = basicBlock.substr(next);
|
|
334
|
+
addIntraMSSAPHISVFGNode(pag->getICFG()->getICFGNode(atoi(temp.c_str())), OPVers.begin(), OPVers.end(), tempMRVer, id);
|
|
335
|
+
}
|
|
336
|
+
else
|
|
337
|
+
{
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (totalVFGNode < id)
|
|
341
|
+
totalVFGNode = id + 1;
|
|
342
|
+
}
|
|
343
|
+
stat->ATVFNodeEnd();
|
|
344
|
+
|
|
345
|
+
stat->indVFEdgeStart();
|
|
346
|
+
// Edges
|
|
347
|
+
while (F.good())
|
|
348
|
+
{
|
|
349
|
+
getline(F, line);
|
|
350
|
+
if (line.empty())
|
|
351
|
+
continue;
|
|
352
|
+
|
|
353
|
+
std::string s = line;
|
|
354
|
+
std::string delimiter = " >= ";
|
|
355
|
+
string temp;
|
|
356
|
+
// int index = 0;
|
|
357
|
+
size_t last = 0;
|
|
358
|
+
size_t next = 0; // size_t outer_last = 0;
|
|
359
|
+
string edge;
|
|
360
|
+
string attributes;
|
|
361
|
+
|
|
362
|
+
next = s.find(delimiter);
|
|
363
|
+
|
|
364
|
+
edge = s.substr(0, next);
|
|
365
|
+
attributes = s.substr(next + 4);
|
|
366
|
+
|
|
367
|
+
// extract nodeIDs for src and dst nodes
|
|
368
|
+
NodeID src;
|
|
369
|
+
NodeID dst;
|
|
370
|
+
next = edge.find("srcSVFGNodeID: ") + 15;
|
|
371
|
+
last = edge.find(" => ");
|
|
372
|
+
src = atoi(edge.substr(next, last-next).c_str());
|
|
373
|
+
next = edge.find("dstSVFGNodeID: ") + 15;
|
|
374
|
+
dst = atoi(edge.substr(next).c_str());
|
|
375
|
+
|
|
376
|
+
string type;
|
|
377
|
+
string attribute;
|
|
378
|
+
if (attributes.find(" | ") == string::npos)
|
|
379
|
+
type = attributes;
|
|
380
|
+
else
|
|
381
|
+
{
|
|
382
|
+
next = attributes.find(" | ");
|
|
383
|
+
type = attributes.substr(0, next);
|
|
384
|
+
attribute = attributes.substr(next + 3);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if(type == "FormalINSVFGNode")
|
|
388
|
+
{
|
|
389
|
+
const FormalINSVFGNode* formalIn = SVFUtil::cast<FormalINSVFGNode>(getSVFGNode(src));
|
|
390
|
+
const ActualINSVFGNode* actualIn = SVFUtil::cast<ActualINSVFGNode>(getSVFGNode(dst));
|
|
391
|
+
addInterIndirectVFCallEdge(actualIn,formalIn, getCallSiteID(actualIn->getCallSite(), formalIn->getFun()));
|
|
392
|
+
}
|
|
393
|
+
else if(type == "FormalOUTSVFGNode")
|
|
394
|
+
{
|
|
395
|
+
const FormalOUTSVFGNode* formalOut = SVFUtil::cast<FormalOUTSVFGNode>(getSVFGNode(src));
|
|
396
|
+
if (attribute.find("intra") != string::npos)
|
|
397
|
+
{
|
|
398
|
+
addIntraIndirectVFEdge(dst, src, formalOut->getMRVer()->getMR()->getPointsTo());
|
|
399
|
+
}
|
|
400
|
+
else
|
|
401
|
+
{
|
|
402
|
+
const ActualOUTSVFGNode* actualOut = SVFUtil::cast<ActualOUTSVFGNode>(getSVFGNode(dst));
|
|
403
|
+
addInterIndirectVFRetEdge(formalOut,actualOut,getCallSiteID(actualOut->getCallSite(), formalOut->getFun()));
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
else if(type == "ActualINSVFGNode")
|
|
407
|
+
{
|
|
408
|
+
const ActualINSVFGNode* actualIn = SVFUtil::cast<ActualINSVFGNode>(getSVFGNode(src));
|
|
409
|
+
addIntraIndirectVFEdge(dst,src, actualIn->getMRVer()->getMR()->getPointsTo());
|
|
410
|
+
}
|
|
411
|
+
else if(type == "ActualOUTSVFGNode")
|
|
412
|
+
{
|
|
413
|
+
// There's no need to connect actual out node to its definition site in the same function.
|
|
414
|
+
}
|
|
415
|
+
else if (type == "StoreNode" || type == "LoadNode" || type == "PHISVFGNode")
|
|
416
|
+
{
|
|
417
|
+
MRVer* tempMRVer;
|
|
418
|
+
tempMRVer = getMRVERFromString(attribute);
|
|
419
|
+
addIntraIndirectVFEdge(dst,src, tempMRVer->getMR()->getPointsTo());
|
|
420
|
+
}
|
|
421
|
+
else
|
|
422
|
+
{
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
stat->indVFEdgeEnd();
|
|
426
|
+
connectFromGlobalToProgEntry();
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
MRVer* SVFG::getMRVERFromString(const string& s)
|
|
430
|
+
{
|
|
431
|
+
if(s == "")
|
|
432
|
+
{
|
|
433
|
+
return NULL;
|
|
434
|
+
}
|
|
435
|
+
string temp;
|
|
436
|
+
size_t last = 0;
|
|
437
|
+
size_t next = 0;
|
|
438
|
+
MRVer* tempMRVer;
|
|
439
|
+
MemRegion* tempMemRegion;
|
|
440
|
+
MSSADEF* tempDef;
|
|
441
|
+
//{create Memory Region object
|
|
442
|
+
next = s.find("MemRegion: pts{") + 15;
|
|
443
|
+
last = s.find("} MRVERSION: ");
|
|
444
|
+
temp = s.substr(next, last-next);
|
|
445
|
+
// convert string to PointsTo
|
|
446
|
+
NodeBS dstPts;
|
|
447
|
+
string point;
|
|
448
|
+
stringstream ss(temp);
|
|
449
|
+
while (getline(ss, point, ' '))
|
|
450
|
+
{
|
|
451
|
+
istringstream sss(point);
|
|
452
|
+
NodeID obj;
|
|
453
|
+
sss >> obj;
|
|
454
|
+
dstPts.set(obj);
|
|
455
|
+
}
|
|
456
|
+
tempMemRegion = new MemRegion(dstPts);
|
|
457
|
+
// create mssdef
|
|
458
|
+
next = s.find("MSSADef: ") + 9;
|
|
459
|
+
last = s.find("} >=");
|
|
460
|
+
temp = s.substr(next, last-next);
|
|
461
|
+
// convert string to deftype
|
|
462
|
+
istringstream ss1(temp.substr(0, temp.find(", ")));
|
|
463
|
+
int obj1;
|
|
464
|
+
ss1 >> obj1;
|
|
465
|
+
MSSADEF::DEFTYPE defType = static_cast<MSSADEF::DEFTYPE>(obj1);
|
|
466
|
+
tempDef = new MSSADEF(defType, tempMemRegion);
|
|
467
|
+
// mrversion
|
|
468
|
+
next = s.find("MRVERSION: ") + 11;
|
|
469
|
+
last = s.find(" MSSADef:");
|
|
470
|
+
temp = s.substr(next, last-next);
|
|
471
|
+
// convert mrversion to nodeid
|
|
472
|
+
istringstream ss2(temp);
|
|
473
|
+
NodeID obj2;
|
|
474
|
+
ss2 >> obj2;
|
|
475
|
+
// create mrver
|
|
476
|
+
tempMRVer = new MRVer(tempMemRegion, obj2, tempDef);
|
|
477
|
+
return tempMRVer;
|
|
478
|
+
}
|
package/lib/MSSA/MemRegion.cpp
CHANGED
|
@@ -807,3 +807,10 @@ ModRefInfo MRGenerator::getModRefInfo(const CallICFGNode* cs1, const CallICFGNod
|
|
|
807
807
|
else
|
|
808
808
|
return ModRefInfo::NoModRef;
|
|
809
809
|
}
|
|
810
|
+
|
|
811
|
+
std::ostream& SVF::operator<<(std::ostream &o, const MRVer& mrver)
|
|
812
|
+
{
|
|
813
|
+
o << "MRVERID: " << mrver.getID() <<" MemRegion: " << mrver.getMR()->dumpStr() << " MRVERSION: " << mrver.getSSAVersion() << " MSSADef: " << mrver.getDef()->getType() << ", "
|
|
814
|
+
<< mrver.getDef()->getMR()->dumpStr() ;
|
|
815
|
+
return o;
|
|
816
|
+
}
|
|
@@ -72,7 +72,7 @@ u32_t LocationSet::getElementNum(const Type* type) const
|
|
|
72
72
|
{
|
|
73
73
|
/// This is a pointer arithmic
|
|
74
74
|
if(const PointerType* pty = SVFUtil::dyn_cast<PointerType>(type))
|
|
75
|
-
return getElementNum(pty
|
|
75
|
+
return getElementNum(getPtrElementType(pty));
|
|
76
76
|
else
|
|
77
77
|
return 1;
|
|
78
78
|
}
|
|
@@ -134,7 +134,7 @@ s32_t LocationSet::accumulateConstantOffset() const
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
if(const PointerType* pty = SVFUtil::dyn_cast<PointerType>(type))
|
|
137
|
-
totalConstOffset += op->getSExtValue() * getElementNum(pty
|
|
137
|
+
totalConstOffset += op->getSExtValue() * getElementNum(getPtrElementType(pty));
|
|
138
138
|
else
|
|
139
139
|
{
|
|
140
140
|
s32_t offset = op->getSExtValue();
|
|
@@ -277,7 +277,7 @@ void PointerAnalysis::dumpAllTypes()
|
|
|
277
277
|
Type* type = node->getValue()->getType();
|
|
278
278
|
SymbolTableInfo::SymbolInfo()->printFlattenFields(type);
|
|
279
279
|
if (PointerType* ptType = SVFUtil::dyn_cast<PointerType>(type))
|
|
280
|
-
SymbolTableInfo::SymbolInfo()->printFlattenFields(ptType
|
|
280
|
+
SymbolTableInfo::SymbolInfo()->printFlattenFields(getPtrElementType(ptType));
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -490,7 +490,7 @@ void SymbolTableInfo::printFlattenFields(const Type* type)
|
|
|
490
490
|
|
|
491
491
|
else if (const PointerType* pt= SVFUtil::dyn_cast<PointerType> (type))
|
|
492
492
|
{
|
|
493
|
-
u32_t eSize = getNumOfFlattenElements(pt
|
|
493
|
+
u32_t eSize = getNumOfFlattenElements(getPtrElementType(pt));
|
|
494
494
|
outs() << " {Type: ";
|
|
495
495
|
outs() << type2String(pt);
|
|
496
496
|
outs() << "}\n";
|
|
@@ -40,7 +40,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
40
40
|
//
|
|
41
41
|
//===----------------------------------------------------------------------===//
|
|
42
42
|
|
|
43
|
-
#define DEBUG_TYPE "break-constgeps"
|
|
44
43
|
|
|
45
44
|
#include "llvm/ADT/Statistic.h"
|
|
46
45
|
#include "llvm/IR/Constants.h"
|
|
@@ -62,6 +61,9 @@ using namespace SVF;
|
|
|
62
61
|
// Identifier variable for the pass
|
|
63
62
|
char BreakConstantGEPs::ID = 0;
|
|
64
63
|
char MergeFunctionRets::ID = 0;
|
|
64
|
+
|
|
65
|
+
#define DEBUG_TYPE "break-constgeps"
|
|
66
|
+
|
|
65
67
|
// Statistics
|
|
66
68
|
STATISTIC (GEPChanges, "Number of Converted GEP Constant Expressions");
|
|
67
69
|
STATISTIC (TotalChanges, "Number of Converted Constant Expressions");
|
package/lib/SVF-FE/CPPUtil.cpp
CHANGED
|
@@ -233,7 +233,7 @@ bool cppUtil::isLoadVtblInst(const LoadInst *loadInst)
|
|
|
233
233
|
for (u32_t i = 0; i < 3; ++i)
|
|
234
234
|
{
|
|
235
235
|
if (const PointerType *ptrTy = SVFUtil::dyn_cast<PointerType>(elemTy))
|
|
236
|
-
elemTy = ptrTy
|
|
236
|
+
elemTy = SVFUtil::getPtrElementType(ptrTy);
|
|
237
237
|
else
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
@@ -419,7 +419,7 @@ string cppUtil::getClassNameFromType(const Type *ty)
|
|
|
419
419
|
string className = "";
|
|
420
420
|
if (const PointerType *ptrType = SVFUtil::dyn_cast<PointerType>(ty))
|
|
421
421
|
{
|
|
422
|
-
const Type *elemType = ptrType
|
|
422
|
+
const Type *elemType = SVFUtil::getPtrElementType(ptrType);
|
|
423
423
|
if (SVFUtil::isa<StructType>(elemType) &&
|
|
424
424
|
!((SVFUtil::cast<StructType>(elemType))->isLiteral()))
|
|
425
425
|
{
|
package/lib/SVF-FE/LLVMUtil.cpp
CHANGED
|
@@ -275,7 +275,7 @@ const Value* SVFUtil::getUniqueUseViaCastInst(const Value* val)
|
|
|
275
275
|
const PointerType * type = SVFUtil::dyn_cast<PointerType>(val->getType());
|
|
276
276
|
assert(type && "this value should be a pointer type!");
|
|
277
277
|
/// If type is void* (i8*) and val is only used at a bitcast instruction
|
|
278
|
-
if (IntegerType *IT = SVFUtil::dyn_cast<IntegerType>(type
|
|
278
|
+
if (IntegerType *IT = SVFUtil::dyn_cast<IntegerType>(getPtrElementType(type)))
|
|
279
279
|
{
|
|
280
280
|
if (IT->getBitWidth() == 8 && val->getNumUses()==1)
|
|
281
281
|
{
|
|
@@ -314,7 +314,7 @@ const Type* SVFUtil::getTypeOfHeapAlloc(const Instruction *inst)
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
assert(type && "not a pointer type?");
|
|
317
|
-
return type
|
|
317
|
+
return getPtrElementType(type);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
/*!
|
|
@@ -276,7 +276,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, LocationSet& ls)
|
|
|
276
276
|
// If it's a non-constant offset access
|
|
277
277
|
// If its point-to target is struct or array, it's likely an array accessing (%result = gep %struct.A* %a, i32 %non-const-index)
|
|
278
278
|
// If its point-to target is single value (pointer arithmetic), then it's a variant gep (%result = gep i8* %p, i32 %non-const-index)
|
|
279
|
-
if(!op && gepTy->isPointerTy() && gepTy
|
|
279
|
+
if(!op && gepTy->isPointerTy() && getPtrElementType(SVFUtil::dyn_cast<PointerType>(gepTy))->isSingleValueType())
|
|
280
280
|
return false;
|
|
281
281
|
|
|
282
282
|
// The actual index
|
|
@@ -1013,7 +1013,7 @@ const Type *SVFIRBuilder::getBaseTypeAndFlattenedFields(const Value *V, std::vec
|
|
|
1013
1013
|
const Value* value = getBaseValueForExtArg(V);
|
|
1014
1014
|
const Type *T = value->getType();
|
|
1015
1015
|
while (const PointerType *ptype = SVFUtil::dyn_cast<PointerType>(T))
|
|
1016
|
-
T = ptype
|
|
1016
|
+
T = getPtrElementType(ptype);
|
|
1017
1017
|
|
|
1018
1018
|
u32_t numOfElems = SymbolTableInfo::SymbolInfo()->getNumOfFlattenElements(T);
|
|
1019
1019
|
/// use user-specified size for this copy operation if the size is a constaint int
|
|
@@ -1327,7 +1327,7 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1327
1327
|
Value *arg = cs.getArgument(i);
|
|
1328
1328
|
if(const PointerType* pty = SVFUtil::dyn_cast<PointerType>(arg->getType()))
|
|
1329
1329
|
{
|
|
1330
|
-
if(pty
|
|
1330
|
+
if(getPtrElementType(pty)->isPointerTy())
|
|
1331
1331
|
{
|
|
1332
1332
|
NodeID dummy = pag->addDummyValNode();
|
|
1333
1333
|
addLoadEdge(pag->getValueNode(arg),dummy);
|
|
@@ -503,7 +503,7 @@ ObjTypeInfo* SymbolTableBuilder::createObjTypeInfo(const Value *val)
|
|
|
503
503
|
|
|
504
504
|
if (refTy)
|
|
505
505
|
{
|
|
506
|
-
Type *objTy = refTy
|
|
506
|
+
Type *objTy = getPtrElementType(refTy);
|
|
507
507
|
ObjTypeInfo* typeInfo = new ObjTypeInfo(objTy, Options::MaxFieldLimit);
|
|
508
508
|
initTypeInfo(typeInfo,val);
|
|
509
509
|
return typeInfo;
|
|
@@ -535,7 +535,7 @@ void SymbolTableBuilder::analyzeObjType(ObjTypeInfo* typeinfo, const Value* val)
|
|
|
535
535
|
|
|
536
536
|
const PointerType * refty = SVFUtil::dyn_cast<PointerType>(val->getType());
|
|
537
537
|
assert(refty && "this value should be a pointer type!");
|
|
538
|
-
Type* elemTy = refty
|
|
538
|
+
Type* elemTy = getPtrElementType(refty);
|
|
539
539
|
bool isPtrObj = false;
|
|
540
540
|
// Find the inter nested array element
|
|
541
541
|
while (const ArrayType *AT= SVFUtil::dyn_cast<ArrayType>(elemTy))
|
package/lib/Util/Options.cpp
CHANGED
|
@@ -471,6 +471,17 @@ llvm::cl::opt<bool> Options::OPTSVFG(
|
|
|
471
471
|
llvm::cl::desc("Optimize SVFG to eliminate formal-in and actual-out")
|
|
472
472
|
);
|
|
473
473
|
|
|
474
|
+
const llvm::cl::opt<std::string> Options::WriteSVFG(
|
|
475
|
+
"write-svfg",
|
|
476
|
+
llvm::cl::init(""),
|
|
477
|
+
llvm::cl::desc("Write SVFG's analysis results to a file")
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
const llvm::cl::opt<std::string> Options::ReadSVFG(
|
|
481
|
+
"read-svfg",
|
|
482
|
+
llvm::cl::init(""),
|
|
483
|
+
llvm::cl::desc("Read SVFG's analysis results from a file")
|
|
484
|
+
);
|
|
474
485
|
|
|
475
486
|
// FSMPTA.cpp
|
|
476
487
|
const llvm::cl::opt<bool> Options::UsePCG(
|
package/lib/Util/PTAStat.cpp
CHANGED
|
@@ -221,6 +221,7 @@ void PTAStat::performStat()
|
|
|
221
221
|
generalNumMap[NumOfObjsHasConstStruct] = numOfHasConstStruct;
|
|
222
222
|
generalNumMap[NumOfObjsHasConstArray] = numOfHasConstArray;
|
|
223
223
|
generalNumMap[NumOfNonPtrObjs] = numOfScalar;
|
|
224
|
+
generalNumMap[NumOfConstantObjs] = numOfConstant;
|
|
224
225
|
|
|
225
226
|
generalNumMap[NumOfIndirectCallSites] = pag->getIndirectCallsites().size();
|
|
226
227
|
generalNumMap["TotalCallSite"] = pag->getCallSiteSet().size();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.467",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|