svf-tools 1.0.559 → 1.0.560
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/CFLGrammar_8txt.html +8 -8
- package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +10 -1
- package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +3 -1
- package/SVF-doxygen/html/html/PEGGrammar_8txt.html +14 -32
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +13 -10
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +190 -2
- package/SVF-doxygen/html/html/functions_a.html +11 -5
- package/SVF-doxygen/html/html/functions_c.html +21 -18
- package/SVF-doxygen/html/html/functions_f.html +3 -3
- package/SVF-doxygen/html/html/functions_func.html +16 -10
- package/SVF-doxygen/html/html/functions_func_c.html +19 -16
- package/SVF-doxygen/html/html/functions_func_s.html +1 -1
- package/SVF-doxygen/html/html/functions_i.html +3 -3
- package/SVF-doxygen/html/html/functions_l.html +3 -3
- package/SVF-doxygen/html/html/functions_o.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +3 -3
- package/SVF-doxygen/html/html/functions_r.html +3 -7
- package/SVF-doxygen/html/html/functions_s.html +18 -16
- package/SVF-doxygen/html/html/functions_t.html +3 -3
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/globals_g.html +3 -3
- package/SVF-doxygen/html/html/globals_v.html +1 -2
- package/SVF-doxygen/html/html/globals_vars.html +3 -4
- package/SVF-doxygen/html/html/search/all_1.js +2 -0
- package/SVF-doxygen/html/html/search/all_10.js +4 -4
- package/SVF-doxygen/html/html/search/all_11.js +1 -1
- package/SVF-doxygen/html/html/search/all_12.js +12 -12
- package/SVF-doxygen/html/html/search/all_13.js +3 -3
- package/SVF-doxygen/html/html/search/all_15.js +3 -3
- package/SVF-doxygen/html/html/search/all_3.js +1 -0
- package/SVF-doxygen/html/html/search/all_6.js +1 -1
- package/SVF-doxygen/html/html/search/all_7.js +2 -2
- 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_e.js +2 -2
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +2 -0
- package/SVF-doxygen/html/html/search/functions_11.js +1 -1
- package/SVF-doxygen/html/html/search/functions_2.js +1 -0
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_7.js +2 -2
- package/SVF-doxygen/html/html/search/variables_e.js +1 -1
- package/include/CFL/CFLGraphBuilder.h +9 -0
- package/include/CFL/PEGGrammar.txt +4 -8
- package/lib/CFL/CFLGraphBuilder.cpp +44 -0
- package/package.json +1 -1
|
@@ -326,6 +326,14 @@ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind sta
|
|
|
326
326
|
key.append("bar");
|
|
327
327
|
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(CFLDerefNode->getId()), label2KindMap[key]);
|
|
328
328
|
}
|
|
329
|
+
else if ( edge->getEdgeKind() == ConstraintEdge::VariantGep)
|
|
330
|
+
{
|
|
331
|
+
/// Handle VGep normalize to Normal Gep by connecting all geps' srcs to vgep dest
|
|
332
|
+
/// Example: In Test Case: Ctest field-ptr-arith-varIdx.c.bc
|
|
333
|
+
/// BFS Search the 8 LEVEL up to find the ValueNode, and the number of level search is arbitary
|
|
334
|
+
/// the more the level search the more valueNode and the Vgep Dst will possivble connect
|
|
335
|
+
connectVGep(cflGraph, graph, edge->getSrcNode(), edge->getDstNode(), 8, pag);
|
|
336
|
+
}
|
|
329
337
|
else
|
|
330
338
|
{
|
|
331
339
|
CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
|
|
@@ -356,5 +364,41 @@ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind sta
|
|
|
356
364
|
return cflGraph;
|
|
357
365
|
}
|
|
358
366
|
|
|
367
|
+
void AliasCFLGraphBuilder::AliasCFLGraphBuilder::connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag)
|
|
368
|
+
{
|
|
369
|
+
if (level == 0) return;
|
|
370
|
+
level -= 1;
|
|
371
|
+
for (auto eit = src->getAddrInEdges().begin(); eit != src->getAddrInEdges().end(); eit++)
|
|
372
|
+
{
|
|
373
|
+
const MemObj* mem = pag->getBaseObj((*eit)->getSrcID());
|
|
374
|
+
for (u32_t maxField = 0 ; maxField < mem->getNumOfElements(); maxField++)
|
|
375
|
+
{
|
|
376
|
+
addBiGepCFLEdge(cflGraph, (*eit)->getDstNode(), dst, maxField);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
for (auto eit = src->getInEdges().begin(); eit != src->getInEdges().end() && level != 0; eit++)
|
|
380
|
+
{
|
|
381
|
+
connectVGep(cflGraph, graph, (*eit)->getSrcNode(), dst, level, pag);
|
|
382
|
+
}
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
359
385
|
|
|
386
|
+
void AliasCFLGraphBuilder::addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label)
|
|
387
|
+
{
|
|
388
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(src->getId()), cflGraph->getGNode(dst->getId()), label);
|
|
389
|
+
std::string key = kind2LabelMap[label];
|
|
390
|
+
key.append("bar");
|
|
391
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(dst->getId()), cflGraph->getGNode(src->getId()), label2KindMap[key]);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
void AliasCFLGraphBuilder::addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri)
|
|
396
|
+
{
|
|
397
|
+
CFLEdge::GEdgeFlag edgeLabel = CFLGrammar::getAttributedKind(attri, ConstraintEdge::NormalGep);
|
|
398
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(src->getId()), cflGraph->getGNode(dst->getId()), edgeLabel);
|
|
399
|
+
std::string key = kind2LabelMap[ConstraintEdge::NormalGep];
|
|
400
|
+
key.append("bar");
|
|
401
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(dst->getId()), cflGraph->getGNode(src->getId()), CFLGrammar::getAttributedKind(attri, label2KindMap[key]));
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
360
404
|
} // end of SVF namespace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.560",
|
|
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": {
|