[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: may alias analysis



On Fri, Aug 27, 2004 at 04:47:47PM +0200, Ercasta wrote:
> Hi,
> I wrote on this mailing list asking for help for CallGraph construction.
> After a long struggle I managed to get Call Graph construction only for
> application classes. Now I'm trying to use Soot's alias analysis.
> Again, I'm having trouble, mainly because of lack of documentation. 
> I am not able to retrieve anything but a DumbPointerAnalysis from
> Scene.v().getPointsToAnalysis().
> Can you please post some lines of code to show me how to obtain
> may-alias analysis for method's variables?

In order to get Soot to run a points-to analysis, you need to
run in whole-program mode (with the -w switch), and enable the cg.spark
phase. After Spark has run, the Scene.v().getPointsToAnalysis() will
return a PAG containing the points-to analysis results. You can find
more documentation on the Spark options in the phase options tutorial
(http://www.sable.mcgill.ca/soot/tutorial/) and in the appendix of my
MSc thesis (http://www.sable.mcgill.ca/publications/). Some information
about using the PointsToAnalysis interface can be found in the slides
for the PLDI03 tutorial (also http://www.sable.mcgill.ca/soot/tutorial/).

Hope that helps.

Ondrej

> TIA
> 
> Antonio Castaldo D'Ursi
>