[Soot-list] annotation bug? (was: Java 1.5 annotations)

Dave King dhking at cse.psu.edu
Wed Apr 30 08:12:29 EDT 2008


On Tue, 2008-04-29 at 22:23 -0400, Eric Bodden wrote:
> The latter are very tricky because there is no guaranteed 1 to 1
> mapping between local variables on the source and on the Jimple level.
> Therefore we will probably decide not to retain local variable
> annotations until somebody specifically asks for this feature.

This is tangently related: I am trying to implement something in Soot
where I can track assignments to certain local variables at certain code
locations [1].  So something like:

TRACK_ASSIGNS(x)
...
statements
x := 3 // we care
more statements
...
UNTRACK_ASSIGNS(x)

x := 4 // don't care

Is there a place that Soot stores information about which local
variables might correspond to which Jimple locals?  I haven't been
successful in using javac -g combined with -p jb.use-original-names to
get at this.  (I think this is because the local variable names don't
show up in the Java bytecode when I do a javap -c, so Jimple can't get
at them)

Because of the we-only-care-sometimes nature of this tracking, it
doesn't seem like annotations are the ideal solution, though if I had
local variable tracking of annotations, I could introduce a temporary
variable y that had an annotation @Track inside the TRACK_ASSIGN block
and get the variable information at the bytecode level this way.

Dave

[1] For my this application, it is probably going to be ultimately
easier to manually specify which variables need to be tracked rather
than inferring this as a result of some bytecode-level analysis.
-- 
Graduate Student
Penn State University
http://www.cse.psu.edu/~dhking/




More information about the Soot-list mailing list