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

Manuel Benz manuel.benz at uni-paderborn.de
Mon Jan 21 05:31:33 EST 2019


Hi.

You probably want to run your transformer in the „jtp“ package. All bodies should be stable and optimised until „jtp“.

Here you can find some reference about Soot's packages and phases: https://github.com/Sable/soot/wiki/Packs-and-phases-in-Soot
The PackManager class is responsible for managing packs and comes with some pre-eneabled ones: https://github.com/Sable/soot/blob/develop/src/main/java/soot/PackManager.java#L176
You can use phase options to configure the different packages and phases: https://soot-build.cs.uni-paderborn.de/public/origin/develop/soot/soot-develop/options/soot_options.htm

Best,
Manuel


Am 21.01.2019 um 09:56 schrieb Eric Bodden <eric.bodden at uni-paderborn.de<mailto:eric.bodden at uni-paderborn.de>>:

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<mailto: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<mailto: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<mailto:ishaq at ishaq.pk>>
Gesendet: Freitag, 18. Januar 2019 17:39
An: soot-list at cs.mcgill.ca<mailto: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

_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA<mailto:Soot-list at CS.McGill.CA>
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

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


More information about the Soot-list mailing list