[Soot-list] Call an explicit phase pack

67 views
Skip to first unread message

emma

unread,
Jul 2, 2014, 2:46:51 PM7/2/14
to Soot list
Hi list,

I'd like to ask if it is possible (and how) to call an explicit soot phase pack.
I need to call the phases AFTER wjtp. So, is it possible to run the phases after these one
and exclude the previous ones?

I know that we can apply a new pack, but how can we run soot from that pack only?
like perhaps:
PackManager.v().getPack("wjtp.myColorer").runPack();


Thanks a lot,

--Emmanuelo

Steven Arzt

unread,
Jul 2, 2014, 5:00:28 PM7/2/14
to emma, Soot list

Hi Emmanuelo,

 

This is theoretically possible. You need to set your Soot options using the setters in Options.v(), then call Scene.v().loadNecessaryClasses() and then call the packs you need with the code you have already proposed. However, note that Soot depends on some early packs such as jb to get its Jimple bodies – otherwise, there is not much you can work on.

 

Best regards,

  Steven

 

 

M.Sc. M.Sc. Steven Arzt

Secure Software Engineering Group (SSE)

European Center for Security and Privacy by Design (EC SPRIDE)

Mornewegstraße 32

D-64293 Darmstadt

Phone: +49 61 51 16-75426

Fax: +49 61 51 16-72118

eMail: steve...@ec-spride.de

Web: http://sse.ec-spride.de

Emma

unread,
Jul 3, 2014, 4:58:56 AM7/3/14
to soot...@cs.mcgill.ca, emma4...@hotmail.com
Thanks Steven!

Although, the code that I proposed doesn't really work. That's why I said "something" like that :P
    PackManager.v().getPack("wjtp.myColorer").runPack();
There is no runPack() method in Soot, but just runPacks();
We can just do:
            PackManager.v().runPacks();

That is my main question how to do it. I'd really appreciate any help
Thank you very much in advance

Emmanuelo
_______________________________________________
Soot-list mailing list
Soot...@CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

Steven Arzt

unread,
Jul 3, 2014, 5:03:07 AM7/3/14
to Emma, soot...@cs.mcgill.ca

Hi Emmanuelo,

 

Try

        PackManager.v().getPack("wjtp").apply();

 

If you don’t need the full pack, but just a single transformer from it, call the transform() method on it directly.

 

Best regards,

  Steven

Emma

unread,
Jul 3, 2014, 8:59:50 AM7/3/14
to Steven Arzt, soot...@sable.mcgill.ca
Ooops yea :/ Sorry for that!
I saw 'apply' method but I didn;t know that it would work for me.

By the chance, I have the query how color tags work.
We can add them to any analysis, but in which phase are they added in order to see them on the output?
I want that in order to call ('apply') the 'color tag' phase (if it exists) and print the new tags.
I tried with             'PackManager.v().writeOutput();'
but I get the old tags.


PS. I've changed the plugin to not reset the scene. That's why I still have the previous query results tags.

Thanks,
Emm.
Reply all
Reply to author
Forward
0 new messages