Software Metrics Metamodel
The Software Metrics Metamodel (SMM) is publicly available specification from the Object Management Group (OMG). A SMM model describes how metrics can be extracted from a model. It also allows for metric reporting. It is developed by the Architecture Driven Modernization taskforce. The SMM uses OMG's Meta-Object Facility (MOF) to define an XMI interchange format between metric extraction tools. It can be used to extract metrics on any MOF element even though in the specification, software artifacts are represented using the Knowledge Discovery Metamodel.
Key Concepts
The SMM defines the following key concepts:
- Measure: A method assigning numerical or symbolic values to entities to characterize an attribute of these entities.
- Measurement: A numerical or a symbolic value assigned to an entity by a measure.
- Measurand: An entity quantified by a measurement.
- Observation: Measurements applied to a set of measurands
Measure Graph
In a SMM model, the measures are organised in the form of a directed-acyclical graph. The measures are divided in two groups:
- Direct measures are leaf measures in the graph. They that can be computed only using a reference to the measurand
- Indirect measures are measures that are computed by combining the information from other measures. For example, comment density could be defined as the number of lines of comments divided by the number of lines of code.
The scales permitted are intervals, ratios or ordinals although there is no distinction between interval and ratio scaled metrics.
Measurement Graph
When extracting metrics on a model, a SMM tool will produce a graph that resembles the measure graph, where every node corresponds to the result of a measure on a measurand.
Observations
The SMM allows for multiple measurements graphs to be stored by associated each of them to an observation that is dated.