[Soot-list] Disable Jimple unused variable elimination process

Eric Bodden eric.bodden at uni-paderborn.de
Tue Oct 2 10:16:08 EDT 2018


Hi Andy.

Are you sure that those variables are actually not already thrown away by the compiler? I would think so, actually. If so, then obviously Soot has no way to recover them, except if you analyze the source code.

Cheers
Eric

> On 26. Sep 2018, at 15:42, 陳日揚 <t106598014 at ntut.org.tw> wrote:
> 
> 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
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list



More information about the Soot-list mailing list