[Soot-list] Exception and Method Analysis

Richard Warburton richard.warburton at gmail.com
Fri Feb 11 11:23:59 EST 2011


> I may be wrong but to the best of my knowledge there's no such
> analysis already built into Soot. But there's all the necessary
> component, of course. There's a ThrowsAnalysis that can tell you which
> exceptions a statement may throw. Then of course there are method
> signatures that tell you which checked exceptions a method may throw.
> You can accumulate these using a call graph to get results for the
> transitive closure of a method call.
>
> So in a nutshell I think this will require a bit of manual labor but
> it should certainly be doable. Whether it's efficient in the end
> depends on the perspective I would say. Whole-program analyses like
> the one you are proposing tend to take a few minutes for realistic
> programs. That's just a matter of intrinsic complexity of the problem.

Thanks for your prompt reply.  I was thinking about this issue more
and I can probably get away with just a callgraph with additional
edges for exception throws.  Is there any analysis like that?  Also is
the architecture of the CallGraph extraction documented anywhere?  I
can see that "Scene.v().getCallGraph()" will give me a callgraph, but
if I wish to hook into the process in order to say annotate edges with
what exceptions may propagate back up that method invocation where
would I start.  Or is it easier for me to simply copy the CallGraph
Analyses and rewrite it with a custom Edge representation that allows
for exceptional information to be annotated?

kind regards,

  Richard


More information about the Soot-list mailing list