svf-tools 1.0.478 → 1.0.481
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/Andersen_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
- package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CFGNormalizer_8cpp.html +5 -4
- package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +50 -40
- package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +20 -18
- package/SVF-doxygen/html/html/CFLAlias_8cpp.html +80 -0
- package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +107 -0
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +14 -35
- package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +10 -10
- package/SVF-doxygen/html/html/CFLGrammar_8cpp.html +1 -0
- package/SVF-doxygen/html/html/CFLGrammar_8cpp_source.html +34 -23
- package/SVF-doxygen/html/html/CFLGrammar_8h.html +9 -1
- package/SVF-doxygen/html/html/CFLGrammar_8h_source.html +106 -62
- package/SVF-doxygen/html/html/CFLGrammar_8txt.html +58 -151
- package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +24 -11
- package/SVF-doxygen/html/html/CFLGraphBuilder_8h.html +2 -0
- package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +18 -19
- package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +27 -16
- package/SVF-doxygen/html/html/CFLGraph_8h_source.html +20 -16
- package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/CFLSolver_8h_source.html +5 -5
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
- package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +7 -7
- package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +36 -32
- package/SVF-doxygen/html/html/ExtAPI_8h.html +36 -0
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +66 -64
- package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +14 -17
- package/SVF-doxygen/html/html/GrammarBuilder_8h.html +0 -1
- package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +9 -11
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +5 -3
- package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/OfflineConsG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +8 -8
- package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +15 -15
- package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/annotated.html +298 -293
- package/SVF-doxygen/html/html/cfl_8cpp.html +2 -2
- package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +96 -0
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +197 -0
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +108 -99
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -39
- package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +3 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +62 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList-members.html +91 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList.html +459 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +47 -38
- package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +180 -137
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +44 -22
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder-members.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +53 -43
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +158 -125
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +20 -21
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +29 -21
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +397 -179
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash-members.html +81 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash.html +124 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +6 -7
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +73 -91
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MHP.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +54 -53
- package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +11 -11
- package/SVF-doxygen/html/html/classes.html +105 -106
- package/SVF-doxygen/html/html/classllvm_1_1GraphPrinter.html +1 -1
- package/SVF-doxygen/html/html/cuddInt_8c.html +17 -17
- package/SVF-doxygen/html/html/cuddInt_8c_source.html +3 -3
- package/SVF-doxygen/html/html/cuddInt_8h.html +5 -5
- package/SVF-doxygen/html/html/cudd_8h.html +9 -9
- package/SVF-doxygen/html/html/cudd_8h_source.html +1 -1
- package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
- package/SVF-doxygen/html/html/files.html +5 -4
- package/SVF-doxygen/html/html/functions_0x7e.html +3 -0
- package/SVF-doxygen/html/html/functions_a.html +14 -8
- package/SVF-doxygen/html/html/functions_b.html +4 -3
- package/SVF-doxygen/html/html/functions_c.html +37 -35
- package/SVF-doxygen/html/html/functions_d.html +8 -4
- package/SVF-doxygen/html/html/functions_e.html +15 -8
- package/SVF-doxygen/html/html/functions_f.html +16 -17
- package/SVF-doxygen/html/html/functions_func.html +1 -1
- package/SVF-doxygen/html/html/functions_func_0x7e.html +3 -0
- package/SVF-doxygen/html/html/functions_func_b.html +3 -2
- package/SVF-doxygen/html/html/functions_func_c.html +32 -28
- package/SVF-doxygen/html/html/functions_func_e.html +14 -7
- package/SVF-doxygen/html/html/functions_func_f.html +3 -2
- package/SVF-doxygen/html/html/functions_func_g.html +22 -18
- package/SVF-doxygen/html/html/functions_func_i.html +18 -9
- package/SVF-doxygen/html/html/functions_func_l.html +2 -5
- package/SVF-doxygen/html/html/functions_func_o.html +20 -5
- package/SVF-doxygen/html/html/functions_func_p.html +9 -7
- package/SVF-doxygen/html/html/functions_func_s.html +12 -6
- package/SVF-doxygen/html/html/functions_g.html +25 -21
- package/SVF-doxygen/html/html/functions_i.html +29 -20
- package/SVF-doxygen/html/html/functions_k.html +2 -1
- package/SVF-doxygen/html/html/functions_l.html +1 -4
- package/SVF-doxygen/html/html/functions_n.html +1 -1
- package/SVF-doxygen/html/html/functions_o.html +24 -15
- package/SVF-doxygen/html/html/functions_p.html +18 -18
- package/SVF-doxygen/html/html/functions_r.html +5 -5
- package/SVF-doxygen/html/html/functions_s.html +24 -16
- package/SVF-doxygen/html/html/functions_t.html +5 -7
- package/SVF-doxygen/html/html/functions_type_d.html +4 -2
- package/SVF-doxygen/html/html/functions_type_p.html +1 -1
- package/SVF-doxygen/html/html/functions_type_s.html +7 -1
- package/SVF-doxygen/html/html/functions_type_v.html +3 -0
- package/SVF-doxygen/html/html/functions_v.html +7 -1
- package/SVF-doxygen/html/html/functions_vars_a.html +6 -0
- package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_d.html +4 -2
- package/SVF-doxygen/html/html/functions_vars_e.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_k.html +1 -0
- package/SVF-doxygen/html/html/functions_vars_n.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_r.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_s.html +2 -2
- package/SVF-doxygen/html/html/functions_vars_t.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_v.html +3 -0
- package/SVF-doxygen/html/html/functions_w.html +6 -10
- package/SVF-doxygen/html/html/globals.html +1 -2
- package/SVF-doxygen/html/html/globals_a.html +1 -6
- package/SVF-doxygen/html/html/globals_c.html +129 -126
- package/SVF-doxygen/html/html/globals_defs_j.html +6 -0
- package/SVF-doxygen/html/html/globals_e.html +7 -8
- package/SVF-doxygen/html/html/globals_f.html +6 -12
- package/SVF-doxygen/html/html/globals_func.html +0 -6
- package/SVF-doxygen/html/html/globals_func_f.html +0 -8
- package/SVF-doxygen/html/html/globals_g.html +4 -2
- package/SVF-doxygen/html/html/globals_j.html +6 -0
- package/SVF-doxygen/html/html/globals_l.html +3 -0
- package/SVF-doxygen/html/html/globals_s.html +7 -9
- package/SVF-doxygen/html/html/globals_v.html +3 -0
- package/SVF-doxygen/html/html/globals_vars.html +17 -13
- package/SVF-doxygen/html/html/hierarchy.html +449 -444
- package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF.html +8 -4
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +2 -2
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +8 -8
- package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/search/all_0.js +1 -1
- package/SVF-doxygen/html/html/search/all_1.js +5 -4
- package/SVF-doxygen/html/html/search/all_10.js +12 -12
- package/SVF-doxygen/html/html/search/all_12.js +3 -3
- package/SVF-doxygen/html/html/search/all_13.js +22 -17
- package/SVF-doxygen/html/html/search/all_14.js +5 -5
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +2 -0
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_1b.js +1 -0
- package/SVF-doxygen/html/html/search/all_2.js +2 -2
- package/SVF-doxygen/html/html/search/all_3.js +7 -6
- package/SVF-doxygen/html/html/search/all_4.js +5 -5
- package/SVF-doxygen/html/html/search/all_5.js +7 -5
- package/SVF-doxygen/html/html/search/all_6.js +4 -4
- package/SVF-doxygen/html/html/search/all_7.js +11 -9
- package/SVF-doxygen/html/html/search/all_9.js +8 -5
- package/SVF-doxygen/html/html/search/all_a.js +2 -0
- package/SVF-doxygen/html/html/search/all_b.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +1 -2
- package/SVF-doxygen/html/html/search/all_d.js +1 -1
- package/SVF-doxygen/html/html/search/all_e.js +4 -4
- package/SVF-doxygen/html/html/search/all_f.js +9 -6
- package/SVF-doxygen/html/html/search/classes_0.js +1 -0
- package/SVF-doxygen/html/html/search/classes_2.js +1 -0
- package/SVF-doxygen/html/html/search/classes_f.js +3 -0
- package/SVF-doxygen/html/html/search/defines_8.js +2 -0
- package/SVF-doxygen/html/html/search/files_2.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +1 -3
- package/SVF-doxygen/html/html/search/functions_1.js +2 -2
- package/SVF-doxygen/html/html/search/functions_11.js +4 -2
- package/SVF-doxygen/html/html/search/functions_17.js +1 -0
- package/SVF-doxygen/html/html/search/functions_2.js +3 -2
- package/SVF-doxygen/html/html/search/functions_3.js +1 -1
- package/SVF-doxygen/html/html/search/functions_4.js +5 -3
- package/SVF-doxygen/html/html/search/functions_5.js +1 -3
- package/SVF-doxygen/html/html/search/functions_6.js +9 -8
- package/SVF-doxygen/html/html/search/functions_8.js +4 -1
- package/SVF-doxygen/html/html/search/functions_b.js +0 -1
- package/SVF-doxygen/html/html/search/functions_e.js +8 -5
- package/SVF-doxygen/html/html/search/functions_f.js +4 -4
- package/SVF-doxygen/html/html/search/typedefs_11.js +3 -1
- package/SVF-doxygen/html/html/search/typedefs_14.js +1 -0
- package/SVF-doxygen/html/html/search/typedefs_3.js +2 -2
- package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
- package/SVF-doxygen/html/html/search/variables_0.js +1 -1
- package/SVF-doxygen/html/html/search/variables_1.js +3 -2
- package/SVF-doxygen/html/html/search/variables_12.js +1 -1
- package/SVF-doxygen/html/html/search/variables_13.js +2 -2
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_16.js +2 -0
- package/SVF-doxygen/html/html/search/variables_3.js +2 -2
- package/SVF-doxygen/html/html/search/variables_4.js +2 -2
- package/SVF-doxygen/html/html/search/variables_5.js +2 -2
- package/SVF-doxygen/html/html/search/variables_6.js +3 -3
- package/SVF-doxygen/html/html/search/variables_7.js +2 -1
- package/SVF-doxygen/html/html/search/variables_b.js +1 -1
- package/SVF-doxygen/html/html/search/variables_c.js +1 -0
- package/SVF-doxygen/html/html/search/variables_e.js +3 -3
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol-members.html +98 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol.html +652 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash-members.html +81 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash.html +124 -0
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +22 -15
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +4 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +4 -2
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
- package/include/CFL/CFGNormalizer.h +14 -9
- package/include/CFL/CFLAlias.h +1 -40
- package/include/CFL/CFLGrammar.h +246 -31
- package/include/CFL/CFLGrammar.txt +13 -15
- package/include/CFL/CFLGraphBuilder.h +27 -29
- package/include/CFL/GrammarBuilder.h +34 -14
- package/include/Graphs/CFLGraph.h +12 -0
- package/include/Graphs/ConsGEdge.h +1 -0
- package/include/SVF-FE/CallGraphBuilder.h +2 -2
- package/include/Util/ExtAPI.h +59 -42
- package/lib/CFL/CFGNormalizer.cpp +138 -86
- package/lib/CFL/CFLAlias.cpp +73 -0
- package/lib/CFL/CFLGrammar.cpp +115 -16
- package/lib/CFL/CFLGraphBuilder.cpp +64 -1
- package/lib/CFL/GrammarBuilder.cpp +42 -60
- package/lib/Graphs/CFLGraph.cpp +41 -1
- package/lib/MemoryModel/LocationSet.cpp +1 -1
- package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
- package/lib/SVF-FE/SymbolTableBuilder.cpp +4 -0
- package/lib/Util/ExtAPI.cpp +34 -2
- package/lib/Util/ExtAPI.json +3268 -2585
- package/package.json +1 -1
- package/include/CFL/CFLGrammarDev.txt +0 -16
|
@@ -66,11 +66,11 @@ $(function() {
|
|
|
66
66
|
<div class="title">GraphPrinter.h</div> </div>
|
|
67
67
|
</div><!--header-->
|
|
68
68
|
<div class="contents">
|
|
69
|
-
<a href="GraphPrinter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- GraphPrinter.h -- Print Generic Graph---------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment">/*</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * GraphPrinter.h</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> *</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * Created on: 19.Sep.,2018</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * Author: Yulei</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#ifndef INCLUDE_UTIL_GRAPHPRINTER_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define INCLUDE_UTIL_GRAPHPRINTER_H_</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include <system_error></span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <llvm/Support/ToolOutputFile.h></span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <llvm/Support/GraphWriter.h></span> <span class="comment">// for graph write</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <llvm/Support/FileSystem.h></span> <span class="comment">// for file open flag</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <llvm/ADT/GraphTraits.h></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">namespace </span><a class="code" href="namespacellvm.html">llvm</a></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">/*</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> * Dump and print the graph for debugging</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> */</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html"> 46</a></span> <span class="keyword">class </span><a class="code" href="classllvm_1_1GraphPrinter.html">GraphPrinter</a></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#a13b2efcc3e5967f60a27e107683cd448"> 50</a></span>  <a class="code" href="classllvm_1_1GraphPrinter.html#a13b2efcc3e5967f60a27e107683cd448">GraphPrinter</a>()</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">template</span><<span class="keyword">class</span> GraphType></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928"> 58</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928">WriteGraphToFile</a>(<a class="code" href="namespaceSVF.html#a8bd74fdcb0e58d0249003df9c3fb8b31">SVF::OutStream</a> &O,</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">const</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> &GraphName, <span class="keyword">const</span> GraphType &GT, <span class="keywordtype">bool</span> simple = <span class="keyword">false</span>)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// Filename of the output dot file</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> Filename = GraphName + <span class="stringliteral">".dot"</span>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  O << <span class="stringliteral">"Writing '"</span> << Filename << <span class="stringliteral">"'..."</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  std::error_code ErrInfo;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  llvm::ToolOutputFile <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>(Filename.c_str(), ErrInfo, llvm::sys::fs::OF_None);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">if</span> (!ErrInfo)</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="comment">// dump the ValueFlowGraph here</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  WriteGraph(<a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os(), GT, simple);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().close();</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">if</span> (!<a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().has_error())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  O << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.keep();</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  O << <span class="stringliteral">" error opening file for writing!\n"</span>;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().clear_error();</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">template</span><<span class="keyword">class</span> GraphType></div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#ad950fc901ea4aabb6d6cdad8f883d381"> 87</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classllvm_1_1GraphPrinter.html#ad950fc901ea4aabb6d6cdad8f883d381">PrintGraph</a>(<a class="code" href="namespaceSVF.html#a8bd74fdcb0e58d0249003df9c3fb8b31">SVF::OutStream</a> &O, <span class="keyword">const</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> &GraphName,</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">const</span> GraphType &GT)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">typedef</span> llvm::GraphTraits<GraphType> GTraits;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::NodeRef NodeRef;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::nodes_iterator node_iterator;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::ChildIteratorType child_iterator;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  O << <span class="stringliteral">"Printing VFG Graph"</span> << <span class="stringliteral">"'...\n"</span>;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// Print each node name and its edges</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  node_iterator I = GTraits::nodes_begin(GT);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  node_iterator E = GTraits::nodes_end(GT);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">for</span> (; I != E; ++I)</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  {</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  NodeRef *Node = *I;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  O << <span class="stringliteral">"node :"</span> << Node << <span class="stringliteral">"'\n"</span>;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  child_iterator EI = GTraits::child_begin(Node);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  child_iterator EE = GTraits::child_end(Node);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; EI != EE && i != 64; ++EI, ++i)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  O << <span class="stringliteral">"child :"</span> << *EI << <span class="stringliteral">"'\n"</span>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> };</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> } <span class="comment">// End namespace llvm</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#endif </span><span class="comment">/* INCLUDE_UTIL_GRAPHPRINTER_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00107">CFLGraph.h:107</a></div></div>
|
|
69
|
+
<a href="GraphPrinter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- GraphPrinter.h -- Print Generic Graph---------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment">/*</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * GraphPrinter.h</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> *</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * Created on: 19.Sep.,2018</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * Author: Yulei</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#ifndef INCLUDE_UTIL_GRAPHPRINTER_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define INCLUDE_UTIL_GRAPHPRINTER_H_</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include <system_error></span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <llvm/Support/ToolOutputFile.h></span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <llvm/Support/GraphWriter.h></span> <span class="comment">// for graph write</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <llvm/Support/FileSystem.h></span> <span class="comment">// for file open flag</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <llvm/ADT/GraphTraits.h></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">namespace </span><a class="code" href="namespacellvm.html">llvm</a></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">/*</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> * Dump and print the graph for debugging</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> */</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html"> 46</a></span> <span class="keyword">class </span><a class="code" href="classllvm_1_1GraphPrinter.html">GraphPrinter</a></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#a13b2efcc3e5967f60a27e107683cd448"> 50</a></span>  <a class="code" href="classllvm_1_1GraphPrinter.html#a13b2efcc3e5967f60a27e107683cd448">GraphPrinter</a>()</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">template</span><<span class="keyword">class</span> GraphType></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928"> 58</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928">WriteGraphToFile</a>(<a class="code" href="namespaceSVF.html#a8bd74fdcb0e58d0249003df9c3fb8b31">SVF::OutStream</a> &O,</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">const</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> &GraphName, <span class="keyword">const</span> GraphType &GT, <span class="keywordtype">bool</span> simple = <span class="keyword">false</span>)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// Filename of the output dot file</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> Filename = GraphName + <span class="stringliteral">".dot"</span>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  O << <span class="stringliteral">"Writing '"</span> << Filename << <span class="stringliteral">"'..."</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  std::error_code ErrInfo;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  llvm::ToolOutputFile <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>(Filename.c_str(), ErrInfo, llvm::sys::fs::OF_None);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">if</span> (!ErrInfo)</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="comment">// dump the ValueFlowGraph here</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  WriteGraph(<a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os(), GT, simple);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().close();</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">if</span> (!<a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().has_error())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  O << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.keep();</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  O << <span class="stringliteral">" error opening file for writing!\n"</span>;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a>.os().clear_error();</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">template</span><<span class="keyword">class</span> GraphType></div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classllvm_1_1GraphPrinter.html#ad950fc901ea4aabb6d6cdad8f883d381"> 87</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classllvm_1_1GraphPrinter.html#ad950fc901ea4aabb6d6cdad8f883d381">PrintGraph</a>(<a class="code" href="namespaceSVF.html#a8bd74fdcb0e58d0249003df9c3fb8b31">SVF::OutStream</a> &O, <span class="keyword">const</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> &GraphName,</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">const</span> GraphType &GT)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">typedef</span> llvm::GraphTraits<GraphType> GTraits;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::NodeRef NodeRef;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::nodes_iterator node_iterator;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> GTraits::ChildIteratorType child_iterator;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  O << <span class="stringliteral">"Printing VFG Graph"</span> << <span class="stringliteral">"'...\n"</span>;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// Print each node name and its edges</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  node_iterator I = GTraits::nodes_begin(GT);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  node_iterator E = GTraits::nodes_end(GT);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">for</span> (; I != E; ++I)</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  {</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  NodeRef *Node = *I;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  O << <span class="stringliteral">"node :"</span> << Node << <span class="stringliteral">"'\n"</span>;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  child_iterator EI = GTraits::child_begin(Node);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  child_iterator EE = GTraits::child_end(Node);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; EI != EE && i != 64; ++EI, ++i)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  O << <span class="stringliteral">"child :"</span> << *EI << <span class="stringliteral">"'\n"</span>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> };</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> } <span class="comment">// End namespace llvm</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#endif </span><span class="comment">/* INCLUDE_UTIL_GRAPHPRINTER_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00119">CFLGraph.h:119</a></div></div>
|
|
70
70
|
<div class="ttc" id="classllvm_1_1GraphPrinter_html_ad950fc901ea4aabb6d6cdad8f883d381"><div class="ttname"><a href="classllvm_1_1GraphPrinter.html#ad950fc901ea4aabb6d6cdad8f883d381">llvm::GraphPrinter::PrintGraph</a></div><div class="ttdeci">static void PrintGraph(SVF::OutStream &O, const std::string &GraphName, const GraphType &GT)</div><div class="ttdef"><b>Definition:</b> <a href="GraphPrinter_8h_source.html#l00087">GraphPrinter.h:87</a></div></div>
|
|
71
71
|
<div class="ttc" id="classllvm_1_1GraphPrinter_html"><div class="ttname"><a href="classllvm_1_1GraphPrinter.html">llvm::GraphPrinter</a></div><div class="ttdef"><b>Definition:</b> <a href="GraphPrinter_8h_source.html#l00046">GraphPrinter.h:46</a></div></div>
|
|
72
72
|
<div class="ttc" id="classllvm_1_1GraphPrinter_html_af6ed328e74882d2b5e2b4039cb836928"><div class="ttname"><a href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928">llvm::GraphPrinter::WriteGraphToFile</a></div><div class="ttdeci">static void WriteGraphToFile(SVF::OutStream &O, const std::string &GraphName, const GraphType &GT, bool simple=false)</div><div class="ttdef"><b>Definition:</b> <a href="GraphPrinter_8h_source.html#l00058">GraphPrinter.h:58</a></div></div>
|
|
73
|
-
<div class="ttc" id="CFLGrammar_8txt_html_acc7b4cf736579c4d83be2316d5a9e5f2"><div class="ttname"><a href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a></div><div class="ttdeci">V Fbar V F</div><div class="ttdef"><b>Definition:</b> <a href="CFLGrammar_8txt_source.html#
|
|
73
|
+
<div class="ttc" id="CFLGrammar_8txt_html_acc7b4cf736579c4d83be2316d5a9e5f2"><div class="ttname"><a href="CFLGrammar_8txt.html#acc7b4cf736579c4d83be2316d5a9e5f2">F</a></div><div class="ttdeci">V Fbar V F</div><div class="ttdef"><b>Definition:</b> <a href="CFLGrammar_8txt_source.html#l00013">CFLGrammar.txt:13</a></div></div>
|
|
74
74
|
<div class="ttc" id="namespaceSVF_html_a8bd74fdcb0e58d0249003df9c3fb8b31"><div class="ttname"><a href="namespaceSVF.html#a8bd74fdcb0e58d0249003df9c3fb8b31">SVF::OutStream</a></div><div class="ttdeci">std::ostream OutStream</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00082">SVFBasicTypes.h:82</a></div></div>
|
|
75
75
|
<div class="ttc" id="cJSON_8h_html_ad4c68ea99a26b0a98ad9a79982960458"><div class="ttname"><a href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">string</a></div><div class="ttdeci">const char *const string</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8h_source.html#l00172">cJSON.h:172</a></div></div>
|
|
76
76
|
<div class="ttc" id="classllvm_1_1GraphPrinter_html_a13b2efcc3e5967f60a27e107683cd448"><div class="ttname"><a href="classllvm_1_1GraphPrinter.html#a13b2efcc3e5967f60a27e107683cd448">llvm::GraphPrinter::GraphPrinter</a></div><div class="ttdeci">GraphPrinter()</div><div class="ttdef"><b>Definition:</b> <a href="GraphPrinter_8h_source.html#l00050">GraphPrinter.h:50</a></div></div>
|
|
@@ -74,7 +74,7 @@ $(function() {
|
|
|
74
74
|
<div class="ttc" id="classSVF_1_1GenericNode_html_a06a7373b11143e709784de784fa476fe"><div class="ttname"><a href="classSVF_1_1GenericNode.html#a06a7373b11143e709784de784fa476fe">SVF::GenericNode::hasIncomingEdge</a></div><div class="ttdeci">bool hasIncomingEdge() const</div><div class="ttdoc">Has incoming/outgoing edge set. </div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00194">GenericGraph.h:194</a></div></div>
|
|
75
75
|
<div class="ttc" id="classSVF_1_1RetPE_html"><div class="ttname"><a href="classSVF_1_1RetPE.html">SVF::RetPE</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00540">SVFStatements.h:540</a></div></div>
|
|
76
76
|
<div class="ttc" id="classSVF_1_1ICFGNode_html_a03587dbd558d8fffe25307b42e3195be"><div class="ttname"><a href="classSVF_1_1ICFGNode.html#a03587dbd558d8fffe25307b42e3195be">SVF::ICFGNode::fun</a></div><div class="ttdeci">const SVFFunction * fun</div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00132">ICFGNode.h:132</a></div></div>
|
|
77
|
-
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
77
|
+
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00119">CFLGraph.h:119</a></div></div>
|
|
78
78
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_ab7f58caf27c30a1d414e06f60ca84d80"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#ab7f58caf27c30a1d414e06f60ca84d80">SVF::SVFUtil::isIntrinsicInst</a></div><div class="ttdeci">bool isIntrinsicInst(const Instruction *inst)</div><div class="ttdoc">Return true if it is an intrinsic instruction. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00181">SVFUtil.h:181</a></div></div>
|
|
79
79
|
<div class="ttc" id="classSVF_1_1ICFG_html_a3b59f9ba22e03d323bc2fa5928902243"><div class="ttname"><a href="classSVF_1_1ICFG.html#a3b59f9ba22e03d323bc2fa5928902243">SVF::ICFG::getRetBlock</a></div><div class="ttdeci">RetICFGNode * getRetBlock(const Instruction *cs)</div><div class="ttdoc">Get/Add a return node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00281">ICFG.h:281</a></div></div>
|
|
80
80
|
<div class="ttc" id="classSVF_1_1CallCFGEdge_html_a2ad72b065dcb752e0779de9ff69c443a"><div class="ttname"><a href="classSVF_1_1CallCFGEdge.html#a2ad72b065dcb752e0779de9ff69c443a">SVF::CallCFGEdge::toString</a></div><div class="ttdeci">virtual const std::string toString() const</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00172">ICFG.cpp:172</a></div></div>
|
|
@@ -72,7 +72,7 @@ $(function() {
|
|
|
72
72
|
<div class="ttc" id="classSVF_1_1ICFG_html_af0434d6ffd247eeaf73b9294e659a3f9"><div class="ttname"><a href="classSVF_1_1ICFG.html#af0434d6ffd247eeaf73b9294e659a3f9">SVF::ICFG::CSToCallNodeMap</a></div><div class="ttdeci">CSToCallNodeMapTy CSToCallNodeMap</div><div class="ttdoc">map a callsite to its CallICFGNode </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00072">ICFG.h:72</a></div></div>
|
|
73
73
|
<div class="ttc" id="classSVF_1_1SVFLoop_html"><div class="ttname"><a href="classSVF_1_1SVFLoop.html">SVF::SVFLoop</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFLoop_8h_source.html#l00037">SVFLoop.h:37</a></div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1ICFG_html_a490e7f2a5a0452d513895d5f24c72d8e"><div class="ttname"><a href="classSVF_1_1ICFG.html#a490e7f2a5a0452d513895d5f24c72d8e">SVF::ICFG::getSVFLoops</a></div><div class="ttdeci">SVFLoopVec & getSVFLoops(const ICFGNode *node)</div><div class="ttdoc">Get loops where a node resides. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00137">ICFG.h:137</a></div></div>
|
|
75
|
-
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
75
|
+
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00119">CFLGraph.h:119</a></div></div>
|
|
76
76
|
<div class="ttc" id="classSVF_1_1ICFG_html_a4288dd1d729524b8e8a92954852a2317"><div class="ttname"><a href="classSVF_1_1ICFG.html#a4288dd1d729524b8e8a92954852a2317">SVF::ICFG::ICFGNodeToSVFLoopVec</a></div><div class="ttdeci">Map< const ICFGNode *, SVFLoopVec > ICFGNodeToSVFLoopVec</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00065">ICFG.h:65</a></div></div>
|
|
77
77
|
<div class="ttc" id="classSVF_1_1ICFG_html_a3b59f9ba22e03d323bc2fa5928902243"><div class="ttname"><a href="classSVF_1_1ICFG.html#a3b59f9ba22e03d323bc2fa5928902243">SVF::ICFG::getRetBlock</a></div><div class="ttdeci">RetICFGNode * getRetBlock(const Instruction *cs)</div><div class="ttdoc">Get/Add a return node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00281">ICFG.h:281</a></div></div>
|
|
78
78
|
<div class="ttc" id="classSVF_1_1ICFG_html_ac603cd3bb9c52c4261bba04e2c8ea193"><div class="ttname"><a href="classSVF_1_1ICFG.html#ac603cd3bb9c52c4261bba04e2c8ea193">SVF::ICFG::CSToCallNodeMapTy</a></div><div class="ttdeci">Map< const Instruction *, CallICFGNode * > CSToCallNodeMapTy</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00061">ICFG.h:61</a></div></div>
|
|
@@ -69,7 +69,7 @@ $(function() {
|
|
|
69
69
|
<a href="IRGraph_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- SVFIR.cpp -- Program assignment graph------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * SVFIR.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * Created on: Nov 1, 2013</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="IRGraph_8h.html">Graphs/IRGraph.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span>SVFUtil;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a2085d6895363c2ff7b757eb58f3f4cea"> 36</a></span> <a class="code" href="classSVF_1_1IRGraph.html#a2085d6895363c2ff7b757eb58f3f4cea">IRGraph::~IRGraph</a>()</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="classSVF_1_1SymbolTableInfo.html#a9f8d99c761f3c7108d797b3702fcbfec">SymbolTableInfo::releaseSymbolInfo</a>();</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  symInfo = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a722f32d0a0a3bafdd97fc74819d2621e"> 45</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1IRGraph.html#a722f32d0a0a3bafdd97fc74819d2621e">IRGraph::addEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge)</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a>(<a class="code" href="SVFBasicTypes_8h.html#a7a295e02c56a93cf9206dd9d3b18dd17">DPAGBuild</a>,</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <span class="stringliteral">"add edge from "</span> << src-><a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>() << <span class="stringliteral">" kind :"</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  << src-><a class="code" href="classSVF_1_1GenericNode.html#a391e996d695b114530120723da1d003e">getNodeKind</a>() << <span class="stringliteral">" to "</span> << dst-><a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>()</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  << <span class="stringliteral">" kind :"</span> << dst-><a class="code" href="classSVF_1_1GenericNode.html#a391e996d695b114530120723da1d003e">getNodeKind</a>() << <span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  src-><a class="code" href="classSVF_1_1SVFVar.html#a21a44c7a30e4e3743f6c3186fd7dbe8f">addOutEdge</a>(edge);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  dst-><a class="code" href="classSVF_1_1SVFVar.html#a9376133075b0d44ff09876af933c8618">addInEdge</a>(edge);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#abe0ab797a3da420e4d2f9136d64fb407"> 60</a></span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#abe0ab797a3da420e4d2f9136d64fb407">IRGraph::hasNonlabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a> edge(src,dst,kind, <span class="keyword">false</span>);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  SVFStmt::SVFStmtSetTy::iterator it = KindToSVFStmtSetMap[kind].find(&edge);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">if</span> (it != KindToSVFStmtSetMap[kind].end())</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> *it;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a1c999e2fd771e4fda192af096e3ec92c"> 74</a></span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#a192e584440eb141e0d35d8fed671bbe0">IRGraph::hasLabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* op1, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind, <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* op2)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a> edge(src,op1,<a class="code" href="classSVF_1_1SVFStmt.html#a3b20523aed66ac8943d7d00ff777137b">SVFStmt::makeEdgeFlagWithAddionalOpnd</a>(kind,op2), <span class="keyword">false</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  SVFStmt::SVFStmtSetTy::iterator it = KindToSVFStmtSetMap[kind].find(&edge);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">if</span> (it != KindToSVFStmtSetMap[kind].end())</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> *it;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a192e584440eb141e0d35d8fed671bbe0"> 88</a></span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#a192e584440eb141e0d35d8fed671bbe0">IRGraph::hasLabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind, <span class="keyword">const</span> <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* callInst)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a> edge(src,dst,<a class="code" href="classSVF_1_1SVFStmt.html#a4513c6e66b46c36219ba6d7403f3eb00">SVFStmt::makeEdgeFlagWithCallInst</a>(kind,callInst), <span class="keyword">false</span>);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  SVFStmt::SVFStmtSetTy::iterator it = KindToSVFStmtSetMap[kind].find(&edge);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">if</span> (it != KindToSVFStmtSetMap[kind].end())</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">return</span> *it;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> }</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a1cb32461439c4dc8d044c2bfadb11307"> 102</a></span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#a1cb32461439c4dc8d044c2bfadb11307">IRGraph::dump</a>(<a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="cJSON_8h.html#a25d22ecc7e656d2c59332072684e8766">name</a>)</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classllvm_1_1GraphPrinter.html#af6ed328e74882d2b5e2b4039cb836928">GraphPrinter::WriteGraphToFile</a>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>(), name, <span class="keyword">this</span>);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> }</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a3a656bb310ba0f42e525995a480a5b67"> 110</a></span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#a3a656bb310ba0f42e525995a480a5b67">IRGraph::view</a>()</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  llvm::ViewGraph(<span class="keyword">this</span>, <span class="stringliteral">"ProgramAssignmentGraph"</span>);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">namespace </span><a class="code" href="namespacellvm.html">llvm</a></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">template</span><></div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html"> 122</a></span> <span class="keyword">struct </span>DOTGraphTraits<<a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a>*> : <span class="keyword">public</span> DefaultDOTGraphTraits</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> {</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#ad6174f74f7a037a7ffd13df41c5f50f7"> 125</a></span>  <span class="keyword">typedef</span> <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#ad6174f74f7a037a7ffd13df41c5f50f7">NodeType</a>;</div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a03a1edb4d4b703eff1bdad004179c1ec"> 126</a></span>  <span class="keyword">typedef</span> <a class="code" href="classSVF_1_1GenericNode.html#a2f5471985dfe62bc9ded830a693ab153">NodeType::iterator</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a03a1edb4d4b703eff1bdad004179c1ec">ChildIteratorType</a>;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#ad540c20d134f28f3b99a32d0e69b2a3f"> 127</a></span>  <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#ad540c20d134f28f3b99a32d0e69b2a3f">DOTGraphTraits</a>(<span class="keywordtype">bool</span> isSimple = <span class="keyword">false</span>) :</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  DefaultDOTGraphTraits(isSimple)</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a6cbd0e71b5ea955de8a548bad9256160"> 133</a></span>  <span class="keyword">static</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a6cbd0e71b5ea955de8a548bad9256160">getGraphName</a>(<a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a> *graph)</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  {</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">return</span> graph-><a class="code" href="classSVF_1_1IRGraph.html#a5a34f23fee4f84e74908041efebd6867">getGraphName</a>();</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  }</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="preprocessor">#if LLVM_VERSION_MAJOR >= 12</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> isNodeHidden(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> *node, <a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a> *)</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a8593f5bcb7ff8b33bce21cfbc91e3753"> 144</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a8593f5bcb7ff8b33bce21cfbc91e3753">isNodeHidden</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> *node)</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1Options.html#adec2012e10130f664fe0ea3acf39f78b">Options::ShowHiddenNode</a>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">else</span> <span class="keywordflow">return</span> node-><a class="code" href="classSVF_1_1SVFVar.html#acf194658d2cbdaf3f26f2af6c325fad7">isIsolatedNode</a>();</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#aa8f1f1699fe8350542072cae450c8afa"> 153</a></span>  <span class="keyword">static</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#aa8f1f1699fe8350542072cae450c8afa">getNodeLabel</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> *node, <a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a>*)</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="comment">// print function info</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">if</span> (node-><a class="code" href="classSVF_1_1SVFVar.html#a53439a493963d16e5a1b5ed36ab6d33e">getFunction</a>())</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  rawstr << <span class="stringliteral">"["</span> << node-><a class="code" href="classSVF_1_1SVFVar.html#a53439a493963d16e5a1b5ed36ab6d33e">getFunction</a>()->getName() << <span class="stringliteral">"] "</span>;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  rawstr << node-><a class="code" href="classSVF_1_1SVFVar.html#ada932ef2ae0a3e712174df479c35b0dd">toString</a>();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  }</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a9f6fb05fdadcba74038252a08356867d"> 167</a></span>  <span class="keyword">static</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a9f6fb05fdadcba74038252a08356867d">getNodeAttributes</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> *node, <a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a>*)</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  {</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">if</span> (SVFUtil::isa<ValVar>(node))</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  {</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span>(SVFUtil::isa<GepValVar>(node))</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=hexagon"</span>;</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<DummyValVar>(node))</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=diamond"</span>;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=box"</span>;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<ObjVar>(node))</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  {</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">if</span>(SVFUtil::isa<GepObjVar>(node))</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=doubleoctagon"</span>;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<FIObjVar>(node))</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=box3d"</span>;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<DummyObjVar>(node))</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=tab"</span>;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=component"</span>;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  }</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<RetPN>(node))</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  {</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=Mrecord"</span>;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<VarArgPN>(node))</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">return</span> <span class="stringliteral">"shape=octagon"</span>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(0 && <span class="stringliteral">"no such kind!!"</span>);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keyword">template</span><<span class="keyword">class</span> EdgeIter></div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a27816e06b813b2723a5757128d009cab"> 205</a></span>  <span class="keyword">static</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a27816e06b813b2723a5757128d009cab">getEdgeAttributes</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>*, EdgeIter EI, <a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a>*)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  {</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">if</span> (SVFUtil::isa<AddrStmt>(edge))</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  {</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=green"</span>;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  }</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<CopyStmt>(edge))</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  {</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=black"</span>;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  }</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<GepStmt>(edge))</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=purple"</span>;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  }</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<StoreStmt>(edge))</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=blue"</span>;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  }</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<LoadStmt>(edge))</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=red"</span>;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  }</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<PhiStmt>(edge))</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  {</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  }</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<SelectStmt>(edge))</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  {</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  }</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<CmpStmt>(edge))</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  {</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  }</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<BinaryOPStmt>(edge))</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  }</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<UnaryOPStmt>(edge))</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  {</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  }</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<BranchStmt>(edge))</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  {</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=grey"</span>;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  }</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<TDForkPE>(edge))</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  {</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=Turquoise"</span>;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  }</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<TDJoinPE>(edge))</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  {</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=Turquoise"</span>;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<CallPE>(edge))</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=black,style=dashed"</span>;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  }</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<RetPE>(edge))</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  {</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">return</span> <span class="stringliteral">"color=black,style=dotted"</span>;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  }</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> </div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"No such kind edge!!"</span>);</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a>(1);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  }</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keyword">template</span><<span class="keyword">class</span> EdgeIter></div><div class="line"><a name="l00275"></a><span class="lineno"><a class="line" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a947696a48fdac183d0cc40de92944315"> 275</a></span>  <span class="keyword">static</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a947696a48fdac183d0cc40de92944315">getEdgeSourceLabel</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>*, EdgeIter EI)</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  {</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1CallPE.html">CallPE</a>* calledge = SVFUtil::dyn_cast<CallPE>(edge))</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  {</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= calledge->getCallSite()->getCallSite();</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1RetPE.html">RetPE</a>* retedge = SVFUtil::dyn_cast<RetPE>(edge))</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  {</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* callInst= retedge->getCallSite()->getCallSite();</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVFUtil::getSourceLoc</a>(callInst);</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  }</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  }</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> };</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> } <span class="comment">// End namespace llvm</span></div><div class="ttc" id="classSVF_1_1SVFVar_html_a9376133075b0d44ff09876af933c8618"><div class="ttname"><a href="classSVF_1_1SVFVar.html#a9376133075b0d44ff09876af933c8618">SVF::SVFVar::addInEdge</a></div><div class="ttdeci">void addInEdge(SVFStmt *inEdge)</div><div class="ttdoc">add methods of the components </div><div class="ttdef"><b>Definition:</b> <a href="SVFVariables_8h_source.html#l00210">SVFVariables.h:210</a></div></div>
|
|
70
70
|
<div class="ttc" id="util_8h_html_a43b6ea6be735bb828bc062c70cadeff8"><div class="ttname"><a href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a></div><div class="ttdeci">VOID_OR_INT exit()</div></div>
|
|
71
71
|
<div class="ttc" id="classSVF_1_1RetPE_html"><div class="ttname"><a href="classSVF_1_1RetPE.html">SVF::RetPE</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00540">SVFStatements.h:540</a></div></div>
|
|
72
|
-
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
72
|
+
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00119">CFLGraph.h:119</a></div></div>
|
|
73
73
|
<div class="ttc" id="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4_html_aa8f1f1699fe8350542072cae450c8afa"><div class="ttname"><a href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#aa8f1f1699fe8350542072cae450c8afa">llvm::DOTGraphTraits< IRGraph * >::getNodeLabel</a></div><div class="ttdeci">static std::string getNodeLabel(SVFVar *node, IRGraph *)</div><div class="ttdef"><b>Definition:</b> <a href="IRGraph_8cpp_source.html#l00153">IRGraph.cpp:153</a></div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1IRGraph_html_a5a34f23fee4f84e74908041efebd6867"><div class="ttname"><a href="classSVF_1_1IRGraph.html#a5a34f23fee4f84e74908041efebd6867">SVF::IRGraph::getGraphName</a></div><div class="ttdeci">std::string getGraphName() const</div><div class="ttdoc">Return graph name. </div><div class="ttdef"><b>Definition:</b> <a href="IRGraph_8h_source.html#l00203">IRGraph.h:203</a></div></div>
|
|
75
75
|
<div class="ttc" id="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4_html_a03a1edb4d4b703eff1bdad004179c1ec"><div class="ttname"><a href="structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html#a03a1edb4d4b703eff1bdad004179c1ec">llvm::DOTGraphTraits< IRGraph * >::ChildIteratorType</a></div><div class="ttdeci">NodeType::iterator ChildIteratorType</div><div class="ttdef"><b>Definition:</b> <a href="IRGraph_8cpp_source.html#l00126">IRGraph.cpp:126</a></div></div>
|
|
@@ -68,7 +68,7 @@ $(function() {
|
|
|
68
68
|
<div class="contents">
|
|
69
69
|
<a href="IRGraph_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- SVFIR.h -- SVF IR Graph or PAG (Program Assignment Graph)--------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * IRGraph.h</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * Created on: Nov 1, 2013</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#ifndef IRGRAPH_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define IRGRAPH_H_</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="SVFStatements_8h.html">MemoryModel/SVFStatements.h</a>"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="SVFVariables_8h.html">MemoryModel/SVFVariables.h</a>"</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "<a class="code" href="NodeIDAllocator_8h.html">Util/NodeIDAllocator.h</a>"</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "<a class="code" href="SVFUtil_8h.html">Util/SVFUtil.h</a>"</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include "<a class="code" href="ICFG_8h.html">Graphs/ICFG.h</a>"</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">namespace </span><a class="code" href="namespaceSVF.html">SVF</a></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="namespaceSVF.html#a733b44f64a95e6e13e7379120d7a3eea"> 42</a></span> <span class="keyword">typedef</span> <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a> <a class="code" href="namespaceSVF.html#a733b44f64a95e6e13e7379120d7a3eea">PAGNode</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="namespaceSVF.html#ae6ead95a66f69e1e4cfa1159f868a152"> 43</a></span> <span class="keyword">typedef</span> <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a> <a class="code" href="namespaceSVF.html#ae6ead95a66f69e1e4cfa1159f868a152">PAGEdge</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">/*</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment">* Graph representation of SVF IR. It can be seen as a program assignment graph (PAG)</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">*/</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html"> 48</a></span> <span class="keyword">class </span><a class="code" href="classSVF_1_1IRGraph.html">IRGraph</a> : <span class="keyword">public</span> <a class="code" href="classSVF_1_1GenericGraph.html">GenericGraph</a><SVFVar,SVFStmt></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a28ea8f85b0923d00364a010c1fd4e416"> 51</a></span>  <span class="keyword">typedef</span> <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const SVFStmt*></a> <a class="code" href="classSVF_1_1IRGraph.html#a28ea8f85b0923d00364a010c1fd4e416">SVFStmtSet</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#addfc2131699f5ecee3a45d65cda46c24"> 52</a></span>  <span class="keyword">typedef</span> <a class="code" href="namespaceSVF.html#a8234d4b959abc9123993bcff4eee34c1">Map<const Value*,SVFStmtSet></a> <a class="code" href="classSVF_1_1IRGraph.html#addfc2131699f5ecee3a45d65cda46c24">ValueToEdgeMap</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a3db2c4e2823f16d78c86596da284acd1"> 55</a></span>  <a class="code" href="classSVF_1_1SVFStmt.html#a93fc6c4c991931c78c48500c2db50f66">SVFStmt::KindToSVFStmtMapTy</a> <a class="code" href="classSVF_1_1IRGraph.html#a3db2c4e2823f16d78c86596da284acd1">KindToSVFStmtSetMap</a>; <span class="comment">// < SVFIR edge map containing all PAGEdges</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#ae0a9b81717fd834bbd109c4b69aaff9d"> 56</a></span>  <a class="code" href="classSVF_1_1SVFStmt.html#a93fc6c4c991931c78c48500c2db50f66">SVFStmt::KindToSVFStmtMapTy</a> <a class="code" href="classSVF_1_1IRGraph.html#ae0a9b81717fd834bbd109c4b69aaff9d">KindToPTASVFStmtSetMap</a>; <span class="comment">// < SVFIR edge map containing only pointer-related edges, i.e, both LHS and RHS are of pointer type</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a7750a2b2a98bb39fc5f67af4e0c12379"> 57</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1IRGraph.html#a7750a2b2a98bb39fc5f67af4e0c12379">fromFile</a>; </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a80cf14bf43accb89cb82490b4f173598"> 58</a></span>  <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a80cf14bf43accb89cb82490b4f173598">nodeNumAfterPAGBuild</a>; <span class="comment">// initial node number after building SVFIR, excluding later added nodes, e.g., gepobj nodes</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a9f68ffe75e3d9457092ac2368aa08a27"> 59</a></span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a9f68ffe75e3d9457092ac2368aa08a27">totalPTAPAGEdge</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a1308b5d3001c6676e8a8be6a8b118704"> 60</a></span>  ValueToEdgeMap <a class="code" href="classSVF_1_1IRGraph.html#a1308b5d3001c6676e8a8be6a8b118704">valueToEdgeMap</a>; </div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a679145e7bf818b0a19005dc8e2845fe1"> 61</a></span>  <a class="code" href="classSVF_1_1SymbolTableInfo.html">SymbolTableInfo</a>* <a class="code" href="classSVF_1_1IRGraph.html#a679145e7bf818b0a19005dc8e2845fe1">symInfo</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a685f1a8a35aa5dc9c298e3b0e2ccf007"> 64</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a685f1a8a35aa5dc9c298e3b0e2ccf007">addNode</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* node, <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> i)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="classSVF_1_1GenericGraph.html#a0a8831a5429005ff9d71adbd6bf3994f">addGNode</a>(i,node);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">return</span> i;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1IRGraph.html#a722f32d0a0a3bafdd97fc74819d2621e">addEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* edge);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#abe0ab797a3da420e4d2f9136d64fb407">hasNonlabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#a192e584440eb141e0d35d8fed671bbe0">hasLabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* dst, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind, <span class="keyword">const</span> <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* cs);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a>* <a class="code" href="classSVF_1_1IRGraph.html#a192e584440eb141e0d35d8fed671bbe0">hasLabeledEdge</a>(<a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* src, <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* op1, <a class="code" href="classSVF_1_1SVFStmt.html#a0ab8621e75e75f03425c323b3ed62ce9">SVFStmt::PEDGEK</a> kind, <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFVar.html">SVFVar</a>* op2);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#aefe3143b33cee00c3c2611fea577c1ac"> 81</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#aefe3143b33cee00c3c2611fea577c1ac">mapValueToEdge</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *V, <a class="code" href="classSVF_1_1SVFStmt.html">SVFStmt</a> *edge)</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keyword">auto</span> inserted = valueToEdgeMap.emplace(V, SVFStmtSet{edge});</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">if</span> (!inserted.second)</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  inserted.first->second.emplace(edge);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  }</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a4f5792216c6f38c32dac5074862ffc50"> 90</a></span>  <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classSVF_1_1MemObj.html">MemObj</a>* <a class="code" href="classSVF_1_1IRGraph.html#a4f5792216c6f38c32dac5074862ffc50">getMemObj</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* val)<span class="keyword"> const</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a65f49178a948380c2d6105178509a906">getObj</a>(symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#afca5a68d1825326e3ec6302ce0afee66">getObjSym</a>(val));</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a34f7644ccf88fc0911c0b4f625dc1f28"> 96</a></span>  <a class="code" href="classSVF_1_1IRGraph.html#a34f7644ccf88fc0911c0b4f625dc1f28">IRGraph</a>(<span class="keywordtype">bool</span> buildFromFile): fromFile(buildFromFile), nodeNumAfterPAGBuild(0), totalPTAPAGEdge(0)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  symInfo = <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>();</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// insert dummy value if a correct value cannot be found</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  valueToEdgeMap[<span class="keyword">nullptr</span>] = <a class="code" href="classSVF_1_1IRGraph.html#a28ea8f85b0923d00364a010c1fd4e416">SVFStmtSet</a>();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">virtual</span> <a class="code" href="classSVF_1_1IRGraph.html#a2085d6895363c2ff7b757eb58f3f4cea">~IRGraph</a>();</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a41423da58a07b344bc7ca8dd96d48f98"> 106</a></span>  <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1IRGraph.html#a41423da58a07b344bc7ca8dd96d48f98">isBuiltFromFile</a>()</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1IRGraph.html#a7750a2b2a98bb39fc5f67af4e0c12379">fromFile</a>;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a7710f6795d971d7a8b5683835c4c0fb8"> 111</a></span>  <span class="keyword">inline</span> <span class="keyword">const</span> SVFStmtSet& <a class="code" href="classSVF_1_1IRGraph.html#a7710f6795d971d7a8b5683835c4c0fb8">getValueEdges</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *V)</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  {</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keyword">auto</span> it = valueToEdgeMap.find(V);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span> (it == valueToEdgeMap.end())</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">//special empty set</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">return</span> valueToEdgeMap.at(<span class="keyword">nullptr</span>);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">return</span> it->second;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624"> 124</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624">getValueNode</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *V)</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#ac71fd3165008ad8c1b8419da832af8fb">getValSym</a>(V);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#aceb17dfbe137658625e16291127267d1"> 128</a></span>  <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1IRGraph.html#aceb17dfbe137658625e16291127267d1">hasValueNode</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* V)</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#ac1fdf0b21d07ee6102b0696d00260777">hasValSym</a>(V);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#aba13ca47865614e45321c1ae53e640c1"> 134</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#aba13ca47865614e45321c1ae53e640c1">getObjectNode</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *V)</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  {</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#afca5a68d1825326e3ec6302ce0afee66">getObjSym</a>(V);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  }</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a96010999a4e5013beb1c37ef753ff910"> 139</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a96010999a4e5013beb1c37ef753ff910">getReturnNode</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* func)<span class="keyword"> const</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#afc8b0b6aea972f34a0c099b75114b81e">getRetSym</a>(func-><a class="code" href="classSVF_1_1SVFFunction.html#ac4ae917ae35ac6fca652fe2dd90a8ac2">getLLVMFun</a>());</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  }</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a8b10c318674a47035d617b3ade4f069b"> 144</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a8b10c318674a47035d617b3ade4f069b">getVarargNode</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* func)<span class="keyword"> const</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aec3fd21a11f760ca8684e390c6948f02">getVarargSym</a>(func-><a class="code" href="classSVF_1_1SVFFunction.html#ac4ae917ae35ac6fca652fe2dd90a8ac2">getLLVMFun</a>());</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a3ce34b9fcb651689bce44ab48fbcdff0"> 148</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a3ce34b9fcb651689bce44ab48fbcdff0">getBlackHoleNode</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a05ca2987d9f8716c24e489bec53502f4">blackholeSymID</a>();</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  }</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#ac5da3a0cbe040a45d719b6f6a23aed91"> 152</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#ac5da3a0cbe040a45d719b6f6a23aed91">getConstantNode</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#ab582424fdb6d9674c1bd4466cdfbe497">constantSymID</a>();</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a3b417ee79560fd00f4cf80906044c198"> 156</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a3b417ee79560fd00f4cf80906044c198">getBlkPtr</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a1689fa03795200b501ae3887906e7e72">blkPtrSymID</a>();</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  }</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a3de9a2a565c303f68a90c32dc59febd5"> 160</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> <a class="code" href="classSVF_1_1IRGraph.html#a3de9a2a565c303f68a90c32dc59febd5">getNullPtr</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#adaed6e68c2f53260ed4c4fc38b5c4721">nullPtrSymID</a>();</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#aafe9544b07a8c40bf915613df11df48e"> 164</a></span>  <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classSVF_1_1MemObj.html">MemObj</a>* <a class="code" href="classSVF_1_1IRGraph.html#aafe9544b07a8c40bf915613df11df48e">getBlackHoleObj</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aebf96274e1ad2a523981487839a3025e">getBlkObj</a>();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  }</div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#aceae1e4e49a1d2e63ef3d71a7e5ef3eb"> 168</a></span>  <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classSVF_1_1MemObj.html">MemObj</a>* <a class="code" href="classSVF_1_1IRGraph.html#aceae1e4e49a1d2e63ef3d71a7e5ef3eb">getConstantObj</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a661eb9ff1839c3af942517808414202b">getConstantObj</a>();</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  }</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a0212f3fe2f37363e8060f292c8cf7668"> 173</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a0212f3fe2f37363e8060f292c8cf7668">getValueNodeNum</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a8f3cb8a1db34dd692ee04561f4edeebf">valSyms</a>().size();</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a82528aff779ccf8f723f57507dd2d991"> 177</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a82528aff779ccf8f723f57507dd2d991">getObjectNodeNum</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">return</span> symInfo-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a929a20dc8f2eb4d82e93938b8339d697">idToObjMap</a>().size();</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  }</div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a0a18bca50f7cd3a1882754f19303d257"> 181</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a0a18bca50f7cd3a1882754f19303d257">getNodeNumAfterPAGBuild</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1IRGraph.html#a80cf14bf43accb89cb82490b4f173598">nodeNumAfterPAGBuild</a>;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  }</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a5fe12445ed0528183775747dec356db0"> 185</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#a5fe12445ed0528183775747dec356db0">setNodeNumAfterPAGBuild</a>(<a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> num)</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  nodeNumAfterPAGBuild = num;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  }</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#afa015e79aa68b102db44b5a0fd653dc6"> 190</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#afa015e79aa68b102db44b5a0fd653dc6">getPAGNodeNum</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1GenericGraph.html#a38122734cbe71551a420dfb7fee2012e">nodeNum</a>;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  }</div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a821df0fcb66e4f0a5b10c295c24b7c2c"> 194</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a821df0fcb66e4f0a5b10c295c24b7c2c">getPAGEdgeNum</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1GenericGraph.html#a2fbc96de5f066469c2739229307bcc0c">edgeNum</a>;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  }</div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a51485004eb28aab6620801205d13ef1b"> 198</a></span>  <span class="keyword">inline</span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1IRGraph.html#a51485004eb28aab6620801205d13ef1b">getPTAPAGEdgeNum</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1IRGraph.html#a9f68ffe75e3d9457092ac2368aa08a27">totalPTAPAGEdge</a>;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classSVF_1_1IRGraph.html#a5a34f23fee4f84e74908041efebd6867"> 203</a></span>  <span class="keyword">inline</span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="classSVF_1_1IRGraph.html#a5a34f23fee4f84e74908041efebd6867">getGraphName</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">return</span> <span class="stringliteral">"SVFIR"</span>;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  }</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#a1cb32461439c4dc8d044c2bfadb11307">dump</a>(<a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="cJSON_8h.html#a25d22ecc7e656d2c59332072684e8766">name</a>);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1IRGraph.html#a3a656bb310ba0f42e525995a480a5b67">view</a>();</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> };</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> }</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="keyword">namespace </span><a class="code" href="namespacellvm.html">llvm</a></div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> {</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="comment">/* !</span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="comment"> * GraphTraits specializations of SVFIR to be used for the generic graph algorithms.</span></div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="comment"> * Provide graph traits for tranversing from a SVFIR node using standard graph traversals.</span></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="comment"> */</span></div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="structllvm_1_1GraphTraits_3_01SVF_1_1SVFVar_01_5_01_4.html"> 225</a></span> <span class="keyword">template</span><> <span class="keyword">struct </span>GraphTraits<<a class="code" href="namespaceSVF.html">SVF</a>::SVFVar*> : <span class="keyword">public</span> GraphTraits<SVF::GenericNode<SVF::SVFVar,SVF::SVFStmt>* ></div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span> {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> };</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1SVFVar_01_5_01_4_01_4.html"> 230</a></span> <span class="keyword">template</span><> <span class="keyword">struct </span>GraphTraits<Inverse<SVF::SVFVar *> > : <span class="keyword">public</span> GraphTraits<Inverse<SVF::GenericNode<SVF::SVFVar,SVF::SVFStmt>* > ></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> };</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> </div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="structllvm_1_1GraphTraits_3_01SVF_1_1IRGraph_01_5_01_4.html"> 234</a></span> <span class="keyword">template</span><> <span class="keyword">struct </span>GraphTraits<SVF::<a class="code" href="classSVF_1_1IRGraph.html#a34f7644ccf88fc0911c0b4f625dc1f28">IRGraph</a>*> : <span class="keyword">public</span> GraphTraits<SVF::GenericGraph<SVF::SVFVar,SVF::SVFStmt>* ></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span> {</div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="structllvm_1_1GraphTraits_3_01SVF_1_1IRGraph_01_5_01_4.html#a2f3dc486fd4a3d8f4f4fd27d0f0f65c4"> 236</a></span>  <span class="keyword">typedef</span> <a class="code" href="classSVF_1_1SVFVar.html">SVF::SVFVar</a> *<a class="code" href="structllvm_1_1GraphTraits_3_01SVF_1_1IRGraph_01_5_01_4.html#a2f3dc486fd4a3d8f4f4fd27d0f0f65c4">NodeRef</a>;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span> };</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> } <span class="comment">// End namespace llvm</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="preprocessor">#endif </span><span class="comment">/* IRGRAPH_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="classSVF_1_1IRGraph_html_a3ce34b9fcb651689bce44ab48fbcdff0"><div class="ttname"><a href="classSVF_1_1IRGraph.html#a3ce34b9fcb651689bce44ab48fbcdff0">SVF::IRGraph::getBlackHoleNode</a></div><div class="ttdeci">NodeID getBlackHoleNode() const</div><div class="ttdef"><b>Definition:</b> <a href="IRGraph_8h_source.html#l00148">IRGraph.h:148</a></div></div>
|
|
70
70
|
<div class="ttc" id="classSVF_1_1MemObj_html"><div class="ttname"><a href="classSVF_1_1MemObj.html">SVF::MemObj</a></div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8h_source.html#l00373">SymbolTableInfo.h:373</a></div></div>
|
|
71
|
-
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
71
|
+
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00119">CFLGraph.h:119</a></div></div>
|
|
72
72
|
<div class="ttc" id="classSVF_1_1SymbolTableInfo_html_aebf96274e1ad2a523981487839a3025e"><div class="ttname"><a href="classSVF_1_1SymbolTableInfo.html#aebf96274e1ad2a523981487839a3025e">SVF::SymbolTableInfo::getBlkObj</a></div><div class="ttdeci">MemObj * getBlkObj() const</div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8h_source.html#l00194">SymbolTableInfo.h:194</a></div></div>
|
|
73
73
|
<div class="ttc" id="SVFStatements_8h_html"><div class="ttname"><a href="SVFStatements_8h.html">SVFStatements.h</a></div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1IRGraph_html_a679145e7bf818b0a19005dc8e2845fe1"><div class="ttname"><a href="classSVF_1_1IRGraph.html#a679145e7bf818b0a19005dc8e2845fe1">SVF::IRGraph::symInfo</a></div><div class="ttdeci">SymbolTableInfo * symInfo</div><div class="ttdef"><b>Definition:</b> <a href="IRGraph_8h_source.html#l00061">IRGraph.h:61</a></div></div>
|