[Soot-list] Which command-line options in order to generate new intermediate variable for each statement in Jimple?

Z zell08v at orange.fr
Sun Jul 22 22:40:32 EDT 2012


Hi, Christina,

I am learning SOOT as well. In my humble point of view, you are requiring
that SOOT does register allocation optimization for you. (See Appel.)

As you probably know, this is s classic hard problem (NP). So I do not
think there is an option to do this. Maybe someone else has already written
an approximate analyses based on SOOT  to do this so you can use her/his
codes to do your work. It it is not yet done, I would encourage you to do
the exercise following algorithms described in Appel's  book.

Cheers,
Zell

On Sun, Jul 22, 2012 at 10:43 PM, Cristina Ilie <crysgirlro at yahoo.com>wrote:

> Hello,
>
> I would like that Soot generates me a Jimple code where the intermediate
> variables don't repeat.
> For example for the nest Java code [1] Soot generates me now the [2]
> Jimple. I wish that Soot
> to generate me a new variable when it performs the add statement: "$d0 =
> $d0 + $d1;";
> Instead of this statement it will insert a new variable "$d3" and it will
> generate the following:
> "$d3 = $d0 + $d1". So the final code will be [3].
>
> I suppose there is an option that should be set or unset for the Soot. Can
> you say me which is?
> I tried to unset the "Jimple Local Aggregator" from "Jimple Body Creation"
> but no positive
> results...
>
> Cristina
>
>
> [1]
> z = Math.sqrt(Math.pow(x, 2)+Math.pow(x, 3));
>
> [2]
> x := @parameter0: double;
> $d0 = staticinvoke <java.lang.Math: double pow(double,double)>(x, 2.0);
> $d1 = staticinvoke <java.lang.Math: double pow(double,double)>(x, 3.0);
> $d0 = $d0 + $d1;
> z = staticinvoke <java.lang.Math: double sqrt(double)>($d0);
>
> [3]
> x := @parameter0: double;
> $d0 = staticinvoke <java.lang.Math: double pow(double,double)>(x, 2.0);
> $d1 = staticinvoke <java.lang.Math: double pow(double,double)>(x, 3.0);
> $d3 = $d0 + $d1;
> z = staticinvoke <java.lang.Math: double sqrt(double)>($d3);
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120723/f5cf9b17/attachment.html 


More information about the Soot-list mailing list