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

Arzt, Steven steven.arzt at sit.fraunhofer.de
Mon Apr 16 01:22:43 EDT 2018


Hi Ali,

Soot automatically defines all classes under the process-dir as application classes and all classes on the classpath as library classes, unless you explicitly include or exclude them. From your e-mail, it seems as if you have everything on the classpath, which leads exactly to the behavior you describe.

Best regards,
  Steven

From: Soot-list <soot-list-bounces at cs.mcgill.ca> On Behalf Of Ali Ghanbari
Sent: Monday, April 16, 2018 6:28 AM
To: soot-list at cs.mcgill.ca
Subject: [Soot-list] Automatically Inferring Application Classes! Can Soot do that?!

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/20180416/c14ac255/attachment.html>


More information about the Soot-list mailing list