[GOODIE][Modules][Experimental] AnalysisUtils

danielv at netvision.net.il danielv at netvision.net.il
Sun May 26 05:21:09 UTC 2002


Hm, I was sure I'd sent that to the list... I'm sending it in a separate
file to make the ENH tracker see it.

PhiHo Hoang <phiho.hoang at rogers.com> wrote:
> Hi Daniel,
> 
> I wrote:
> 
> >	What is the prerequisite for 'AnalysisUtils' ?
> 
> Actually, I meant where can I get 'MoreAnalysis.1.cs' :-)
> 
> 	Cheers,
> 
> 	PhiHo.
> 
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On Behalf Of PhiHo
> Hoang
> Sent: Saturday, May 25, 2002 8:54 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: [GOODIE][Modules][Experimental] AnalysisUtils
> 
> 
> Hi Daniel,
> 
> 	I tried to file in your AnalysisUtils and got:
>  
> 		'MessageNotUnderstood: deepGlobalReferencesDo:'
> 
> 	What is the prerequisite for 'AnalysisUtils' ?
> 
> 	Please find attached the log file.
> 
> 	Your contribution is greatly appreciated.
> 
> 	Cheers,
> 
> 	PhiHo.
> 
> 
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On Behalf Of Daniel
> Vainsencher
> Sent: Saturday, May 25, 2002 10:03 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [GOODIE][Modules][Experimental] AnalysisUtils
> 
> 
> An application of graph theory to the analysis of modules (and generally
> groups of classes). Try th following examples:
> 
> ModuleAnalyzer reportFor: (Module @ #(Squeak Network Applications
> MailReader)) on: Transcript. Transcript endEntry. <do-it>
> 
> ModuleAnalyzer reportFor: (Module @ #(Squeak Morphic Demo)) on:
> Transcript. Transcript endEntry. <do-it>
> 
> StrongComponentFinder new findStrongComponentsForNodes: (Module @
> #(Squeak Network Applications Morphic)) deepClasses <explore-it>
> 
> from preamble:
> 
> "Change Set:		AnalysisUtils
> Date:			25 May 2002
> Author:			Daniel Vainsencher
> 
> 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.."!



More information about the Squeak-dev mailing list