MareaHeaderGrey

Abstract

Distribution Maps are part of the suite Moose, a platform for software and data analysis. Moose is also implemented on top of Pharo Smalltalk and, therefore, we use our modified Virtual Machine of the tool Unused Objects Detector to run it.Distribution Maps’ technique provides a quick look at the distribution of properties within a system and it reveals complex information in an intuitive way. The use of Distribution Map fills the gap between the raw results obtained by automated algorithms and the following analysis carried out by a human expert.The idea of software visualization is helping us to analyze software, to understand the results of an analysis, to answer questions, etc. In our context, it is important to know which classes, methods and packages are used for the minimal code execution. This is important for building minimal systems and for knowing which are the classes that should be part of that base system. Which classes does the system use more? Which classes have several instances and most of them are used? Which classes or packages are not used at all? Which classes have instances but are not generally used? With UsedO Object Maps we answer all those questions through meaningful visualizations.

Interesting Links

Installation

Take a Moose image an evaluate:
Gofer new
	squeaksource: 'UsedObjects';
	package: 'ConfigurationOfUsedObjects';
load.
(Smalltalk at: #ConfigurationOfUsedObjects) project lastVersion load: 'UsedObjectsForMoose'. 

Getting Started

The first step is to do an analysis of certain code execution using the UnusedObjectDiscoverer. This is explained here. But in a glance you can evaluate this example:
UnusedObjectDiscoverer current startDiscovery.
Transcript show: 'Do something'.
Transcript browse.
UnusedObjectDiscoverer current stopDiscovery.
Now that you have already analyzed a certain code execution, now those objects that were used are mark. So we can build visualizations on top of that information. The main class is called UsedObjectsDistributionMap which defines the basis of a Used Object Map. In addition, it contains several examples of different maps. Such examples are represented as class side methods in UsedObjectsDistributionMap under 'visualizations' category. Examples are the methods #amountUsedInstances, #includedAbstractClasses, #methodLevel, #usedAndUnusedClasses and #usedInstancesMemory. You can run any of those methods and get the visualization. Be aware that it may take a couple of minutes.

Screenshots

Abstract

Distribution Maps are part of the suite Moose, a platform for software and data analysis. Moose is also implemented on top of Pharo Smalltalk and, therefore, we use our modified Virtual Machine of the tool Unused Objects Detector to run it.

Distribution Maps’ technique provides a quick look at the distribution of properties within a system and it reveals complex information in an intuitive way. The use of Distribution Map fills the gap between the raw results obtained by automated algorithms and the following analysis carried out by a human expert.

The idea of software visualization is helping us to analyze software, to understand the results of an analysis, to answer questions, etc. In our context, it is important to know which classes, methods and packages are used for the minimal code execution. This is important for building minimal systems and for knowing which are the classes that should be part of that base system. Which classes does the system use more? Which classes have several instances and most of them are used? Which classes or packages are not used at all? Which classes have instances but are not generally used? With UsedO Object Maps we answer all those questions through meaningful visualizations.

Interesting Links

  • An already compiled Virutal Machine (for MacOS) for testing available here. Otherwise a new VM must be compiled from sources and our changes. Still need to document how to do this.
  • An already prepared Moose image with some Used Object Maps on it is also available here.
  • Slides of presentation in Smalltalks 2010. You can also download a pdf.

Installation

Take a Moose image an evaluate:

Gofer new
	squeaksource: 'UsedObjects';
	package: 'ConfigurationOfUsedObjects';
load.
(Smalltalk at: #ConfigurationOfUsedObjects) project lastVersion load: 'UsedObjectsForMoose'. 

Getting Started

The first step is to do an analysis of certain code execution using the UnusedObjectDiscoverer. This is explained here. But in a glance you can evaluate this example:

UnusedObjectDiscoverer current startDiscovery.
Transcript show: 'Do something'.
Transcript browse.
UnusedObjectDiscoverer current stopDiscovery.

Now that you have already analyzed a certain code execution, now those objects that were used are mark. So we can build visualizations on top of that information.

The main class is called UsedObjectsDistributionMap which defines the basis of a Used Object Map. In addition, it contains several examples of different maps. Such examples are represented as class side methods in UsedObjectsDistributionMap under 'visualizations' category. Examples are the methods #amountUsedInstances, #includedAbstractClasses, #methodLevel, #usedAndUnusedClasses and #usedInstancesMemory. You can run any of those methods and get the visualization. Be aware that it may take a couple of minutes.

Screenshots