next up previous
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 $ A$ are defined as pairs $ V^A = \left(G^A, R^A\right)$ and are bound to the common model with a mapping specification $ \alpha^A$ . Again, $ G^A$ is a tree grammar specifying the set of view entities and their structural containment required by $ A$ . $ R^A$ is a set of semantic relations over view entities required by $ A$ .

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):

$ succ(e, r)$
[ $ succ^*(e,r)$, $ succ^+(e,r)$] - denotes the set of direct [transitive, transitive excluding $ e$] successors of a node or set of nodes $ e$over edges (relations) of type $ r$.
$ \vert S\vert$
- denotes the number of elements in a set $ S$.
$ pred(e, r)$
[ $ pred^*(e,r)$, $ pred^+(e,r)$] - denotes the set of direct [transitive, transitive excluding $ e$] predecessors of a node or set of nodes $ e$over edges (relations) of type $ r$.
$ dist(e, e', r)$
- denotes the distance or set of distances (number of relations) between a node $ e$and a node or set of nodes $ e'$. It is 0, if it $ e$equals $ e'$, and $ \infty$, if there is no path between $ e$and $ e'$.
$ max(S)$
- denotes the maximum in a set $ S$of values.
$ min(S)$
- denotes the minimum in a set $ S$of values.
$ scc(e, r)$
- denotes the set of strongly connected components in a set $ e$of elements over edges (relations) of type $ r$.
$ outdegree(e, r)$
[ $ outdegree^+(e, r)$] - denotes the number of outgoing relations of type $ r$from a node $ e$including [excluding] relations to $ e$itself.

For additional simplification, we define some frequently used sets:

$ M(c)$
$ = pred(c, \textrm{methodof})$- denotes the set of all methods locally declared in a class $ c$, ignoring visibility and other attributes.
$ F(c)$
$ = pred(c, \textrm{fieldof})$- denotes the set of all fields locally declared in a class $ c$, ignoring visibility and other attributes.



Subsections
next up previous
Next: Complexity Up: Compendium of Software Quality Previous: Compliance
Copyright © 2008-2009, ARiSA AB. Phone: +46-(0)470 70 8495 Email: info@arisa.se Valid CSS! Valid XHTML 1.0 Transitional