svf-tools 1.0.781 → 1.0.783
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/CDG_8h.html +2 -2
- package/SVF-doxygen/html/html/CDG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/CFBasicBlockG_8cpp_source.html +152 -90
- package/SVF-doxygen/html/html/CFBasicBlockG_8h.html +3 -1
- package/SVF-doxygen/html/html/CFBasicBlockG_8h_source.html +601 -260
- package/SVF-doxygen/html/html/ConsGNode_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ExtAPI_8cpp.html +50 -50
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +180 -181
- package/SVF-doxygen/html/html/ExtAPI_8h.html +6 -6
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +13 -13
- package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LLVMModule_8h_source.html +1 -1
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +7 -7
- package/SVF-doxygen/html/html/WTO_8h_source.html +6 -6
- package/SVF-doxygen/html/html/annotated.html +325 -333
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockEdge-members.html +19 -12
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockEdge.html +219 -30
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGBuilder-members.html +4 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGBuilder.html +147 -39
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGWTOCycle.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGWTONode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGraph-members.html +32 -28
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockGraph.html +382 -184
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockNode-members.html +51 -41
- package/SVF-doxygen/html/html/classSVF_1_1CFBasicBlockNode.html +1244 -159
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +34 -34
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +65 -25
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +107 -107
- package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.html +4 -5
- package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1GenericGraph.html +3 -4
- package/SVF-doxygen/html/html/classSVF_1_1GenericGraph.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
- package/SVF-doxygen/html/html/classes.html +266 -276
- package/SVF-doxygen/html/html/dir_a10fe8a299b5f0831d187a9a2e1308ef.html +0 -2
- package/SVF-doxygen/html/html/dir_fc0329f850c815763e0c5b05933e8d55.html +0 -2
- package/SVF-doxygen/html/html/files.html +19 -21
- package/SVF-doxygen/html/html/functions.html +2 -33
- package/SVF-doxygen/html/html/functions_a.html +14 -16
- package/SVF-doxygen/html/html/functions_b.html +8 -9
- package/SVF-doxygen/html/html/functions_c.html +34 -31
- package/SVF-doxygen/html/html/functions_d.html +11 -13
- package/SVF-doxygen/html/html/functions_e.html +1 -1
- package/SVF-doxygen/html/html/functions_func.html +16 -18
- package/SVF-doxygen/html/html/functions_func_b.html +2 -3
- package/SVF-doxygen/html/html/functions_func_c.html +31 -31
- package/SVF-doxygen/html/html/functions_func_d.html +10 -12
- package/SVF-doxygen/html/html/functions_func_g.html +22 -59
- package/SVF-doxygen/html/html/functions_func_h.html +9 -12
- package/SVF-doxygen/html/html/functions_func_i.html +13 -26
- package/SVF-doxygen/html/html/functions_func_o.html +9 -9
- package/SVF-doxygen/html/html/functions_func_p.html +1 -1
- package/SVF-doxygen/html/html/functions_func_r.html +15 -15
- package/SVF-doxygen/html/html/functions_func_s.html +20 -29
- package/SVF-doxygen/html/html/functions_func_t.html +0 -2
- package/SVF-doxygen/html/html/functions_func_v.html +2 -3
- package/SVF-doxygen/html/html/functions_func_~.html +0 -12
- package/SVF-doxygen/html/html/functions_g.html +23 -60
- package/SVF-doxygen/html/html/functions_h.html +9 -12
- package/SVF-doxygen/html/html/functions_i.html +16 -44
- package/SVF-doxygen/html/html/functions_n.html +6 -8
- package/SVF-doxygen/html/html/functions_o.html +23 -27
- package/SVF-doxygen/html/html/functions_p.html +8 -12
- package/SVF-doxygen/html/html/functions_r.html +17 -17
- package/SVF-doxygen/html/html/functions_s.html +16 -33
- package/SVF-doxygen/html/html/functions_t.html +5 -7
- package/SVF-doxygen/html/html/functions_type_c.html +6 -3
- package/SVF-doxygen/html/html/functions_type_e.html +1 -1
- package/SVF-doxygen/html/html/functions_type_i.html +3 -18
- package/SVF-doxygen/html/html/functions_type_n.html +0 -2
- package/SVF-doxygen/html/html/functions_type_s.html +0 -6
- package/SVF-doxygen/html/html/functions_v.html +4 -5
- package/SVF-doxygen/html/html/functions_vars.html +2 -33
- package/SVF-doxygen/html/html/functions_vars_i.html +2 -2
- package/SVF-doxygen/html/html/functions_vars_o.html +2 -2
- package/SVF-doxygen/html/html/functions_w.html +8 -8
- package/SVF-doxygen/html/html/functions_~.html +0 -12
- package/SVF-doxygen/html/html/globals_d.html +2 -2
- package/SVF-doxygen/html/html/globals_defs.html +2 -2
- package/SVF-doxygen/html/html/hierarchy.html +458 -469
- package/SVF-doxygen/html/html/namespaceSVF.html +7 -78
- package/SVF-doxygen/html/html/namespacemembers_g.html +3 -12
- package/SVF-doxygen/html/html/namespacemembers_n.html +1 -1
- package/SVF-doxygen/html/html/namespacemembers_type_g.html +0 -9
- package/SVF-doxygen/html/html/namespacemembers_type_n.html +1 -1
- package/SVF-doxygen/html/html/search/all_0.js +137 -147
- package/SVF-doxygen/html/html/search/all_1.js +484 -485
- package/SVF-doxygen/html/html/search/all_10.js +324 -324
- package/SVF-doxygen/html/html/search/all_11.js +224 -224
- package/SVF-doxygen/html/html/search/all_12.js +541 -546
- package/SVF-doxygen/html/html/search/all_13.js +190 -190
- package/SVF-doxygen/html/html/search/all_14.js +67 -67
- package/SVF-doxygen/html/html/search/all_15.js +170 -170
- package/SVF-doxygen/html/html/search/all_16.js +63 -63
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_18.js +1 -1
- package/SVF-doxygen/html/html/search/all_19.js +11 -11
- package/SVF-doxygen/html/html/search/all_1a.js +172 -176
- package/SVF-doxygen/html/html/search/all_2.js +167 -167
- package/SVF-doxygen/html/html/search/all_3.js +640 -639
- package/SVF-doxygen/html/html/search/all_4.js +233 -234
- package/SVF-doxygen/html/html/search/all_5.js +121 -120
- package/SVF-doxygen/html/html/search/all_6.js +225 -225
- package/SVF-doxygen/html/html/search/all_7.js +1037 -1056
- package/SVF-doxygen/html/html/search/all_8.js +194 -195
- package/SVF-doxygen/html/html/search/all_9.js +607 -617
- package/SVF-doxygen/html/html/search/all_a.js +46 -46
- package/SVF-doxygen/html/html/search/all_b.js +26 -26
- package/SVF-doxygen/html/html/search/all_c.js +116 -116
- package/SVF-doxygen/html/html/search/all_d.js +196 -196
- package/SVF-doxygen/html/html/search/all_e.js +207 -207
- package/SVF-doxygen/html/html/search/all_f.js +116 -116
- package/SVF-doxygen/html/html/search/classes_0.js +26 -26
- package/SVF-doxygen/html/html/search/classes_1.js +9 -9
- package/SVF-doxygen/html/html/search/classes_10.js +73 -73
- package/SVF-doxygen/html/html/search/classes_11.js +15 -15
- package/SVF-doxygen/html/html/search/classes_12.js +2 -2
- package/SVF-doxygen/html/html/search/classes_13.js +10 -10
- package/SVF-doxygen/html/html/search/classes_14.js +14 -14
- package/SVF-doxygen/html/html/search/classes_15.js +1 -1
- package/SVF-doxygen/html/html/search/classes_2.js +80 -80
- package/SVF-doxygen/html/html/search/classes_3.js +37 -38
- package/SVF-doxygen/html/html/search/classes_4.js +9 -9
- package/SVF-doxygen/html/html/search/classes_5.js +28 -28
- package/SVF-doxygen/html/html/search/classes_6.js +104 -110
- package/SVF-doxygen/html/html/search/classes_7.js +33 -33
- package/SVF-doxygen/html/html/search/classes_8.js +56 -60
- package/SVF-doxygen/html/html/search/classes_9.js +1 -1
- package/SVF-doxygen/html/html/search/classes_a.js +12 -12
- package/SVF-doxygen/html/html/search/classes_b.js +29 -29
- package/SVF-doxygen/html/html/search/classes_c.js +6 -6
- package/SVF-doxygen/html/html/search/classes_d.js +18 -18
- package/SVF-doxygen/html/html/search/classes_e.js +36 -36
- package/SVF-doxygen/html/html/search/classes_f.js +25 -25
- package/SVF-doxygen/html/html/search/defines_0.js +3 -3
- package/SVF-doxygen/html/html/search/defines_1.js +2 -2
- package/SVF-doxygen/html/html/search/defines_2.js +30 -30
- package/SVF-doxygen/html/html/search/defines_3.js +21 -21
- package/SVF-doxygen/html/html/search/defines_4.js +2 -2
- package/SVF-doxygen/html/html/search/defines_5.js +4 -4
- package/SVF-doxygen/html/html/search/defines_6.js +2 -2
- package/SVF-doxygen/html/html/search/defines_7.js +5 -5
- package/SVF-doxygen/html/html/search/defines_8.js +11 -11
- package/SVF-doxygen/html/html/search/defines_9.js +9 -9
- package/SVF-doxygen/html/html/search/defines_a.js +2 -2
- package/SVF-doxygen/html/html/search/defines_b.js +1 -1
- package/SVF-doxygen/html/html/search/defines_c.js +3 -3
- package/SVF-doxygen/html/html/search/defines_d.js +2 -2
- package/SVF-doxygen/html/html/search/defines_e.js +7 -7
- package/SVF-doxygen/html/html/search/defines_f.js +3 -3
- package/SVF-doxygen/html/html/search/enums_0.js +3 -3
- package/SVF-doxygen/html/html/search/enums_1.js +2 -2
- package/SVF-doxygen/html/html/search/enums_10.js +1 -1
- package/SVF-doxygen/html/html/search/enums_11.js +1 -1
- package/SVF-doxygen/html/html/search/enums_2.js +8 -8
- package/SVF-doxygen/html/html/search/enums_3.js +1 -1
- package/SVF-doxygen/html/html/search/enums_4.js +3 -3
- package/SVF-doxygen/html/html/search/enums_5.js +1 -1
- package/SVF-doxygen/html/html/search/enums_6.js +2 -2
- package/SVF-doxygen/html/html/search/enums_7.js +2 -2
- package/SVF-doxygen/html/html/search/enums_8.js +4 -4
- package/SVF-doxygen/html/html/search/enums_9.js +1 -1
- package/SVF-doxygen/html/html/search/enums_a.js +1 -1
- package/SVF-doxygen/html/html/search/enums_b.js +7 -7
- package/SVF-doxygen/html/html/search/enums_c.js +1 -1
- package/SVF-doxygen/html/html/search/enums_d.js +4 -4
- package/SVF-doxygen/html/html/search/enums_e.js +2 -2
- package/SVF-doxygen/html/html/search/enums_f.js +4 -4
- package/SVF-doxygen/html/html/search/enumvalues_0.js +14 -14
- package/SVF-doxygen/html/html/search/enumvalues_1.js +14 -14
- package/SVF-doxygen/html/html/search/enumvalues_10.js +35 -35
- package/SVF-doxygen/html/html/search/enumvalues_11.js +3 -3
- package/SVF-doxygen/html/html/search/enumvalues_12.js +10 -10
- package/SVF-doxygen/html/html/search/enumvalues_13.js +1 -1
- package/SVF-doxygen/html/html/search/enumvalues_14.js +1 -1
- package/SVF-doxygen/html/html/search/enumvalues_15.js +3 -3
- package/SVF-doxygen/html/html/search/enumvalues_2.js +36 -36
- package/SVF-doxygen/html/html/search/enumvalues_3.js +13 -13
- package/SVF-doxygen/html/html/search/enumvalues_4.js +2 -2
- package/SVF-doxygen/html/html/search/enumvalues_5.js +47 -47
- package/SVF-doxygen/html/html/search/enumvalues_6.js +6 -6
- package/SVF-doxygen/html/html/search/enumvalues_7.js +9 -9
- package/SVF-doxygen/html/html/search/enumvalues_8.js +23 -23
- package/SVF-doxygen/html/html/search/enumvalues_9.js +6 -6
- package/SVF-doxygen/html/html/search/enumvalues_a.js +15 -15
- package/SVF-doxygen/html/html/search/enumvalues_b.js +11 -11
- package/SVF-doxygen/html/html/search/enumvalues_c.js +5 -5
- package/SVF-doxygen/html/html/search/enumvalues_d.js +18 -18
- package/SVF-doxygen/html/html/search/enumvalues_e.js +9 -9
- package/SVF-doxygen/html/html/search/enumvalues_f.js +45 -45
- package/SVF-doxygen/html/html/search/files_0.js +13 -13
- package/SVF-doxygen/html/html/search/files_1.js +7 -7
- package/SVF-doxygen/html/html/search/files_10.js +8 -8
- package/SVF-doxygen/html/html/search/files_11.js +8 -8
- package/SVF-doxygen/html/html/search/files_12.js +2 -2
- package/SVF-doxygen/html/html/search/files_2.js +53 -53
- package/SVF-doxygen/html/html/search/files_3.js +14 -14
- package/SVF-doxygen/html/html/search/files_4.js +5 -5
- package/SVF-doxygen/html/html/search/files_5.js +13 -13
- package/SVF-doxygen/html/html/search/files_6.js +9 -9
- package/SVF-doxygen/html/html/search/files_7.js +14 -16
- package/SVF-doxygen/html/html/search/files_8.js +13 -13
- package/SVF-doxygen/html/html/search/files_9.js +18 -18
- package/SVF-doxygen/html/html/search/files_a.js +3 -3
- package/SVF-doxygen/html/html/search/files_b.js +2 -2
- package/SVF-doxygen/html/html/search/files_c.js +20 -20
- package/SVF-doxygen/html/html/search/files_d.js +4 -4
- package/SVF-doxygen/html/html/search/files_e.js +62 -62
- package/SVF-doxygen/html/html/search/files_f.js +8 -8
- package/SVF-doxygen/html/html/search/functions_0.js +12 -12
- package/SVF-doxygen/html/html/search/functions_1.js +356 -357
- package/SVF-doxygen/html/html/search/functions_10.js +140 -140
- package/SVF-doxygen/html/html/search/functions_11.js +138 -138
- package/SVF-doxygen/html/html/search/functions_12.js +276 -279
- package/SVF-doxygen/html/html/search/functions_13.js +58 -58
- package/SVF-doxygen/html/html/search/functions_14.js +39 -39
- package/SVF-doxygen/html/html/search/functions_15.js +71 -71
- package/SVF-doxygen/html/html/search/functions_16.js +32 -32
- package/SVF-doxygen/html/html/search/functions_17.js +3 -3
- package/SVF-doxygen/html/html/search/functions_18.js +172 -176
- package/SVF-doxygen/html/html/search/functions_2.js +86 -86
- package/SVF-doxygen/html/html/search/functions_3.js +257 -257
- package/SVF-doxygen/html/html/search/functions_4.js +75 -75
- package/SVF-doxygen/html/html/search/functions_5.js +53 -53
- package/SVF-doxygen/html/html/search/functions_6.js +59 -59
- package/SVF-doxygen/html/html/search/functions_7.js +848 -858
- package/SVF-doxygen/html/html/search/functions_8.js +146 -147
- package/SVF-doxygen/html/html/search/functions_9.js +425 -429
- package/SVF-doxygen/html/html/search/functions_a.js +30 -30
- package/SVF-doxygen/html/html/search/functions_b.js +2 -2
- package/SVF-doxygen/html/html/search/functions_c.js +26 -26
- package/SVF-doxygen/html/html/search/functions_d.js +77 -77
- package/SVF-doxygen/html/html/search/functions_e.js +35 -35
- package/SVF-doxygen/html/html/search/functions_f.js +56 -56
- package/SVF-doxygen/html/html/search/namespaces_0.js +1 -1
- package/SVF-doxygen/html/html/search/namespaces_1.js +7 -7
- package/SVF-doxygen/html/html/search/related_0.js +2 -2
- package/SVF-doxygen/html/html/search/related_1.js +2 -2
- package/SVF-doxygen/html/html/search/related_2.js +2 -2
- package/SVF-doxygen/html/html/search/related_3.js +2 -2
- package/SVF-doxygen/html/html/search/related_4.js +2 -2
- package/SVF-doxygen/html/html/search/related_5.js +1 -1
- package/SVF-doxygen/html/html/search/related_6.js +2 -2
- package/SVF-doxygen/html/html/search/related_7.js +4 -4
- package/SVF-doxygen/html/html/search/related_8.js +2 -2
- package/SVF-doxygen/html/html/search/related_9.js +4 -4
- package/SVF-doxygen/html/html/search/related_a.js +19 -19
- package/SVF-doxygen/html/html/search/related_b.js +4 -4
- package/SVF-doxygen/html/html/search/related_c.js +1 -1
- package/SVF-doxygen/html/html/search/related_d.js +11 -11
- package/SVF-doxygen/html/html/search/related_e.js +2 -2
- package/SVF-doxygen/html/html/search/related_f.js +2 -2
- package/SVF-doxygen/html/html/search/typedefs_0.js +18 -18
- package/SVF-doxygen/html/html/search/typedefs_1.js +26 -26
- package/SVF-doxygen/html/html/search/typedefs_10.js +61 -63
- package/SVF-doxygen/html/html/search/typedefs_11.js +13 -13
- package/SVF-doxygen/html/html/search/typedefs_12.js +11 -11
- package/SVF-doxygen/html/html/search/typedefs_13.js +35 -35
- package/SVF-doxygen/html/html/search/typedefs_14.js +8 -8
- package/SVF-doxygen/html/html/search/typedefs_2.js +129 -128
- package/SVF-doxygen/html/html/search/typedefs_3.js +39 -39
- package/SVF-doxygen/html/html/search/typedefs_4.js +17 -17
- package/SVF-doxygen/html/html/search/typedefs_5.js +41 -41
- package/SVF-doxygen/html/html/search/typedefs_6.js +55 -58
- package/SVF-doxygen/html/html/search/typedefs_7.js +42 -46
- package/SVF-doxygen/html/html/search/typedefs_8.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_9.js +6 -6
- package/SVF-doxygen/html/html/search/typedefs_a.js +29 -29
- package/SVF-doxygen/html/html/search/typedefs_b.js +29 -29
- package/SVF-doxygen/html/html/search/typedefs_c.js +41 -41
- package/SVF-doxygen/html/html/search/typedefs_d.js +15 -15
- package/SVF-doxygen/html/html/search/typedefs_e.js +52 -52
- package/SVF-doxygen/html/html/search/typedefs_f.js +14 -14
- package/SVF-doxygen/html/html/search/variables_0.js +152 -162
- package/SVF-doxygen/html/html/search/variables_1.js +75 -75
- package/SVF-doxygen/html/html/search/variables_10.js +97 -97
- package/SVF-doxygen/html/html/search/variables_11.js +46 -46
- package/SVF-doxygen/html/html/search/variables_12.js +92 -92
- package/SVF-doxygen/html/html/search/variables_13.js +75 -75
- package/SVF-doxygen/html/html/search/variables_14.js +14 -14
- package/SVF-doxygen/html/html/search/variables_15.js +48 -48
- package/SVF-doxygen/html/html/search/variables_16.js +9 -9
- package/SVF-doxygen/html/html/search/variables_17.js +1 -1
- package/SVF-doxygen/html/html/search/variables_18.js +2 -2
- package/SVF-doxygen/html/html/search/variables_2.js +37 -37
- package/SVF-doxygen/html/html/search/variables_3.js +142 -142
- package/SVF-doxygen/html/html/search/variables_4.js +55 -55
- package/SVF-doxygen/html/html/search/variables_5.js +39 -39
- package/SVF-doxygen/html/html/search/variables_6.js +66 -66
- package/SVF-doxygen/html/html/search/variables_7.js +33 -33
- package/SVF-doxygen/html/html/search/variables_8.js +7 -7
- package/SVF-doxygen/html/html/search/variables_9.js +77 -77
- package/SVF-doxygen/html/html/search/variables_a.js +4 -4
- package/SVF-doxygen/html/html/search/variables_b.js +10 -10
- package/SVF-doxygen/html/html/search/variables_c.js +45 -45
- package/SVF-doxygen/html/html/search/variables_d.js +56 -56
- package/SVF-doxygen/html/html/search/variables_e.js +123 -123
- package/SVF-doxygen/html/html/search/variables_f.js +30 -30
- package/SVF-doxygen/html/html/structSVF_1_1CFBasicBlockEdge_1_1equalCFBBEdge-members.html +84 -0
- package/SVF-doxygen/html/html/structSVF_1_1CFBasicBlockEdge_1_1equalCFBBEdge.html +144 -0
- package/SVF-doxygen/html/html/structSVF_1_1DOTGraphTraits_3_01SVF_1_1CFBasicBlockGraph_01_5_01_4.html +40 -40
- package/SVF-doxygen/html/html/structSVF_1_1GenericGraphTraits_3_01Inverse_3_01SVF_1_1CFBasicBlockNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structSVF_1_1GenericGraphTraits_3_01SVF_1_1CFBasicBlockGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structSVF_1_1GenericGraphTraits_3_01SVF_1_1CFBasicBlockNode_01_5_01_4.html +1 -1
- package/package.json +1 -1
- package/svf/include/Graphs/CFBasicBlockG.h +342 -32
- package/svf/include/Util/ExtAPI.h +2 -2
- package/svf/lib/Graphs/CFBasicBlockG.cpp +97 -36
- package/svf/lib/Util/ExtAPI.cpp +14 -15
- package/svf/include/Graphs/ICFGWrapper.h +0 -728
- package/svf/lib/Graphs/ICFGWrapper.cpp +0 -97
|
@@ -1,728 +0,0 @@
|
|
|
1
|
-
//===- ICFGWrapper.h -- ICFG Wrapper-----------------------------------------//
|
|
2
|
-
//
|
|
3
|
-
// SVF: Static Value-Flow Analysis
|
|
4
|
-
//
|
|
5
|
-
// Copyright (C) <2013-2017> <Yulei Sui>
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// This program is free software: you can redistribute it and/or modify
|
|
9
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
-
// (at your option) any later version.
|
|
12
|
-
|
|
13
|
-
// This program is distributed in the hope that it will be useful,
|
|
14
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
// GNU Affero General Public License for more details.
|
|
17
|
-
|
|
18
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
//
|
|
21
|
-
//===----------------------------------------------------------------------===//
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* ICFGWrapper.h
|
|
25
|
-
*
|
|
26
|
-
* Created on: Sep 26, 2023
|
|
27
|
-
* Author: Xiao Cheng
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
#ifndef SVF_ICFGWRAPPER_H
|
|
31
|
-
#define SVF_ICFGWRAPPER_H
|
|
32
|
-
|
|
33
|
-
#include "Graphs/ICFG.h"
|
|
34
|
-
#include "SVFIR/SVFIR.h"
|
|
35
|
-
|
|
36
|
-
namespace SVF
|
|
37
|
-
{
|
|
38
|
-
class ICFGNodeWrapper;
|
|
39
|
-
|
|
40
|
-
typedef GenericEdge<ICFGNodeWrapper> GenericICFGWrapperEdgeTy;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class ICFGEdgeWrapper : public GenericICFGWrapperEdgeTy
|
|
44
|
-
{
|
|
45
|
-
public:
|
|
46
|
-
typedef struct equalICFGEdgeWrapper
|
|
47
|
-
{
|
|
48
|
-
bool
|
|
49
|
-
operator()(const ICFGEdgeWrapper *lhs, const ICFGEdgeWrapper *rhs) const
|
|
50
|
-
{
|
|
51
|
-
if (lhs->getSrcID() != rhs->getSrcID())
|
|
52
|
-
return lhs->getSrcID() < rhs->getSrcID();
|
|
53
|
-
else if (lhs->getDstID() != rhs->getDstID())
|
|
54
|
-
return lhs->getDstID() < rhs->getDstID();
|
|
55
|
-
else
|
|
56
|
-
return lhs->getICFGEdge() < rhs->getICFGEdge();
|
|
57
|
-
}
|
|
58
|
-
} equalICFGEdgeWrapper;
|
|
59
|
-
|
|
60
|
-
typedef OrderedSet<ICFGEdgeWrapper *, equalICFGEdgeWrapper> ICFGEdgeWrapperSetTy;
|
|
61
|
-
typedef ICFGEdgeWrapperSetTy::iterator iterator;
|
|
62
|
-
typedef ICFGEdgeWrapperSetTy::const_iterator const_iterator;
|
|
63
|
-
|
|
64
|
-
private:
|
|
65
|
-
ICFGEdge *_icfgEdge;
|
|
66
|
-
|
|
67
|
-
public:
|
|
68
|
-
ICFGEdgeWrapper(ICFGNodeWrapper *src, ICFGNodeWrapper *dst, ICFGEdge *edge) :
|
|
69
|
-
GenericICFGWrapperEdgeTy(src, dst, 0), _icfgEdge(edge)
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
~ICFGEdgeWrapper() {}
|
|
75
|
-
|
|
76
|
-
virtual const std::string toString() const
|
|
77
|
-
{
|
|
78
|
-
return _icfgEdge->toString();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
inline ICFGEdge *getICFGEdge() const
|
|
82
|
-
{
|
|
83
|
-
return _icfgEdge;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
inline void setICFGEdge(ICFGEdge *edge)
|
|
87
|
-
{
|
|
88
|
-
_icfgEdge = edge;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
using SVF::GenericEdge<NodeType>::operator==;
|
|
92
|
-
/// Add the hash function for std::set (we also can overload operator< to implement this)
|
|
93
|
-
// and duplicated elements in the set are not inserted (binary tree comparison)
|
|
94
|
-
//@{
|
|
95
|
-
|
|
96
|
-
virtual inline bool operator==(const ICFGEdgeWrapper *rhs) const
|
|
97
|
-
{
|
|
98
|
-
return (rhs->getSrcID() == this->getSrcID() && rhs->getDstID() == this->getDstID() &&
|
|
99
|
-
rhs->getICFGEdge() == this->getICFGEdge());
|
|
100
|
-
}
|
|
101
|
-
//@}
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
typedef GenericNode<ICFGNodeWrapper, ICFGEdgeWrapper> GenericICFGNodeWrapperTy;
|
|
106
|
-
|
|
107
|
-
class ICFGNodeWrapper : public GenericICFGNodeWrapperTy
|
|
108
|
-
{
|
|
109
|
-
public:
|
|
110
|
-
typedef ICFGEdgeWrapper::ICFGEdgeWrapperSetTy ICFGEdgeWrapperSetTy;
|
|
111
|
-
typedef ICFGEdgeWrapper::ICFGEdgeWrapperSetTy::iterator iterator;
|
|
112
|
-
typedef ICFGEdgeWrapper::ICFGEdgeWrapperSetTy::const_iterator const_iterator;
|
|
113
|
-
private:
|
|
114
|
-
const ICFGNode *_icfgNode;
|
|
115
|
-
ICFGNodeWrapper *_callICFGNodeWrapper{nullptr};
|
|
116
|
-
ICFGNodeWrapper *_retICFGNodeWrapper{nullptr};
|
|
117
|
-
ICFGEdgeWrapperSetTy InEdges; ///< all incoming edge of this node
|
|
118
|
-
ICFGEdgeWrapperSetTy OutEdges; ///< all outgoing edge of this node
|
|
119
|
-
public:
|
|
120
|
-
ICFGNodeWrapper(const ICFGNode *node) : GenericICFGNodeWrapperTy(node->getId(), 0), _icfgNode(node) {}
|
|
121
|
-
|
|
122
|
-
virtual ~ICFGNodeWrapper()
|
|
123
|
-
{
|
|
124
|
-
for (auto *edge: OutEdges)
|
|
125
|
-
delete edge;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
virtual const std::string toString() const
|
|
129
|
-
{
|
|
130
|
-
return _icfgNode->toString();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const ICFGNode *getICFGNode() const
|
|
134
|
-
{
|
|
135
|
-
return _icfgNode;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
ICFGNodeWrapper *getCallICFGNodeWrapper() const
|
|
139
|
-
{
|
|
140
|
-
return _callICFGNodeWrapper;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
void setCallICFGNodeWrapper(ICFGNodeWrapper *node)
|
|
144
|
-
{
|
|
145
|
-
_callICFGNodeWrapper = node;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
ICFGNodeWrapper *getRetICFGNodeWrapper() const
|
|
149
|
-
{
|
|
150
|
-
return _retICFGNodeWrapper;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
void setRetICFGNodeWrapper(ICFGNodeWrapper *node)
|
|
154
|
-
{
|
|
155
|
-
_retICFGNodeWrapper = node;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/// Get incoming/outgoing edge set
|
|
160
|
-
///@{
|
|
161
|
-
inline const ICFGEdgeWrapperSetTy &getOutEdges() const
|
|
162
|
-
{
|
|
163
|
-
return OutEdges;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
inline const ICFGEdgeWrapperSetTy &getInEdges() const
|
|
167
|
-
{
|
|
168
|
-
return InEdges;
|
|
169
|
-
}
|
|
170
|
-
///@}
|
|
171
|
-
|
|
172
|
-
/// Has incoming/outgoing edge set
|
|
173
|
-
//@{
|
|
174
|
-
inline bool hasIncomingEdge() const
|
|
175
|
-
{
|
|
176
|
-
return (InEdges.empty() == false);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
inline bool hasOutgoingEdge() const
|
|
180
|
-
{
|
|
181
|
-
return (OutEdges.empty() == false);
|
|
182
|
-
}
|
|
183
|
-
//@}
|
|
184
|
-
|
|
185
|
-
/// iterators
|
|
186
|
-
//@{
|
|
187
|
-
inline iterator OutEdgeBegin()
|
|
188
|
-
{
|
|
189
|
-
return OutEdges.begin();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
inline iterator OutEdgeEnd()
|
|
193
|
-
{
|
|
194
|
-
return OutEdges.end();
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
inline iterator InEdgeBegin()
|
|
198
|
-
{
|
|
199
|
-
return InEdges.begin();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
inline iterator InEdgeEnd()
|
|
203
|
-
{
|
|
204
|
-
return InEdges.end();
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
inline const_iterator OutEdgeBegin() const
|
|
208
|
-
{
|
|
209
|
-
return OutEdges.begin();
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
inline const_iterator OutEdgeEnd() const
|
|
213
|
-
{
|
|
214
|
-
return OutEdges.end();
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
inline const_iterator InEdgeBegin() const
|
|
218
|
-
{
|
|
219
|
-
return InEdges.begin();
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
inline const_iterator InEdgeEnd() const
|
|
223
|
-
{
|
|
224
|
-
return InEdges.end();
|
|
225
|
-
}
|
|
226
|
-
//@}
|
|
227
|
-
|
|
228
|
-
/// Iterators used for SCC detection, overwrite it in child class if necessory
|
|
229
|
-
//@{
|
|
230
|
-
virtual inline iterator directOutEdgeBegin()
|
|
231
|
-
{
|
|
232
|
-
return OutEdges.begin();
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
virtual inline iterator directOutEdgeEnd()
|
|
236
|
-
{
|
|
237
|
-
return OutEdges.end();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
virtual inline iterator directInEdgeBegin()
|
|
241
|
-
{
|
|
242
|
-
return InEdges.begin();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
virtual inline iterator directInEdgeEnd()
|
|
246
|
-
{
|
|
247
|
-
return InEdges.end();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
virtual inline const_iterator directOutEdgeBegin() const
|
|
251
|
-
{
|
|
252
|
-
return OutEdges.begin();
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
virtual inline const_iterator directOutEdgeEnd() const
|
|
256
|
-
{
|
|
257
|
-
return OutEdges.end();
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
virtual inline const_iterator directInEdgeBegin() const
|
|
261
|
-
{
|
|
262
|
-
return InEdges.begin();
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
virtual inline const_iterator directInEdgeEnd() const
|
|
266
|
-
{
|
|
267
|
-
return InEdges.end();
|
|
268
|
-
}
|
|
269
|
-
//@}
|
|
270
|
-
|
|
271
|
-
/// Add incoming and outgoing edges
|
|
272
|
-
//@{
|
|
273
|
-
inline bool addIncomingEdge(ICFGEdgeWrapper *inEdge)
|
|
274
|
-
{
|
|
275
|
-
return InEdges.insert(inEdge).second;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
inline bool addOutgoingEdge(ICFGEdgeWrapper *outEdge)
|
|
279
|
-
{
|
|
280
|
-
return OutEdges.insert(outEdge).second;
|
|
281
|
-
}
|
|
282
|
-
//@}
|
|
283
|
-
|
|
284
|
-
/// Remove incoming and outgoing edges
|
|
285
|
-
///@{
|
|
286
|
-
inline u32_t removeIncomingEdge(ICFGEdgeWrapper *edge)
|
|
287
|
-
{
|
|
288
|
-
iterator it = InEdges.find(edge);
|
|
289
|
-
assert(it != InEdges.end() && "can not find in edge in SVFG node");
|
|
290
|
-
return InEdges.erase(edge);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
inline u32_t removeOutgoingEdge(ICFGEdgeWrapper *edge)
|
|
294
|
-
{
|
|
295
|
-
iterator it = OutEdges.find(edge);
|
|
296
|
-
assert(it != OutEdges.end() && "can not find out edge in SVFG node");
|
|
297
|
-
return OutEdges.erase(edge);
|
|
298
|
-
}
|
|
299
|
-
///@}
|
|
300
|
-
|
|
301
|
-
/// Find incoming and outgoing edges
|
|
302
|
-
//@{
|
|
303
|
-
inline ICFGEdgeWrapper *hasIncomingEdge(ICFGEdgeWrapper *edge) const
|
|
304
|
-
{
|
|
305
|
-
const_iterator it = InEdges.find(edge);
|
|
306
|
-
if (it != InEdges.end())
|
|
307
|
-
return *it;
|
|
308
|
-
else
|
|
309
|
-
return nullptr;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
inline ICFGEdgeWrapper *hasOutgoingEdge(ICFGEdgeWrapper *edge) const
|
|
313
|
-
{
|
|
314
|
-
const_iterator it = OutEdges.find(edge);
|
|
315
|
-
if (it != OutEdges.end())
|
|
316
|
-
return *it;
|
|
317
|
-
else
|
|
318
|
-
return nullptr;
|
|
319
|
-
}
|
|
320
|
-
//@}
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
typedef std::vector<std::pair<NodeID, NodeID>> NodePairVector;
|
|
324
|
-
typedef GenericGraph<ICFGNodeWrapper, ICFGEdgeWrapper> GenericICFGWrapperTy;
|
|
325
|
-
|
|
326
|
-
class ICFGWrapper : public GenericICFGWrapperTy
|
|
327
|
-
{
|
|
328
|
-
public:
|
|
329
|
-
|
|
330
|
-
typedef Map<NodeID, ICFGNodeWrapper *> ICFGWrapperNodeIDToNodeMapTy;
|
|
331
|
-
typedef ICFGEdgeWrapper::ICFGEdgeWrapperSetTy ICFGEdgeWrapperSetTy;
|
|
332
|
-
typedef ICFGWrapperNodeIDToNodeMapTy::iterator iterator;
|
|
333
|
-
typedef ICFGWrapperNodeIDToNodeMapTy::const_iterator const_iterator;
|
|
334
|
-
typedef std::vector<const ICFGNodeWrapper *> ICFGNodeWrapperVector;
|
|
335
|
-
typedef std::vector<std::pair<const ICFGNodeWrapper *, const ICFGNodeWrapper *>> ICFGNodeWrapperPairVector;
|
|
336
|
-
typedef Map<const SVFFunction *, const ICFGNodeWrapper *> SVFFuncToICFGNodeWrapperMap;
|
|
337
|
-
private:
|
|
338
|
-
static std::unique_ptr<ICFGWrapper> _icfgWrapper; ///< Singleton pattern here
|
|
339
|
-
SVFFuncToICFGNodeWrapperMap _funcToFunEntry;
|
|
340
|
-
SVFFuncToICFGNodeWrapperMap _funcToFunExit;
|
|
341
|
-
u32_t _edgeWrapperNum; ///< total num of node
|
|
342
|
-
u32_t _nodeWrapperNum; ///< total num of edge
|
|
343
|
-
ICFG *_icfg;
|
|
344
|
-
|
|
345
|
-
/// Constructor
|
|
346
|
-
ICFGWrapper(ICFG *icfg) : _edgeWrapperNum(0), _nodeWrapperNum(0), _icfg(icfg)
|
|
347
|
-
{
|
|
348
|
-
assert(_icfg && "ICFGWrapper constructor cannot accept nullptr of icfg");
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
public:
|
|
352
|
-
/// Singleton design here to make sure we only have one instance during any analysis
|
|
353
|
-
//@{
|
|
354
|
-
static inline const std::unique_ptr<ICFGWrapper> &getICFGWrapper(ICFG *_icfg)
|
|
355
|
-
{
|
|
356
|
-
if (_icfgWrapper == nullptr)
|
|
357
|
-
{
|
|
358
|
-
_icfgWrapper = std::make_unique<ICFGWrapper>(ICFGWrapper(_icfg));
|
|
359
|
-
}
|
|
360
|
-
return _icfgWrapper;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
static inline const std::unique_ptr<ICFGWrapper> &getICFGWrapper()
|
|
364
|
-
{
|
|
365
|
-
assert(_icfgWrapper && "icfg wrapper not init?");
|
|
366
|
-
return _icfgWrapper;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
static void releaseICFGWrapper()
|
|
370
|
-
{
|
|
371
|
-
ICFGWrapper *w = _icfgWrapper.release();
|
|
372
|
-
delete w;
|
|
373
|
-
_icfgWrapper = nullptr;
|
|
374
|
-
}
|
|
375
|
-
//@}
|
|
376
|
-
|
|
377
|
-
/// Destructor
|
|
378
|
-
virtual ~ICFGWrapper() = default;
|
|
379
|
-
|
|
380
|
-
/// Get a ICFG node wrapper
|
|
381
|
-
inline ICFGNodeWrapper *getICFGNodeWrapper(NodeID id) const
|
|
382
|
-
{
|
|
383
|
-
if (!hasICFGNodeWrapper(id))
|
|
384
|
-
return nullptr;
|
|
385
|
-
return getGNode(id);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/// Whether has the ICFGNodeWrapper
|
|
389
|
-
inline bool hasICFGNodeWrapper(NodeID id) const
|
|
390
|
-
{
|
|
391
|
-
return hasGNode(id);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/// Whether we has a ICFG Edge Wrapper
|
|
395
|
-
bool hasICFGEdgeWrapper(ICFGNodeWrapper *src, ICFGNodeWrapper *dst, ICFGEdge *icfgEdge)
|
|
396
|
-
{
|
|
397
|
-
ICFGEdgeWrapper edge(src, dst, icfgEdge);
|
|
398
|
-
ICFGEdgeWrapper *outEdge = src->hasOutgoingEdge(&edge);
|
|
399
|
-
ICFGEdgeWrapper *inEdge = dst->hasIncomingEdge(&edge);
|
|
400
|
-
if (outEdge && inEdge)
|
|
401
|
-
{
|
|
402
|
-
assert(outEdge == inEdge && "edges not match");
|
|
403
|
-
return true;
|
|
404
|
-
}
|
|
405
|
-
else
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
ICFGEdgeWrapper *hasICFGEdgeWrapper(ICFGNodeWrapper *src, ICFGNodeWrapper *dst)
|
|
410
|
-
{
|
|
411
|
-
for (const auto &e: src->getOutEdges())
|
|
412
|
-
{
|
|
413
|
-
if (e->getDstNode() == dst)
|
|
414
|
-
return e;
|
|
415
|
-
}
|
|
416
|
-
return nullptr;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/// Get a ICFG edge wrapper according to src, dst and icfgEdge
|
|
420
|
-
ICFGEdgeWrapper *
|
|
421
|
-
getICFGEdgeWrapper(const ICFGNodeWrapper *src, const ICFGNodeWrapper *dst, ICFGEdge *icfgEdge)
|
|
422
|
-
{
|
|
423
|
-
ICFGEdgeWrapper *edge = nullptr;
|
|
424
|
-
size_t counter = 0;
|
|
425
|
-
for (ICFGEdgeWrapper::ICFGEdgeWrapperSetTy::iterator iter = src->OutEdgeBegin();
|
|
426
|
-
iter != src->OutEdgeEnd(); ++iter)
|
|
427
|
-
{
|
|
428
|
-
if ((*iter)->getDstID() == dst->getId())
|
|
429
|
-
{
|
|
430
|
-
counter++;
|
|
431
|
-
edge = (*iter);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
assert(counter <= 1 && "there's more than one edge between two ICFGNodeWrappers");
|
|
435
|
-
return edge;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/// View graph from the debugger
|
|
439
|
-
void view();
|
|
440
|
-
|
|
441
|
-
/// Dump graph into dot file
|
|
442
|
-
void dump(const std::string &filename);
|
|
443
|
-
|
|
444
|
-
/// Remove a ICFGEdgeWrapper
|
|
445
|
-
inline void removeICFGEdgeWrapper(ICFGEdgeWrapper *edge)
|
|
446
|
-
{
|
|
447
|
-
if (edge->getDstNode()->hasIncomingEdge(edge))
|
|
448
|
-
{
|
|
449
|
-
edge->getDstNode()->removeIncomingEdge(edge);
|
|
450
|
-
}
|
|
451
|
-
if (edge->getSrcNode()->hasOutgoingEdge(edge))
|
|
452
|
-
{
|
|
453
|
-
edge->getSrcNode()->removeOutgoingEdge(edge);
|
|
454
|
-
}
|
|
455
|
-
delete edge;
|
|
456
|
-
_edgeWrapperNum--;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/// Remove a ICFGNodeWrapper
|
|
460
|
-
inline void removeICFGNodeWrapper(ICFGNodeWrapper *node)
|
|
461
|
-
{
|
|
462
|
-
std::set<ICFGEdgeWrapper *> temp;
|
|
463
|
-
for (ICFGEdgeWrapper *e: node->getInEdges())
|
|
464
|
-
temp.insert(e);
|
|
465
|
-
for (ICFGEdgeWrapper *e: node->getOutEdges())
|
|
466
|
-
temp.insert(e);
|
|
467
|
-
for (ICFGEdgeWrapper *e: temp)
|
|
468
|
-
{
|
|
469
|
-
removeICFGEdgeWrapper(e);
|
|
470
|
-
}
|
|
471
|
-
removeGNode(node);
|
|
472
|
-
_nodeWrapperNum--;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/// Remove node from nodeID
|
|
476
|
-
inline bool removeICFGNodeWrapper(NodeID id)
|
|
477
|
-
{
|
|
478
|
-
if (hasICFGNodeWrapper(id))
|
|
479
|
-
{
|
|
480
|
-
removeICFGNodeWrapper(getICFGNodeWrapper(id));
|
|
481
|
-
return true;
|
|
482
|
-
}
|
|
483
|
-
return false;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/// Add ICFGEdgeWrapper
|
|
487
|
-
inline bool addICFGEdgeWrapper(ICFGEdgeWrapper *edge)
|
|
488
|
-
{
|
|
489
|
-
bool added1 = edge->getDstNode()->addIncomingEdge(edge);
|
|
490
|
-
bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
|
|
491
|
-
assert(added1 && added2 && "edge not added??");
|
|
492
|
-
_edgeWrapperNum++;
|
|
493
|
-
return true;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
/// Add a ICFGNodeWrapper
|
|
497
|
-
virtual inline void addICFGNodeWrapper(ICFGNodeWrapper *node)
|
|
498
|
-
{
|
|
499
|
-
addGNode(node->getId(), node);
|
|
500
|
-
_nodeWrapperNum++;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
const ICFGNodeWrapper *getFunEntry(const SVFFunction *func) const
|
|
504
|
-
{
|
|
505
|
-
auto it = _funcToFunEntry.find(func);
|
|
506
|
-
assert(it != _funcToFunEntry.end() && "no entry?");
|
|
507
|
-
return it->second;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
const ICFGNodeWrapper *getFunExit(const SVFFunction *func) const
|
|
511
|
-
{
|
|
512
|
-
auto it = _funcToFunExit.find(func);
|
|
513
|
-
assert(it != _funcToFunExit.end() && "no exit?");
|
|
514
|
-
return it->second;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/// Add ICFGEdgeWrappers from nodeid pair
|
|
518
|
-
void addICFGNodeWrapperFromICFGNode(const ICFGNode *src);
|
|
519
|
-
|
|
520
|
-
inline u32_t getNodeWrapperNum() const
|
|
521
|
-
{
|
|
522
|
-
return _nodeWrapperNum;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
inline u32_t getEdgeWrapperNum() const
|
|
526
|
-
{
|
|
527
|
-
return _edgeWrapperNum;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
class ICFGWrapperBuilder
|
|
533
|
-
{
|
|
534
|
-
public:
|
|
535
|
-
ICFGWrapperBuilder() {}
|
|
536
|
-
|
|
537
|
-
~ICFGWrapperBuilder() {}
|
|
538
|
-
|
|
539
|
-
void build(ICFG *icfg);
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
namespace SVF
|
|
544
|
-
{
|
|
545
|
-
/* !
|
|
546
|
-
* GenericGraphTraits specializations for generic graph algorithms.
|
|
547
|
-
* Provide graph traits for traversing from a constraint node using standard graph ICFGTraversals.
|
|
548
|
-
*/
|
|
549
|
-
template<>
|
|
550
|
-
struct GenericGraphTraits<SVF::ICFGNodeWrapper *>
|
|
551
|
-
: public GenericGraphTraits<SVF::GenericNode<SVF::ICFGNodeWrapper, SVF::ICFGEdgeWrapper> *>
|
|
552
|
-
{
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
/// Inverse GenericGraphTraits specializations for call graph node, it is used for inverse ICFGTraversal.
|
|
556
|
-
template<>
|
|
557
|
-
struct GenericGraphTraits<Inverse<SVF::ICFGNodeWrapper *> > : public GenericGraphTraits<
|
|
558
|
-
Inverse<SVF::GenericNode<SVF::ICFGNodeWrapper, SVF::ICFGEdgeWrapper> *> >
|
|
559
|
-
{
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
template<>
|
|
563
|
-
struct GenericGraphTraits<SVF::ICFGWrapper *>
|
|
564
|
-
: public GenericGraphTraits<SVF::GenericGraph<SVF::ICFGNodeWrapper, SVF::ICFGEdgeWrapper> *>
|
|
565
|
-
{
|
|
566
|
-
typedef SVF::ICFGNodeWrapper *NodeRef;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
template<>
|
|
570
|
-
struct DOTGraphTraits<SVF::ICFGWrapper *> : public DOTGraphTraits<SVF::SVFIR *>
|
|
571
|
-
{
|
|
572
|
-
|
|
573
|
-
typedef SVF::ICFGNodeWrapper NodeType;
|
|
574
|
-
|
|
575
|
-
DOTGraphTraits(bool isSimple = false) :
|
|
576
|
-
DOTGraphTraits<SVF::SVFIR *>(isSimple)
|
|
577
|
-
{
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/// Return name of the graph
|
|
581
|
-
static std::string getGraphName(SVF::ICFGWrapper *)
|
|
582
|
-
{
|
|
583
|
-
return "ICFGWrapper";
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
static bool isNodeHidden(NodeType *node, SVF::ICFGWrapper *graph)
|
|
587
|
-
{
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
std::string getNodeLabel(NodeType *node, SVF::ICFGWrapper *graph)
|
|
592
|
-
{
|
|
593
|
-
return getSimpleNodeLabel(node, graph);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/// Return the label of an ICFG node
|
|
597
|
-
static std::string getSimpleNodeLabel(NodeType *node, SVF::ICFGWrapper *)
|
|
598
|
-
{
|
|
599
|
-
std::string str;
|
|
600
|
-
std::stringstream rawstr(str);
|
|
601
|
-
rawstr << "NodeID: " << node->getId() << "\n";
|
|
602
|
-
if (const SVF::IntraICFGNode *bNode = SVF::SVFUtil::dyn_cast<SVF::IntraICFGNode>(node->getICFGNode()))
|
|
603
|
-
{
|
|
604
|
-
rawstr << "IntraICFGNode ID: " << bNode->getId() << " \t";
|
|
605
|
-
SVF::SVFIR::SVFStmtList &edges = SVF::SVFIR::getPAG()->getSVFStmtList(bNode);
|
|
606
|
-
if (edges.empty())
|
|
607
|
-
{
|
|
608
|
-
rawstr << bNode->getInst()->toString() << " \t";
|
|
609
|
-
}
|
|
610
|
-
else
|
|
611
|
-
{
|
|
612
|
-
for (SVF::SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)
|
|
613
|
-
{
|
|
614
|
-
const SVF::PAGEdge *edge = *it;
|
|
615
|
-
rawstr << edge->toString();
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
rawstr << " {fun: " << bNode->getFun()->getName() << "}";
|
|
619
|
-
}
|
|
620
|
-
else if (const SVF::FunEntryICFGNode *entry = SVF::SVFUtil::dyn_cast<SVF::FunEntryICFGNode>(
|
|
621
|
-
node->getICFGNode()))
|
|
622
|
-
{
|
|
623
|
-
rawstr << entry->toString();
|
|
624
|
-
}
|
|
625
|
-
else if (const SVF::FunExitICFGNode *exit = SVF::SVFUtil::dyn_cast<SVF::FunExitICFGNode>(
|
|
626
|
-
node->getICFGNode()))
|
|
627
|
-
{
|
|
628
|
-
rawstr << exit->toString();
|
|
629
|
-
}
|
|
630
|
-
else if (const SVF::CallICFGNode *call = SVF::SVFUtil::dyn_cast<SVF::CallICFGNode>(node->getICFGNode()))
|
|
631
|
-
{
|
|
632
|
-
rawstr << call->toString();
|
|
633
|
-
}
|
|
634
|
-
else if (const SVF::RetICFGNode *ret = SVF::SVFUtil::dyn_cast<SVF::RetICFGNode>(node->getICFGNode()))
|
|
635
|
-
{
|
|
636
|
-
rawstr << ret->toString();
|
|
637
|
-
}
|
|
638
|
-
else if (const SVF::GlobalICFGNode *glob = SVF::SVFUtil::dyn_cast<SVF::GlobalICFGNode>(
|
|
639
|
-
node->getICFGNode()))
|
|
640
|
-
{
|
|
641
|
-
SVF::SVFIR::SVFStmtList &edges = SVF::SVFIR::getPAG()->getSVFStmtList(glob);
|
|
642
|
-
for (SVF::SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)
|
|
643
|
-
{
|
|
644
|
-
const SVF::PAGEdge *edge = *it;
|
|
645
|
-
rawstr << edge->toString();
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
else
|
|
649
|
-
assert(false && "what else kinds of nodes do we have??");
|
|
650
|
-
|
|
651
|
-
return rawstr.str();
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
static std::string getNodeAttributes(NodeType *node, SVF::ICFGWrapper *)
|
|
655
|
-
{
|
|
656
|
-
std::string str;
|
|
657
|
-
std::stringstream rawstr(str);
|
|
658
|
-
|
|
659
|
-
if (SVF::SVFUtil::isa<SVF::IntraICFGNode>(node->getICFGNode()))
|
|
660
|
-
{
|
|
661
|
-
rawstr << "color=black";
|
|
662
|
-
}
|
|
663
|
-
else if (SVF::SVFUtil::isa<SVF::FunEntryICFGNode>(node->getICFGNode()))
|
|
664
|
-
{
|
|
665
|
-
rawstr << "color=yellow";
|
|
666
|
-
}
|
|
667
|
-
else if (SVF::SVFUtil::isa<SVF::FunExitICFGNode>(node->getICFGNode()))
|
|
668
|
-
{
|
|
669
|
-
rawstr << "color=green";
|
|
670
|
-
}
|
|
671
|
-
else if (SVF::SVFUtil::isa<SVF::CallICFGNode>(node->getICFGNode()))
|
|
672
|
-
{
|
|
673
|
-
rawstr << "color=red";
|
|
674
|
-
}
|
|
675
|
-
else if (SVF::SVFUtil::isa<SVF::RetICFGNode>(node->getICFGNode()))
|
|
676
|
-
{
|
|
677
|
-
rawstr << "color=blue";
|
|
678
|
-
}
|
|
679
|
-
else if (SVF::SVFUtil::isa<SVF::GlobalICFGNode>(node->getICFGNode()))
|
|
680
|
-
{
|
|
681
|
-
rawstr << "color=purple";
|
|
682
|
-
}
|
|
683
|
-
else
|
|
684
|
-
assert(false && "no such kind of node!!");
|
|
685
|
-
|
|
686
|
-
rawstr << "";
|
|
687
|
-
|
|
688
|
-
return rawstr.str();
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
template<class EdgeIter>
|
|
692
|
-
static std::string getEdgeAttributes(NodeType *, EdgeIter EI, SVF::ICFGWrapper *)
|
|
693
|
-
{
|
|
694
|
-
SVF::ICFGEdgeWrapper *edge = *(EI.getCurrent());
|
|
695
|
-
assert(edge && "No edge found!!");
|
|
696
|
-
if (!edge->getICFGEdge())
|
|
697
|
-
return "style=solid";
|
|
698
|
-
if (SVF::SVFUtil::isa<SVF::CallCFGEdge>(edge->getICFGEdge()))
|
|
699
|
-
return "style=solid,color=red";
|
|
700
|
-
else if (SVF::SVFUtil::isa<SVF::RetCFGEdge>(edge->getICFGEdge()))
|
|
701
|
-
return "style=solid,color=blue";
|
|
702
|
-
else
|
|
703
|
-
return "style=solid";
|
|
704
|
-
return "";
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
template<class EdgeIter>
|
|
708
|
-
static std::string getEdgeSourceLabel(NodeType *, EdgeIter EI)
|
|
709
|
-
{
|
|
710
|
-
SVF::ICFGEdgeWrapper *edge = *(EI.getCurrent());
|
|
711
|
-
assert(edge && "No edge found!!");
|
|
712
|
-
|
|
713
|
-
std::string str;
|
|
714
|
-
std::stringstream rawstr(str);
|
|
715
|
-
if (!edge->getICFGEdge())
|
|
716
|
-
return rawstr.str();
|
|
717
|
-
if (SVF::CallCFGEdge *dirCall = SVF::SVFUtil::dyn_cast<SVF::CallCFGEdge>(edge->getICFGEdge()))
|
|
718
|
-
rawstr << dirCall->getCallSite();
|
|
719
|
-
else if (SVF::RetCFGEdge *dirRet = SVF::SVFUtil::dyn_cast<SVF::RetCFGEdge>(edge->getICFGEdge()))
|
|
720
|
-
rawstr << dirRet->getCallSite();
|
|
721
|
-
|
|
722
|
-
return rawstr.str();
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
} // End namespace SVF
|
|
727
|
-
|
|
728
|
-
#endif //SVF_ICFGWRAPPER_H
|