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
package/lib/CFL/CFLVF.cpp
CHANGED
|
@@ -28,62 +28,52 @@
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
#include "CFL/CFLVF.h"
|
|
31
|
-
#include "Util/SVFBasicTypes.h"
|
|
32
|
-
#include "WPA/Andersen.h"
|
|
33
31
|
|
|
34
32
|
using namespace SVF;
|
|
35
33
|
using namespace cppUtil;
|
|
36
34
|
using namespace SVFUtil;
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
void CFLVF::analyze()
|
|
36
|
+
void CFLVF::buildCFLGraph()
|
|
41
37
|
{
|
|
42
|
-
|
|
43
|
-
CFGNormalizer normalizer = CFGNormalizer();
|
|
38
|
+
// Build CFL Graph
|
|
44
39
|
VFCFLGraphBuilder cflGraphBuilder = VFCFLGraphBuilder();
|
|
45
|
-
|
|
46
|
-
if (Options::CFLGraph.empty())
|
|
40
|
+
if (Options::CFLGraph.empty()) // built from svfir
|
|
47
41
|
{
|
|
48
42
|
PointerAnalysis::initialize();
|
|
49
|
-
GrammarBase *grammarBase = grammarBuilder.build();
|
|
50
43
|
AndersenWaveDiff* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
|
|
51
44
|
svfg = memSSA.buildFullSVFG(ander);
|
|
52
|
-
|
|
53
|
-
if (Options::PEGTransfer)
|
|
54
|
-
{
|
|
55
|
-
graph = cflGraphBuilder.buildBiPEGgraph(consCG, grammarBase->getStartKind(), grammarBase, svfir);
|
|
56
|
-
}
|
|
57
|
-
else
|
|
58
|
-
{
|
|
59
|
-
graph = cflGraphBuilder.buildBigraph(svfg, grammarBase->getStartKind(), grammarBase);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
cflChecker.check(grammarBase, &cflGraphBuilder, graph);
|
|
63
|
-
grammar = normalizer.normalize(grammarBase);
|
|
64
|
-
cflChecker.check(grammar, &cflGraphBuilder, graph);
|
|
65
|
-
delete consCG;
|
|
66
|
-
delete grammarBase;
|
|
45
|
+
graph = cflGraphBuilder.buildBigraph(svfg, grammarBase->getStartKind(), grammarBase);
|
|
67
46
|
}
|
|
68
47
|
else
|
|
69
|
-
{
|
|
70
|
-
GrammarBase *grammarBase = grammarBuilder.build();
|
|
71
48
|
graph = cflGraphBuilder.buildFromDot(Options::CFLGraph, grammarBase);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
|
|
50
|
+
// Check CFL Graph and Grammar are accordance with grammar
|
|
51
|
+
CFLGramGraphChecker cflChecker = CFLGramGraphChecker();
|
|
52
|
+
cflChecker.check(grammarBase, &cflGraphBuilder, graph);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
void CFLVF::initialize()
|
|
56
|
+
{
|
|
57
|
+
// Build CFL Grammar
|
|
58
|
+
buildCFLGrammar();
|
|
59
|
+
|
|
60
|
+
// Build CFL Graph
|
|
61
|
+
buildCFLGraph();
|
|
62
|
+
|
|
63
|
+
// Normalize grammar
|
|
64
|
+
normalizeCFLGrammar();
|
|
65
|
+
|
|
66
|
+
// Initialize sovler
|
|
77
67
|
solver = new CFLSolver(graph, grammar);
|
|
78
|
-
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void CFLVF::finalize()
|
|
71
|
+
{
|
|
79
72
|
if(Options::PrintCFL == true)
|
|
80
73
|
{
|
|
81
|
-
|
|
74
|
+
if (Options::CFLGraph.empty())
|
|
75
|
+
svfir->dump("IR");
|
|
82
76
|
grammar->dump("Grammar");
|
|
83
77
|
graph->dump("CFLGraph");
|
|
84
78
|
}
|
|
85
|
-
if (Options::CFLGraph.empty())
|
|
86
|
-
{
|
|
87
|
-
PointerAnalysis::finalize();
|
|
88
|
-
}
|
|
89
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.579",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
package/tools/CFL/cfl.cpp
CHANGED
|
@@ -28,11 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
#include "SVF-FE/LLVMUtil.h"
|
|
31
|
-
#include "
|
|
31
|
+
#include "SVF-FE/SVFIRBuilder.h"
|
|
32
32
|
#include "CFL/CFLAlias.h"
|
|
33
33
|
#include "CFL/CFLVF.h"
|
|
34
|
-
#include "SVF-FE/SVFIRBuilder.h"
|
|
35
|
-
#include "CFL/CFGNormalizer.h"
|
|
36
34
|
|
|
37
35
|
using namespace llvm;
|
|
38
36
|
using namespace SVF;
|
|
@@ -57,35 +55,24 @@ int main(int argc, char ** argv)
|
|
|
57
55
|
{
|
|
58
56
|
LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);
|
|
59
57
|
}
|
|
58
|
+
|
|
59
|
+
SVFIR* svfir = nullptr;
|
|
60
60
|
if (Options::CFLGraph.empty())
|
|
61
61
|
{
|
|
62
62
|
SVFModule* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);
|
|
63
63
|
svfModule->buildSymbolTableInfo();
|
|
64
|
-
|
|
65
|
-
/// Build Program Assignment Graph (SVFIR)
|
|
66
64
|
SVFIRBuilder builder;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
else
|
|
75
|
-
{
|
|
76
|
-
CFLAlias* cflaa = new CFLAlias(svfir);
|
|
77
|
-
cflaa->analyze();
|
|
78
|
-
delete cflaa;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
65
|
+
svfir = builder.build(svfModule);
|
|
66
|
+
} // if no dot form CFLGraph is specified, we use svfir from .bc.
|
|
67
|
+
|
|
68
|
+
CFLBase* cfl;
|
|
69
|
+
if (Options::CFLSVFG)
|
|
70
|
+
cfl = new CFLVF(svfir);
|
|
81
71
|
else
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
CFLAlias* cflaa = new CFLAlias(svfir);
|
|
85
|
-
cflaa->analyze();
|
|
86
|
-
delete cflaa;
|
|
87
|
-
}
|
|
72
|
+
cfl = new CFLAlias(svfir); // if no svfg is specified, we use CFLAlias as the default one.
|
|
73
|
+
cfl->analyze();
|
|
88
74
|
|
|
75
|
+
delete cfl;
|
|
89
76
|
SVFIR::releaseSVFIR();
|
|
90
77
|
SVF::LLVMModuleSet::releaseLLVMModuleSet();
|
|
91
78
|
|