[Soot-list] Pointer Analysis
Saswat Anand
saswat at cc.gatech.edu
Fri Dec 9 19:39:51 EST 2005
Google tells me difference between Union and PointsToSetInternal was
asked earlier here, and I was the one to ask!! So sorry for asking
again. Ondrej's reply from that thread (in case it is interesting to
others):
The Spark points-to set implementations only know about the other Spark
points-to sets implementations. Union is part of the side-effect
analysis, which is external to Spark, and was developed later. So, you
should be able to pass a Spark points-to set to a Union, but not a Union
to a Spark points-to set. There's a static utility method in Union that
takes two PointsToSets and calls the hasNonEmptyIntersection() method
on them the right way around.
Saswat
Saswat Anand wrote:
>
> Thanks a lot for the quick help! It serves my purpose nicely because I
> have just one PointsToSet and for a large number of new stmts, I need to
> check if their corresponding Alloc node is in that PointsToSet. So I can
> first iterate through all nodes of the set and build a reverse mapping.
>
> But there still remains another problem. I see class Union also
> implements PointsToSet. When and where Union is used to represent
> points-to set? I want to be able to cast PointsToSet's that I get from
> PointsToAnalysis APIs to PointsToSetInternal. When can I do that safely?
>
> Saswat
>
>
> Manu Sridharan wrote:
>
>> I'll give this one a try...
>>
>> You can call getNewExpr() on an AllocNode to get the corresponding new
>> expr. So, given a PointsToSetInternal, I'd iterate through its
>> contents (using forall()), and then for each AllocNode in the set,
>> check if its new expr is the desired one. I don't think there is a
>> reverse mapping from new exprs to the corresponding AllocNode.
>> Someone can correct me if I'm off on this one.
>>
>> -Manu
>>
>> Saswat Anand wrote:
>>
>>> Hello,
>>>
>>> I need some pointers on using soot's points-to analysis and would
>>> appreciate your help very much.
>>>
>>> I want to find out if the Alloc node corresponding a new statement is
>>> in a given PointsToSet. Basically, how can I find the Alloc node
>>> corresponding to a new stmt. If I know that, I can probably use
>>> PointsToSetInternal: contains( Node n ). But is it safe to do that?
>>>
>>> Thanks,
>>> Saswat
>>>
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>>
>>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
More information about the Soot-list
mailing list