svf-tools 1.0.577 → 1.0.579
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/CFLAlias_8cpp.html +0 -1
- package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +10 -42
- package/SVF-doxygen/html/html/CFLAlias_8h.html +1 -8
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +22 -49
- package/SVF-doxygen/html/html/CFLBase_8cpp.html +89 -0
- package/SVF-doxygen/html/html/CFLBase_8cpp_source.html +119 -0
- package/SVF-doxygen/html/html/CFLBase_8h.html +104 -0
- package/SVF-doxygen/html/html/CFLBase_8h_source.html +117 -0
- package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/CFLGraph_8h_source.html +5 -4
- package/SVF-doxygen/html/html/CFLStat_8cpp_source.html +17 -58
- package/SVF-doxygen/html/html/CFLStat_8h.html +1 -0
- package/SVF-doxygen/html/html/CFLStat_8h_source.html +12 -22
- package/SVF-doxygen/html/html/CFLVF_8cpp.html +0 -2
- package/SVF-doxygen/html/html/CFLVF_8cpp_source.html +4 -15
- package/SVF-doxygen/html/html/CFLVF_8h.html +3 -8
- package/SVF-doxygen/html/html/CFLVF_8h_source.html +11 -26
- 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/ConsGNode_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
- 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/GEPTypeBridgeIterator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +1 -1
- 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/PTACallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8h_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/TCT_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8h_source.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 +271 -270
- package/SVF-doxygen/html/html/cfl_8cpp.html +6 -9
- package/SVF-doxygen/html/html/cfl_8cpp_source.html +6 -8
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +9 -8
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +120 -121
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +212 -713
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase-members.html +270 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase.html +1199 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +33 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFLStat-members.html +21 -31
- package/SVF-doxygen/html/html/classSVF_1_1CFLStat.html +62 -358
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF-members.html +94 -80
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF.html +207 -287
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF.png +0 -0
- 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_1GenericNode.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +12 -11
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1SVFStat.html +1 -1
- package/SVF-doxygen/html/html/classes.html +96 -95
- 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/dir_ae8aa099e368efaa962140c6624142bc.html +2 -0
- package/SVF-doxygen/html/html/files.html +15 -13
- package/SVF-doxygen/html/html/functions.html +0 -8
- package/SVF-doxygen/html/html/functions_0x7e.html +2 -5
- package/SVF-doxygen/html/html/functions_a.html +9 -11
- package/SVF-doxygen/html/html/functions_b.html +11 -4
- package/SVF-doxygen/html/html/functions_c.html +33 -32
- package/SVF-doxygen/html/html/functions_f.html +16 -14
- package/SVF-doxygen/html/html/functions_func.html +6 -7
- package/SVF-doxygen/html/html/functions_func_0x7e.html +2 -5
- package/SVF-doxygen/html/html/functions_func_b.html +7 -0
- package/SVF-doxygen/html/html/functions_func_c.html +31 -23
- package/SVF-doxygen/html/html/functions_func_f.html +3 -1
- package/SVF-doxygen/html/html/functions_func_g.html +14 -11
- package/SVF-doxygen/html/html/functions_func_i.html +9 -7
- package/SVF-doxygen/html/html/functions_func_n.html +3 -0
- package/SVF-doxygen/html/html/functions_func_p.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +14 -13
- package/SVF-doxygen/html/html/functions_g.html +19 -15
- package/SVF-doxygen/html/html/functions_i.html +16 -14
- package/SVF-doxygen/html/html/functions_l.html +6 -6
- package/SVF-doxygen/html/html/functions_m.html +1 -2
- package/SVF-doxygen/html/html/functions_n.html +15 -8
- package/SVF-doxygen/html/html/functions_p.html +10 -10
- package/SVF-doxygen/html/html/functions_r.html +1 -1
- package/SVF-doxygen/html/html/functions_s.html +22 -21
- package/SVF-doxygen/html/html/functions_t.html +17 -13
- package/SVF-doxygen/html/html/functions_type_c.html +0 -1
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars.html +0 -8
- package/SVF-doxygen/html/html/functions_vars_a.html +0 -1
- package/SVF-doxygen/html/html/functions_vars_c.html +0 -2
- package/SVF-doxygen/html/html/functions_vars_g.html +5 -4
- package/SVF-doxygen/html/html/functions_vars_m.html +0 -1
- package/SVF-doxygen/html/html/functions_vars_n.html +12 -8
- package/SVF-doxygen/html/html/functions_vars_p.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_s.html +2 -4
- package/SVF-doxygen/html/html/functions_vars_t.html +12 -6
- package/SVF-doxygen/html/html/hierarchy.html +58 -57
- package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF.html +3 -0
- package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/search/all_0.js +8 -8
- package/SVF-doxygen/html/html/search/all_1.js +2 -2
- package/SVF-doxygen/html/html/search/all_10.js +6 -6
- package/SVF-doxygen/html/html/search/all_11.js +1 -1
- package/SVF-doxygen/html/html/search/all_12.js +11 -11
- package/SVF-doxygen/html/html/search/all_13.js +16 -12
- package/SVF-doxygen/html/html/search/all_15.js +3 -3
- package/SVF-doxygen/html/html/search/all_16.js +1 -1
- package/SVF-doxygen/html/html/search/all_19.js +1 -2
- package/SVF-doxygen/html/html/search/all_2.js +2 -0
- package/SVF-doxygen/html/html/search/all_3.js +12 -7
- package/SVF-doxygen/html/html/search/all_6.js +4 -4
- package/SVF-doxygen/html/html/search/all_7.js +5 -4
- package/SVF-doxygen/html/html/search/all_9.js +4 -4
- package/SVF-doxygen/html/html/search/all_b.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +4 -4
- package/SVF-doxygen/html/html/search/all_d.js +1 -1
- package/SVF-doxygen/html/html/search/all_e.js +14 -9
- package/SVF-doxygen/html/html/search/classes_2.js +1 -0
- package/SVF-doxygen/html/html/search/files_2.js +2 -0
- package/SVF-doxygen/html/html/search/functions_0.js +1 -1
- package/SVF-doxygen/html/html/search/functions_1.js +2 -0
- package/SVF-doxygen/html/html/search/functions_11.js +3 -3
- package/SVF-doxygen/html/html/search/functions_17.js +1 -2
- package/SVF-doxygen/html/html/search/functions_2.js +5 -2
- package/SVF-doxygen/html/html/search/functions_5.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +2 -1
- package/SVF-doxygen/html/html/search/functions_8.js +1 -1
- package/SVF-doxygen/html/html/search/functions_d.js +1 -0
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_2.js +1 -1
- package/SVF-doxygen/html/html/search/variables_0.js +8 -8
- package/SVF-doxygen/html/html/search/variables_1.js +1 -1
- package/SVF-doxygen/html/html/search/variables_10.js +1 -1
- package/SVF-doxygen/html/html/search/variables_12.js +2 -2
- package/SVF-doxygen/html/html/search/variables_13.js +13 -9
- package/SVF-doxygen/html/html/search/variables_3.js +2 -2
- package/SVF-doxygen/html/html/search/variables_7.js +3 -2
- package/SVF-doxygen/html/html/search/variables_9.js +1 -1
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +12 -8
- 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/CFLAlias.h +12 -51
- package/include/CFL/CFLBase.h +110 -0
- package/include/CFL/CFLStat.h +7 -18
- package/include/CFL/CFLVF.h +13 -25
- package/include/Graphs/CFLGraph.h +5 -0
- package/lib/CFL/CFLAlias.cpp +33 -66
- package/lib/CFL/CFLBase.cpp +133 -0
- package/lib/CFL/CFLStat.cpp +22 -149
- package/lib/CFL/CFLVF.cpp +28 -38
- package/package.json +1 -1
- package/tools/CFL/cfl.cpp +12 -25
|
@@ -24,8 +24,9 @@ var searchData=
|
|
|
24
24
|
['globs',['globs',['../classSVF_1_1SaberSVFGBuilder.html#a967dba864a6032e448222525aedb1f2a',1,'SVF::SaberSVFGBuilder']]],
|
|
25
25
|
['globsvfgnodes',['globSVFGNodes',['../classSVF_1_1SaberSVFGBuilder.html#a9431a9dcbcf88b78e721b0347046e997',1,'SVF::SaberSVFGBuilder']]],
|
|
26
26
|
['globsvfstmtset',['globSVFStmtSet',['../classSVF_1_1SVFIR.html#a71b51492b00e66e36266b9a76a842323',1,'SVF::SVFIR']]],
|
|
27
|
-
['grammar',['grammar',['../
|
|
27
|
+
['grammar',['grammar',['../classSVF_1_1CFLBase.html#af7b0e90b8f8998ab6cf4e05155c7a503',1,'SVF::CFLBase::grammar()'],['../classSVF_1_1CFLSolver.html#aad88cf557ec43127de859b765505df49',1,'SVF::CFLSolver::grammar()'],['../classSVF_1_1GrammarBuilder.html#a7b81810150ce896801e4e6a831ab98aa',1,'SVF::GrammarBuilder::grammar()']]],
|
|
28
|
+
['grammarbase',['grammarBase',['../classSVF_1_1CFLBase.html#aef3da4ce970597586757cafd2a435c1f',1,'SVF::CFLBase']]],
|
|
28
29
|
['grammarfilename',['GrammarFilename',['../classSVF_1_1Options.html#aa929e2ae2c0a78181c3a1311bfe73596',1,'SVF::Options']]],
|
|
29
|
-
['graph',['graph',['../
|
|
30
|
+
['graph',['graph',['../classSVF_1_1CFLBase.html#a8101683062b9a71c0b2309cbdfb7b26f',1,'SVF::CFLBase::graph()'],['../classSVF_1_1CFLSolver.html#aedd6c605c4c381c738f4c6682c40d9f2',1,'SVF::CFLSolver::graph()'],['../classSVF_1_1SVFGStat.html#a3d06ead4c3222ce8a0535d9f3d504c3d',1,'SVF::SVFGStat::graph()']]],
|
|
30
31
|
['graphtxt',['Graphtxt',['../classSVF_1_1Options.html#aa5c4bc8e55a056adcd7a6f8946ad5f38',1,'SVF::Options']]]
|
|
31
32
|
];
|
|
@@ -8,7 +8,7 @@ var searchData=
|
|
|
8
8
|
['icfgnode2svfstmtsmap',['icfgNode2SVFStmtsMap',['../classSVF_1_1SVFIR.html#a86c0c23d854b034d741d9d8891debab7',1,'SVF::SVFIR']]],
|
|
9
9
|
['icfgnodes',['icfgNodes',['../classSVF_1_1SVFLoop.html#a062e4b336b9b8315a9fc1107c9cab840',1,'SVF::SVFLoop']]],
|
|
10
10
|
['icfgnodetosvfloopvec',['icfgNodeToSVFLoopVec',['../classSVF_1_1ICFG.html#a7d6aeecb00d77600a204a72d60023d54',1,'SVF::ICFG']]],
|
|
11
|
-
['id',['
|
|
11
|
+
['id',['ID',['../classSVF_1_1DDAPass.html#adb39fc24e3d45e558ac36f37b5dc3565',1,'SVF::DDAPass::ID()'],['../classSVF_1_1MTA.html#a5ce0b3247bd412e5267a42be0646471b',1,'SVF::MTA::ID()'],['../classSVF_1_1BreakConstantGEPs.html#a8010c4f5824ed5ebcb7ae283473ada22',1,'SVF::BreakConstantGEPs::ID()'],['../classSVF_1_1MergeFunctionRets.html#a7a763ae6c9d3c72345495f01b0b4b458',1,'SVF::MergeFunctionRets::ID()'],['../classSVF_1_1IteratedDominanceFrontier.html#aaae6f876063759941ac236f17a80cea2',1,'SVF::IteratedDominanceFrontier::ID()'],['../classSVF_1_1WPAPass.html#a2674527c92cdef223e655d449f0811d4',1,'SVF::WPAPass::ID()'],['../classSVF_1_1GenericNode.html#aaa53457604fe4cf4cb97ca85d33907b0',1,'SVF::GenericNode::id()']]],
|
|
12
12
|
['idcounter',['idCounter',['../classSVF_1_1PersistentPointsToCache.html#ad8d24772f7503e0e735f546506d2bcc5',1,'SVF::PersistentPointsToCache']]],
|
|
13
13
|
['idtocsmap',['idToCSMap',['../classSVF_1_1PTACallGraph.html#a5d6f63baad19589a9fd1e069631e18fa',1,'SVF::PTACallGraph']]],
|
|
14
14
|
['idtonodemap',['IDToNodeMap',['../classSVF_1_1GenericGraph.html#a47a1ef8b67b0c92f78b4457dc3bbfe71',1,'SVF::GenericGraph']]],
|
|
@@ -20,7 +20,7 @@ var searchData=
|
|
|
20
20
|
['maxoffsetlimit',['maxOffsetLimit',['../classSVF_1_1ObjTypeInfo.html#a5ff63eb0654acd152f7d6c18618ee94a',1,'SVF::ObjTypeInfo']]],
|
|
21
21
|
['maxoutdegree',['maxOutDegree',['../classSVF_1_1SVFGStat.html#a6694ace7ee1b24b0c5ce42e06e4db2cf',1,'SVF::SVFGStat']]],
|
|
22
22
|
['maxpathlen',['MaxPathLen',['../classSVF_1_1Options.html#a32ef95b3bd06b50337b3129b74ffb45c',1,'SVF::Options']]],
|
|
23
|
-
['maxpointstosetsize',['MaxPointsToSetSize',['../
|
|
23
|
+
['maxpointstosetsize',['MaxPointsToSetSize',['../classSVF_1_1AndersenBase.html#abd73e930450b7c605f478672bdf9bdae',1,'SVF::AndersenBase']]],
|
|
24
24
|
['maxsccsize',['maxSCCSize',['../classSVF_1_1FlowSensitive.html#aa3d4703756a6297ab5c0756172024fe4',1,'SVF::FlowSensitive']]],
|
|
25
25
|
['maxstepinwrapper',['MaxStepInWrapper',['../classSVF_1_1Options.html#a0b82f16ee0c7e6566a6ae20662525e84',1,'SVF::Options']]],
|
|
26
26
|
['maxstruct',['maxStruct',['../classSVF_1_1SymbolTableInfo.html#a4e33a01e203f07a8154af6ee65f5ba46',1,'SVF::SymbolTableInfo']]],
|
|
@@ -58,7 +58,7 @@ var searchData=
|
|
|
58
58
|
['numofentrychi',['NumOfEntryChi',['../classSVF_1_1MemSSAStat.html#ad96437d0c28f8088c711a718d2f2730e',1,'SVF::MemSSAStat']]],
|
|
59
59
|
['numofentrynodes',['numOfEntryNodes',['../classSVF_1_1ICFGStat.html#ad37793e64fe58a8faba201c18d876685',1,'SVF::ICFGStat']]],
|
|
60
60
|
['numofexitnodes',['numOfExitNodes',['../classSVF_1_1ICFGStat.html#ad7e00680fb8ca31afbd166f9a4adc5ec',1,'SVF::ICFGStat']]],
|
|
61
|
-
['numoffieldexpand',['numOfFieldExpand',['../
|
|
61
|
+
['numoffieldexpand',['numOfFieldExpand',['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase']]],
|
|
62
62
|
['numofflattenelements',['numOfFlattenElements',['../classSVF_1_1StInfo.html#a7aa5b5018b4dec4913eb6aecf25568a4',1,'SVF::StInfo']]],
|
|
63
63
|
['numofflattenfields',['numOfFlattenFields',['../classSVF_1_1StInfo.html#aa9b4e659f4a4421aadf736a3de24ca50',1,'SVF::StInfo']]],
|
|
64
64
|
['numofformalin',['numOfFormalIn',['../classSVF_1_1SVFGStat.html#abc5e079242666bb55ec7dbc7f258b3db',1,'SVF::SVFGStat']]],
|
|
@@ -86,16 +86,17 @@ var searchData=
|
|
|
86
86
|
['numofnodesinscc',['numOfNodesInSCC',['../classSVF_1_1FlowSensitive.html#a9f3fe97202db8170fa9f47c5684bce75',1,'SVF::FlowSensitive']]],
|
|
87
87
|
['numofnonlocalld',['numOfNonLocalLd',['../classSVF_1_1MTAAnnotator.html#ad53ac0cec797f84d3bc14bdb6bab1ab3',1,'SVF::MTAAnnotator']]],
|
|
88
88
|
['numofnonlocalst',['numOfNonLocalSt',['../classSVF_1_1MTAAnnotator.html#a3c07f9964623b3895b1bab59a63dccfb',1,'SVF::MTAAnnotator']]],
|
|
89
|
+
['numofnonterminaledges',['numOfNonterminalEdges',['../classSVF_1_1CFLBase.html#a4c03b83cb2a3c0c166d96550d6771a1b',1,'SVF::CFLBase']]],
|
|
89
90
|
['numofphi',['numOfPhi',['../classSVF_1_1SVFGStat.html#a0e1fcb9154aad266406c4da4861ba020',1,'SVF::SVFGStat']]],
|
|
90
91
|
['numofprocessedactualparam',['numOfProcessedActualParam',['../classSVF_1_1FlowSensitive.html#abdc30e45347579986c42795a436a1251',1,'SVF::FlowSensitive']]],
|
|
91
|
-
['numofprocessedaddr',['numOfProcessedAddr',['../
|
|
92
|
-
['numofprocessedcopy',['numOfProcessedCopy',['../
|
|
92
|
+
['numofprocessedaddr',['numOfProcessedAddr',['../classSVF_1_1AndersenBase.html#a4acad18a6eb585ba9e3d2276dd591067',1,'SVF::AndersenBase::numOfProcessedAddr()'],['../classSVF_1_1FlowSensitive.html#ae4253bc632ffffe2498263c90f456ca7',1,'SVF::FlowSensitive::numOfProcessedAddr()']]],
|
|
93
|
+
['numofprocessedcopy',['numOfProcessedCopy',['../classSVF_1_1AndersenBase.html#a04acd871bd1b98cd9e83e395334ac130',1,'SVF::AndersenBase::numOfProcessedCopy()'],['../classSVF_1_1FlowSensitive.html#a19e017f3ed6429fa30687018e64dae54',1,'SVF::FlowSensitive::numOfProcessedCopy()']]],
|
|
93
94
|
['numofprocessedformalret',['numOfProcessedFormalRet',['../classSVF_1_1FlowSensitive.html#ae048cc5350cf2b075c05f5d84777a3c5',1,'SVF::FlowSensitive']]],
|
|
94
|
-
['numofprocessedgep',['numOfProcessedGep',['../
|
|
95
|
-
['numofprocessedload',['numOfProcessedLoad',['../
|
|
95
|
+
['numofprocessedgep',['numOfProcessedGep',['../classSVF_1_1AndersenBase.html#aa1246b392aeae1fd10c8a9ebedcc2dd9',1,'SVF::AndersenBase::numOfProcessedGep()'],['../classSVF_1_1FlowSensitive.html#a88a111b6bc347d6562db7af8bd8f2f0e',1,'SVF::FlowSensitive::numOfProcessedGep()']]],
|
|
96
|
+
['numofprocessedload',['numOfProcessedLoad',['../classSVF_1_1AndersenBase.html#a69aae96fc1c99bf108075e5061f50f9e',1,'SVF::AndersenBase::numOfProcessedLoad()'],['../classSVF_1_1FlowSensitive.html#a0e1a0bdbf4f81a3600ac26ac011ac268',1,'SVF::FlowSensitive::numOfProcessedLoad()']]],
|
|
96
97
|
['numofprocessedmssanode',['numOfProcessedMSSANode',['../classSVF_1_1FlowSensitive.html#af71a5ae3aef022c569e89f40515072cf',1,'SVF::FlowSensitive']]],
|
|
97
98
|
['numofprocessedphi',['numOfProcessedPhi',['../classSVF_1_1FlowSensitive.html#ac39abcb40e4b568ab59b7cf48ed10f70',1,'SVF::FlowSensitive']]],
|
|
98
|
-
['numofprocessedstore',['numOfProcessedStore',['../
|
|
99
|
+
['numofprocessedstore',['numOfProcessedStore',['../classSVF_1_1AndersenBase.html#a2b763519509ce21cf40893c01f8357b6',1,'SVF::AndersenBase::numOfProcessedStore()'],['../classSVF_1_1FlowSensitive.html#a669e8f1dd8572b7dcff373c9787a923d',1,'SVF::FlowSensitive::numOfProcessedStore()']]],
|
|
99
100
|
['numofremovedpts',['numOfRemovedPTS',['../classSVF_1_1MTASVFGBuilder.html#a07c3f5fa2e0092dac28521cf901a26cf',1,'SVF::MTASVFGBuilder']]],
|
|
100
101
|
['numofremovedsvfgedges',['numOfRemovedSVFGEdges',['../classSVF_1_1MTASVFGBuilder.html#a0319d1d2e78c79f9943f2e2f65da26ed',1,'SVF::MTASVFGBuilder']]],
|
|
101
102
|
['numofresolvedindcalledge',['numOfResolvedIndCallEdge',['../classSVF_1_1PTACallGraph.html#adf05313ea8bcc7973acebd3fbcd75c92',1,'SVF::PTACallGraph']]],
|
|
@@ -103,11 +104,14 @@ var searchData=
|
|
|
103
104
|
['numofretmu',['NumOfRetMu',['../classSVF_1_1MemSSAStat.html#a1459465f0a76c09b5dd7d777467ac2e4',1,'SVF::MemSSAStat']]],
|
|
104
105
|
['numofretnodes',['numOfRetNodes',['../classSVF_1_1ICFGStat.html#ac9bfce40c058ed7ab178fe1f1818e9de',1,'SVF::ICFGStat']]],
|
|
105
106
|
['numofscc',['numOfSCC',['../classSVF_1_1FlowSensitive.html#a0ac955bf06261eec1c6bb78ec99652e3',1,'SVF::FlowSensitive']]],
|
|
106
|
-
['numofsccdetection',['numOfSCCDetection',['../
|
|
107
|
-
['numofsfrs',['numOfSfrs',['../
|
|
107
|
+
['numofsccdetection',['numOfSCCDetection',['../classSVF_1_1AndersenBase.html#a0d7298cbf83568f24fd2bd1926a32968',1,'SVF::AndersenBase']]],
|
|
108
|
+
['numofsfrs',['numOfSfrs',['../classSVF_1_1AndersenBase.html#a25b00d9ca71cbdd27530fc5d0dc84ee5',1,'SVF::AndersenBase']]],
|
|
109
|
+
['numofstartedges',['numOfStartEdges',['../classSVF_1_1CFLBase.html#a25a593cb2a855a93d3593efba382a58c',1,'SVF::CFLBase']]],
|
|
108
110
|
['numofstore',['numOfStore',['../classSVF_1_1SVFGStat.html#a4d15f2de3f226c26cb2af57176444ec9',1,'SVF::SVFGStat']]],
|
|
109
111
|
['numofstorechi',['NumOfStoreChi',['../classSVF_1_1MemSSAStat.html#a810965c025da84c58575c8066bc84056',1,'SVF::MemSSAStat']]],
|
|
110
112
|
['numofstorehaschi',['NumOfStoreHasChi',['../classSVF_1_1MemSSAStat.html#a3bc14307bd0f986cbd8ba5970f1abf0f',1,'SVF::MemSSAStat']]],
|
|
113
|
+
['numoftemporarynonterminaledges',['numOfTemporaryNonterminalEdges',['../classSVF_1_1CFLBase.html#ac3b408acb295e2c319e3542539e6df47',1,'SVF::CFLBase']]],
|
|
114
|
+
['numofterminaledges',['numOfTerminalEdges',['../classSVF_1_1CFLBase.html#abc5502f15583f0546bbc2a678d2f2ed9',1,'SVF::CFLBase']]],
|
|
111
115
|
['numoftotalqueries',['numOfTotalQueries',['../classSVF_1_1LockAnalysis.html#ad648ad9cda4070f9aec1addef0067627',1,'SVF::LockAnalysis::numOfTotalQueries()'],['../classSVF_1_1MHP.html#a26ae18993915d76b704232cded9811c2',1,'SVF::MHP::numOfTotalQueries()']]],
|
|
112
116
|
['numperquerystatmap',['NumPerQueryStatMap',['../classSVF_1_1DDAStat.html#a7dabcdacf00844415bd23ca241d885e9',1,'SVF::DDAStat']]],
|
|
113
117
|
['numprelabelednodes',['numPrelabeledNodes',['../classSVF_1_1VersionedFlowSensitive.html#aff5029fca933376be1fa374bec790da6',1,'SVF::VersionedFlowSensitive']]],
|
|
@@ -85,7 +85,7 @@ struct llvm::GraphTraits< Inverse< SVF::CFLNode * > ></h3>
|
|
|
85
85
|
|
|
86
86
|
<p>Inverse GraphTraits specializations for call graph node, it is used for inverse traversal. </p>
|
|
87
87
|
|
|
88
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
88
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00135">135</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
89
89
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
90
90
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a></li>
|
|
91
91
|
</ul>
|
|
@@ -90,7 +90,7 @@ Public Types</h2></td></tr>
|
|
|
90
90
|
struct llvm::GraphTraits< SVF::CFLGraph * ></h3>
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
93
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00139">139</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
94
94
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
95
95
|
<a id="a6f880b27ee400d73347d77abb7a80f3d"></a>
|
|
96
96
|
<h2 class="memtitle"><span class="permalink"><a href="#a6f880b27ee400d73347d77abb7a80f3d">◆ </a></span>NodeRef</h2>
|
|
@@ -104,7 +104,7 @@ struct llvm::GraphTraits< SVF::CFLGraph * ></h3>
|
|
|
104
104
|
</table>
|
|
105
105
|
</div><div class="memdoc">
|
|
106
106
|
|
|
107
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
107
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00141">141</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
108
108
|
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
@@ -81,7 +81,7 @@ Inheritance diagram for llvm::GraphTraits< SVF::CFLNode * >:</div>
|
|
|
81
81
|
struct llvm::GraphTraits< SVF::CFLNode * ></h3>
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
84
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00129">129</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
85
85
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
86
86
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a></li>
|
|
87
87
|
</ul>
|
|
@@ -69,7 +69,7 @@ $(function() {
|
|
|
69
69
|
<a href="svf-ex_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">//===- svf-ex.cpp -- A driver example of SVF-------------------------------------//</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-> <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"> // A driver program of SVF including usages of SVF APIs</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"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="SVFG_8h.html">Graphs/SVFG.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="Andersen_8h.html">WPA/Andersen.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="SVFIRBuilder_8h.html">SVF-FE/SVFIRBuilder.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="svf-ex_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</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="svf-ex_8cpp.html#a5fe2142b121150867c08ee9bd8f65940"> 45</a></span> <a class="code" href="namespaceSVF.html#a61c01e2e687ab3a001fb806737583943">SVF::AliasResult</a> <a class="code" href="svf-ex_8cpp.html#a5fe2142b121150867c08ee9bd8f65940">aliasQuery</a>(<a class="code" href="classSVF_1_1PointerAnalysis.html">PointerAnalysis</a>* pta, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* v1, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* v2)</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>  <span class="keywordflow">return</span> pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a6c01f259ad2379a422d7106ce0255eb8">alias</a>(v1,v2);</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> </div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#ae004a620ad67220b6dd8212a2ad625a9"> 53</a></span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="svf-ex_8cpp.html#ae004a620ad67220b6dd8212a2ad625a9">printPts</a>(<a class="code" href="classSVF_1_1PointerAnalysis.html">PointerAnalysis</a>* pta, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* val)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</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>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> pNodeId = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a240219c2dc4f5cc5f85445e18c79b83b">getPAG</a>()-><a class="code" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624">getValueNode</a>(val);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1PointsTo.html">PointsTo</a>& pts = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a4dfb43679e9fa794ebad99b6584c32ec">getPts</a>(pNodeId);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1PointsTo_1_1PointsToIterator.html">PointsTo::iterator</a> ii = pts.<a class="code" href="classSVF_1_1PointsTo.html#aa53962e561399bf493d1f2b9137356f6">begin</a>(), ie = pts.<a class="code" href="classSVF_1_1PointsTo.html#a8f741cdffbf3c5fe0f602cdca677dee6">end</a>();</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  ii != ie; ii++)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  rawstr << <span class="stringliteral">" "</span> << *ii << <span class="stringliteral">" "</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classSVF_1_1SVFVar.html">PAGNode</a>* targetObj = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a240219c2dc4f5cc5f85445e18c79b83b">getPAG</a>()-><a class="code" href="classSVF_1_1GenericGraph.html#a43c9c773bfa17abf481c33073e30d01b">getGNode</a>(*ii);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span>(targetObj-><a class="code" href="classSVF_1_1SVFVar.html#a1ace69053c2c4436fd78d5624bd0086a">hasValue</a>())</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>  rawstr << <span class="stringliteral">"("</span> <<*targetObj-><a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>() << <span class="stringliteral">")\t "</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="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> rawstr.str();</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> }</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> </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#af45b449c07f1c975eea45d40d1cc37f6"> 80</a></span> <span class="keywordtype">void</span> <a class="code" href="svf-ex_8cpp.html#af45b449c07f1c975eea45d40d1cc37f6">traverseOnICFG</a>(<a class="code" href="classSVF_1_1ICFG.html">ICFG</a>* icfg, <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* inst)</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>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* iNode = icfg-><a class="code" href="classSVF_1_1ICFG.html#a5f2c0aaba07d6fdd63058da0fb60ca8b">getICFGNode</a>(inst);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="classSVF_1_1FIFOWorkList.html">FIFOWorkList<const ICFGNode*></a> worklist;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const ICFGNode*></a> visited;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(iNode);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">while</span> (!worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a7056704c224dfb4b57287fe90c004aa8">empty</a>())</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>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* vNode = worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a8fa72918fce7e9c0b2dc34b683a797c6">pop</a>();</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1ICFGNode.html#ac16c5a3227a44d3b9f7c3209156d9df2">ICFGNode::const_iterator</a> it = vNode-><a class="code" href="classSVF_1_1GenericNode.html#aa4f103330118c8976bf95e4bf53416eb">OutEdgeBegin</a>(), eit =</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  vNode-><a class="code" href="classSVF_1_1GenericNode.html#a19a3366fd8a58290d0c740c46c3dcb3d">OutEdgeEnd</a>(); it != eit; ++it)</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>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *it;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* succNode = edge-><a class="code" href="classSVF_1_1GenericEdge.html#aeaa31a2c8479e831b36ce2e2582ceb86">getDstNode</a>();</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">if</span> (visited.find(succNode) == visited.end())</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>  visited.insert(succNode);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(succNode);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</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> }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#a210d797e39e39071d420ba450727d6e4"> 108</a></span> <span class="keywordtype">void</span> <a class="code" href="svf-ex_8cpp.html#a210d797e39e39071d420ba450727d6e4">traverseOnVFG</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFG.html">SVFG</a>* vfg, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* val)</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> {</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="classSVF_1_1SVFIR.html">SVFIR</a>* pag = SVFIR::getPAG();</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>  <a class="code" href="classSVF_1_1SVFVar.html">PAGNode</a>* pNode = pag-><a class="code" href="classSVF_1_1GenericGraph.html#a43c9c773bfa17abf481c33073e30d01b">getGNode</a>(pag-><a class="code" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624">getValueNode</a>(val));</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* vNode = vfg-><a class="code" href="classSVF_1_1SVFG.html#a8e7a945f4266e8dc7dcfff2ad6494bfb">getDefSVFGNode</a>(pNode);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <a class="code" href="classSVF_1_1FIFOWorkList.html">FIFOWorkList<const VFGNode*></a> worklist;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const VFGNode*></a> visited;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(vNode);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">while</span> (!worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a7056704c224dfb4b57287fe90c004aa8">empty</a>())</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>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* vNode = worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a8fa72918fce7e9c0b2dc34b683a797c6">pop</a>();</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1VFGNode.html#a3c558955f60c237c558d8faafed781e8">VFGNode::const_iterator</a> it = vNode-><a class="code" href="classSVF_1_1GenericNode.html#aa4f103330118c8976bf95e4bf53416eb">OutEdgeBegin</a>(), eit =</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  vNode-><a class="code" href="classSVF_1_1GenericNode.html#a19a3366fd8a58290d0c740c46c3dcb3d">OutEdgeEnd</a>(); it != eit; ++it)</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="classSVF_1_1VFGEdge.html">VFGEdge</a>* edge = *it;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* succNode = edge-><a class="code" href="classSVF_1_1GenericEdge.html#aeaa31a2c8479e831b36ce2e2582ceb86">getDstNode</a>();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span> (visited.find(succNode) == visited.end())</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  visited.insert(succNode);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(succNode);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">for</span>(<a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const VFGNode*>::const_iterator</a> it = visited.begin(), eit = visited.end(); it!=eit; ++it)</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// const VFGNode* node = *it;</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"></span> }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 145</a></span> <span class="keywordtype">int</span> <a class="code" href="svf-ex_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</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>  <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</span>)</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1SVFIRBuilder.html">SVFIRBuilder</a> builder;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classSVF_1_1SVFIR.html">SVFIR</a>* pag = builder.<a class="code" href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">build</a>(svfModule);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classSVF_1_1Andersen.html">Andersen</a>* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classSVF_1_1PTACallGraph.html">PTACallGraph</a>* callgraph = ander-><a class="code" href="classSVF_1_1PointerAnalysis.html#a7c9b7e5fe37ae31ba84d167945ca57df">getPTACallGraph</a>();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="classSVF_1_1ICFG.html">ICFG</a>* icfg = pag-><a class="code" href="classSVF_1_1SVFIR.html#aa1943d53e75aef9b014953143c6894da">getICFG</a>();</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  icfg-><a class="code" href="classSVF_1_1ICFG.html#a999956500bbd605326531480546db9ba">dump</a>(<span class="stringliteral">"icfg"</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="classSVF_1_1VFG.html">VFG</a>* vfg = <span class="keyword">new</span> <a class="code" href="classSVF_1_1VFG.html">VFG</a>(callgraph);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classSVF_1_1SVFGBuilder.html">SVFGBuilder</a> svfBuilder(<span class="keyword">true</span>);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="classSVF_1_1SVFG.html">SVFG</a>* svfg = svfBuilder.<a class="code" href="classSVF_1_1SVFGBuilder.html#a54a713e3989597b11cee70864d0197bd">buildFullSVFG</a>(ander);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// clean up memory</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keyword">delete</span> vfg;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keyword">delete</span> svfg;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  AndersenWaveDiff::releaseAndersenWaveDiff();</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  SVFIR::releaseSVFIR();</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  LLVMModuleSet::getLLVMModuleSet()->dumpModulesToFile(<span class="stringliteral">".svf.bc"</span>);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="classSVF_1_1LLVMModuleSet.html#a2f8e91c075d90be66412a079fe73e936">SVF::LLVMModuleSet::releaseLLVMModuleSet</a>();</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  llvm::llvm_shutdown();</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div><div class="ttc" id="Andersen_8h_html"><div class="ttname"><a href="Andersen_8h.html">Andersen.h</a></div></div>
|
|
70
70
|
<div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00044">ICFGEdge.h:44</a></div></div>
|
|
71
71
|
<div class="ttc" id="classSVF_1_1VFG_html"><div class="ttname"><a href="classSVF_1_1VFG.html">SVF::VFG</a></div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00050">VFG.h:50</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#l00123">CFLGraph.h:123</a></div></div>
|
|
73
73
|
<div class="ttc" id="classSVF_1_1PointerAnalysis_html_a4dfb43679e9fa794ebad99b6584c32ec"><div class="ttname"><a href="classSVF_1_1PointerAnalysis.html#a4dfb43679e9fa794ebad99b6584c32ec">SVF::PointerAnalysis::getPts</a></div><div class="ttdeci">virtual const PointsTo & getPts(NodeID ptr)=0</div><div class="ttdoc">Get points-to targets of a pointer. It needs to be implemented in child class. </div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#l00050">SVFIRBuilder.cpp:50</a></div></div>
|
|
75
75
|
<div class="ttc" id="namespaceSVF_html_a43a65e0d33af3c743294f7a1139d2301"><div class="ttname"><a href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">SVF::NodeID</a></div><div class="ttdeci">unsigned NodeID</div><div class="ttdef"><b>Definition:</b> <a href="MTAResultValidator_8h_source.html#l00019">MTAResultValidator.h:19</a></div></div>
|
|
@@ -66,7 +66,7 @@ $(function() {
|
|
|
66
66
|
<div class="title">wpa.cpp</div> </div>
|
|
67
67
|
</div><!--header-->
|
|
68
68
|
<div class="contents">
|
|
69
|
-
<a href="wpa_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">//===- wpa.cpp -- Whole program analysis -------------------------------------//</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"> // Whole Program Pointer Analysis</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"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="WPAPass_8h.html">WPA/WPAPass.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="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</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"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span> <span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</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="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</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="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</span>)</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>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</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> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  wpa-><a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</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="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</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#
|
|
69
|
+
<a href="wpa_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">//===- wpa.cpp -- Whole program analysis -------------------------------------//</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"> // Whole Program Pointer Analysis</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"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="WPAPass_8h.html">WPA/WPAPass.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="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</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"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span> <span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</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="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</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="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</span>)</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>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</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> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  wpa-><a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</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="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</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#l00123">CFLGraph.h:123</a></div></div>
|
|
70
70
|
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
|
|
71
71
|
<div class="ttc" id="wpa_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="wpa_8cpp_source.html#l00040">wpa.cpp:40</a></div></div>
|
|
72
72
|
<div class="ttc" id="classSVF_1_1SVFModule_html"><div class="ttname"><a href="classSVF_1_1SVFModule.html">SVF::SVFModule</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00041">SVFModule.h:41</a></div></div>
|
package/include/CFL/CFLAlias.h
CHANGED
|
@@ -30,14 +30,7 @@
|
|
|
30
30
|
#ifndef INCLUDE_CFL_CFLALIAS_H_
|
|
31
31
|
#define INCLUDE_CFL_CFLALIAS_H_
|
|
32
32
|
|
|
33
|
-
#include "CFL/
|
|
34
|
-
#include "CFL/CFGNormalizer.h"
|
|
35
|
-
#include "CFL/GrammarBuilder.h"
|
|
36
|
-
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
-
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
-
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
-
#include "Graphs/ConsG.h"
|
|
40
|
-
#include "Util/Options.h"
|
|
33
|
+
#include "CFL/CFLBase.h"
|
|
41
34
|
#include "CFL/CFLStat.h"
|
|
42
35
|
|
|
43
36
|
namespace SVF
|
|
@@ -45,26 +38,26 @@ namespace SVF
|
|
|
45
38
|
|
|
46
39
|
class CFLStat;
|
|
47
40
|
|
|
48
|
-
class CFLAlias : public
|
|
41
|
+
class CFLAlias : public CFLBase
|
|
49
42
|
{
|
|
50
43
|
|
|
51
44
|
public:
|
|
52
45
|
typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
|
|
53
46
|
|
|
54
|
-
CFLAlias(SVFIR* ir) :
|
|
47
|
+
CFLAlias(SVFIR* ir) : CFLBase(ir, PointerAnalysis::CFLFICI_WPA)
|
|
55
48
|
{
|
|
56
49
|
}
|
|
57
50
|
|
|
58
|
-
///
|
|
59
|
-
virtual
|
|
60
|
-
{
|
|
61
|
-
delete solver;
|
|
62
|
-
}
|
|
51
|
+
/// Initialize the grammar, graph, solver
|
|
52
|
+
virtual void initialize();
|
|
63
53
|
|
|
64
|
-
///
|
|
65
|
-
virtual void
|
|
54
|
+
/// Print grammar and graph
|
|
55
|
+
virtual void finalize();
|
|
66
56
|
|
|
67
|
-
///
|
|
57
|
+
/// Solving CFL Reachability
|
|
58
|
+
virtual void solve();
|
|
59
|
+
|
|
60
|
+
/// Interface exposed to users of our Alias analysis, given Value infos
|
|
68
61
|
virtual AliasResult alias(const Value* v1, const Value* v2)
|
|
69
62
|
{
|
|
70
63
|
NodeID n1 = svfir->getValueNode(v1);
|
|
@@ -72,7 +65,7 @@ public:
|
|
|
72
65
|
return alias(n1,n2);
|
|
73
66
|
}
|
|
74
67
|
|
|
75
|
-
/// Interface exposed to users of our
|
|
68
|
+
/// Interface exposed to users of our Alias analysis, given PAGNodeID
|
|
76
69
|
virtual AliasResult alias(NodeID node1, NodeID node2)
|
|
77
70
|
{
|
|
78
71
|
if(graph->hasEdge(graph->getGNode(node1), graph->getGNode(node2), graph->startKind))
|
|
@@ -107,7 +100,6 @@ public:
|
|
|
107
100
|
|
|
108
101
|
/// Need Original one for virtual table
|
|
109
102
|
|
|
110
|
-
|
|
111
103
|
/// Add copy edge on constraint graph
|
|
112
104
|
virtual inline bool addCopyEdge(NodeID src, NodeID dst)
|
|
113
105
|
{
|
|
@@ -142,39 +134,8 @@ public:
|
|
|
142
134
|
|
|
143
135
|
void heapAllocatorViaIndCall(CallSite cs);
|
|
144
136
|
|
|
145
|
-
/// Get CFL graph
|
|
146
|
-
CFLGraph* getCFLGraph()
|
|
147
|
-
{
|
|
148
|
-
return graph;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/// Statistics
|
|
152
|
-
//@{
|
|
153
|
-
static u32_t numOfProcessedAddr; /// Number of processed Addr edge
|
|
154
|
-
static u32_t numOfProcessedCopy; /// Number of processed Copy edge
|
|
155
|
-
static u32_t numOfProcessedGep; /// Number of processed Gep edge
|
|
156
|
-
static u32_t numOfProcessedLoad; /// Number of processed Load edge
|
|
157
|
-
static u32_t numOfProcessedStore; /// Number of processed Store edge
|
|
158
|
-
static u32_t numOfSfrs;
|
|
159
|
-
static u32_t numOfFieldExpand;
|
|
160
|
-
|
|
161
|
-
static u32_t numOfSCCDetection;
|
|
162
|
-
static double timeOfSCCDetection;
|
|
163
|
-
static double timeOfSCCMerges;
|
|
164
|
-
static double timeOfCollapse;
|
|
165
|
-
static u32_t AveragePointsToSetSize;
|
|
166
|
-
static u32_t MaxPointsToSetSize;
|
|
167
|
-
static double timeOfProcessCopyGep;
|
|
168
|
-
static double timeOfProcessLoadStore;
|
|
169
|
-
static double timeOfUpdateCallGraph;
|
|
170
|
-
//@}
|
|
171
|
-
|
|
172
137
|
private:
|
|
173
138
|
CallSite2DummyValPN callsite2DummyValPN; ///< Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator
|
|
174
|
-
SVFIR* svfir;
|
|
175
|
-
CFLGraph* graph;
|
|
176
|
-
CFLGrammar* grammar;
|
|
177
|
-
CFLSolver *solver;
|
|
178
139
|
};
|
|
179
140
|
|
|
180
141
|
} // End namespace SVF
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
//===----- CFLBase.h -- CFL Analysis Client Base--------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* CFLBase.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: Oct 12, 2022
|
|
27
|
+
* Author: Pei Xu
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef INCLUDE_CFL_CFLBASE_H_
|
|
31
|
+
#define INCLUDE_CFL_CFLBASE_H_
|
|
32
|
+
|
|
33
|
+
#include "CFL/CFLSolver.h"
|
|
34
|
+
#include "CFL/CFGNormalizer.h"
|
|
35
|
+
#include "CFL/GrammarBuilder.h"
|
|
36
|
+
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
+
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
+
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
+
#include "Graphs/ConsG.h"
|
|
40
|
+
#include "Util/Options.h"
|
|
41
|
+
#include "Util/SVFBasicTypes.h"
|
|
42
|
+
|
|
43
|
+
namespace SVF
|
|
44
|
+
{
|
|
45
|
+
|
|
46
|
+
class CFLStat;
|
|
47
|
+
|
|
48
|
+
/// CFL Client Base Class
|
|
49
|
+
class CFLBase : public BVDataPTAImpl
|
|
50
|
+
{
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
CFLBase(SVFIR* ir, PointerAnalysis::PTATY pty) : BVDataPTAImpl(ir, pty), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
|
|
54
|
+
{
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// Destructor
|
|
58
|
+
virtual ~CFLBase()
|
|
59
|
+
{
|
|
60
|
+
delete solver;
|
|
61
|
+
delete grammarBase;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Build Grammar from text file
|
|
65
|
+
virtual void buildCFLGrammar();
|
|
66
|
+
|
|
67
|
+
/// Build CFLGraph based on Option
|
|
68
|
+
virtual void buildCFLGraph();
|
|
69
|
+
|
|
70
|
+
/// Normalize grammar
|
|
71
|
+
virtual void normalizeCFLGrammar();
|
|
72
|
+
|
|
73
|
+
/// Get CFL graph
|
|
74
|
+
CFLGraph* getCFLGraph();
|
|
75
|
+
|
|
76
|
+
/// Count the num of Nonterminal Edges
|
|
77
|
+
virtual void countSumEdges();
|
|
78
|
+
|
|
79
|
+
/// Solving CFL Reachability
|
|
80
|
+
virtual void solve();
|
|
81
|
+
|
|
82
|
+
/// Perform analyze (main part of CFLR Analysis)
|
|
83
|
+
virtual void analyze();
|
|
84
|
+
|
|
85
|
+
/// Statistics
|
|
86
|
+
//@{
|
|
87
|
+
// Grammar
|
|
88
|
+
static double timeOfBuildCFLGrammar; // Time of building grammarBase from text file
|
|
89
|
+
static double timeOfNormalizeGrammar; // Time of normalizing grammarBase to CFLGrammar
|
|
90
|
+
// Graph
|
|
91
|
+
static double timeOfBuildCFLGraph; // Time of building CFLGraph
|
|
92
|
+
static double numOfTerminalEdges; // Number of terminal labeled edges
|
|
93
|
+
static double numOfTemporaryNonterminalEdges; // Number of temporary (ie. X0, X1..) nonterminal labeled edges
|
|
94
|
+
static double numOfNonterminalEdges; // Number of nonterminal labeled edges
|
|
95
|
+
static double numOfStartEdges; // Number of start nonterminal labeled edges
|
|
96
|
+
// Solver
|
|
97
|
+
static double timeOfSolving; // time of solving CFL Reachability
|
|
98
|
+
//@}
|
|
99
|
+
|
|
100
|
+
protected:
|
|
101
|
+
SVFIR* svfir;
|
|
102
|
+
CFLGraph* graph;
|
|
103
|
+
GrammarBase* grammarBase;
|
|
104
|
+
CFLGrammar* grammar;
|
|
105
|
+
CFLSolver* solver;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
} // End namespace SVF
|
|
109
|
+
|
|
110
|
+
#endif /* INCLUDE_CFL_CFLBASE_H_*/
|