svf-tools 1.0.412 → 1.0.415
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/AndersenStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +5 -5
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +9 -9
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/FSMPTA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +5 -5
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8h_source.html +6 -6
- package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +21 -21
- package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +8 -8
- package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGEdge_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGNode_8h_source.html +89 -88
- package/SVF-doxygen/html/html/SVFGOPT_8cpp_source.html +15 -15
- package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +19 -19
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +71 -69
- package/SVF-doxygen/html/html/SVFG_8h_source.html +41 -41
- package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SVFUtil_8h.html +2 -2
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/VFGEdge_8h_source.html +1 -1
- package/SVF-doxygen/html/html/VFGNode_8h.html +1 -1
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +197 -195
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +89 -72
- package/SVF-doxygen/html/html/VFG_8h_source.html +39 -39
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8h_source.html +2 -2
- package/SVF-doxygen/html/html/WPAStat_8h_source.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode.html +24 -21
- package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode.html +25 -22
- package/SVF-doxygen/html/html/classSVF_1_1ActualParmVFGNode-members.html +45 -44
- package/SVF-doxygen/html/html/classSVF_1_1ActualParmVFGNode.html +59 -22
- package/SVF-doxygen/html/html/classSVF_1_1ActualRetVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1ActualRetVFGNode.html +61 -24
- package/SVF-doxygen/html/html/classSVF_1_1AddrVFGNode-members.html +51 -50
- package/SVF-doxygen/html/html/classSVF_1_1AddrVFGNode.html +50 -14
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode-members.html +44 -43
- package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode.html +23 -20
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode-members.html +52 -51
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +69 -32
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +59 -24
- package/SVF-doxygen/html/html/classSVF_1_1CallDirSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CallIndSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode-members.html +52 -51
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +70 -33
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CopyVFGNode-members.html +51 -50
- package/SVF-doxygen/html/html/classSVF_1_1CopyVFGNode.html +50 -14
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DirectSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DummyVersionPropSVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1DummyVersionPropSVFGNode.html +53 -17
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode-members.html +47 -46
- package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode.html +24 -21
- package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode-members.html +47 -46
- package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode.html +22 -19
- package/SVF-doxygen/html/html/classSVF_1_1FormalParmVFGNode-members.html +45 -44
- package/SVF-doxygen/html/html/classSVF_1_1FormalParmVFGNode.html +65 -28
- package/SVF-doxygen/html/html/classSVF_1_1FormalRetVFGNode-members.html +49 -48
- package/SVF-doxygen/html/html/classSVF_1_1FormalRetVFGNode.html +65 -28
- package/SVF-doxygen/html/html/classSVF_1_1GepVFGNode-members.html +51 -50
- package/SVF-doxygen/html/html/classSVF_1_1GepVFGNode.html +50 -14
- package/SVF-doxygen/html/html/classSVF_1_1IndirectSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1InterMSSAPHISVFGNode-members.html +58 -57
- package/SVF-doxygen/html/html/classSVF_1_1InterMSSAPHISVFGNode.html +45 -42
- package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode-members.html +56 -55
- package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode.html +40 -37
- package/SVF-doxygen/html/html/classSVF_1_1IntraDirSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1IntraIndSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1IntraMSSAPHISVFGNode-members.html +56 -55
- package/SVF-doxygen/html/html/classSVF_1_1IntraMSSAPHISVFGNode.html +26 -23
- package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode-members.html +57 -56
- package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode.html +26 -23
- package/SVF-doxygen/html/html/classSVF_1_1LoadVFGNode-members.html +54 -53
- package/SVF-doxygen/html/html/classSVF_1_1LoadVFGNode.html +50 -14
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MRSVFGNode-members.html +44 -43
- package/SVF-doxygen/html/html/classSVF_1_1MRSVFGNode.html +48 -13
- package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode-members.html +53 -52
- package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode.html +36 -33
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator_1_1Clusterer.html +1 -2
- package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode-members.html +46 -45
- package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode.html +58 -21
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode-members.html +53 -52
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +71 -34
- package/SVF-doxygen/html/html/classSVF_1_1RetDirSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetIndSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +77 -77
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +29 -29
- package/SVF-doxygen/html/html/classSVF_1_1SaberAnnotator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1StmtVFGNode-members.html +51 -50
- package/SVF-doxygen/html/html/classSVF_1_1StmtVFGNode.html +35 -32
- package/SVF-doxygen/html/html/classSVF_1_1StoreVFGNode-members.html +54 -53
- package/SVF-doxygen/html/html/classSVF_1_1StoreVFGNode.html +51 -14
- package/SVF-doxygen/html/html/classSVF_1_1ThreadMHPIndSVFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode-members.html +55 -54
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +76 -39
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +70 -70
- package/SVF-doxygen/html/html/classSVF_1_1VFGEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VFGNode-members.html +43 -42
- package/SVF-doxygen/html/html/classSVF_1_1VFGNode.html +41 -9
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +10 -10
- package/SVF-doxygen/html/html/functions_func_g.html +32 -12
- package/SVF-doxygen/html/html/functions_func_t.html +2 -2
- package/SVF-doxygen/html/html/functions_g.html +27 -7
- package/SVF-doxygen/html/html/functions_i.html +1 -1
- package/SVF-doxygen/html/html/functions_l.html +5 -5
- package/SVF-doxygen/html/html/functions_p.html +6 -6
- package/SVF-doxygen/html/html/functions_r.html +8 -8
- package/SVF-doxygen/html/html/functions_t.html +8 -6
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/namespaceSVF.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +7 -7
- package/SVF-doxygen/html/html/namespacemembers_p.html +1 -1
- package/SVF-doxygen/html/html/namespacemembers_type_p.html +1 -1
- package/SVF-doxygen/html/html/search/all_10.js +5 -5
- package/SVF-doxygen/html/html/search/all_12.js +3 -3
- package/SVF-doxygen/html/html/search/all_13.js +3 -3
- package/SVF-doxygen/html/html/search/all_14.js +7 -7
- package/SVF-doxygen/html/html/search/all_16.js +2 -2
- package/SVF-doxygen/html/html/search/all_7.js +1 -0
- package/SVF-doxygen/html/html/search/all_9.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +3 -3
- package/SVF-doxygen/html/html/search/all_d.js +1 -1
- package/SVF-doxygen/html/html/search/all_e.js +3 -3
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_11.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +1 -0
- package/SVF-doxygen/html/html/search/functions_8.js +1 -1
- package/SVF-doxygen/html/html/search/functions_e.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
- package/SVF-doxygen/html/html/search/variables_14.js +4 -4
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01SVFG_01_5_01_4.html +48 -48
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01VFG_01_5_01_4.html +36 -36
- package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1SVFGNodeLockSpan_01_4.html +1 -1
- package/include/Graphs/SVFGNode.h +6 -1
- package/include/Graphs/VFG.h +1 -1
- package/include/Graphs/VFGNode.h +38 -3
- package/include/Util/SVFUtil.h +1 -1
- package/lib/Graphs/SVFG.cpp +9 -0
- package/lib/Graphs/VFG.cpp +86 -0
- package/lib/Util/NodeIDAllocator.cpp +2 -2
- package/lib/WPA/AndersenStat.cpp +0 -8
- package/package.json +1 -1
package/include/Graphs/VFGNode.h
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
#define INCLUDE_UTIL_VFGNODE_H_
|
|
32
32
|
|
|
33
33
|
#include "Graphs/GenericGraph.h"
|
|
34
|
-
#include "Graphs/
|
|
34
|
+
#include "Graphs/SVFGEdge.h"
|
|
35
35
|
#include "Graphs/ICFGNode.h"
|
|
36
36
|
#include "MemoryModel/SVFIR.h"
|
|
37
37
|
|
|
@@ -92,6 +92,9 @@ public:
|
|
|
92
92
|
return nullptr;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/// Return the left hand side SVF Vars
|
|
96
|
+
virtual const NodeBS getDefSVFVars() const = 0;
|
|
97
|
+
|
|
95
98
|
/// Overloading operator << for dumping ICFG node ID
|
|
96
99
|
//@{
|
|
97
100
|
friend OutStream& operator<< (OutStream &o, const VFGNode &node)
|
|
@@ -226,6 +229,8 @@ public:
|
|
|
226
229
|
}
|
|
227
230
|
//@}
|
|
228
231
|
|
|
232
|
+
const NodeBS getDefSVFVars() const override;
|
|
233
|
+
|
|
229
234
|
const std::string toString() const override;
|
|
230
235
|
};
|
|
231
236
|
|
|
@@ -265,6 +270,8 @@ public:
|
|
|
265
270
|
}
|
|
266
271
|
//@}
|
|
267
272
|
|
|
273
|
+
const NodeBS getDefSVFVars() const override;
|
|
274
|
+
|
|
268
275
|
const std::string toString() const override;
|
|
269
276
|
};
|
|
270
277
|
|
|
@@ -304,6 +311,8 @@ public:
|
|
|
304
311
|
}
|
|
305
312
|
//@}
|
|
306
313
|
|
|
314
|
+
const NodeBS getDefSVFVars() const override;
|
|
315
|
+
|
|
307
316
|
const std::string toString() const override;
|
|
308
317
|
};
|
|
309
318
|
|
|
@@ -376,6 +385,9 @@ public:
|
|
|
376
385
|
return opVers.end();
|
|
377
386
|
}
|
|
378
387
|
//@}
|
|
388
|
+
|
|
389
|
+
const NodeBS getDefSVFVars() const override;
|
|
390
|
+
|
|
379
391
|
const Value* getValue() const override;
|
|
380
392
|
const std::string toString() const override;
|
|
381
393
|
};
|
|
@@ -449,6 +461,8 @@ public:
|
|
|
449
461
|
}
|
|
450
462
|
//@}
|
|
451
463
|
|
|
464
|
+
const NodeBS getDefSVFVars() const override;
|
|
465
|
+
|
|
452
466
|
const Value* getValue() const override;
|
|
453
467
|
const std::string toString() const override;
|
|
454
468
|
};
|
|
@@ -525,7 +539,9 @@ public:
|
|
|
525
539
|
}
|
|
526
540
|
//@}
|
|
527
541
|
|
|
528
|
-
|
|
542
|
+
const NodeBS getDefSVFVars() const override;
|
|
543
|
+
|
|
544
|
+
virtual const std::string toString() const override;
|
|
529
545
|
};
|
|
530
546
|
|
|
531
547
|
/*
|
|
@@ -560,7 +576,7 @@ public:
|
|
|
560
576
|
}
|
|
561
577
|
//@}
|
|
562
578
|
|
|
563
|
-
/// Return the branch statement
|
|
579
|
+
/// Return the branch statement
|
|
564
580
|
const BranchStmt* getBranchStmt() const{
|
|
565
581
|
return brstmt;
|
|
566
582
|
}
|
|
@@ -576,6 +592,9 @@ public:
|
|
|
576
592
|
return brstmt->getSuccessor(i);
|
|
577
593
|
}
|
|
578
594
|
///@}
|
|
595
|
+
|
|
596
|
+
const NodeBS getDefSVFVars() const override;
|
|
597
|
+
|
|
579
598
|
virtual const std::string toString() const override;
|
|
580
599
|
};
|
|
581
600
|
|
|
@@ -615,6 +634,8 @@ public:
|
|
|
615
634
|
}
|
|
616
635
|
//@}
|
|
617
636
|
|
|
637
|
+
const NodeBS getDefSVFVars() const override;
|
|
638
|
+
|
|
618
639
|
const std::string toString() const override;
|
|
619
640
|
};
|
|
620
641
|
|
|
@@ -686,6 +707,8 @@ public:
|
|
|
686
707
|
}
|
|
687
708
|
//@}
|
|
688
709
|
|
|
710
|
+
const NodeBS getDefSVFVars() const override;
|
|
711
|
+
|
|
689
712
|
const Value* getValue() const override;
|
|
690
713
|
const std::string toString() const override;
|
|
691
714
|
};
|
|
@@ -777,6 +800,8 @@ public:
|
|
|
777
800
|
}
|
|
778
801
|
//@}
|
|
779
802
|
|
|
803
|
+
const NodeBS getDefSVFVars() const override;
|
|
804
|
+
|
|
780
805
|
const std::string toString() const override;
|
|
781
806
|
};
|
|
782
807
|
|
|
@@ -871,6 +896,8 @@ public:
|
|
|
871
896
|
}
|
|
872
897
|
//@}
|
|
873
898
|
|
|
899
|
+
const NodeBS getDefSVFVars() const override;
|
|
900
|
+
|
|
874
901
|
const std::string toString() const override;
|
|
875
902
|
};
|
|
876
903
|
|
|
@@ -939,6 +966,8 @@ public:
|
|
|
939
966
|
}
|
|
940
967
|
//@}
|
|
941
968
|
|
|
969
|
+
const NodeBS getDefSVFVars() const override;
|
|
970
|
+
|
|
942
971
|
const std::string toString() const override;
|
|
943
972
|
};
|
|
944
973
|
|
|
@@ -995,6 +1024,8 @@ public:
|
|
|
995
1024
|
}
|
|
996
1025
|
//@}
|
|
997
1026
|
|
|
1027
|
+
const NodeBS getDefSVFVars() const override;
|
|
1028
|
+
|
|
998
1029
|
const std::string toString() const override;
|
|
999
1030
|
};
|
|
1000
1031
|
|
|
@@ -1059,6 +1090,8 @@ public:
|
|
|
1059
1090
|
}
|
|
1060
1091
|
//@}
|
|
1061
1092
|
|
|
1093
|
+
const NodeBS getDefSVFVars() const override;
|
|
1094
|
+
|
|
1062
1095
|
const std::string toString() const override;
|
|
1063
1096
|
};
|
|
1064
1097
|
|
|
@@ -1164,6 +1197,8 @@ public:
|
|
|
1164
1197
|
}
|
|
1165
1198
|
//@}
|
|
1166
1199
|
|
|
1200
|
+
const NodeBS getDefSVFVars() const override;
|
|
1201
|
+
|
|
1167
1202
|
const std::string toString() const override;
|
|
1168
1203
|
};
|
|
1169
1204
|
|
package/include/Util/SVFUtil.h
CHANGED
|
@@ -161,7 +161,7 @@ inline NodeBS ptsToNodeBS(const PointsTo &pts)
|
|
|
161
161
|
return nbs;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
typedef OrderedSet<PointsTo,
|
|
164
|
+
typedef OrderedSet<PointsTo, equalPointsTo> PointsToList;
|
|
165
165
|
void dumpPointsToList(const PointsToList& ptl);
|
|
166
166
|
|
|
167
167
|
inline bool isIntrinsicFun(const Function* func)
|
package/lib/Graphs/SVFG.cpp
CHANGED
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
using namespace SVF;
|
|
42
42
|
using namespace SVFUtil;
|
|
43
43
|
|
|
44
|
+
const NodeBS MRSVFGNode::getDefSVFVars() const {
|
|
45
|
+
return getPointsTo();
|
|
46
|
+
}
|
|
44
47
|
|
|
45
48
|
const std::string MRSVFGNode::toString() const {
|
|
46
49
|
std::string str;
|
|
@@ -113,6 +116,12 @@ const std::string IntraMSSAPHISVFGNode::toString() const {
|
|
|
113
116
|
return rawstr.str();
|
|
114
117
|
}
|
|
115
118
|
|
|
119
|
+
const NodeBS DummyVersionPropSVFGNode::getDefSVFVars() const {
|
|
120
|
+
NodeBS nb;
|
|
121
|
+
nb.set(object);
|
|
122
|
+
return nb;
|
|
123
|
+
}
|
|
124
|
+
|
|
116
125
|
const std::string InterMSSAPHISVFGNode::toString() const {
|
|
117
126
|
std::string str;
|
|
118
127
|
raw_string_ostream rawstr(str);
|
package/lib/Graphs/VFG.cpp
CHANGED
|
@@ -52,6 +52,12 @@ const std::string StmtVFGNode::toString() const {
|
|
|
52
52
|
return rawstr.str();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
const NodeBS LoadVFGNode::getDefSVFVars() const {
|
|
56
|
+
NodeBS nb;
|
|
57
|
+
nb.set(getPAGDstNodeID());
|
|
58
|
+
return nb;
|
|
59
|
+
}
|
|
60
|
+
|
|
55
61
|
const std::string LoadVFGNode::toString() const {
|
|
56
62
|
std::string str;
|
|
57
63
|
raw_string_ostream rawstr(str);
|
|
@@ -60,6 +66,15 @@ const std::string LoadVFGNode::toString() const {
|
|
|
60
66
|
return rawstr.str();
|
|
61
67
|
}
|
|
62
68
|
|
|
69
|
+
const NodeBS StoreVFGNode::getDefSVFVars() const {
|
|
70
|
+
NodeBS nb;
|
|
71
|
+
for (auto edge: getOutEdges()) {
|
|
72
|
+
if (IndirectSVFGEdge *iedge = SVFUtil::dyn_cast<IndirectSVFGEdge>(edge)) {
|
|
73
|
+
nb |= iedge->getPointsTo();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return nb;
|
|
77
|
+
}
|
|
63
78
|
|
|
64
79
|
const std::string StoreVFGNode::toString() const {
|
|
65
80
|
std::string str;
|
|
@@ -69,6 +84,12 @@ const std::string StoreVFGNode::toString() const {
|
|
|
69
84
|
return rawstr.str();
|
|
70
85
|
}
|
|
71
86
|
|
|
87
|
+
const NodeBS CopyVFGNode::getDefSVFVars() const {
|
|
88
|
+
NodeBS nb;
|
|
89
|
+
nb.set(getPAGDstNodeID());
|
|
90
|
+
return nb;
|
|
91
|
+
}
|
|
92
|
+
|
|
72
93
|
const std::string CopyVFGNode::toString() const {
|
|
73
94
|
std::string str;
|
|
74
95
|
raw_string_ostream rawstr(str);
|
|
@@ -77,6 +98,12 @@ const std::string CopyVFGNode::toString() const {
|
|
|
77
98
|
return rawstr.str();
|
|
78
99
|
}
|
|
79
100
|
|
|
101
|
+
const NodeBS CmpVFGNode::getDefSVFVars() const {
|
|
102
|
+
NodeBS nb;
|
|
103
|
+
nb.set(getRes()->getId());
|
|
104
|
+
return nb;
|
|
105
|
+
}
|
|
106
|
+
|
|
80
107
|
const std::string CmpVFGNode::toString() const {
|
|
81
108
|
std::string str;
|
|
82
109
|
raw_string_ostream rawstr(str);
|
|
@@ -92,6 +119,12 @@ const std::string CmpVFGNode::toString() const {
|
|
|
92
119
|
return rawstr.str();
|
|
93
120
|
}
|
|
94
121
|
|
|
122
|
+
const NodeBS BinaryOPVFGNode::getDefSVFVars() const {
|
|
123
|
+
NodeBS nb;
|
|
124
|
+
nb.set(getRes()->getId());
|
|
125
|
+
return nb;
|
|
126
|
+
}
|
|
127
|
+
|
|
95
128
|
const std::string BinaryOPVFGNode::toString() const {
|
|
96
129
|
std::string str;
|
|
97
130
|
raw_string_ostream rawstr(str);
|
|
@@ -107,6 +140,12 @@ const std::string BinaryOPVFGNode::toString() const {
|
|
|
107
140
|
return rawstr.str();
|
|
108
141
|
}
|
|
109
142
|
|
|
143
|
+
const NodeBS UnaryOPVFGNode::getDefSVFVars() const {
|
|
144
|
+
NodeBS nb;
|
|
145
|
+
nb.set(getRes()->getId());
|
|
146
|
+
return nb;
|
|
147
|
+
}
|
|
148
|
+
|
|
110
149
|
const std::string UnaryOPVFGNode::toString() const {
|
|
111
150
|
std::string str;
|
|
112
151
|
raw_string_ostream rawstr(str);
|
|
@@ -122,6 +161,10 @@ const std::string UnaryOPVFGNode::toString() const {
|
|
|
122
161
|
return rawstr.str();
|
|
123
162
|
}
|
|
124
163
|
|
|
164
|
+
const NodeBS BranchVFGNode::getDefSVFVars() const {
|
|
165
|
+
return NodeBS();
|
|
166
|
+
}
|
|
167
|
+
|
|
125
168
|
const std::string BranchVFGNode::toString() const {
|
|
126
169
|
std::string str;
|
|
127
170
|
raw_string_ostream rawstr(str);
|
|
@@ -130,6 +173,11 @@ const std::string BranchVFGNode::toString() const {
|
|
|
130
173
|
return rawstr.str();
|
|
131
174
|
}
|
|
132
175
|
|
|
176
|
+
const NodeBS GepVFGNode::getDefSVFVars() const {
|
|
177
|
+
NodeBS nb;
|
|
178
|
+
nb.set(getPAGDstNodeID());
|
|
179
|
+
return nb;
|
|
180
|
+
}
|
|
133
181
|
|
|
134
182
|
const std::string GepVFGNode::toString() const {
|
|
135
183
|
std::string str;
|
|
@@ -139,6 +187,11 @@ const std::string GepVFGNode::toString() const {
|
|
|
139
187
|
return rawstr.str();
|
|
140
188
|
}
|
|
141
189
|
|
|
190
|
+
const NodeBS PHIVFGNode::getDefSVFVars() const {
|
|
191
|
+
NodeBS nb;
|
|
192
|
+
nb.set(getRes()->getId());
|
|
193
|
+
return nb;
|
|
194
|
+
}
|
|
142
195
|
|
|
143
196
|
const std::string PHIVFGNode::toString() const {
|
|
144
197
|
std::string str;
|
|
@@ -171,6 +224,11 @@ const std::string IntraPHIVFGNode::toString() const {
|
|
|
171
224
|
return rawstr.str();
|
|
172
225
|
}
|
|
173
226
|
|
|
227
|
+
const NodeBS AddrVFGNode::getDefSVFVars() const {
|
|
228
|
+
NodeBS nb;
|
|
229
|
+
nb.set(getPAGDstNodeID());
|
|
230
|
+
return nb;
|
|
231
|
+
}
|
|
174
232
|
|
|
175
233
|
const std::string AddrVFGNode::toString() const {
|
|
176
234
|
std::string str;
|
|
@@ -189,6 +247,11 @@ const std::string ArgumentVFGNode::toString() const {
|
|
|
189
247
|
return rawstr.str();
|
|
190
248
|
}
|
|
191
249
|
|
|
250
|
+
const NodeBS ActualParmVFGNode::getDefSVFVars() const {
|
|
251
|
+
NodeBS nb;
|
|
252
|
+
nb.set(getParam()->getId());
|
|
253
|
+
return nb;
|
|
254
|
+
}
|
|
192
255
|
|
|
193
256
|
const std::string ActualParmVFGNode::toString() const {
|
|
194
257
|
std::string str;
|
|
@@ -199,6 +262,11 @@ const std::string ActualParmVFGNode::toString() const {
|
|
|
199
262
|
return rawstr.str();
|
|
200
263
|
}
|
|
201
264
|
|
|
265
|
+
const NodeBS FormalParmVFGNode::getDefSVFVars() const {
|
|
266
|
+
NodeBS nb;
|
|
267
|
+
nb.set(getParam()->getId());
|
|
268
|
+
return nb;
|
|
269
|
+
}
|
|
202
270
|
|
|
203
271
|
const std::string FormalParmVFGNode::toString() const {
|
|
204
272
|
std::string str;
|
|
@@ -209,6 +277,12 @@ const std::string FormalParmVFGNode::toString() const {
|
|
|
209
277
|
return rawstr.str();
|
|
210
278
|
}
|
|
211
279
|
|
|
280
|
+
const NodeBS ActualRetVFGNode::getDefSVFVars() const {
|
|
281
|
+
NodeBS nb;
|
|
282
|
+
nb.set(getRev()->getId());
|
|
283
|
+
return nb;
|
|
284
|
+
}
|
|
285
|
+
|
|
212
286
|
const std::string ActualRetVFGNode::toString() const {
|
|
213
287
|
std::string str;
|
|
214
288
|
raw_string_ostream rawstr(str);
|
|
@@ -219,6 +293,12 @@ const std::string ActualRetVFGNode::toString() const {
|
|
|
219
293
|
}
|
|
220
294
|
|
|
221
295
|
|
|
296
|
+
const NodeBS FormalRetVFGNode::getDefSVFVars() const {
|
|
297
|
+
NodeBS nb;
|
|
298
|
+
nb.set(getRet()->getId());
|
|
299
|
+
return nb;
|
|
300
|
+
}
|
|
301
|
+
|
|
222
302
|
const std::string FormalRetVFGNode::toString() const {
|
|
223
303
|
std::string str;
|
|
224
304
|
raw_string_ostream rawstr(str);
|
|
@@ -239,6 +319,12 @@ const std::string InterPHIVFGNode::toString() const {
|
|
|
239
319
|
return rawstr.str();
|
|
240
320
|
}
|
|
241
321
|
|
|
322
|
+
const NodeBS NullPtrVFGNode::getDefSVFVars() const {
|
|
323
|
+
NodeBS nb;
|
|
324
|
+
nb.set(getPAGNode()->getId());
|
|
325
|
+
return nb;
|
|
326
|
+
}
|
|
327
|
+
|
|
242
328
|
const std::string NullPtrVFGNode::toString() const {
|
|
243
329
|
std::string str;
|
|
244
330
|
raw_string_ostream rawstr(str);
|
|
@@ -256,7 +256,7 @@ namespace SVF
|
|
|
256
256
|
|
|
257
257
|
// Size of the return node mapping. It is potentially larger than the number of
|
|
258
258
|
// objects because we align each region to NATIVE_INT_SIZE.
|
|
259
|
-
size_t numMappings = 0;
|
|
259
|
+
// size_t numMappings = 0;
|
|
260
260
|
|
|
261
261
|
// Maps a region to a mapping which maps 0 to n to all objects
|
|
262
262
|
// in that region.
|
|
@@ -282,7 +282,7 @@ namespace SVF
|
|
|
282
282
|
// to start assigning from 0 rounded up to the fewest needed
|
|
283
283
|
// native ints. This is added to the number of mappings since
|
|
284
284
|
// we align each region to a native int.
|
|
285
|
-
numMappings += requiredBits(regionsObjects[region].size());
|
|
285
|
+
// numMappings += requiredBits(regionsObjects[region].size());
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
// Points-to sets which are relevant to a region, i.e., those whose elements
|
package/lib/WPA/AndersenStat.cpp
CHANGED
|
@@ -121,19 +121,15 @@ void AndersenStat::constraintGraphStat()
|
|
|
121
121
|
u32_t cgNodeNumber = 0;
|
|
122
122
|
u32_t objNodeNumber = 0;
|
|
123
123
|
u32_t addrtotalIn = 0;
|
|
124
|
-
u32_t addrtotalOut = 0;
|
|
125
124
|
u32_t addrmaxIn = 0;
|
|
126
125
|
u32_t addrmaxOut = 0;
|
|
127
126
|
u32_t copytotalIn = 0;
|
|
128
|
-
u32_t copytotalOut = 0;
|
|
129
127
|
u32_t copymaxIn = 0;
|
|
130
128
|
u32_t copymaxOut = 0;
|
|
131
129
|
u32_t loadtotalIn = 0;
|
|
132
|
-
u32_t loadtotalOut = 0;
|
|
133
130
|
u32_t loadmaxIn = 0;
|
|
134
131
|
u32_t loadmaxOut = 0;
|
|
135
132
|
u32_t storetotalIn = 0;
|
|
136
|
-
u32_t storetotalOut = 0;
|
|
137
133
|
u32_t storemaxIn = 0;
|
|
138
134
|
u32_t storemaxOut = 0;
|
|
139
135
|
|
|
@@ -155,7 +151,6 @@ void AndersenStat::constraintGraphStat()
|
|
|
155
151
|
u32_t nCopyOut = nodeIt->second->getDirectOutEdges().size();
|
|
156
152
|
if(nCopyOut > copymaxOut)
|
|
157
153
|
copymaxOut = nCopyOut;
|
|
158
|
-
copytotalOut +=nCopyOut;
|
|
159
154
|
u32_t nLoadIn = nodeIt->second->getLoadInEdges().size();
|
|
160
155
|
if(nLoadIn > loadmaxIn)
|
|
161
156
|
loadmaxIn = nLoadIn;
|
|
@@ -163,7 +158,6 @@ void AndersenStat::constraintGraphStat()
|
|
|
163
158
|
u32_t nLoadOut = nodeIt->second->getLoadOutEdges().size();
|
|
164
159
|
if(nLoadOut > loadmaxOut)
|
|
165
160
|
loadmaxOut = nLoadOut;
|
|
166
|
-
loadtotalOut +=nLoadOut;
|
|
167
161
|
u32_t nStoreIn = nodeIt->second->getStoreInEdges().size();
|
|
168
162
|
if(nStoreIn > storemaxIn)
|
|
169
163
|
storemaxIn = nStoreIn;
|
|
@@ -171,7 +165,6 @@ void AndersenStat::constraintGraphStat()
|
|
|
171
165
|
u32_t nStoreOut = nodeIt->second->getStoreOutEdges().size();
|
|
172
166
|
if(nStoreOut > storemaxOut)
|
|
173
167
|
storemaxOut = nStoreOut;
|
|
174
|
-
storetotalOut +=nStoreOut;
|
|
175
168
|
u32_t nAddrIn = nodeIt->second->getAddrInEdges().size();
|
|
176
169
|
if(nAddrIn > addrmaxIn)
|
|
177
170
|
addrmaxIn = nAddrIn;
|
|
@@ -179,7 +172,6 @@ void AndersenStat::constraintGraphStat()
|
|
|
179
172
|
u32_t nAddrOut = nodeIt->second->getAddrOutEdges().size();
|
|
180
173
|
if(nAddrOut > addrmaxOut)
|
|
181
174
|
addrmaxOut = nAddrOut;
|
|
182
|
-
addrtotalOut +=nAddrOut;
|
|
183
175
|
}
|
|
184
176
|
double storeavgIn = (double)storetotalIn/cgNodeNumber;
|
|
185
177
|
double loadavgIn = (double)loadtotalIn/cgNodeNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.415",
|
|
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": {
|