[Soot-list] Call graph behavior with interfaces and no concrete implementations

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Aug 12 03:15:24 EDT 2010


On 12 August 2010 00:55, Hal Hildebrand <hal.hildebrand at gmail.com> wrote:
> Is there something I can do, or something I'm doing which I shouldn't, which would make this scenario work with Soot?

Hi Hal.

First of all: This is intended behavior. Soot performs a whole-program
analysis, which means that it assumes that you provide the whole
program. In your specific case, I don't think that the issue is
actually that Y is an interface. You would also see no call edge if Y
was just a class. The problem is that the field X.y is never
initialized. This makes Soot assume that the field will always be null
and that therefore the call to y.foo() can never happen.

To deal with this properly I think that you would actually have to
change the way Spark builds its pointer-assignment graph. You can find
all the information about how this graph is build in Ondrej Lhotak's
Master's thesis.

Eric


More information about the Soot-list mailing list