Next: Complexity Up: Compendium of Software Quality Previous: Compliance

Software Quality Metrics

This part of the document defines standard metrics reported in literature. Moreover, it discusses the applicability of each metric in one of the ISO 9126-3:2003 (factors/criteria) properties/sub properties, Section 2.

Metrics are classified as supporting mainly statements on software Complexity (cf. Section 3.1), software Architecture and Structure (cf. Section 3.2), and software Design and Coding (cf. Section 3.3).

We use the following description schema for each metric. It defines:

Handle
A short name or symbol uniquely identifying the metric. This is the way it is referenced in this document and literature. If there are more than one variation of a metric, additional symbols will be added to distinguish the different variants.
Description
A textual description of the metric and what it measures. This description is a summary of how the metric is described in literature. Since it is described in natural language, it is not suitable for an unambiguous definition of the metric.
Scope
Identifies the program element the metric applies to. This could be system for the whole software system, package/directory for entities of a package or a directory, class/module/file for classes, modules and files, respectively, and procedure/function/method for procedures, functions and methods, respectively. Only the core scope is named.
Definition
A formal definition of the metric using set theory and mathematics. The definition is based on the meta-model specified in the compendium. Usually a view is defined as well, see below.
View
Definition of the view, describing its relevant elements, semantic relations, and the tree grammar.
Scale
Defines the scale type of the metric. It is one of Absolute, Rational, Interval, Ordinal, and Nominal.
Domain
Defines the domain of metric values.
Highly Related Software Quality Properties
Discusses factors and criteria as listed in the ISO 9126-3:2003 standard that are assessable with the metric.
Related Software Quality Properties
Discusses factors and criteria as listed in the ISO 9126-3:2003 standard that are somewhat assessable with the metric.
References
Gives references to literature, projects, repositories, and programs using, implementing, or describing the metric. Moreover, it points to validating and evaluating experiments investigating its appropriateness.
Since
Since which version of the compendium is the metric contained.

The definition of the metrics is based on the common meta-model as defined in Section . For each metric, we define a view further abstracting from the common meta-model to provide exactly the information required by that metric. The view is used for the actual metric definition. This approach makes the metric definitions independent from changes of the common meta-model (this is discussed in more detail in Chapter ). Formally, views of a metric analysis are defined as pairs and are bound to the common model with a mapping specification . Again, is a tree grammar specifying the set of view entities and their structural containment required by . is a set of semantic relations over view entities required by .

The construction of concrete view models follows the same principles as the abstractions from front-end specific to common models: we ignore some common meta-model entity types, which leads to a filtering of the corresponding nodes. We propagate relevant descendants of filtered nodes to their relevant ancestors by adding them as direct children. Moreover, we ignore some relation types, and attach remaining relations defined over filtered nodes to the relevant ancestors of those nodes, as described in detail in [20].

To simplify metric definitions, we define some utility operation(s):

[ , ] - denotes the set of direct [transitive, transitive excluding ] successors of a node or set of nodes over edges (relations) of type .
- denotes the number of elements in a set .
[ , ] - denotes the set of direct [transitive, transitive excluding ] predecessors of a node or set of nodes over edges (relations) of type .
- denotes the distance or set of distances (number of relations) between a node and a node or set of nodes . It is 0, if it equals , and , if there is no path between and .
- denotes the maximum in a set of values.
- denotes the minimum in a set of values.
- denotes the set of strongly connected components in a set of elements over edges (relations) of type .
[ ] - denotes the number of outgoing relations of type from a node including [excluding] relations to itself.

For additional simplification, we define some frequently used sets:

- denotes the set of all methods locally declared in a class , ignoring visibility and other attributes.
- denotes the set of all fields locally declared in a class , ignoring visibility and other attributes.

Subsections

Next: Complexity Up: Compendium of Software Quality Previous: Compliance