[abc-users] Re: Strange effect in Baf to Jasmin conversion

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Fri, 18 Apr 2008 14:25:21 -0400

This should be fixed now. I checked in a change which makes Soot
validate the condition that identity statements come first when the
validation flag is enabled. Furthermore abc now runs an
IdentityStmtNormalizer in its jtp phase to ensure that these
requirements be met.

Amjad, if you try out the latest SVN version your should actually not
be seeing this problem any more.

Eric

On 17/04/2008, Eric Bodden <eric.bodden_at_mail.mcgill.ca> wrote:
> Hi all.
>
> After some discussion with Patrick it seems that indeed there exists
> an implicit condition that identity statements have to be the first
> statements in a Jimple (and Baf) body. (I remember this having come up
> before but I could never quite explain why.)
>
> So there's two things we can do in abc, either check this condition or
> enforce it. I personally think that enforcing would be nicer and
> indeed when looking at this method it seems that the person who
> implemented the method had something like this in mind:
>
> abc.soot.util.Restructure.getThisLocal(SootMethod)
>
> (the code that would do the actual restructuring is commented out)
>
> What's your opinion on this?
>
>
> Eric
>
>
> On 17/04/2008, Patrick Lam <plam_at_cs.mcgill.ca> wrote:
> > Eric Bodden wrote:
> > > Thanks for the detailed explanation Patrick. After reading the
> > > relevant portion of the specification (see below), I wonder whether
> > > not actually the local variable packer should ensure that local
> > > variable 0 is never written to and if that would not be the "more
> > > correct" fix. Of course one could also enforce that identity
> > > statements always come first in Jimple (and Baf) but that would add
> > > yet another constraint on the developer.
> >
> >
> > I don't like that as much as enforcing the Jimple/Baf conditions,
> > because it means that the local variable packer needs to know whether or
> > not the method is an instance method or a static method. The Jimple/Baf
> > condition is something that really ought to be checked, and it just
> > makes sense anyway: identity statements should come first (or at the
> > head of exception-catching blocks).
> >
> > pat
> >
> >
>
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>

-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
Received on Fri Apr 18 2008 - 19:25:25 BST

This archive was generated by hypermail 2.2.0 : Sat Apr 19 2008 - 02:10:11 BST