svf-tools 1.0.336 → 1.0.340
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/AndersenSFR_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/Andersen_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +4 -4
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +3 -3
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +4 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/ICFG_8h_source.html +38 -37
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +3 -3
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +4 -4
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +22 -25
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +42 -43
- package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp.html +1 -0
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +40 -40
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +12 -12
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +14 -14
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +22 -21
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +47 -47
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +91 -87
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +4 -4
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/VFG_8h_source.html +8 -8
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +187 -188
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +7 -10
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase-members.html +160 -161
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +4 -7
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD-members.html +199 -200
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD-members.html +202 -203
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD-members.html +195 -196
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +196 -197
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +205 -206
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -4
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +193 -194
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl-members.html +116 -117
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +12 -15
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar.html +13 -11
- package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +19 -19
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl-members.html +104 -105
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +5 -8
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA-members.html +182 -183
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +12 -15
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar.html +46 -14
- package/SVF-doxygen/html/html/classSVF_1_1DummyValVar-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DummyValVar.html +45 -14
- package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA-members.html +219 -220
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA-members.html +180 -181
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +9 -12
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive-members.html +212 -213
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +17 -20
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC-members.html +244 -245
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +7 -10
- package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +1 -3
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +27 -27
- package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +27 -26
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +183 -116
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +9 -5
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +26 -25
- package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt-members.html +37 -36
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +27 -3
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis-members.html +78 -79
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +106 -146
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetPN-members.html +75 -73
- package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +60 -16
- package/SVF-doxygen/html/html/classSVF_1_1RetPN.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +122 -115
- package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SVFVar.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard-members.html +171 -172
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +0 -3
- package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis-members.html +161 -162
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +3 -6
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +25 -25
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1ValVar.html +17 -11
- package/SVF-doxygen/html/html/classSVF_1_1ValVar.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN-members.html +74 -72
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +60 -16
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive-members.html +254 -255
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +2 -5
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +1 -1
- package/SVF-doxygen/html/html/functions_c.html +12 -12
- package/SVF-doxygen/html/html/functions_d.html +0 -3
- package/SVF-doxygen/html/html/functions_func_c.html +19 -19
- package/SVF-doxygen/html/html/functions_func_d.html +0 -3
- package/SVF-doxygen/html/html/functions_func_i.html +13 -10
- package/SVF-doxygen/html/html/functions_i.html +10 -6
- package/SVF-doxygen/html/html/functions_l.html +6 -6
- package/SVF-doxygen/html/html/functions_n.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +9 -9
- package/SVF-doxygen/html/html/functions_r.html +1 -1
- package/SVF-doxygen/html/html/functions_rela.html +3 -0
- package/SVF-doxygen/html/html/functions_s.html +14 -12
- package/SVF-doxygen/html/html/functions_t.html +7 -5
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/hierarchy.html +5 -5
- package/SVF-doxygen/html/html/search/all_10.js +7 -7
- package/SVF-doxygen/html/html/search/all_12.js +1 -1
- package/SVF-doxygen/html/html/search/all_13.js +10 -10
- package/SVF-doxygen/html/html/search/all_14.js +3 -3
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_3.js +1 -1
- package/SVF-doxygen/html/html/search/all_4.js +0 -1
- package/SVF-doxygen/html/html/search/all_9.js +2 -1
- package/SVF-doxygen/html/html/search/all_c.js +3 -3
- package/SVF-doxygen/html/html/search/all_d.js +3 -3
- package/SVF-doxygen/html/html/search/all_e.js +2 -2
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_2.js +1 -1
- package/SVF-doxygen/html/html/search/functions_3.js +0 -1
- package/SVF-doxygen/html/html/search/functions_8.js +1 -0
- package/SVF-doxygen/html/html/search/functions_e.js +1 -1
- package/SVF-doxygen/html/html/search/related_4.js +1 -0
- package/SVF-doxygen/html/html/search/variables_14.js +1 -1
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1ICFGNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1ICFGNode_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1ICFG_01_5_01_4.html +2 -2
- 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/Graphs/ICFG.h +5 -3
- package/include/MemoryModel/PointerAnalysis.h +0 -3
- package/include/MemoryModel/SVFStatements.h +5 -0
- package/include/MemoryModel/SVFVariables.h +25 -4
- package/include/MemoryModel/SymbolTableInfo.h +2 -2
- package/lib/Graphs/ICFG.cpp +2 -2
- package/lib/MSSA/MemSSA.cpp +1 -1
- package/lib/MemoryModel/PointerAnalysis.cpp +1 -21
- package/lib/MemoryModel/SVFStatements.cpp +10 -1
- package/lib/SVF-FE/ICFGBuilder.cpp +16 -2
- package/lib/SVF-FE/SVFIRBuilder.cpp +13 -0
- package/lib/SVF-FE/SymbolTableBuilder.cpp +8 -8
- package/package.json +1 -1
package/include/Graphs/ICFG.h
CHANGED
|
@@ -46,6 +46,8 @@ typedef GenericGraph<ICFGNode,ICFGEdge> GenericICFGTy;
|
|
|
46
46
|
class ICFG : public GenericICFGTy
|
|
47
47
|
{
|
|
48
48
|
|
|
49
|
+
friend class ICFGBuilder;
|
|
50
|
+
|
|
49
51
|
public:
|
|
50
52
|
|
|
51
53
|
typedef Map<NodeID, ICFGNode *> ICFGNodeIDToNodeMapTy;
|
|
@@ -109,7 +111,7 @@ public:
|
|
|
109
111
|
/// update ICFG for indirect calls
|
|
110
112
|
void updateCallGraph(PTACallGraph* callgraph);
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
protected:
|
|
113
115
|
/// Remove a SVFG edge
|
|
114
116
|
inline void removeICFGEdge(ICFGEdge* edge)
|
|
115
117
|
{
|
|
@@ -157,6 +159,7 @@ public:
|
|
|
157
159
|
addGNode(node->getId(),node);
|
|
158
160
|
}
|
|
159
161
|
|
|
162
|
+
public:
|
|
160
163
|
/// Get a basic block ICFGNode
|
|
161
164
|
/// TODO:: need to fix the assertions
|
|
162
165
|
//@{
|
|
@@ -172,11 +175,10 @@ public:
|
|
|
172
175
|
|
|
173
176
|
FunExitBlockNode* getFunExitBlockNode(const SVFFunction* fun);
|
|
174
177
|
|
|
175
|
-
GlobalBlockNode* getGlobalBlockNode() const
|
|
178
|
+
inline GlobalBlockNode* getGlobalBlockNode() const
|
|
176
179
|
{
|
|
177
180
|
return globalBlockNode;
|
|
178
181
|
}
|
|
179
|
-
|
|
180
182
|
//@}
|
|
181
183
|
|
|
182
184
|
private:
|
|
@@ -293,9 +293,6 @@ protected:
|
|
|
293
293
|
virtual void validateExpectedFailureTests(std::string fun);
|
|
294
294
|
//@}
|
|
295
295
|
|
|
296
|
-
/// Whether to dump the graph for debugging purpose
|
|
297
|
-
bool dumpGraph();
|
|
298
|
-
|
|
299
296
|
/// Reset all object node as field-sensitive.
|
|
300
297
|
void resetObjFieldSensitive();
|
|
301
298
|
|
|
@@ -753,6 +753,11 @@ public:
|
|
|
753
753
|
void addOpVar(SVFVar* op){
|
|
754
754
|
opVars.push_back(op);
|
|
755
755
|
}
|
|
756
|
+
|
|
757
|
+
/// Return true if this is a phi at the function exit
|
|
758
|
+
/// to receive one or multiple return values of this function
|
|
759
|
+
bool isFunctionRetPhi() const;
|
|
760
|
+
|
|
756
761
|
virtual const std::string toString() const override;
|
|
757
762
|
};
|
|
758
763
|
|
|
@@ -285,12 +285,16 @@ public:
|
|
|
285
285
|
{
|
|
286
286
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
287
287
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
288
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
289
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
288
290
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
289
291
|
}
|
|
290
292
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
291
293
|
{
|
|
292
294
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
293
295
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
296
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
297
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
294
298
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
295
299
|
}
|
|
296
300
|
//@}
|
|
@@ -578,7 +582,7 @@ public:
|
|
|
578
582
|
/*
|
|
579
583
|
* Unique Return node of a procedure
|
|
580
584
|
*/
|
|
581
|
-
class RetPN: public
|
|
585
|
+
class RetPN: public ValVar
|
|
582
586
|
{
|
|
583
587
|
|
|
584
588
|
public:
|
|
@@ -592,6 +596,10 @@ public:
|
|
|
592
596
|
{
|
|
593
597
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
594
598
|
}
|
|
599
|
+
static inline bool classof(const ValVar *node)
|
|
600
|
+
{
|
|
601
|
+
return node->getNodeKind() == SVFVar::RetNode;
|
|
602
|
+
}
|
|
595
603
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
596
604
|
{
|
|
597
605
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
@@ -600,7 +608,7 @@ public:
|
|
|
600
608
|
|
|
601
609
|
/// Constructor
|
|
602
610
|
RetPN(const SVFFunction* val, NodeID i) :
|
|
603
|
-
|
|
611
|
+
ValVar(val->getLLVMFun(), i, RetNode)
|
|
604
612
|
{
|
|
605
613
|
}
|
|
606
614
|
|
|
@@ -617,7 +625,7 @@ public:
|
|
|
617
625
|
/*
|
|
618
626
|
* Unique vararg node of a procedure
|
|
619
627
|
*/
|
|
620
|
-
class VarArgPN: public
|
|
628
|
+
class VarArgPN: public ValVar
|
|
621
629
|
{
|
|
622
630
|
|
|
623
631
|
public:
|
|
@@ -631,6 +639,10 @@ public:
|
|
|
631
639
|
{
|
|
632
640
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
633
641
|
}
|
|
642
|
+
static inline bool classof(const ValVar *node)
|
|
643
|
+
{
|
|
644
|
+
return node->getNodeKind() == SVFVar::VarargNode;
|
|
645
|
+
}
|
|
634
646
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
635
647
|
{
|
|
636
648
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
@@ -639,7 +651,7 @@ public:
|
|
|
639
651
|
|
|
640
652
|
/// Constructor
|
|
641
653
|
VarArgPN(const SVFFunction* val, NodeID i) :
|
|
642
|
-
|
|
654
|
+
ValVar(val->getLLVMFun(), i, VarargNode)
|
|
643
655
|
{
|
|
644
656
|
}
|
|
645
657
|
|
|
@@ -672,6 +684,10 @@ public:
|
|
|
672
684
|
{
|
|
673
685
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
674
686
|
}
|
|
687
|
+
static inline bool classof(const ValVar *node)
|
|
688
|
+
{
|
|
689
|
+
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
690
|
+
}
|
|
675
691
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
676
692
|
{
|
|
677
693
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
@@ -712,6 +728,11 @@ public:
|
|
|
712
728
|
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
713
729
|
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
714
730
|
}
|
|
731
|
+
static inline bool classof(const ObjVar *node)
|
|
732
|
+
{
|
|
733
|
+
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
734
|
+
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
735
|
+
}
|
|
715
736
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
716
737
|
{
|
|
717
738
|
return node->getNodeKind() == SVFVar::DummyObjNode
|
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -472,7 +472,7 @@ struct DOTGraphTraits<ICFG*> : public DOTGraphTraits<SVFIR*>
|
|
|
472
472
|
if (IntraBlockNode* bNode = SVFUtil::dyn_cast<IntraBlockNode>(node))
|
|
473
473
|
{
|
|
474
474
|
rawstr << "IntraBlockNode ID: " << bNode->getId() << " \t";
|
|
475
|
-
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->
|
|
475
|
+
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->getSVFStmtList(bNode);
|
|
476
476
|
if (edges.empty()) {
|
|
477
477
|
rawstr << value2String(bNode->getInst()) << " \t";
|
|
478
478
|
} else {
|
|
@@ -502,7 +502,7 @@ struct DOTGraphTraits<ICFG*> : public DOTGraphTraits<SVFIR*>
|
|
|
502
502
|
}
|
|
503
503
|
else if (GlobalBlockNode* glob = SVFUtil::dyn_cast<GlobalBlockNode>(node) )
|
|
504
504
|
{
|
|
505
|
-
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->
|
|
505
|
+
SVFIR::SVFStmtList& edges = SVFIR::getPAG()->getSVFStmtList(glob);
|
|
506
506
|
for (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)
|
|
507
507
|
{
|
|
508
508
|
const PAGEdge* edge = *it;
|
package/lib/MSSA/MemSSA.cpp
CHANGED
|
@@ -67,7 +67,7 @@ MemSSA::MemSSA(BVDataPTAImpl* p, bool ptrOnlyMSSA) : df(nullptr),dt(nullptr)
|
|
|
67
67
|
double mrStart = stat->getClk(true);
|
|
68
68
|
mrGen->generateMRs();
|
|
69
69
|
double mrEnd = stat->getClk(true);
|
|
70
|
-
timeOfGeneratingMemRegions
|
|
70
|
+
timeOfGeneratingMemRegions = (mrEnd - mrStart)/TIMEINTERVAL;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
SVFIR* MemSSA::getPAG()
|
|
@@ -129,18 +129,6 @@ void PointerAnalysis::initialize()
|
|
|
129
129
|
|
|
130
130
|
svfMod = pag->getModule();
|
|
131
131
|
|
|
132
|
-
// dump SVFIR
|
|
133
|
-
if (dumpGraph())
|
|
134
|
-
pag->dump("pag_initial");
|
|
135
|
-
|
|
136
|
-
// dump ICFG
|
|
137
|
-
if (Options::DumpICFG)
|
|
138
|
-
pag->getICFG()->dump("icfg_initial");
|
|
139
|
-
|
|
140
|
-
// print to command line of the SVFIR graph
|
|
141
|
-
if (Options::PAGPrint)
|
|
142
|
-
pag->print();
|
|
143
|
-
|
|
144
132
|
/// initialise pta call graph for every pointer analysis instance
|
|
145
133
|
if(Options::EnableThreadCallGraph)
|
|
146
134
|
{
|
|
@@ -192,14 +180,6 @@ void PointerAnalysis::resetObjFieldSensitive()
|
|
|
192
180
|
}
|
|
193
181
|
}
|
|
194
182
|
|
|
195
|
-
/*!
|
|
196
|
-
* Flag in order to dump graph
|
|
197
|
-
*/
|
|
198
|
-
bool PointerAnalysis::dumpGraph()
|
|
199
|
-
{
|
|
200
|
-
return Options::PAGDotGraph;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
183
|
/*
|
|
204
184
|
* Dump statistics
|
|
205
185
|
*/
|
|
@@ -225,7 +205,7 @@ void PointerAnalysis::finalize()
|
|
|
225
205
|
|
|
226
206
|
SVFIR* pag = SVFIR::getPAG();
|
|
227
207
|
// dump SVFIR
|
|
228
|
-
if (
|
|
208
|
+
if (Options::PAGDotGraph)
|
|
229
209
|
pag->dump("pag_final");
|
|
230
210
|
|
|
231
211
|
// dump ICFG
|
|
@@ -90,7 +90,10 @@ const std::string CopyStmt::toString() const{
|
|
|
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: [" << getResID() << "<--(";
|
|
94
|
+
for(const SVFVar* op : getOpndVars())
|
|
95
|
+
rawstr << op->getId() << ",";
|
|
96
|
+
rawstr << ")]\t";
|
|
94
97
|
if (Options::PAGDotGraphShorter) {
|
|
95
98
|
rawstr << "\n";
|
|
96
99
|
}
|
|
@@ -263,6 +266,12 @@ NodeID UnaryOPStmt::getResID() const{
|
|
|
263
266
|
return getRes()->getId();
|
|
264
267
|
}
|
|
265
268
|
|
|
269
|
+
/// Return true if this is a phi at the function exit
|
|
270
|
+
/// to receive one or multiple return values of this function
|
|
271
|
+
bool PhiStmt::isFunctionRetPhi() const{
|
|
272
|
+
return SVFUtil::isa<RetPN>(getRes());
|
|
273
|
+
}
|
|
274
|
+
|
|
266
275
|
|
|
267
276
|
/// The branch is unconditional if cond is a null value
|
|
268
277
|
bool BranchStmt::isUnconditional() const {
|
|
@@ -185,7 +185,9 @@ void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* ca
|
|
|
185
185
|
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
/*
|
|
189
|
+
* Add the global initialization statements immediately after the function entry of main
|
|
190
|
+
*/
|
|
189
191
|
void ICFGBuilder::connectGlobalToProgEntry(SVFModule* svfModule)
|
|
190
192
|
{
|
|
191
193
|
const SVFFunction* mainFunc = SVFUtil::getProgEntryFunction(svfModule);
|
|
@@ -196,7 +198,19 @@ void ICFGBuilder::connectGlobalToProgEntry(SVFModule* svfModule)
|
|
|
196
198
|
|
|
197
199
|
FunEntryBlockNode* entryNode = icfg->getFunEntryBlockNode(mainFunc);
|
|
198
200
|
GlobalBlockNode* globalNode = icfg->getGlobalBlockNode();
|
|
199
|
-
|
|
201
|
+
|
|
202
|
+
std::vector<ICFGEdge*> toBeRemovedEdges;
|
|
203
|
+
for(ICFGEdge* edge : entryNode->getOutEdges())
|
|
204
|
+
toBeRemovedEdges.push_back(edge);
|
|
205
|
+
|
|
206
|
+
for(ICFGEdge* edge : toBeRemovedEdges){
|
|
207
|
+
assert(SVFUtil::isa<IntraCFGEdge>(edge) && "the outgoing edge of FunEntryBlockNode is not an intraCFGEdge?");
|
|
208
|
+
icfg->removeICFGEdge(edge);
|
|
209
|
+
IntraCFGEdge* intraEdge = new IntraCFGEdge(globalNode, edge->getDstNode());
|
|
210
|
+
icfg->addICFGEdge(intraEdge);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
IntraCFGEdge* intraEdge = new IntraCFGEdge(entryNode, globalNode);
|
|
200
214
|
icfg->addICFGEdge(intraEdge);
|
|
201
215
|
}
|
|
202
216
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
#include "SVF-FE/CPPUtil.h"
|
|
35
35
|
#include "Util/BasicTypes.h"
|
|
36
36
|
#include "MemoryModel/PAGBuilderFromFile.h"
|
|
37
|
+
#include "Util/Options.h"
|
|
37
38
|
|
|
38
39
|
using namespace std;
|
|
39
40
|
using namespace SVF;
|
|
@@ -119,6 +120,18 @@ SVFIR* SVFIRBuilder::build(SVFModule* svfModule)
|
|
|
119
120
|
|
|
120
121
|
pag->setNodeNumAfterPAGBuild(pag->getTotalNodeNum());
|
|
121
122
|
|
|
123
|
+
// dump SVFIR
|
|
124
|
+
if (Options::PAGDotGraph)
|
|
125
|
+
pag->dump("svfir_initial");
|
|
126
|
+
|
|
127
|
+
// print to command line of the SVFIR graph
|
|
128
|
+
if (Options::PAGPrint)
|
|
129
|
+
pag->print();
|
|
130
|
+
|
|
131
|
+
// dump ICFG
|
|
132
|
+
if (Options::DumpICFG)
|
|
133
|
+
pag->getICFG()->dump("icfg_initial");
|
|
134
|
+
|
|
122
135
|
return pag;
|
|
123
136
|
}
|
|
124
137
|
|
|
@@ -52,20 +52,20 @@ void SymbolTableBuilder::buildMemModel(SVFModule* svfModule)
|
|
|
52
52
|
|
|
53
53
|
StInfo::setMaxFieldLimit(Options::MaxFieldLimit);
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// Pointer #0 always represents the null pointer.
|
|
56
|
+
assert(symInfo->totalSymNum++ == SymbolTableInfo::NullPtr && "Something changed!");
|
|
57
|
+
|
|
58
|
+
// Pointer #1 always represents the pointer points-to black hole.
|
|
59
|
+
assert(symInfo->totalSymNum++ == SymbolTableInfo::BlkPtr && "Something changed!");
|
|
60
|
+
|
|
61
|
+
// Object #2 is black hole the object that may point to any object
|
|
56
62
|
assert(symInfo->totalSymNum++ == SymbolTableInfo::BlackHole && "Something changed!");
|
|
57
63
|
symInfo->createBlkObj(SymbolTableInfo::BlackHole);
|
|
58
64
|
|
|
59
|
-
// Object #
|
|
65
|
+
// Object #3 always represents the unique constant of a program (merging all constants if Options::ModelConsts is disabled)
|
|
60
66
|
assert(symInfo->totalSymNum++ == SymbolTableInfo::ConstantObj && "Something changed!");
|
|
61
67
|
symInfo->createConstantObj(SymbolTableInfo::ConstantObj);
|
|
62
68
|
|
|
63
|
-
// Pointer #2 always represents the pointer points-to black hole.
|
|
64
|
-
assert(symInfo->totalSymNum++ == SymbolTableInfo::BlkPtr && "Something changed!");
|
|
65
|
-
|
|
66
|
-
// Pointer #3 always represents the null pointer.
|
|
67
|
-
assert(symInfo->totalSymNum++ == SymbolTableInfo::NullPtr && "Something changed!");
|
|
68
|
-
|
|
69
69
|
// Add symbols for all the globals .
|
|
70
70
|
for (SVFModule::global_iterator I = svfModule->global_begin(), E =
|
|
71
71
|
svfModule->global_end(); I != E; ++I)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.340",
|
|
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": {
|