[Soot-list] How to have whole-program analysis run from non-main() methods

Jiaqi Tan tanjiaqi at gmail.com
Fri Dec 16 03:12:04 EST 2011


Hi,

How does Soot decide which classes to load and resolve? All of my
classes are in one JAR file. Currently I have a set of classes with
known entry-points with static main() functions, but I also have
another set of classes which I suspect are reachable only via
reflection. Assuming that the reflection calls are not reflected due
to the unsoundness introduced, then my call-graph should consist of
unconnected components, with one set reachable from the static main()
functions, and the other reachable through other methods, e.g. the
functions registered with the reflection API.

But if I use addBasicClass() on the classes with the main() functions,
then will the other classes not reachable without reflection be added
to the worklist of classes to resolve? Because if the other classes
which are in the JAR but are not reachable are not added to the
worklist, then even the suggested wjpp transform() would not add the
methods in those classes as entry points?

Second (unrelated) question: Is wjpp a new pack not available in 2.4.0?

Thanks!
Jiaqi

On Fri, Dec 16, 2011 at 4:03 PM, Eric Bodden <eric.bodden at ec-spride.de> wrote:
> Hi.
>
>> Does the wjpp pack run before the call-graph construction starts?
>
> Yes.
>
>> Do all
>> packs happen before call-graph construction?
>
> No. All other w* packs run after the cg phase. That's why we
> introduced the wjpp: to allow things to be done *before* the call
> graph is constructed.
>
> Eric


More information about the Soot-list mailing list