[Soot-list] Creating call graph for a library (no main class) [Need HELP]

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Fri Apr 19 21:49:57 EDT 2013


Hello,

The error you mention looks like the process path or the class path is 
not set properly. Note that the stuff in the process path needs to be in 
the Soot classpath too.

As a general thing, it is good to use Soot's main method instead of 
rolling one's own.

Second, before you get too involved in this...
I see that you use CHA. As you know, CHA is horribly imprecise. Maybe it 
would work for your specific case, but Spark is a better option.

But Spark has problems dealing with non-static entry points. Many people 
work around that by generating a stub main. But I guess that it could be 
very cumbersome to do that for a whole library.

And passing nulls as arguments won't work, because Spark is able to 
reason about those.

I am thinking that this could be useful to you:
http://plg.uwaterloo.ca/~karim/projects/averroes/

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

On 13-04-18 06:34 PM, Abdejalil SETH wrote:
> Hi everyboddy,
>
> I don't have a problem with the analysing phase but when i but your code
> to analyse a library without a main class a i have found some problem
> and i think just in the entry
>
> MyCallGraph.JAVA
>
>     http://pastebin.com/9NUWr1vM
>
>
> OUTPUT :
>
> Exception in thread "main" java.lang.RuntimeException: *couldn't find
> class: doAnalysis.FieldAccessible (is your soot-class-path set properly?)*
> at soot.SootResolver.bringToHierarchy(SootResolver.java:205)
> at soot.SootResolver.bringToSignatures(SootResolver.java:239)
> at soot.SootResolver.bringToBodies(SootResolver.java:280)
> at soot.SootResolver.processResolveWorklist(SootResolver.java:150)
> at soot.SootResolver.resolveClass(SootResolver.java:124)
> at soot.Scene.forceResolve(Scene.java:1279)
> at doAnalysis.MyCallGraph.getAllMethods(MyCallGraph.java:19)
> at doAnalysis.MyCallGraph.main(MyCallGraph.java:56
>
> I have attached the lib.jar and also the code of FieldAccessible.JAVA :
> http://pastebin.com/YQaJSJ9K
>
> lib.jar
>
>       * lib.jar
>           o doAnalysis
>               + FieldAccessible.class
>
>
>
>
>
> Please help me to fix this problem, and to find the error.
>
> Thank you in advance
> Jalilos
>
> 	
>
>
>
> --
>
>
> *ABDELJALIL SETH*
>
> Ms/ Engineer in computer science and systems analysis.
>
> <http://www.linkedin.com/in/AbdeljalilSETH>
> 	Please consider your environmental responsibility. Before printing this
> e-mail message, ask yourself whether you really need a hard copy.
>
>
>
> _______________________________________________
> 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