Software Metrics Metamodel

From Wikipedia, the free encyclopedia

The OMG Structured Metrics Metamodel (SMM) specification defines a standard Software Metrics Metamodel. It is a publicly available specification from the Object Management Group (OMG). An 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 Task Force. 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.
  • Scope: The scope of a measure represents the domain of entities on which the measure can be applied. Minimally, a scope defines the class of measurands.
  • Operation: Defines a computation that needs to be executed.
  • 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.
  • ObservationScope: The domain of all entities on which to apply measurement for a given Observation.

Measures

The SMM describes several types of measures that can be used to define most standard software metrics. The scales permitted are intervals, ratios or ordinals although there is no distinction between interval and ratio scaled metrics.

Measure Types

In a SMM model, the measures are organized in the form of a directed-acyclical graph. The measures are divided in two groups:

  • Direct measures are leaf measures in the graph. They can be computed only using a reference to the measurand.
  • Indirect measures are measures that rely on the result of other measures. For example, comment density could be defined as the number of lines of comments divided by the number of lines of code.

Direct measures can be defined using an Operation element which can be formulated as an Object constraints language or XQuery request on a measurand. The SMM requires that direct measures be numeric (of DimensionalMeasure type). Indirect measures can be of the following types:

  • Collective measure: A collective measure is defined on a measurand that is a container entity. It describe the execution of a base measure on all of its containers as well as the application of a standard aggregation techniques (e.g., the mean or maximum).
  • Ranking measure: A ranking measure depends on a base measure whose results are converted to an ordinal scale by applying a transformation where numeric intervals are assigned to symbols
  • Rescaled measure: Applies a formula to a numeric measure.
  • Named measure: This is a special numeric measure that exists to support importing metrics from non SMM-compliant tools

Measurement

The process of extracting metrics, requires a SMM tool to apply the measures to an observation scope that hold one or more models. This tool will produce a graph containing measurements, that maps to the measure graph. On this graph every node corresponds to the result of a measure on a measurand. Therefore, measures are mapped to 0 or more measurements where 0 indicates that no measurands corresponding to the scope of the measure were found.

Observations

The SMM allows for multiple measurements graphs to be stored. Whenever a measurement graph is produced, it is associated to an observation that is dated and tagged with information describing the tool used to extract the metrics. Observations exist to be passed to metric reporting tools that can provide additional features like visualization and statistical control.

This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.