[Soot-list] Automatically Inferring Application Classes! Can Soot do that?!

Ali Ghanbari microdeniz at gmail.com
Mon Apr 16 00:28:22 EDT 2018


Hi,

Is there any way to instruct Soot to take all the classes under certain
path as application classes?

For the following simple program, once I analyze it using CHA and filter
methods from third-party libraries out of the call graph, I get only one
method left (i.e. T.main).

class A { @Override public String toString(){ return ""; } }
public class T { public static void main(String[] args){ new
Object().toString(); } }

But when I analyze the next program, I get the expected results (i.e. after
filtering out all other methods, the set of methods in the call graph are
T.main, A.<init> and A.toString).

class A { @Override public String toString(){ return ""; } }
public class T { public static void main(String[] args){ A a = new A(); new
Object().toString(); } }

This is how CHA works...

It seems that when we just name the main class in the command-line, Soot
ignores all the other classes in the class path. As soon as I name the
second class A in the command-line I get the expected result.

Could you please tell me if there is any easy way to instruct Soot that all
the classes under certain path are application classes? As you know for a
big program such as Apache Commons Lang, it would be impossible to name all
the application classes (even writing a program to extract all the class
files under a directory does not seem a good idea, as there should be a
mechanism built in Soot for this purpose)

Thank you so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20180415/a6651f88/attachment.html>


More information about the Soot-list mailing list