Re: [abc-users] Obtaining jimplified advices in a ReweavingAnalysis

From: Nathan Weston <npweston@gmail.com>
Date: Fri Jun 15 2007 - 16:41:31 BST

Thanks for your (very) swift reply Eric!

What I'm trying to do is to analyse advice essentially pre-weave-time
- the idea is to do some pre-processing on the advice such that when I
come to the analysis on the woven program I have some partial results
which can be reused in the analysis. Ideally I'd like to analyse
methods pre-weave-time as well - i.e. before invocations of advices
are included.

When you say getting the Jimple from an AdviceDecl, do you mean simply
getting the Methods associated with the Application Classes and
retrieving their bodies? That's what I'm doing presently, and as you
say around advice is a little tricky :)

Thanks again,
Nathan

On 6/15/07, Eric Bodden <eric.bodden@mail.mcgill.ca> wrote:
> HI, Nathan.
>
> I think this is a bit tricky, because some pieces of advice are
> inlined while others may not. So first of all you would have to know
> where to look for the code. Also, I am not quite sure whether you want
> the code of the shadow, i.e. the location where the advice is woven or
> the code that is actually woven into there.
>
> The latter you can get by looking at the Jimple that is generated for
> the AdviceDecl (AdviceDecl is a MethodDecl and the advice body is
> hence a normal method body for which Jimple is generated the usual
> way.) For around-advice, things might be a bit more tricky.
>
> What are you trying to achieve on a higher level? Maybe there are
> other ways to do it...
>
> Eric
>
> On 15/06/07, Nathan Weston <npweston@gmail.com> wrote:
> > Hello,
> >
> > I was just wondering if it's possible, from a ReweavingAnalysis, to
> > obtain a chain of Jimple stmts which correspond to an advice's code
> > BEFORE weaving? That is, I would like to expose and analyse what an
> > advice might look like before weaving, with proceed() statements
> > unbound. Or is there a way to analyse this code at an earlier stage,
> > before the weaving happens?
> >
> > Thanks for your help,
> > Nathan Weston
> >
> >
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>
>
Received on Fri Jun 15 16:41:33 2007

This archive was generated by hypermail 2.1.8 : Fri Jun 15 2007 - 17:00:10 BST