[Soot-list] Pointer Analysis

Saswat Anand saswat at cc.gatech.edu
Fri Dec 9 19:21:50 EST 2005


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
> 
> 
> 



More information about the Soot-list mailing list