[Soot-list] Spark call graph: Missing edges out of method

Andreas Pavlogiannis paulogiann at gmail.com
Fri Nov 1 17:41:25 EDT 2013


Hi,

I am looking for some help to interpret the following. The dacapo 
benchmar pmd defines a method:

<net.sourceforge.pmd.symboltable.ClassScope: java.lang.String toString()>

I build the call graph on the fly, using reflection. The above method 
makes a number of invokes, some of them to java.util (for example, to 
<java.util.HashMap: java.lang.Object get(java.lang.Object)>). However, 
having all-reachable=false in the cg, only some of the outgoing edges 
appear in the call graph, with <java.util.HashMap: java.lang.Object 
get(java.lang.Object)> (and others to java.util) missing. If I turn 
all-reachable=true, the missing invokes appear.

A call to ReachableMethods() shows that both 
<net.sourceforge.pmd.symboltable.ClassScope: java.lang.String 
toString()> and <java.util.HashMap: java.lang.Object 
get(java.lang.Object)> are reachable in both settings of the 
all-reachable flag.

I would expect that all invokes out of a reachable method are also 
reachable. Could someone explain why this happens, and how I can have 
this consistency (that all invokes of reachable methods appear in the 
cg) without having to set all-reachable=true?

Note: I have observed similar behavior with other methods that overload 
from java.lang.Object, but I could not understand it or overcome it so far.

Thanks,
Andreas


More information about the Soot-list mailing list