[Soot-list] Whole program analysis

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Wed Feb 12 10:08:36 EST 2014


I have done a little bit of grepping in the phase options, and it seems
like Paddle has an option. That's as good as I can tell you.

http://www.sable.mcgill.ca/soot/tutorial/phase/phase.html#SECTION00063000000000000000

Unless Soot has a better option built-in, you may need to generate a
stub entry point in wjpp.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 02/11/2014 10:26 AM, Aditya Bhandari wrote:
> Hello,
> 
> I am very new to using Soot. I am using Eclipse to run a simple live
> variables analysis using Soot on the following test program.
> 
> /public class Input {/
> /
> /
> /private Lock lock = new ReentrantLock();/
> /private int count = 0;/
> //
> /private class Thread1 extends Thread {/
> /public void run() {/
> /lock.lock();/
> /    count++;/
> /    lock.unlock();/
> /    }/
> /}/
> //
> /public static void main(String[] args) {/
> /Input ip = new Input();/
> //
> /Thread t1 = new Thread(ip.new Thread1());/
> /                t1.start();/
> /}/
> /}/
> /
> /
> Even on using the -w option, the /run()/ method is not reached during
> the analysis. How can I enable Soot to enter the /run()/ method
> when /t1.start()/ is called?
> 
> Also, how can I extract the call graph for the program?
> I have tried the following for obtaining the call graph (read this in a
> beginner's tutorial on using Soot). But, it produces a out of memory error.
> 
> /public class Livemain {/
> /
> /
> /public static void main(String[] args) {/
> /    if(args.length == 0) System.exit(-1);/
> /    PackManager.v().getPack("wjtp")./
> /    add(new Transform("wjtp.liveVariables", new SceneTransformer() {/
> /@Override/
> /protected void internalTransform (String phaseName, Map options) {/
> /  CallGraph cg = Scene.v().getCallGraph();/
> /  System.out.println("call graph: " + cg);/
> /  }/
> /}));/
> /    /
> /    soot.Main.main(args);/
> /        }/
> /}/
> 
> Thank you in advance!
> 
> Regards,
> Aditya Bhandari
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list