SVF-tools / SVF

Static Value-Flow Analysis Framework for Source Code
http://svf-tools.github.io/SVF/
Other
1.39k stars 434 forks source link

How to get point-to set? #1485

Open yuffon opened 2 months ago

yuffon commented 2 months ago

Hi, I am using SVF to get point-to set. I see in

AliasResult BVDataPTAImpl::alias(const PointsTo& p1, const PointsTo& p2)
{

    PointsTo pts1;
    expandFIObjs(p1,pts1);
    PointsTo pts2;
    expandFIObjs(p2,pts2);

    if (containBlackHoleNode(pts1) || containBlackHoleNode(pts2) || pts1.intersects(pts2))
        return AliasResult::MayAlias;
    else
        return AliasResult::NoAlias;
}

It seems that I should use expandFIObjs to get the entire pt set, isn't it? Besides, what is the meaning of blackhole nodes?

yuleisui commented 2 months ago

Yes, expandFIObjs will allow you to expand an FI Obj to be replaced by all its field objects if this FI object has fields.

Blackhole is an object that possibly aliases with any other objects.

yuffon commented 2 months ago

Yes, expandFIObjs will allow you to expand an FI Obj to be replaced by all its field objects if this FI object has fields.

Blackhole is an object that possibly aliases with any other objects.

Thanks, Yulei. I get it.