[Soot-list] How to invalidate spark result?

Chen Fu chen.fu.cn at gmail.com
Thu Oct 14 15:36:04 EDT 2004


I reset the following fields in Singletons and G between two Spark,
and it seems work now. maybe some of them are not necessary.

instanceSparkTransformer = null;
instanceFieldTagger = null;
instanceFullObjectSet = null;
instanceFieldReadTagAggregator = null;
instanceFieldWriteTagAggregator = null;
instanceFieldTagAggregator = null;
Parm_pairToElement.clear();
MethodPAG_methodToPag.clear();


On Tue, 12 Oct 2004 22:39:10 -0400, Ondrej Lhotak
<olhotak at sable.mcgill.ca> wrote:
> 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