svf-tools 1.0.1278 → 1.0.1279
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/package.json +1 -1
- package/svf/include/Util/NodeIDAllocator.h +13 -4
- package/svf/lib/Util/NodeIDAllocator.cpp +18 -8
- package/svf/lib/WPA/Andersen.cpp +4 -3
- package/svf/lib/WPA/FlowSensitive.cpp +4 -10
- package/svf/lib/WPA/VersionedFlowSensitive.cpp +3 -1
- package/SVF-doxygen/doxygen.config +0 -2548
- package/SVF-doxygen/wiki/PAG.png +0 -0
- package/SVF-doxygen/wiki/andersen.png +0 -0
- package/SVF-doxygen/wiki/callgraph.png +0 -0
- package/SVF-doxygen/wiki/consG.png +0 -0
- package/SVF-doxygen/wiki/cpu2000-flto +0 -432
- package/SVF-doxygen/wiki/cpu2006-flto +0 -417
- package/SVF-doxygen/wiki/cpu2017-wllvm.cfg +0 -999
- package/SVF-doxygen/wiki/database.png +0 -0
- package/SVF-doxygen/wiki/framework.png +0 -0
- package/SVF-doxygen/wiki/help.png +0 -0
- package/SVF-doxygen/wiki/icfg.png +0 -0
- package/SVF-doxygen/wiki/mssa-cha.png +0 -0
- package/SVF-doxygen/wiki/pagedge.png +0 -0
- package/SVF-doxygen/wiki/pagnode.png +0 -0
- package/SVF-doxygen/wiki/pt.png +0 -0
- package/SVF-doxygen/wiki/setupcmake.png +0 -0
- package/SVF-doxygen/wiki/setupconfiguration.png +0 -0
- package/SVF-doxygen/wiki/setupdashboard.png +0 -0
- package/SVF-doxygen/wiki/setupdebug.png +0 -0
- package/SVF-doxygen/wiki/setupenv.png +0 -0
- package/SVF-doxygen/wiki/startup.png +0 -0
- package/SVF-doxygen/wiki/svf-stat.pdf +0 -0
- package/SVF-doxygen/wiki/svfg-framework.png +0 -0
- package/SVF-doxygen/wiki/svfg.png +0 -0
- package/SVF-doxygen/wiki/svfg_opt.png +0 -0
- package/SVF-doxygen/wiki/svfgedge-cha.png +0 -0
- package/SVF-doxygen/wiki/svfgnode-cha.png +0 -0
- package/SVF-doxygen/wiki/svfpic/README.md +0 -6
- package/SVF-doxygen/wiki/svfpic/ass-1debug1.png +0 -0
- package/SVF-doxygen/wiki/svfpic/ass-1debug2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/build.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/cmd.png +0 -0
- package/SVF-doxygen/wiki/svfpic/connect1.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/connect2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/connect3.png +0 -0
- package/SVF-doxygen/wiki/svfpic/connect4.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/connect5.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/connect6.png +0 -0
- package/SVF-doxygen/wiki/svfpic/connect7.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/continue.png +0 -0
- package/SVF-doxygen/wiki/svfpic/debug-new.png +0 -0
- package/SVF-doxygen/wiki/svfpic/debug-new2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/debug1.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/debug2.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/debug3.png +0 -0
- package/SVF-doxygen/wiki/svfpic/debug4.png +0 -0
- package/SVF-doxygen/wiki/svfpic/debug5.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/debug6.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/docker_sys_requirement.png +0 -0
- package/SVF-doxygen/wiki/svfpic/docker_sys_requirements.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuild.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuild2.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuild3.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuild4.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuild5.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerbuildimage.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockercmd.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockercmd2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockercontainer.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb1.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb10.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb2.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb3.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb4.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb5.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb6.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb7.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb8.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerdb9.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerfinshbuilt.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerimage.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockernameImage.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerpull.png +0 -0
- package/SVF-doxygen/wiki/svfpic/dockerpull2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/download.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/extension1.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/extension2.jpeg +0 -0
- package/SVF-doxygen/wiki/svfpic/graphviz.png +0 -0
- package/SVF-doxygen/wiki/svfpic/hellodb.png +0 -0
- package/SVF-doxygen/wiki/svfpic/hellodb2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/hviz_0.png +0 -0
- package/SVF-doxygen/wiki/svfpic/hviz_1.png +0 -0
- package/SVF-doxygen/wiki/svfpic/hviz_2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/installC:C++Ext.png +0 -0
- package/SVF-doxygen/wiki/svfpic/installCMakeExt.png +0 -0
- package/SVF-doxygen/wiki/svfpic/installRCext.png +0 -0
- package/SVF-doxygen/wiki/svfpic/installdockerext.png +0 -0
- package/SVF-doxygen/wiki/svfpic/launch1.png +0 -0
- package/SVF-doxygen/wiki/svfpic/openfile.png +0 -0
- package/SVF-doxygen/wiki/svfpic/pathfolder.png +0 -0
- package/SVF-doxygen/wiki/svfpic/restart.png +0 -0
- package/SVF-doxygen/wiki/svfpic/rundocker.png +0 -0
- package/SVF-doxygen/wiki/svfpic/runinCLI.png +0 -0
- package/SVF-doxygen/wiki/svfpic/screen.png +0 -0
- package/SVF-doxygen/wiki/svfpic/settings1.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/settings2.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/settings3.jpg +0 -0
- package/SVF-doxygen/wiki/svfpic/shortlists.png +0 -0
- package/SVF-doxygen/wiki/svfpic/start.png +0 -0
- package/SVF-doxygen/wiki/svfpic/start1.png +0 -0
- package/SVF-doxygen/wiki/svfpic/update0.png +0 -0
- package/SVF-doxygen/wiki/svfpic/verify_docker.png +0 -0
- package/SVF-doxygen/wiki/svfpic/vs_entry_window.png +0 -0
- package/SVF-doxygen/wiki/svfpic/wsl.png +0 -0
- package/SVF-doxygen/wiki/svfpic/wsl_1.png +0 -0
- package/SVF-doxygen/wiki/svfpic/wsl_2.png +0 -0
- package/SVF-doxygen/wiki/svfpic/wsl_3.png +0 -0
- package/SVF-doxygen/wiki/tools.png +0 -0
- package/SVF-doxygen/wiki/users.png +0 -0
- package/SVF-doxygen/wiki/vm1.png +0 -0
- package/SVF-doxygen/wiki/vm2.png +0 -0
- package/SVF-doxygen/wiki/vm3.png +0 -0
- package/SVF-doxygen/wiki/vm4.png +0 -0
- package/SVF-doxygen/wiki/vm5.png +0 -0
- package/SVF-doxygen/wiki/vscode_build_tasks.png +0 -0
- package/SVF-doxygen/wiki/vscode_cpp_extension.png +0 -0
- package/SVF-doxygen/wiki/vscode_debug_list.png +0 -0
- package/SVF-doxygen/wiki/vscode_dir_structure.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1279",
|
|
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": {
|
|
@@ -163,7 +163,13 @@ public:
|
|
|
163
163
|
/// or a subset, depending on the client's wish.
|
|
164
164
|
/// TODO: interfaces are getting unwieldy, an initialised object may be better.
|
|
165
165
|
/// TODO: kind of sucks pta can't be const here because getPts isn't.
|
|
166
|
-
static std::vector<NodeID> cluster(
|
|
166
|
+
static std::vector<NodeID> cluster(
|
|
167
|
+
BVDataPTAImpl *pta,
|
|
168
|
+
const std::vector<std::pair<NodeID, unsigned>> keys,
|
|
169
|
+
std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
170
|
+
std::string evalSubtitle="",
|
|
171
|
+
bool printStat=true
|
|
172
|
+
);
|
|
167
173
|
|
|
168
174
|
// Returns a reverse node mapping for mapping generated by cluster().
|
|
169
175
|
static std::vector<NodeID> getReverseNodeMapping(const std::vector<NodeID> &nodeMapping);
|
|
@@ -206,9 +212,12 @@ public:
|
|
|
206
212
|
|
|
207
213
|
// From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences).
|
|
208
214
|
static inline std::pair<hclust_fast_methods, std::vector<NodeID>> determineBestMapping(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
216
|
+
Map<PointsTo, unsigned> pointsToSets,
|
|
217
|
+
const std::string &evalSubtitle,
|
|
218
|
+
double &evalTime,
|
|
219
|
+
bool printStat
|
|
220
|
+
);
|
|
212
221
|
};
|
|
213
222
|
};
|
|
214
223
|
|
|
@@ -190,7 +190,13 @@ const std::string NodeIDAllocator::Clusterer::LargestRegion = "LargestRegion";
|
|
|
190
190
|
const std::string NodeIDAllocator::Clusterer::BestCandidate = "BestCandidate";
|
|
191
191
|
const std::string NodeIDAllocator::Clusterer::NumNonTrivialRegionObjects = "NumNonTrivObj";
|
|
192
192
|
|
|
193
|
-
std::vector<NodeID> NodeIDAllocator::Clusterer::cluster(
|
|
193
|
+
std::vector<NodeID> NodeIDAllocator::Clusterer::cluster(
|
|
194
|
+
BVDataPTAImpl *pta,
|
|
195
|
+
const std::vector<std::pair<NodeID, unsigned>> keys,
|
|
196
|
+
std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
197
|
+
std::string evalSubtitle,
|
|
198
|
+
bool printStat
|
|
199
|
+
)
|
|
194
200
|
{
|
|
195
201
|
assert(pta != nullptr && "Clusterer::cluster: given null BVDataPTAImpl");
|
|
196
202
|
assert(Options::NodeAllocStrat() == Strategy::DENSE && "Clusterer::cluster: only dense allocation clustering currently supported");
|
|
@@ -385,8 +391,8 @@ std::vector<NodeID> NodeIDAllocator::Clusterer::cluster(BVDataPTAImpl *pta, cons
|
|
|
385
391
|
}
|
|
386
392
|
|
|
387
393
|
// Work out which of the mappings we generated looks best.
|
|
388
|
-
std::pair<hclust_fast_methods, std::vector<NodeID>> bestMapping =
|
|
389
|
-
|
|
394
|
+
std::pair<hclust_fast_methods, std::vector<NodeID>> bestMapping =
|
|
395
|
+
determineBestMapping(candidates, pointsToSets, evalSubtitle, evalTime, printStat);
|
|
390
396
|
|
|
391
397
|
overallStats[DistanceMatrixTime] = std::to_string(distanceMatrixTime);
|
|
392
398
|
overallStats[DendrogramTraversalTime] = std::to_string(dendrogramTraversalTime);
|
|
@@ -395,7 +401,7 @@ std::vector<NodeID> NodeIDAllocator::Clusterer::cluster(BVDataPTAImpl *pta, cons
|
|
|
395
401
|
overallStats[TotalTime] = std::to_string(distanceMatrixTime + dendrogramTraversalTime + fastClusterTime + regioningTime + evalTime);
|
|
396
402
|
|
|
397
403
|
overallStats[BestCandidate] = SVFUtil::hclustMethodToString(bestMapping.first);
|
|
398
|
-
printStats(evalSubtitle + ": overall", overallStats);
|
|
404
|
+
if (printStat) { printStats(evalSubtitle + ": overall", overallStats); }
|
|
399
405
|
|
|
400
406
|
return bestMapping.second;
|
|
401
407
|
}
|
|
@@ -654,14 +660,18 @@ void NodeIDAllocator::Clusterer::evaluate(const std::vector<NodeID> &nodeMap, co
|
|
|
654
660
|
|
|
655
661
|
// Work out which of the mappings we generated looks best.
|
|
656
662
|
std::pair<hclust_fast_methods, std::vector<NodeID>> NodeIDAllocator::Clusterer::determineBestMapping(
|
|
657
|
-
|
|
658
|
-
|
|
663
|
+
const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
|
|
664
|
+
Map<PointsTo, unsigned> pointsToSets,
|
|
665
|
+
const std::string &evalSubtitle,
|
|
666
|
+
double &evalTime,
|
|
667
|
+
bool printStat
|
|
668
|
+
)
|
|
659
669
|
{
|
|
660
670
|
// In case we're not comparing anything, set to first "candidate".
|
|
661
671
|
std::pair<hclust_fast_methods, std::vector<NodeID>> bestMapping = candidates[0];
|
|
662
672
|
// Number of bits required for the best candidate.
|
|
663
673
|
size_t bestWords = std::numeric_limits<size_t>::max();
|
|
664
|
-
if (
|
|
674
|
+
if ((enum hclust_fast_methods)Options::ClusterMethod() == HCLUST_METHOD_SVF_BEST)
|
|
665
675
|
{
|
|
666
676
|
for (const std::pair<hclust_fast_methods, std::vector<NodeID>> &candidate : candidates)
|
|
667
677
|
{
|
|
@@ -675,7 +685,7 @@ std::pair<hclust_fast_methods, std::vector<NodeID>> NodeIDAllocator::Clusterer::
|
|
|
675
685
|
evaluate(candidateMapping, pointsToSets, candidateStats, true);
|
|
676
686
|
const double clkEnd = PTAStat::getClk(true);
|
|
677
687
|
evalTime += (clkEnd - clkStart) / TIMEINTERVAL;
|
|
678
|
-
printStats(evalSubtitle + ": candidate " + candidateMethodName, candidateStats);
|
|
688
|
+
if (printStat) { printStats(evalSubtitle + ": candidate " + candidateMethodName, candidateStats); }
|
|
679
689
|
|
|
680
690
|
size_t candidateWords = 0;
|
|
681
691
|
if (Options::PtType() == PointsTo::SBV) candidateWords = std::stoull(candidateStats[NewSbvNumWords]);
|
package/svf/lib/WPA/Andersen.cpp
CHANGED
|
@@ -431,7 +431,6 @@ void Andersen::initialize()
|
|
|
431
431
|
*/
|
|
432
432
|
void Andersen::finalize()
|
|
433
433
|
{
|
|
434
|
-
// TODO: check -stat too.
|
|
435
434
|
// TODO: broken
|
|
436
435
|
if (Options::ClusterAnder())
|
|
437
436
|
{
|
|
@@ -440,7 +439,7 @@ void Andersen::finalize()
|
|
|
440
439
|
// TODO: should we use liveOnly?
|
|
441
440
|
// TODO: parameterise final arg.
|
|
442
441
|
NodeIDAllocator::Clusterer::evaluate(*PointsTo::getCurrentBestNodeMapping(), ptd->getAllPts(true), stats, true);
|
|
443
|
-
NodeIDAllocator::Clusterer::printStats("post-main", stats);
|
|
442
|
+
if (print_stat) { NodeIDAllocator::Clusterer::printStats("post-main", stats); }
|
|
444
443
|
}
|
|
445
444
|
|
|
446
445
|
/// sanitize field insensitive obj
|
|
@@ -917,7 +916,9 @@ void Andersen::cluster(void) const
|
|
|
917
916
|
|
|
918
917
|
std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> candidates;
|
|
919
918
|
PointsTo::MappingPtr nodeMapping =
|
|
920
|
-
std::make_shared<std::vector<NodeID>>(
|
|
919
|
+
std::make_shared<std::vector<NodeID>>(
|
|
920
|
+
NodeIDAllocator::Clusterer::cluster(steens, keys, candidates, "aux-steens", print_stat)
|
|
921
|
+
);
|
|
921
922
|
PointsTo::MappingPtr reverseNodeMapping =
|
|
922
923
|
std::make_shared<std::vector<NodeID>>(NodeIDAllocator::Clusterer::getReverseNodeMapping(*nodeMapping));
|
|
923
924
|
|
|
@@ -188,15 +188,7 @@ void FlowSensitive::finalize()
|
|
|
188
188
|
Map<PointsTo, unsigned> allPts = ptd->getAllPts(true);
|
|
189
189
|
// TODO: parameterise final arg.
|
|
190
190
|
NodeIDAllocator::Clusterer::evaluate(*PointsTo::getCurrentBestNodeMapping(), allPts, stats, true);
|
|
191
|
-
NodeIDAllocator::Clusterer::printStats("post-main: best", stats);
|
|
192
|
-
|
|
193
|
-
// Do the same for the candidates. TODO: probably temporary for eval. purposes.
|
|
194
|
-
for (std::pair<hclust_fast_methods, std::vector<NodeID>> &candidate : candidateMappings)
|
|
195
|
-
{
|
|
196
|
-
// Can reuse stats, since we're always filling it with `evaluate`, it will always be overwritten.
|
|
197
|
-
NodeIDAllocator::Clusterer::evaluate(candidate.second, allPts, stats, true);
|
|
198
|
-
NodeIDAllocator::Clusterer::printStats("post-main: candidate " + SVFUtil::hclustMethodToString(candidate.first), stats);
|
|
199
|
-
}
|
|
191
|
+
if (print_stat) { NodeIDAllocator::Clusterer::printStats("post-main: best", stats); }
|
|
200
192
|
}
|
|
201
193
|
|
|
202
194
|
BVDataPTAImpl::finalize();
|
|
@@ -831,7 +823,9 @@ void FlowSensitive::cluster(void)
|
|
|
831
823
|
keys.emplace_back(pair.first, 1);
|
|
832
824
|
|
|
833
825
|
PointsTo::MappingPtr nodeMapping =
|
|
834
|
-
std::make_shared<std::vector<NodeID>>(
|
|
826
|
+
std::make_shared<std::vector<NodeID>>(
|
|
827
|
+
NodeIDAllocator::Clusterer::cluster(ander, keys, candidateMappings, "aux-ander", print_stat)
|
|
828
|
+
);
|
|
835
829
|
PointsTo::MappingPtr reverseNodeMapping =
|
|
836
830
|
std::make_shared<std::vector<NodeID>>(NodeIDAllocator::Clusterer::getReverseNodeMapping(*nodeMapping));
|
|
837
831
|
|
|
@@ -791,7 +791,9 @@ void VersionedFlowSensitive::cluster(void)
|
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
PointsTo::MappingPtr nodeMapping =
|
|
794
|
-
std::make_shared<std::vector<NodeID>>(
|
|
794
|
+
std::make_shared<std::vector<NodeID>>(
|
|
795
|
+
NodeIDAllocator::Clusterer::cluster(ander, keys, candidateMappings, "aux-ander", print_stat)
|
|
796
|
+
);
|
|
795
797
|
PointsTo::MappingPtr reverseNodeMapping =
|
|
796
798
|
std::make_shared<std::vector<NodeID>>(NodeIDAllocator::Clusterer::getReverseNodeMapping(*nodeMapping));
|
|
797
799
|
|