[GOODIE][Modules][Experimental] AnalysisUtils (0.2)

Daniel Vainsencher danielv at netvision.net.il
Mon May 27 04:44:53 UTC 2002


from preamble:

"Change Set:		AnalysisUtils
Date:			25 May 2002
Author:			Daniel Vainsencher

version (0.2): fixed a bug in the analysis - now treat both instance and
class methods as belonging to the concrete class. Separating the meta
class is not appropriate for this analysis.

Prerequisites:
	MoreAnalysis.1.cs

Experimental tools to guide the refactoring system (graph theory is our
friend!!).

First the fundemental algorithms, then the easy interface.

StrongComponentsFinder implements a cache for class dependency
information, including the inverted dependencies, and two useful graph
algorithms -
findWeakComponents: collectionOfClasses will return a collection of sets
of classes that are dependent on one another. If a module has more than
one of these, we can separate it into these groups and they will be
non-interdependent modules. It will sometimes make sense to have two
weak components in the same module if the same modules use them both,
but it's a good heuristic.

This is useful because it will reduce the class count in the minimal
system, remove dependencies on the core, and thus expose the core of the
problem, without requiring any refactoring of code...

findStrongComponentsForNodes: collectionOfClasses will return a
collection of collections of classes that are cyclicly dependent on one
another. These are groups that can only be unloaded atomically, so if
they're big they probably need refactoring.

Run on any big chunk of the system, the strong components will show you
what needs to be taken apart most urgently. Just find any one class in
there that you think should be optional, and start severing dependencies
on it.

ModuleAnalyzer reportFor: aModule on: aStream will spill a nice detailed
analysis of your favorite module in terms of the above algorithms,
showing a lot bout what can and should be done...

favorite usage:
ModuleAnalyzer reportFor: Module root Squeak Morphic on: Transcript.
Transcript endEntry <do it>

ClassDependencyViewer is just a beginning of something. Help from
someone handy with simple Morphic lists and drag&drop would be much
appreciated. Mail me.."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AnalysisUtils.cs.gz
Type: application/octet-stream
Size: 4078 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020527/a7373dc2/AnalysisUtils.cs.obj


More information about the Squeak-dev mailing list