[Soot-list] Why create temp$xx variables?

Patrick Lam plam at sable.mcgill.ca
Tue Apr 21 12:11:25 EDT 2009


Peng Du wrote:
> Thanks, Eric and Patrick.
> 
> Yes, I did turned off all the optimizations to see what the result would 
> be. The reason why I turned off those optimizations is: I want to write 
> a custom constant propagator with Shimple. Then I ran into this temp$ 
> issue and couldn't figure out why. If SOOT propagates and fold those 
> constants, I can't test my algorithm then.
> 
> How can I get around this?

You get the temp$ variables because Soot creates them by default when 
creating Jimple from bytecode; it has to do some work to eliminate them. 
I don't exactly understand what you're trying to accomplish. You can 
either run your own constant propagator without Soot's default ones, and 
you should then get rid of the temp$ variables and anything else you can 
get, or you can run your constant propagator with Soot's default passes, 
in which case you should be able to get any additional constants that 
you can find.

pat


More information about the Soot-list mailing list