Software Metrics Metamodel
Encyclopedia
The Software Metrics Metamodel (SMM) is publicly available specification from the Object Management Group
Object Management Group
Object Management Group is a consortium, originally aimed at setting standards for distributed object-oriented systems, and is now focused on modeling and model-based standards.- Overview :...

 (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
Architecture Driven Modernization
Architecture-driven modernization is the name of the initiative of the Object Management Group related to building and promoting standards that can be applied to modernize legacy systems...

 taskforce. The SMM uses OMG's Meta-Object Facility
Meta-Object Facility
The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website.- Overview :...

 (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
Knowledge Discovery Metamodel
Knowledge Discovery Metamodel is publicly available specification from the Object Management Group . KDM is a common intermediate representation for existing software systems and their operating environments, that defines common metadata required for deep semantic integration of Application...

.

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
Level of measurement
The "levels of measurement", or scales of measure are expressions that typically refer to the theory of scale types developed by the psychologist Stanley Smith Stevens. Stevens proposed his theory in a 1946 Science article titled "On the theory of scales of measurement"...

 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 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 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
OCL
The initialism OCL can have several meanings, depending on context:*OCl−, the hypochlorite ion, in chemistry*Object Constraint Language*Ocean Climate Laboratory *Ocean County Library*Old Colony League, a high school sports league in Massachusetts...

 or XQuery
XQuery
- Features :XQuery provides the means to extract and manipulate data from XML documents or any data source that can be viewed as XML, such as relational databases or office documents....

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.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK