Fwd: [Soot-list] LoopFinder

Eric Bodden eric.bodden at mail.mcgill.ca
Thu Jan 10 04:51:26 EST 2008


Hi.

It does not matter what you do. You can use a new LoopFinder every
time or you can cache one as you do. It makes no difference at all.

There is no singleton method v() because that would make no sense. The
method loops() returns a new collection of loops depending on when
internalTransform(..) was called the last time. A mistake is probably
to have put this class in the annotation package because it does not
generate any annotations at all (any more?).

Eric

On 10/01/2008, Peng Li <lipeng360 at gmail.com> wrote:
> HI Rich,
> Thank you for you reply. The LoopFinder I am using is from the
> soot.jimple.toolkits.annotation.logic.LoopFinder.The class uses a
> MHGDominatorsFinder to find loops.
>
> I am just wondering if the way I am using this internaltransform
> is ok?
>
> Cheers
> Peng
> 2008/1/9, Richard L. Halpert <richardlhalpert at gmail.com>:
> > If you're referring to
> > soot.jimple.toolkits.thread.mhp.LoopFinder, it was written
> > that way because it was was written specifically to be a part of the MHP
> > analysis, which at the time was not integrated into Soot.  (It was built as
> > a branch).  The author didn't bother to go to the trouble of making it "play
> > nice" with the rest of Soot since she didn't expect it to ever be merged
> > back in.  As it turns out, I needed MHP for my work, so I merged it back
> > into Soot, but it's a lot of code, and I did not have a chance to make sure
> > everything fits in.
> >
> > The way you're using it is just fine.  Maybe if I ever finish my thesis,
> > I'll tidy up the code :-P
> >
> > -Rich
> >
> >
> > On Jan 9, 2008 4:39 PM, Peng Li < lipeng360 at gmail.com> wrote:
> > >
> > > HI
> > > I am using a pre-build internalTransform LoopFinder in soot, but I
> > > found there is no v() method in this transform. So, I just copy this
> > > class to my project and add something as following,
> > > private static LoopFinder instance = new LoopFinder();
> > > public static LoopFinder v() { return instance; }
> > >
> > > It seems that the internalTransform works no problem to find all the
> > > loops in my application. However, I am wondering why this
> > > internalTransform is wrote this way? How do we add this kind of
> > > transform into a phase?
> > >
> > > Cheers
> > > Peng
> > > _______________________________________________
> > > 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
>


--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list