[Soot-list] how to make sure my internalTransform is executed at the very end

Eric Bodden eric.bodden at uni-paderborn.de
Mon Jan 21 03:56:55 EST 2019


Hi again.

How are you inserting your transform right now? You need to stick it into the right pack to get the desired behavior.

Cheers
Eric

> On 20. Jan 2019, at 01:30, Ishaq <ishaq at ishaq.pk> wrote:
> 
> Thank you very much for replying Dr. Eric, I think I did not elaborate my problem correctly.
> 
> I do *not* want to disable this pack, (I want all optimizations). I just want my transformation pack to run at the very end so that it doesn't have stale information.
> 
> I was hoping to some how define these optimizations packs as dependency of my analysis (e.g. similar to how we can define dependencies between LLVM passes), so that my code runs after these optimizations have taken place.
> 
> if I can't figure it out, I'll disable these optimizations like you suggested. 
> 
> 
> 
> --
> MI
> 
> 
> On Sat, Jan 19, 2019 at 9:44 AM Eric Bodden <eric.bodden at uni-paderborn.de> wrote:
> Hi Ishaq.
> 
> You will need to identify the appropriate pack in Soot that applies this optimization and then disable it, through the appropriate options. To me this look like a constant propagator.
> 
> Cheers
> Eric
> 
> --
> Sent from my mobile
> Von: Ishaq <ishaq at ishaq.pk>
> Gesendet: Freitag, 18. Januar 2019 17:39
> An: soot-list at cs.mcgill.ca
> Betreff: [Soot-list] how to make sure my internalTransform is executed at	the very end 
> 
> Hello,
> 
> My code essentially constructs def use chains (I store the Stmt/Unit objects in a map). However, once the internalTransform has finished running, some of them become null e.g. an IfStmt whose condition was "i23_1 >= 100", now looks has "0 >= 100" and it's target is now null.
> 
> I am assuming this happens because Soot optimizes away the unnecessary variables (e.g. in the above case, it figured out that i23_1 was always going to be 0 and hence, there was no need for conditional jump).
> 
> Problem is that I need my def-use chains to be constructed from the final optimized soot shimple so that it remains valid when I use it later.
> 
> How do I ensure that my internalTransform is executed after Soot has made all its changes to the code?
> 
> Thanks.
> --
> MI



More information about the Soot-list mailing list