[Soot-list] How to invalidate spark result?

Ondrej Lhotak olhotak at sable.mcgill.ca
Tue Oct 12 22:39:10 EDT 2004


On Tue, Oct 12, 2004 at 10:15:41PM -0400, Chen Fu wrote:
> Is there anyway to invalidate the points-to analysis result and rerun
> spark all over again. Suppose I defined two phase in the transformer,
> the first phase need points-to information so it's following a spark
> phase. But my first phase changed the code and then again my second
> phase also need points-to information. But the result of spark is not
> longer valid because of the modification in my first phase.
> 
> I've tried to call 
> Scene.v().releasePointsToAnalysis();
> then
> Sparktranformer.v().transform(...).

This is the correct way to do it. However, I don't normally run it
twice like this, so there may well be problems with it. I had a quick
look through the code looking for state that might be retained, but
didn't notice any. One thing that may be causing the problem is that
Spark will use a call graph from the Scene if there is one, so it may
be getting the out-of-date call graph from the first run. So, calling
releaseCallGraph on the Scene might help.

> But the second phase finished in no time and the result seems not right.

You don't say exactly how much time is no time, but it's not all that
unusual that it would run in a few seconds the second time. The reason
is that Spark itself is very quick; what takes most of the time is
reading in and converting to Jimple all the class files.

Ondrej

> What's the correct way to do it?
> 
> Thanks!
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://www.sable.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list