[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which Transformation Pack Should I choose?



Emil Slusanschi <slusanschi@sc.rwth-aachen.de> wrote:
> I want to be able to "read" and verify the generated/reverse engineered 
> code that is being generated (java source files). If I keep generating a 
> ton of temporaries (which is perfectly normal at the Jimple level ofc), 
> I will eventually loose the overview.

Ah, yes, Grimp is probably your best bet for aggregated expressions in
that case.

> maybe optimize the resulting transformed piece of code. And yes, I also 
> wanted to ask: is there a way of determining the _exact_ order in which 
> the passes (packs and analyses) are executed. By this I mean, first a 
> jop.cse and then my jtp.transform and then another gop.transform maybe 
> and so on... Can it be done through the command line? The order of the 
> arguments in the command line or something?

You can determine the exact order.  Take a look at P83 of
http://www.sable.mcgill.ca/soot/tutorial/pldi03/tutorial.pdf
for a quick overview of the ordering of the packs.

Within the packs, optimizations are applyed in the order listed on
http://www.sable.mcgill.ca/soot/tutorial/phase/ or the order in which
you added them.

If you're brave you can look at soot/PackManager.java as well.

If you want to change the ordering of the analyses, you'd have to do
it at an API level by manipulating the Packs.  Unfortunately, it looks
messier than I expected.  While you can add your own analyses to the
pack, you can't really remove them -- although you could disable them
by applying the proper phase option.  Again, if you're brave you could
play with soot/PackManager.java directly.

Alternately, you don't have to rely on the packs at all... you can
apply the analyses directly from your code in whatever order you wish.

Hope this answers your questions.

Cheers,
Navin.