svf-tools 1.0.341 → 1.0.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/BasicTypes_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +3 -3
- package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +38 -36
- package/SVF-doxygen/html/html/ICFG_8h_source.html +18 -18
- package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Options_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/Options_8h_source.html +2 -2
- package/SVF-doxygen/html/html/PCG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/SVFG_8h_source.html +4 -4
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +20 -20
- package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +5 -5
- package/SVF-doxygen/html/html/SVFVariables_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/VFG_8h_source.html +4 -4
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrStmt.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +6 -5
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +15 -12
- package/SVF-doxygen/html/html/classSVF_1_1CallBlockNode.html +5 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallCFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +6 -5
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyStmt.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FunEntryBlockNode.html +4 -2
- package/SVF-doxygen/html/html/classSVF_1_1FunExitBlockNode.html +4 -2
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1GlobalBlockNode.html +3 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +46 -46
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1ICFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraBlockNode.html +7 -3
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator_1_1Clusterer.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1Options-members.html +27 -27
- package/SVF-doxygen/html/html/classSVF_1_1Options.html +26 -26
- package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1RetBlockNode.html +5 -3
- package/SVF-doxygen/html/html/classSVF_1_1RetCFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFFunction.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1SVFStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TCT.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraphBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +10 -9
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1ValVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +8 -11
- package/SVF-doxygen/html/html/functions_s.html +18 -15
- package/SVF-doxygen/html/html/functions_t.html +4 -4
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars_p.html +0 -3
- package/SVF-doxygen/html/html/functions_vars_s.html +3 -0
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +11 -11
- package/SVF-doxygen/html/html/search/all_10.js +0 -1
- package/SVF-doxygen/html/html/search/all_13.js +2 -1
- package/SVF-doxygen/html/html/search/all_14.js +5 -5
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +1 -1
- package/SVF-doxygen/html/html/search/variables_10.js +0 -1
- package/SVF-doxygen/html/html/search/variables_13.js +1 -0
- package/SVF-doxygen/html/html/search/variables_14.js +3 -3
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +17 -17
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/include/Util/Options.h +1 -1
- package/lib/Graphs/ICFG.cpp +39 -27
- package/lib/MemoryModel/SVFStatements.cpp +53 -49
- package/lib/MemoryModel/SVFVariables.cpp +10 -10
- package/lib/Util/Options.cpp +3 -3
- package/lib/Util/SVFUtil.cpp +2 -0
- package/package.json +1 -1
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -61,7 +61,7 @@ FunExitBlockNode::FunExitBlockNode(NodeID id, const SVFFunction* f) : InterBlock
|
|
|
61
61
|
const std::string ICFGNode::toString() const {
|
|
62
62
|
std::string str;
|
|
63
63
|
raw_string_ostream rawstr(str);
|
|
64
|
-
rawstr << "ICFGNode
|
|
64
|
+
rawstr << "ICFGNode" << getId();
|
|
65
65
|
return rawstr.str();
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -72,7 +72,9 @@ void ICFGNode::dump() const {
|
|
|
72
72
|
const std::string GlobalBlockNode::toString() const {
|
|
73
73
|
std::string str;
|
|
74
74
|
raw_string_ostream rawstr(str);
|
|
75
|
-
rawstr << "GlobalBlockNode
|
|
75
|
+
rawstr << "GlobalBlockNode" << getId();
|
|
76
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
77
|
+
rawstr << "\n" << stmt->toString();
|
|
76
78
|
return rawstr.str();
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -80,8 +82,12 @@ const std::string GlobalBlockNode::toString() const {
|
|
|
80
82
|
const std::string IntraBlockNode::toString() const {
|
|
81
83
|
std::string str;
|
|
82
84
|
raw_string_ostream rawstr(str);
|
|
83
|
-
rawstr << "IntraBlockNode
|
|
84
|
-
rawstr <<
|
|
85
|
+
rawstr << "IntraBlockNode" << getId();
|
|
86
|
+
rawstr << " {fun: " << getFun()->getName() << getSourceLoc(getInst()) << "}";
|
|
87
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
88
|
+
rawstr << "\n" << stmt->toString();
|
|
89
|
+
if(getSVFStmts().empty())
|
|
90
|
+
rawstr << "\n" << value2String(getInst());
|
|
85
91
|
return rawstr.str();
|
|
86
92
|
}
|
|
87
93
|
|
|
@@ -89,24 +95,26 @@ const std::string IntraBlockNode::toString() const {
|
|
|
89
95
|
const std::string FunEntryBlockNode::toString() const {
|
|
90
96
|
std::string str;
|
|
91
97
|
raw_string_ostream rawstr(str);
|
|
92
|
-
rawstr << "FunEntryBlockNode
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
rawstr << "FunEntryBlockNode" << getId();
|
|
99
|
+
rawstr << " {fun: " << getFun()->getName();
|
|
100
|
+
if (isExtCall(getFun())==false)
|
|
101
|
+
rawstr << getSourceLoc(getFun()->getLLVMFun());
|
|
102
|
+
rawstr << "}";
|
|
103
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
104
|
+
rawstr << "\n" << stmt->toString();
|
|
98
105
|
return rawstr.str();
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
const std::string FunExitBlockNode::toString() const {
|
|
102
109
|
std::string str;
|
|
103
110
|
raw_string_ostream rawstr(str);
|
|
104
|
-
rawstr << "FunExitBlockNode
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
rawstr << "FunExitBlockNode" << getId();
|
|
112
|
+
rawstr << " {fun: " << getFun()->getName();
|
|
113
|
+
if (isExtCall(getFun())==false)
|
|
114
|
+
rawstr << getSourceLoc(getFunExitBB(getFun()->getLLVMFun())->getFirstNonPHI());
|
|
115
|
+
rawstr << "}";
|
|
116
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
117
|
+
rawstr << "\n" << stmt->toString();
|
|
110
118
|
return rawstr.str();
|
|
111
119
|
}
|
|
112
120
|
|
|
@@ -114,23 +122,27 @@ const std::string FunExitBlockNode::toString() const {
|
|
|
114
122
|
const std::string CallBlockNode::toString() const {
|
|
115
123
|
std::string str;
|
|
116
124
|
raw_string_ostream rawstr(str);
|
|
117
|
-
rawstr << "CallBlockNode
|
|
118
|
-
rawstr <<
|
|
125
|
+
rawstr << "CallBlockNode" << getId();
|
|
126
|
+
rawstr << " {fun: " << getFun()->getName() << getSourceLoc(getCallSite()) << "}";
|
|
127
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
128
|
+
rawstr << "\n" << stmt->toString();
|
|
119
129
|
return rawstr.str();
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
const std::string RetBlockNode::toString() const {
|
|
123
133
|
std::string str;
|
|
124
134
|
raw_string_ostream rawstr(str);
|
|
125
|
-
rawstr << "RetBlockNode
|
|
126
|
-
rawstr <<
|
|
135
|
+
rawstr << "RetBlockNode" << getId();
|
|
136
|
+
rawstr << " {fun: " << getFun()->getName() << getSourceLoc(getCallSite()) << "}";
|
|
137
|
+
for (const SVFStmt *stmt : getSVFStmts())
|
|
138
|
+
rawstr << "\n" << stmt->toString();
|
|
127
139
|
return rawstr.str();
|
|
128
140
|
}
|
|
129
141
|
|
|
130
142
|
const std::string ICFGEdge::toString() const {
|
|
131
143
|
std::string str;
|
|
132
144
|
raw_string_ostream rawstr(str);
|
|
133
|
-
rawstr << "ICFGEdge: [" << getDstID() << "<--" << getSrcID() << "]\t";
|
|
145
|
+
rawstr << "ICFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t";
|
|
134
146
|
return rawstr.str();
|
|
135
147
|
}
|
|
136
148
|
|
|
@@ -138,9 +150,9 @@ const std::string IntraCFGEdge::toString() const {
|
|
|
138
150
|
std::string str;
|
|
139
151
|
raw_string_ostream rawstr(str);
|
|
140
152
|
if(brCondition.first == nullptr)
|
|
141
|
-
rawstr << "IntraCFGEdge: [" << getDstID() << "<--" << getSrcID() << "]\t";
|
|
153
|
+
rawstr << "IntraCFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t";
|
|
142
154
|
else
|
|
143
|
-
rawstr << "IntraCFGEdge: [" << getDstID() << "<--" << getSrcID() << "] with condition (" << *brCondition.first << "==" << brCondition.second << ") \t";
|
|
155
|
+
rawstr << "IntraCFGEdge: [ICFGNode" << getDstID() << " <-- ICFGNode" << getSrcID() << "] with condition (" << *brCondition.first << "==" << brCondition.second << ") \t";
|
|
144
156
|
|
|
145
157
|
return rawstr.str();
|
|
146
158
|
}
|
|
@@ -148,16 +160,16 @@ const std::string IntraCFGEdge::toString() const {
|
|
|
148
160
|
const std::string CallCFGEdge::toString() const {
|
|
149
161
|
std::string str;
|
|
150
162
|
raw_string_ostream rawstr(str);
|
|
151
|
-
rawstr << "CallCFGEdge " << " [";
|
|
152
|
-
rawstr << getDstID() << "<--" << getSrcID() << "]\t CallSite: " << *cs << "\t";
|
|
163
|
+
rawstr << "CallCFGEdge " << " [ICFGNode";
|
|
164
|
+
rawstr << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t CallSite: " << *cs << "\t";
|
|
153
165
|
return rawstr.str();
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
const std::string RetCFGEdge::toString() const {
|
|
157
169
|
std::string str;
|
|
158
170
|
raw_string_ostream rawstr(str);
|
|
159
|
-
rawstr << "RetCFGEdge " << " [";
|
|
160
|
-
rawstr << getDstID() << "<--" << getSrcID() << "]\t CallSite: " << *cs << "\t";
|
|
171
|
+
rawstr << "RetCFGEdge " << " [ICFGNode";
|
|
172
|
+
rawstr << getDstID() << " <-- ICFGNode" << getSrcID() << "]\t CallSite: " << *cs << "\t";
|
|
161
173
|
return rawstr.str();
|
|
162
174
|
}
|
|
163
175
|
|
|
@@ -61,76 +61,76 @@ bool SVFStmt::isPTAEdge() const
|
|
|
61
61
|
const std::string SVFStmt::toString() const {
|
|
62
62
|
std::string str;
|
|
63
63
|
raw_string_ostream rawstr(str);
|
|
64
|
-
rawstr << "SVFStmt: [" << getDstID() << "<--" << getSrcID() << "]\t";
|
|
64
|
+
rawstr << "SVFStmt: [Var" << getDstID() << " <-- Var" << getSrcID() << "]\t";
|
|
65
65
|
return rawstr.str();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
const std::string AddrStmt::toString() const{
|
|
69
69
|
std::string str;
|
|
70
70
|
raw_string_ostream rawstr(str);
|
|
71
|
-
rawstr << "AddrStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
72
|
-
if (Options::
|
|
71
|
+
rawstr << "AddrStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
72
|
+
if (Options::ShowSVFIRValue) {
|
|
73
73
|
rawstr << "\n";
|
|
74
|
+
rawstr << value2String(getValue());
|
|
74
75
|
}
|
|
75
|
-
rawstr << value2String(getValue());
|
|
76
76
|
return rawstr.str();
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
const std::string CopyStmt::toString() const{
|
|
80
80
|
std::string str;
|
|
81
81
|
raw_string_ostream rawstr(str);
|
|
82
|
-
rawstr << "CopyStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
83
|
-
if (Options::
|
|
82
|
+
rawstr << "CopyStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
83
|
+
if (Options::ShowSVFIRValue) {
|
|
84
84
|
rawstr << "\n";
|
|
85
|
+
rawstr << value2String(getValue());
|
|
85
86
|
}
|
|
86
|
-
rawstr << value2String(getValue());
|
|
87
87
|
return rawstr.str();
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
const std::string PhiStmt::toString() const{
|
|
91
91
|
std::string str;
|
|
92
92
|
raw_string_ostream rawstr(str);
|
|
93
|
-
rawstr << "PhiStmt: [" << getResID() << "<--(";
|
|
93
|
+
rawstr << "PhiStmt: [Var" << getResID() << " <-- (Var";
|
|
94
94
|
for(const SVFVar* op : getOpndVars())
|
|
95
95
|
rawstr << op->getId() << ",";
|
|
96
96
|
rawstr << ")]\t";
|
|
97
|
-
if (Options::
|
|
97
|
+
if (Options::ShowSVFIRValue) {
|
|
98
98
|
rawstr << "\n";
|
|
99
|
+
rawstr << value2String(getValue());
|
|
99
100
|
}
|
|
100
|
-
rawstr << value2String(getValue());
|
|
101
101
|
return rawstr.str();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const std::string CmpStmt::toString() const{
|
|
105
105
|
std::string str;
|
|
106
106
|
raw_string_ostream rawstr(str);
|
|
107
|
-
rawstr << "CmpStmt: [" << getResID() << "<--(" << getOpVarID(0) << "
|
|
108
|
-
if (Options::
|
|
107
|
+
rawstr << "CmpStmt: [Var" << getResID() << " <-- (Var" << getOpVarID(0) << " predicate" << getPredicate() << " Var" << getOpVarID(1) << ")]\t";
|
|
108
|
+
if (Options::ShowSVFIRValue) {
|
|
109
109
|
rawstr << "\n";
|
|
110
|
+
rawstr << value2String(getValue());
|
|
110
111
|
}
|
|
111
|
-
rawstr << value2String(getValue());
|
|
112
112
|
return rawstr.str();
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
const std::string BinaryOPStmt::toString() const{
|
|
116
116
|
std::string str;
|
|
117
117
|
raw_string_ostream rawstr(str);
|
|
118
|
-
rawstr << "BinaryOPStmt: [" << getResID() << "<--(" << getOpVarID(0) << "
|
|
119
|
-
if (Options::
|
|
118
|
+
rawstr << "BinaryOPStmt: [Var" << getResID() << " <-- (Var" << getOpVarID(0) << " opcode" << getOpcode() << " Var" << getOpVarID(1) << ")]\t";
|
|
119
|
+
if (Options::ShowSVFIRValue) {
|
|
120
120
|
rawstr << "\n";
|
|
121
|
+
rawstr << value2String(getValue());
|
|
121
122
|
}
|
|
122
|
-
rawstr << value2String(getValue());
|
|
123
123
|
return rawstr.str();
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
const std::string UnaryOPStmt::toString() const{
|
|
127
127
|
std::string str;
|
|
128
128
|
raw_string_ostream rawstr(str);
|
|
129
|
-
rawstr << "UnaryOPStmt: [" << getResID() << "<--" << getOpVarID() << "]\t";
|
|
130
|
-
if (Options::
|
|
129
|
+
rawstr << "UnaryOPStmt: [Var" << getResID() << " <-- " << " opcode" << getOpcode() << " Var" << getOpVarID() << "]\t";
|
|
130
|
+
if (Options::ShowSVFIRValue) {
|
|
131
131
|
rawstr << "\n";
|
|
132
|
+
rawstr << value2String(getValue());
|
|
132
133
|
}
|
|
133
|
-
rawstr << value2String(getValue());
|
|
134
134
|
return rawstr.str();
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -138,13 +138,17 @@ const std::string BranchStmt::toString() const {
|
|
|
138
138
|
std::string str;
|
|
139
139
|
raw_string_ostream rawstr(str);
|
|
140
140
|
if(isConditional())
|
|
141
|
-
rawstr << "BranchStmt: [" << getCondition()->
|
|
141
|
+
rawstr << "BranchStmt: [Condition Var" << getCondition()->getId() << "]\t";
|
|
142
142
|
else
|
|
143
143
|
rawstr << "BranchStmt: [" << " Unconditional branch" << "]\t";
|
|
144
|
-
|
|
144
|
+
|
|
145
|
+
for(u32_t i = 0; i < getNumSuccessors(); i++)
|
|
146
|
+
rawstr << "Successor " << i << " ICFGNode" << getSuccessor(i)->getId() << "\n";
|
|
147
|
+
|
|
148
|
+
if (Options::ShowSVFIRValue) {
|
|
145
149
|
rawstr << "\n";
|
|
150
|
+
rawstr << value2String(getValue());
|
|
146
151
|
}
|
|
147
|
-
rawstr << value2String(getValue());
|
|
148
152
|
return rawstr.str();
|
|
149
153
|
}
|
|
150
154
|
|
|
@@ -152,99 +156,99 @@ const std::string BranchStmt::toString() const {
|
|
|
152
156
|
const std::string LoadStmt::toString() const{
|
|
153
157
|
std::string str;
|
|
154
158
|
raw_string_ostream rawstr(str);
|
|
155
|
-
rawstr << "LoadStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
156
|
-
if (Options::
|
|
159
|
+
rawstr << "LoadStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
160
|
+
if (Options::ShowSVFIRValue) {
|
|
157
161
|
rawstr << "\n";
|
|
162
|
+
rawstr << value2String(getValue());
|
|
158
163
|
}
|
|
159
|
-
rawstr << value2String(getValue());
|
|
160
164
|
return rawstr.str();
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
const std::string StoreStmt::toString() const{
|
|
164
168
|
std::string str;
|
|
165
169
|
raw_string_ostream rawstr(str);
|
|
166
|
-
rawstr << "StoreStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
167
|
-
if (Options::
|
|
170
|
+
rawstr << "StoreStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
171
|
+
if (Options::ShowSVFIRValue) {
|
|
168
172
|
rawstr << "\n";
|
|
173
|
+
rawstr << value2String(getValue());
|
|
169
174
|
}
|
|
170
|
-
rawstr << value2String(getValue());
|
|
171
175
|
return rawstr.str();
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
const std::string GepStmt::toString() const{
|
|
175
179
|
std::string str;
|
|
176
180
|
raw_string_ostream rawstr(str);
|
|
177
|
-
rawstr << "GepStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
178
|
-
if (Options::
|
|
181
|
+
rawstr << "GepStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
182
|
+
if (Options::ShowSVFIRValue) {
|
|
179
183
|
rawstr << "\n";
|
|
184
|
+
rawstr << value2String(getValue());
|
|
180
185
|
}
|
|
181
|
-
rawstr << value2String(getValue());
|
|
182
186
|
return rawstr.str();
|
|
183
187
|
}
|
|
184
188
|
|
|
185
189
|
const std::string NormalGepStmt::toString() const{
|
|
186
190
|
std::string str;
|
|
187
191
|
raw_string_ostream rawstr(str);
|
|
188
|
-
rawstr << "NormalGepStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
189
|
-
if (Options::
|
|
192
|
+
rawstr << "NormalGepStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
193
|
+
if (Options::ShowSVFIRValue) {
|
|
190
194
|
rawstr << "\n";
|
|
195
|
+
rawstr << value2String(getValue());
|
|
191
196
|
}
|
|
192
|
-
rawstr << value2String(getValue());
|
|
193
197
|
return rawstr.str();
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
const std::string VariantGepStmt::toString() const{
|
|
197
201
|
std::string str;
|
|
198
202
|
raw_string_ostream rawstr(str);
|
|
199
|
-
rawstr << "VariantGepStmt: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
200
|
-
if (Options::
|
|
203
|
+
rawstr << "VariantGepStmt: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
204
|
+
if (Options::ShowSVFIRValue) {
|
|
201
205
|
rawstr << "\n";
|
|
206
|
+
rawstr << value2String(getValue());
|
|
202
207
|
}
|
|
203
|
-
rawstr << value2String(getValue());
|
|
204
208
|
return rawstr.str();
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
const std::string CallPE::toString() const{
|
|
208
212
|
std::string str;
|
|
209
213
|
raw_string_ostream rawstr(str);
|
|
210
|
-
rawstr << "CallPE: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
211
|
-
if (Options::
|
|
214
|
+
rawstr << "CallPE: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
215
|
+
if (Options::ShowSVFIRValue) {
|
|
212
216
|
rawstr << "\n";
|
|
217
|
+
rawstr << value2String(getValue());
|
|
213
218
|
}
|
|
214
|
-
rawstr << value2String(getValue());
|
|
215
219
|
return rawstr.str();
|
|
216
220
|
}
|
|
217
221
|
|
|
218
222
|
const std::string RetPE::toString() const{
|
|
219
223
|
std::string str;
|
|
220
224
|
raw_string_ostream rawstr(str);
|
|
221
|
-
rawstr << "RetPE: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
222
|
-
if (Options::
|
|
225
|
+
rawstr << "RetPE: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
226
|
+
if (Options::ShowSVFIRValue) {
|
|
223
227
|
rawstr << "\n";
|
|
228
|
+
rawstr << value2String(getValue());
|
|
224
229
|
}
|
|
225
|
-
rawstr << value2String(getValue());
|
|
226
230
|
return rawstr.str();
|
|
227
231
|
}
|
|
228
232
|
|
|
229
233
|
const std::string TDForkPE::toString() const{
|
|
230
234
|
std::string str;
|
|
231
235
|
raw_string_ostream rawstr(str);
|
|
232
|
-
rawstr << "TDForkPE: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
233
|
-
if (Options::
|
|
236
|
+
rawstr << "TDForkPE: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
237
|
+
if (Options::ShowSVFIRValue) {
|
|
234
238
|
rawstr << "\n";
|
|
239
|
+
rawstr << value2String(getValue());
|
|
235
240
|
}
|
|
236
|
-
rawstr << value2String(getValue());
|
|
237
241
|
return rawstr.str();
|
|
238
242
|
}
|
|
239
243
|
|
|
240
244
|
const std::string TDJoinPE::toString() const{
|
|
241
245
|
std::string str;
|
|
242
246
|
raw_string_ostream rawstr(str);
|
|
243
|
-
rawstr << "TDJoinPE: [" << getLHSVarID() << "<--" << getRHSVarID() << "]\t";
|
|
244
|
-
if (Options::
|
|
247
|
+
rawstr << "TDJoinPE: [Var" << getLHSVarID() << " <-- Var" << getRHSVarID() << "]\t";
|
|
248
|
+
if (Options::ShowSVFIRValue) {
|
|
245
249
|
rawstr << "\n";
|
|
250
|
+
rawstr << value2String(getValue());
|
|
246
251
|
}
|
|
247
|
-
rawstr << value2String(getValue());
|
|
248
252
|
return rawstr.str();
|
|
249
253
|
}
|
|
250
254
|
|
|
@@ -112,10 +112,10 @@ const std::string ValVar::toString() const {
|
|
|
112
112
|
std::string str;
|
|
113
113
|
raw_string_ostream rawstr(str);
|
|
114
114
|
rawstr << "ValVar ID: " << getId();
|
|
115
|
-
if (Options::
|
|
115
|
+
if (Options::ShowSVFIRValue) {
|
|
116
116
|
rawstr << "\n";
|
|
117
|
+
rawstr << value2String(value);
|
|
117
118
|
}
|
|
118
|
-
rawstr << value2String(value);
|
|
119
119
|
return rawstr.str();
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -123,10 +123,10 @@ const std::string ObjVar::toString() const {
|
|
|
123
123
|
std::string str;
|
|
124
124
|
raw_string_ostream rawstr(str);
|
|
125
125
|
rawstr << "ObjVar ID: " << getId();
|
|
126
|
-
if (Options::
|
|
126
|
+
if (Options::ShowSVFIRValue) {
|
|
127
127
|
rawstr << "\n";
|
|
128
|
+
rawstr << value2String(value);
|
|
128
129
|
}
|
|
129
|
-
rawstr << value2String(value);
|
|
130
130
|
return rawstr.str();
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -134,10 +134,10 @@ const std::string GepValVar::toString() const {
|
|
|
134
134
|
std::string str;
|
|
135
135
|
raw_string_ostream rawstr(str);
|
|
136
136
|
rawstr << "GepValVar ID: " << getId() << " with offset_" + llvm::utostr(getFieldOffset());
|
|
137
|
-
if (Options::
|
|
137
|
+
if (Options::ShowSVFIRValue) {
|
|
138
138
|
rawstr << "\n";
|
|
139
|
+
rawstr << value2String(value);
|
|
139
140
|
}
|
|
140
|
-
rawstr << value2String(value);
|
|
141
141
|
return rawstr.str();
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -145,10 +145,10 @@ const std::string GepObjVar::toString() const {
|
|
|
145
145
|
std::string str;
|
|
146
146
|
raw_string_ostream rawstr(str);
|
|
147
147
|
rawstr << "GepObjVar ID: " << getId() << " with offset_" + llvm::itostr(ls.accumulateConstantFieldIdx());
|
|
148
|
-
if (Options::
|
|
148
|
+
if (Options::ShowSVFIRValue) {
|
|
149
149
|
rawstr << "\n";
|
|
150
|
+
rawstr << value2String(value);
|
|
150
151
|
}
|
|
151
|
-
rawstr << value2String(value);
|
|
152
152
|
return rawstr.str();
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -156,10 +156,10 @@ const std::string FIObjVar::toString() const {
|
|
|
156
156
|
std::string str;
|
|
157
157
|
raw_string_ostream rawstr(str);
|
|
158
158
|
rawstr << "FIObjVar ID: " << getId() << " (base object)";
|
|
159
|
-
if (Options::
|
|
159
|
+
if (Options::ShowSVFIRValue) {
|
|
160
160
|
rawstr << "\n";
|
|
161
|
+
rawstr << value2String(value);
|
|
161
162
|
}
|
|
162
|
-
rawstr << value2String(value);
|
|
163
163
|
return rawstr.str();
|
|
164
164
|
}
|
|
165
165
|
|
package/lib/Util/Options.cpp
CHANGED
|
@@ -296,10 +296,10 @@ namespace SVF
|
|
|
296
296
|
llvm::cl::desc("Dump dot graph of SVFIR")
|
|
297
297
|
);
|
|
298
298
|
|
|
299
|
-
const llvm::cl::opt<bool> Options::
|
|
300
|
-
"
|
|
299
|
+
const llvm::cl::opt<bool> Options::ShowSVFIRValue(
|
|
300
|
+
"show-ir-value",
|
|
301
301
|
llvm::cl::init(true),
|
|
302
|
-
llvm::cl::desc("
|
|
302
|
+
llvm::cl::desc("Show values of SVFIR (e.g., when generating dot graph)")
|
|
303
303
|
);
|
|
304
304
|
|
|
305
305
|
const llvm::cl::opt<bool> Options::DumpICFG(
|
package/lib/Util/SVFUtil.cpp
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.342",
|
|
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": {
|