[Soot-list] Disable Jimple unused variable elimination process

陳日揚 t106598014 at ntut.org.tw
Wed Sep 26 09:42:51 EDT 2018


Hi,


I want to do some analyses in BodyTransformer for Jimple code which was
transformed from .class files. It seems that Soot've done some
optimizations like eliminating unused variables in Jimple Body Creation
phase. I'm wondering can I disable such elimination process so that I can
get unused variables' informations in Jimple code.


I've tried disable "Unused Local Eliminator" and "Dead Assignment
Eliminator" commandline options("-p jb.ulp enabled:false -p jb.dae
enabled:false"), but the input program below still output Jimple code
without variable "a"'s information.


Java source code(compile to .class file before running Soot):

public void foo() {

    int a = method1();

}


Output Jimple code:

public void foo() {

          X r0;

          r0 := @this: X;

          specialinvoke r0.<X: int method1()>();

          return;

 }


Thanks a lot !


Best regard,

Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20180926/9e90d327/attachment.html>


More information about the Soot-list mailing list