[Soot-list] Pack Manager and removing phase

Arzt, Steven steven.arzt at sit.fraunhofer.de
Thu Mar 9 07:14:44 EST 2017


Hi Pallavi,

The best approach is to add both transformers right away and then call the PackManager only once. It will then run both transformers consecutively. I still do not understand what you mean by “the instrumented code is blank(null)”. Soot works on a Scene and transforms classes and methods in the Scene. The Scene will never be null. The term “code” is not clear in the context of Soot. Do you mean that a certain method has no active body anymore?

Best regards,
  Steven

From: Pallavi Majumder [mailto:s8pamaju at stud.uni-saarland.de]
Sent: Thursday, March 9, 2017 1:11 PM
To: Arzt, Steven <steven.arzt at sit.fraunhofer.de>
Cc: soot-list at cs.mcgill.ca
Subject: Re: [Soot-list] Pack Manager and removing phase


Hi Steven,

The stack trace is correct. What I am basically doing is instrumenting my code, if I run the Pack Managers together the output instrumented code is blank(null).

The reason why I am running it twice is that I am adding a different transform the second time.

Best,
Pallavi
Quoting "Arzt, Steven" <steven.arzt at sit.fraunhofer.de<mailto:steven.arzt at sit.fraunhofer.de>>:
Hi Pallavi,







To understand what happens here, I would need a lot more detail. What do you mean by “null result”? Is there some exception? What is the stack trace?







Secondly, why do you attempt to run the PackManager twice at all? This is not the intended use of the PackManager and I don’t really see a reason why this should be necessary.







Best regards,


  Steven







From: Soot-list [mailto:soot-list-bounces at cs.mcgill.ca] On Behalf Of Pallavi Majumder
Sent: Thursday, March 9, 2017 11:49 AM
To: soot-list at cs.mcgill.ca<mailto:soot-list at cs.mcgill.ca>
Subject: [Soot-list] Pack Manager and removing phase








Hello All,

I execute, the following code twice. Each time for different classname. However, when I execute them in the same program run the result of the second transform is incorrect.

PackManager.v().getPack("jtp")


.add(new Transform("jtp.mainInstrumentation", classname));

When I execute the PackManager twice in 2 different program runs, everything works fine but executing them together creates a null result. I tried to remove the particular phase name before the second execution, but that does not help.

Just to make it clear, here is what I tried:


PackManager.v().getPack("jtp")


.add(new Transform("jtp.mainInstrumentation", new XMLConversion()));
PackManager.v().getPack("jtp").remove("jtp.mainInstrumentation");


PackManager.v().getPack("jtp")


.add(new Transform("jtp.xmlInstrumentation", new XMLConversion()));



jtp.mainInstrumentation works fine, but jtp.xmlInstrumentation does not work here. However , if I execute them individually, I get perfect results.

Please note that I want them to use "jtp" and not "wjtp" or any other packs.

I would really appreciate if anyone has an idea why this happens in PackManager.

Thanks,
Pallavi




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


More information about the Soot-list mailing list