by Muhammad Usman Bhatti, Nicolas Anquetil and Stéphane Ducasse

Moose is an open-source platform for the assessment of software and data analysis. Moose provides several engines to build tools, analyses and visualizations. One of Moose’s strengths is the possibility to rapidly build domain-specific analysis tools.

To cope with a world in constant evolution, software systems must also evolve, otherwise they become progressively less relevant. Software evolution is a major contributor to the cost of software. Recent studies show that software evolution effort can represent 90% of the total software development effort. Of this 90%, between 40 and 60% is spent on code reading and program understanding. This is not surprising given that software systems are increasing in complexity every day.

To control these costs we need tools for code understanding and program assessment such as software metrics that provide an insight into software systems. But available tools are often too general, and inappropriate for specific domains or problems. We need intelligent tools to analyze systems because organizations have specific problems that can only be solved with dedicated solutions. To provide dedicated tools in a cost effective manner, we need environments for creating such tools. Moose is an extensive platform for software and data analysis rooted in the core idea of building dedicated tools.

Software and data analysis with Moose
Moose is a free and open-source project started in 1996 in the context of the FAMOOS European project to study evolving object-oriented systems. Since its conception it has spread to several research groups and it is increasingly being applied in industrial contexts. In total, the effort spent on Moose equates to more than 150 person-years of research and development.

Moose offers standard solutions (quality metrics) but more importantly it allows rapid assessment of software quality and system structure through rapid building of small context-specific tools for very specific situations. Moose offers solutions that are specifically addressing the questions and concerns of daily software and its evolution.

Components in Moose
Data from various sources (source code, version control systems, bug tracker systems) and in various formats is imported in Moose. The imported data is stored in a model independent of the programming language. Supporting new data merely requires adapting the generic model and importing the data into the environment. Once information is imported, analysts can take advantage of the different tools for crafting software analysis tailored to their needs.

FAMIX is a language independent meta-model that can represent in a uniform way multiple object-oriented and procedural language entities or other software entities such as bugs or versions. All Moose components work on FAMIX models and as such are completely independent of the actual source from which the data were extracted.

Metrics: Moose provides software quality metrics for program assessment. Existing metrics include standard metrics such as cyclomatic complexity, depth of inheritance tree and so forth. Custom metrics suites, on all represented entities, can also be built on top of the information available.

Mondrian: A scripting engine that enables interactive crafting of custom visualizations. Typical visualizations include representing software components such as packages, classes, or methods and their dependencies. Visualization can be enriched by sizing and/or colouring nodes according to specific properties (see Figure 1). For example, the colour shade may depend on the value of a metric: the longer a method in the source code, the darker it will be in the visualization; similarly, the height and the width of nodes may depend on different metrics. Colour may also be used to highlight specific entities fulfilling a certain criterion, eg all entities from a specific author can be coloured in blue.

Figure 1: A visualization in Mondrian showing classes
Figure 1: A visualization in Mondrian showing classes

Glamour: An engine for building dedicated browsers. It can be used to present software analysis in the form of custom reports or to create dedicated browsers. Through a simple model of information flow, different panes can present various points of view at various levels of detail on the data. For example, selecting a class (small square) in the top left pane of the visualization in Figure 2 will show metrics about it on the top right pane, its source code in the bottom left pane, and the classes of its package that have bugs in the bottom right pane.

Figure 2: A visualization on bug incidence in classes
Figure 2: A visualization on bug incidence in classes

Arki: An engine to describe and automatically verify rules on the entities of the model. For example one could specify that the database should not be called from the user interface layer, ensure architecture compliance, check specific code conventions, verify the quantity of comments, etc.

Conclusion
Software evolution is an activity that requires adapted solutions. Software analysis tools cannot act as universal oracles independent of the specific situation of the organizations using them. Hence, modern software analysis environments should provide services that allow users to express their requirements without taking too much effort. Moose allows for rapid assessment of software quality by rapid building of small context-specific tools for very specific situations.

Link:
The Moose Book: http://www.themoosebook.org/

Please contact:
Usman Bhatti
Inria, France
Rmod project-team
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

{jcomments on}
Next issue: January 2025
Special theme:
Large-Scale Data Analytics
Call for the next issue
Get the latest issue to your desktop
RSS Feed