[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limiting whole-program analysis





Helge Jensen wrote:

What should I do? where is it described what I should do to stop the transitive traversal? any hints appreciated.

I found out that I could use "Spark" to do "on-the-fly" call-graph generation and it completes within 10 seconds (still WAY too much for such a simple program, which does not invoke anything but the "+" operator)


After a hint from Eran Yahav <yahave@post.tau.ac.il>, i found some mailing-list archives encouraging me toi edit ReachableMethods.addMethod, which i have done to:

  private void addMethod( MethodOrMethodContext m ) {
    if( set.add( m ) ) {
      if (!m.method().getDeclaringClass()
            .getJavaPackageName().startsWith("java") )
        reachables.add( m );
    }
  }

Which should be fine for my purposes (for the moment), and yields the call-graph i expect.

--
Helge