Python call tree tool?

Ira D. Baxter idbaxter at semdesigns.com
Wed Apr 24 10:38:12 EDT 2002


"François Pinard" <pinard at iro.umontreal.ca> wrote in message
news:mailman.1019588025.27016.python-list at python.org...
> [Robin Becker]
>
> > I guess I can use inspect to figure out the functions/classes that are
> > declared in an arbitrary module, but it seems harder to determine if
> > these things are actually referenced in other modules. For that I assume
> > I will have to do some code analysis.
>
> It may be difficult to do in general.
> Such usages do not appear uncommon at all to me, and it surely requires an
> extremely clever and sophisticated code analyser to find out what really
> happens at run-time.

Most analyses of real programs are hard to do exactly,
even if you take into account inter-procedurel (inter object)
interactions.   In any case, that doesn't stop people from
implementing pretty reasonable analyzers.   But you are
right, you need strong foundations to do it.

I can't offer an off-the-shelf call tree analyzer.
But our DMS Software Reengineering Toolkit would
be good for implementing one.  In a similar vein,
we have done "Deactive" code analysis ("defined but not
referenced" code as defined by FAA DO187B
flight software requirements) for large Java systems.
See http://www.semdesigns.com/Products/DMS/DMSToolkit.html.

--
Ira D. Baxter, Ph.D. CTO Semantic Designs, Inc.
http://www.semdesigns.com





More information about the Python-list mailing list