Distance-based software measurement: necessary and sufficient properties for software measures

12
Distance-based software measurement: necessary and sufficient properties for software measures G. Poels * , G. Dedene Department Applied Economic Sciences, Catholic University of Leuven, Naamsestraat 69, B-3000 Leuven, Belgium Received 2 October 1998; received in revised form 2 June 1999; accepted 7 June 1999 Abstract Axiomatic approaches to software measurement present sets of necessary, but not sufficient measure axioms. The insufficiency of the measure axioms implies that they are useful to invalidate existing software measures, but not to validate them. In this paper, a set of measure axioms is presented whose sufficiency is guaranteed by measurement theory. The axioms referred to are the metric axioms, used in mathematics to define measures of distance. We present a constructive procedure that defines software measures satisfying these axioms. As an illustration of distance-based software measurement, a measure is defined for the aggregation coupling of object classes. q 2000 Elsevier Science B.V. All rights reserved. Keywords: Software metric; Axiomatic approach; Measure validation; Measurement theory 1. Introduction In the past few years there has been an increasing interest in using more rigorous approaches to software measure- ment. A substantial number of researchers have proposed axiomatic approaches to the definition and validation of software measures [1–15]. Generally, an axiomatic approach formalises the empirical understanding of a soft- ware attribute through the definition of a set of desirable software measure properties. Newly proposed and existing software measures are ‘validated’ by proving their invar- iance with respect to the property set. Measures that do not satisfy one or more of the desirable properties are inva- lidated in the sense that they do not measure the software attribute such as it is understood by the developers of the property set. In the software engineering literature, the notion of measure validity is used in many ways with different mean- ings [16]. Fenton and Pfleeger [17] call a measure internally valid if it is a proper numerical characterisation of the attribute. The internal validity of a measure must be distinguished from its external validity. The latter perspective on measure validity refers to the usefulness of a measure. According to Briand et al. [18] a software measure is useful if it is related to a measure of some external attribute, e.g. maintainability or reliability. 1 The axiomatic approach to measurement is concerned with internal validity, which is the notion of measure validity referred to in this paper. In the representational theory of measurement (e.g. [19]) the empirical understanding of an attribute is formalised through the definition of an empirical relational system. A measure is (internally) valid if it is a homomorphism from the empirical relational system into a formal relational system, i.e. if it maps entities into values such that all empirical relations among the entities are preserved as formal relations among the measurement values. The funda- mental problem of software measurement is that for many software attributes, including software complexity, it is not known what the empirical relational system looks like [20]. However, part of the empirical understanding of a software attribute may be formalised as a set of desirable properties for the measures of that attribute. Briand et al. [2] argue that measure properties must be seen as properties that charac- terise the formal relational system. Instead of explicitly defining the empirical relational system, the axiomatic approaches define properties of the formal relational system Information and Software Technology 42 (2000) 35–46 0950-5849/00/$ - see front matter q 2000 Elsevier Science B.V. All rights reserved. PII: S0950-5849(99)00053-1 www.elsevier.nl/locate/infsof * Corresponding author. Tel.: 1 32-16-32-6891; fax: 1 32-16-32-6732. E-mail address: [email protected] (G. Poels) 1 Briand et al. consider the usefulness of measures of the internal attri- butes of software products. Internal attributes can be measured purely in terms of the software product itself, regardless of how it relates to its environment. Typical internal software attributes include size, structural complexity, coupling and cohesion.

Transcript of Distance-based software measurement: necessary and sufficient properties for software measures

Distance-based software measurement: necessary and sufficient propertiesfor software measures

G. Poels* , G. Dedene

Department Applied Economic Sciences, Catholic University of Leuven, Naamsestraat 69, B-3000 Leuven, Belgium

Received 2 October 1998; received in revised form 2 June 1999; accepted 7 June 1999

Abstract

Axiomatic approaches to software measurement present sets of necessary, but not sufficient measure axioms. The insufficiency of themeasure axioms implies that they are useful to invalidate existing software measures, but not to validate them. In this paper, a set of measureaxioms is presented whose sufficiency is guaranteed by measurement theory. The axioms referred to are the metric axioms, used inmathematics to define measures of distance. We present a constructive procedure that defines software measures satisfying these axioms.As an illustration of distance-based software measurement, a measure is defined for the aggregation coupling of object classes.q 2000Elsevier Science B.V. All rights reserved.

Keywords:Software metric; Axiomatic approach; Measure validation; Measurement theory

1. Introduction

In the past few years there has been an increasing interestin using more rigorous approaches to software measure-ment. A substantial number of researchers have proposedaxiomatic approaches to the definition and validation ofsoftware measures [1–15]. Generally, an axiomaticapproach formalises the empirical understanding of a soft-ware attribute through the definition of a set of desirablesoftware measure properties. Newly proposed and existingsoftware measures are ‘validated’ by proving their invar-iance with respect to the property set. Measures that donot satisfy one or more of the desirable properties are inva-lidated in the sense that they do not measure the softwareattribute such as it is understood by the developers of theproperty set.

In the software engineering literature, the notion ofmeasure validity is used in many ways with different mean-ings [16]. Fenton and Pfleeger [17] call a measure internallyvalid if it is a proper numerical characterisation of theattribute. The internal validity of a measure must bedistinguished from its external validity. The latter perspectiveon measure validity refers to the usefulness of a measure.According to Briand et al. [18] a software measure is usefulif it is related to a measure of some external attribute, e.g.

maintainability or reliability.1 The axiomatic approach tomeasurement is concerned with internal validity, which isthe notion of measure validity referred to in this paper.

In the representational theory of measurement (e.g. [19])the empirical understanding of an attribute is formalisedthrough the definition of an empirical relational system. Ameasure is (internally) valid if it is a homomorphism fromthe empirical relational system into a formal relationalsystem, i.e. if it maps entities into values such that allempirical relations among the entities are preserved asformal relations among the measurement values. The funda-mental problem of software measurement is that for manysoftware attributes, including software complexity, it is notknown what the empirical relational system looks like [20].However, part of the empirical understanding of a softwareattribute may be formalised as a set of desirable propertiesfor the measures of that attribute. Briand et al. [2] argue thatmeasure properties must be seen as properties that charac-terise the formal relational system. Instead of explicitlydefining the empirical relational system, the axiomaticapproaches define properties of the formal relational system

Information and Software Technology 42 (2000) 35–46

0950-5849/00/$ - see front matterq 2000 Elsevier Science B.V. All rights reserved.PII: S0950-5849(99)00053-1

www.elsevier.nl/locate/infsof

* Corresponding author. Tel.:1 32-16-32-6891; fax:1 32-16-32-6732.E-mail address:[email protected] (G. Poels)

1 Briand et al. consider the usefulness of measures of the internal attri-butes of software products. Internal attributes can be measured purely interms of the software product itself, regardless of how it relates to itsenvironment. Typical internal software attributes include size, structuralcomplexity, coupling and cohesion.

that are preserved from corresponding properties of theempirical relational system.

Although axiomatic approaches avoid the explicit defini-tion of empirical relational systems, the resulting sets ofdesirable measure properties do not satisfy as axiomaticdefinitions of software measures. For instance, most axio-matic approaches for complexity measures regard measureproperties as necessary but not sufficient axioms [21]. As aconsequence, these measure property sets are useful to in-validate software measures by showing that they do notmeasure the attribute such as it is empirically understood.However, the set of measures that would be considered validfor the attribute of interest is only a subset of the set ofmeasures that satisfy all the necessary axioms. A moreuseful measure property set consists of axioms that areboth necessary and sufficient. Such a property set guaranteesthat all axiomatic defined software measures are validmeasures for the software attribute for which the propertyset was developed.

In this paper an axiomatic approach to software measure-ment is presented that defines necessary and sufficientmeasure properties. Sufficiency is implied by the specificmethod used to define software attributes. In mathematics,a number of concepts are defined using necessary and suffi-cient sets of axioms. One of these concepts is the metric. Inmathematics, a metric is called a ‘measure of distance’.Suppes et al. [22] show that a metric is also a measureaccording to the representational theory of measurement,given that the empirical relational system of distance satis-fies a set of empirical properties referred to as a proximitystructure. Every function that satisfies the metric axioms isthus by definition a valid measure of distance if a proximitystructure is assumed. The distance-based approach to soft-ware measurement describes software attributes with proxi-mity structures. Every software attribute is defined as thedistance from the software product that must be measured(or its abstraction) to some reference software product (orabstraction). Now, if software attributes are defined asdistances, then metrics can be used to measure the softwareattributes. Hence, software measures have an axiomaticdefinition, i.e. they must satisfy the metric axioms.

The distance-based axiomatic approach is similar to thegeneric axiomatic approach of Briand et al. [2] in the sensethat it is not restricted to the measurement of a particulartype of software products. However, whereas the axiomaticapproach of Briand et al. presents specific measure propertysets for size, complexity, length, coupling and cohesion, ourapproach uses the same set of measure properties, no matterwhat software attribute is measured. Different software attri-butes are defined as different distances, specified by thechoice of software product abstraction and referenceabstraction. These subjective choices reflect the empiricalunderstanding of the software attribute of interest. However,this ‘formalised’ subjectivity does not alter the basic axiomset used to define software measures.

The distance-based approach makes some assumptions

regarding the level of empirical understanding of a softwareattribute that is required. The level of understanding of asoftware attribute determines the sophistication of theempirical relational system and the type of scale. Generally,more useful scale types (e.g. ratio scales) require moresophisticated empirical relational systems than ‘lower’scale types (e.g. nominal and ordinal scales). It is thereforenot surprising that some of the proposed measure propertysets (e.g. [2]) constrain the type of the scales. There has beenan interesting discussion among software measurementresearchers regarding the desirability of such a constraint(see e.g. [23–25]) and as a result different measure propertysets have been proposed for different scale types [8]. Weshow that in order to apply the distance-based approach tomeasurement a minimum level of empirical understandingof a software attribute is required that, for instance, excludesnominal scales. However, the approach neither requires thatthe empirical relational system is an extensive structure(leading automatically to ratio scales), nor that a closedbinary operation on the set of software products or softwareproduct abstractions is defined.

The organisation of this paper is as follows. In Section 2the existing axiomatic approaches to software measurementare discussed. We distinguish different types of axiomaticapproaches depending on their specificity with respect to thesoftware attribute and measurement abstraction to whichthey apply. We also show that even the more specificmeasure property sets, for instance those associated withcontrol-flow complexity or size, cannot be proven to besufficient. In Section 3 we present our distance-based axio-matic approach to software measurement, along with anexample application: the definition of an aggregationcoupling measure for object classes. In Section 4 we focuson the relationship with the representational theory ofmeasurement, and we analyse the requirements for adistance-based definition of software attributes. Our conclu-sions are given in Section 5.

2. Axiomatic approaches to software measurement

An early type of axiomatic approach aims at the founda-tion of axiom schemes for complexity measures that aredefined on control-flow graph abstractions of software.For instance, Prather calls any functionm from the classof structured programs to the non-negative real numbers aproper measureof program complexity if it satisfies [10]:

(i) m�beginS1;S2;…;Sn end� $P

m�Si�;(ii) 2�m�S1�1 m�S2�� $ m (if P then S1 else S2) .

m�S1�1 m�S2�;(iii) 2m�S� $ m�while P do S� . m�S�;

where P is an arbitrary predicate and theSi (and S) arestructured processes built up inductively from a base setof simple statements using only the sequence, selectionand iteration structure constructs.

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4636

As there is a one-to-one association between the axiomschemes (i)–(iii) and the structure constructs, propermeasures can be given an axiomatic definition by specifyingthe behaviour of the proper measure under each of theaxiom schemes and the value of the proper measure overthe set of simple statements. For instance, Prather defines aprogram’s testing complexity measurem as

(a) m�simple statement� � 1;(b) m�beginS1;S2;…;Sn end� � P

m�Si�;(c) m�if P thenS1 elseS2� � 2max�m�S1�;m�S2��;(d) m�while P doS� � 2m�S�;

and shows thatm is a proper measure [10].Whereas the axiom schemes (i)–(iii) are sufficient to

define proper measures of structured program complexity(i.e. through the definition of a specific axiom for eachaxiom schema, and within the boundaries of that axiomschema), they are not sufficient to discriminate measuresfor specific program complexity attributes, implying thatthey are no substitute for an explicitly defined empiricalrelational system. The empirical properties preserved byPrather’s axiom schemes (i)–(iii) are thus not sufficient todescribe the empirical understanding of specific complexityattributes. Prather shows, for example, that the circuit rankof a connected control-flow graphG (i.e. r�G� � e2 n 11� d; whereG hase edges andn nodes, includingd deci-sion nodes), which differs by one from the cyclomaticnumber of a graph [26], is a proper measure because itsatisfies the three axiom schemes. However, Prather arguesthat the circuit rankr does not effectively characterise test-ing complexity since it is insensitive to the depth of nestingof a decision node.

Fenton and Whitty [6] extend the axiomatic approach ofPrather to control-flow graph abstractions of arbitraryprograms by introducing more general axiom schemes forsequencing and nesting. These axiom schemes are mademore specific by setting upper and lower bounds oncomplexity measures.Structural measuresare given anaxiomatic definition through the precise specification of asequencing and a nesting axiom that take the same form andfall within the bounds of the axiom schemes. It is alsorequired that the measure values are defined for the primegraphs in the set of control-flow graphs (this is in fact a thirdaxiom schema). Related to the axiomatic approach ofFenton and Whitty is the subsequent work of Prather [11]that is used to classify structural measures intohierarchicalmeasuresand recursive measures, i.e. a subclass of hier-archical measures satisfying a more restrictive nestingaxiom schema.

Another type of axiomatic approach is illustrated byShepperd and Ince [12]. Compared to the work of Prather[10,11] and Fenton and Whitty [6], the axiomatic approachis more flexible with respect to the measure and model forwhich axioms are defined. For instance, in [12] an exampleis provided of the axiomatic validation of a design measure,i.e. the common coupling measureC defined for the

modules of a system architecture. Also in [5] axioms areproposed for module coupling based on any designdocument that details the module interrelationships. Theaxiomatic approach of Briand et al. [2] is the most genericin nature as it contains axioms for size, length, complexity,coupling and cohesion, and this for any graph-based systemrepresentation that is used to represent software in any stageof its development. The axiom sets of Briand et al. havebeen extended by Whitmire [15] to include axioms forsufficiency, completeness, primitiveness, similarity, andvolatility in the context of object-oriented software. Otherrelated work specifying graph-based axioms for treeimpurity and internal reuse [17], reuse benefit [4], andlack of cohesion [1] can be found in the literature.2

Apart from the axioms specific to the model underlyingcommon coupling measures, Shepperd and Ince present anumber of axioms that are fundamental to all measurement[12]. Similar axioms can be found in [13,14,16,23,27,28].Examples of these axioms are [16]:

(i) It must be possible to describe, even if not formally,the rules governing the measurement method.(ii) The measure must generate at least two equivalenceclasses.(iii) If an infinite number of objects or events is measured,eventually two or more must be assigned to the sameequivalence class.

It is argued in Ref. [16] that axioms of this type are notnecessarily satisfied for homomorphic mappings fromempirical relational systems into formal relational systems.They are however used to avoid certain unwanted propertiesof functions that can technically be validated using measure-ment theory.

Although axioms fundamental to all measurement can befound in Weyuker’s axiomatic approach [14], she also intro-duces desirable properties for measures defined on aformally defined model of a program, based on a simplifiedsyntax. In Ref. [7] Weyuker’s axioms were refined forcontrol-flow complexity measures, using sequencing andnesting axiom schemes. The axiomatic approach of Tianand Zelkowitz [13] is again somewhat more generic innature as it focuses on general program complexity axiomstaking a parse tree of a program as the software abstraction.

A common characteristic of both the generic and morespecific axiomatic approaches is that their developers do notclaim that the proposed axiom sets are sufficient. Measureaxioms must rather be regarded as desirable (i.e. necessary)

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–46 37

2 Note that reuse benefit is an external attribute. The properties proposedby Devanbu et al. [4] must be verified for measures of the (relative) amountof reuse in a software system. However, the desirable measure propertiesformalise intuitive notions regarding the relationship between reuse benefitand the amount of reuse in a system. They require for instance that a reusemeasure must assign a higher value to a verbatim reused component than toa non-verbatim reused component. The property set of Devanbu et al. is arare example of an axiomatic approach that considers issues of externalvalidity or measure usefulness.

properties. According to Weyuker the complexity measureproperties she proposes “are generally desirable and rele-vant, but certainly not complete” [14]. Shepperd and Inceargue that “it is probable that there are model properties thatare important, yet have been omitted from the set of modelaxioms due to oversight” [12]. According to Tian and Zelk-owitz “the axioms and classification schema effectivelydefine a set of minimal requirements on complexitymeasures. If we view measures as points in a measurespace, these minimal requirements prescribe the binaryboundary conditions of the feasible region where measuresare to be selected” [13]. Briand et al. repeat several timesthat their measure properties are not sufficient, for instance“by no means should these properties be regarded as theunique set of properties that can be possibly defined for agiven concept” [2] and “we consider these properties neces-sary but not sufficient because they do not guarantee that themeasures for which they hold are useful or even makesense” [2]. Fenton and Pfleeger present a set of four treeimpurity measure properties and state that “any measurem of tree impurity must satisfyat least four properties”[17]. Finally, we cite Kitchenham and Stell: “What canwe conclude from a set of axioms that are necessary butnot sufficient?” [21].

Note that the insufficiency of many measure axiom setscan be formally proven. Take for instance the axiom setAx2proposed by Morasca and Briand [8]. The axiom setAx2contains a single desirable measure property (denoted Size.4) that is meaningful for size measures at and above theordinal level of measurement. This axiom is defined interms of a generic representation of (software) systemsand modules that was originally proposed in [2]. A systemS is represented as a pairkE;Rl; where E is the set ofelements ofS and R is a binary relation onE (i.e.R # E × E). Axiom Size. 4 of axiom setAx2 is:

�S0 � kE0;R0l and S00 � kE00;R00l and E0 # E00�) Size�S0� # Size�S00�:

Briand et al. [2] regard measure axioms as properties of theformal relational system that are preserved from corre-sponding properties of the empirical relational system. AsSize. 4 is the only axiom inAx2, the empirical relationalsystem it is preserved from is�S;#s�; whereS is a countableset of software systems and#s# S× S is defined such that

;S0 � kE0;R0l; S00 � kE00;R00l [ S : S0 #s S00 , E0 # E00:

If we wish to measure the size of software systems at andabove the ordinal level of measurement, then the empiricalrelational system�S;#s�must be homomorphically mappedinto a formal relational system�N;#N�; whereN is a set ofnumbers or formal symbols (e.g. the setR of real numbers)and#N is a total ordering relation (e.g. the ordering relation## R × R). According to the representation theorem ofCantor (see [19]), a homomorphism from�S;#s� into(R,#) exists if and only if#s is a weak order. An order is

weak if it is transitive and strongly complete. Whereas tran-sitivity is satisfied:

;S� kE;Rl;S0 � kE0;R0l;S00 � kE 00;R00l [ S : �E# E 0 and E0 # E00 ) E # E00� ) �S#s S0 and S0

#s S00 ) S#s S00�strong completeness is not satisfied:

'S0 � kE0;R0l;S00 � kE 00;R00l [ S : �E 0 ÷ E 00 and E00

÷ E 0 and E0 ± E00� ) not �S0 #s S00 or S00 #s S0�:The containment relation# on sets of system elements andthe binary ordering relation#s on systems are only partialorders (i.e. they are reflexive, transitive and antisymmetric,but not strongly complete). Therefore, there is no homo-morphism from �S;#s� into (R, # ). Note that axiomSize. 4 requires a measure of size to be a mapping Size:

S! R that satisfies

;S0 � kE0;R0l;S00 � kE 00;R00l [ S : S0 #s S00 ) Size�S0�# Size�S00�

whereas measurement theory requires Size to be a homo-morphism, also satisfying the( implication:

;S0 � kE0;R0l;S00 � kE 00;R00l [ S : S0 #s S00 , Size�S0�# Size�S00�:

The requirement that Size must only satisfy the) implica-tion can also be found in [13,31,32]. From a measurementtheoretical point of view, this requirement is not sufficient.Hence, the axiom setAx2 is not sufficient to define sizemeasures at and above the ordinal level of measurement.

3. The distance-based approach to softwaremeasurement

In a recent paper Kitchenham and Stell [21] suggest tostudy the role of axiomatic approaches in mathematics tobetter understand the axiomatic approaches to softwaremeasurement. An interesting axiom set in this regard isthe set of metric axioms, used to define metrics. Althoughthe term ‘metric’ is used in the software measurement litera-ture to denote “any number extracted from a softwareentity” [17, p. 324], in mathematics a metric is called a‘measure of distance’. Any functiond : X × X! R is a‘measure of distance’ if it satisfies:

(i) non-negativity:;x; y [ X : d�x; y� $ 0(ii) identity: ;x; y [ X : d�x; y� � 0, x� y(iii) symmetry: ;x; y [ X : d�x; y� � d�y; x�(iv) triangle inequality:;x; y; z [ X : d�x; y� # d�x; z�1

d�z; y�:If d is a metric, then (X, d ) is called a metric space.

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4638

A metric is also a measure in the sense of measurementtheory if distances inX are described by a proximitystructure [22]. Let# x, , x and � x be quaternary relationsonX. The observations that (i) the distance betweenw andxis at most as great as that betweeny andz, (ii) the distancebetweenw andx is not as great as that betweeny andz, and(iii) the distance betweenw and x is the same as thatbetweeny and z are denoted by (i)�w; x� #x �y; z�; (ii)�w; x� ,x �y; z� and (iii) �w; x� �x �y; z�; respectively. Then,(X, # x) is a proximity structure if and only if the followingaxioms hold;x; y [ X :

(i) #x is a weak order;(ii) �x; x� ,x �x; y� wheneverx ± y �positivity�;(iii) �x; x� �x �y; y� �minimality�;(iv) �x; y� �x �y; x� �symmetry�:

If �X;#x� is a proximity structure and�X; d� is a metricspace, then, according to the representational theory ofmeasurement,d is a measure of distance (i.e. a homomorph-ism from �X;#x� into (R, # ) if and only if

;w; x; y; z [ X : �w; x� #x �y; z� , d�w; x� # d�y; z�:Our approach to software measurement is to define internalattributes of software products as distances between thesesoftware products (or their measurement abstractions) andother software products (or abstractions) that are used asreference points for measurement. If software attributesare defined as distances, then the measures of thesedistances can be used as software measures. Hence, ourdistance-based approach results in an axiomatic definitionof software measures. In previous research we applied thedistance-based approach to the definition and measurementof object class complexity based on a formal model ofobject behaviour and interaction [33]. In the current paperthe approach is further formalised and generalised, andattention is paid to its underlying assumptions. As an illus-tration, a distance-based definition of aggregation couplingbetween object classes will be presented, along with theaxiomatic definition of an aggregation coupling measure.

The distance-based approach to software measurementconsists of the following activities:

1. For the set of software productsP and for the internalattributeattr of the software products inP, choose a set ofsoftware productsM that can be used as measurementabstractions to emphasiseattr, and define a mappingabs:P! M.

Measurement abstractions are used in software measure-ment to emphasise the attribute of interest, while simulta-neously de-emphasising other attributes [20]. For instance, awidely used measurement abstraction to measure thecontrol-flow complexity of a program is the control-flowgraph. The assumption that a set of software productsMcan be found and that a mapping abs:P! M can be definedis made in other formal software measurement approaches(e.g. the Model-Order-Mapping (MOM) approach [31],

model-based software measurement [34]) that are notrestricted to the measurement of a particular softwareattribute. Approaches that focus on the measurement of asingle attribute (e.g. control-flow complexity) do not makethis assumption as the software product abstraction (e.g.control-flow graph) is fixed, and not freely chosen.

One objection to the above assumption could be that forsome attributes there might exist different setsM, i.e. differ-ent types of non-equivalent software product abstractionsthat emphasise the same attribute.3 Our position is that incase many sets of non-equivalent candidate abstractions canbe identified, the attribute actually consists of a number ofsub-attributes, one for each type of software productabstraction.4 The distance-based approach must be appliedto each of the sub-attributes to arrive at a measure for thatsub-attribute. The collection of these measures is then usedto measure the ‘global’ attribute. Whether the sub-attributemeasures are combined into one composite measure for the‘global’ attribute or not, depends upon the availability oftheories and/or empirical models that justify the combina-tion rule.

We believe that the refinement of attributes into atomicsub-attributes, i.e. attributes for which a single softwareproduct abstraction is defined, is an appropriate strategyfor software product measurement. For instance, in case ofcomplexity measurement, Fenton [35] argues that there isno single number that may characterise a general notion ofcomplexity, even not control-flow complexity. Therefore itis only meaningful to measure very specific complexityattributes. We think that use of different software productabstractions implies that actually different notions of theattribute are measured, unless of course the abstractionsare equivalent, i.e. they can be mutually derived fromeach other without additional information.

2. Define a setTe of elementary transformation types onM that is constructively and inverse constructivelycomplete

The function abs:P! M is not required to be surjective.Not all elements ofM must actually be measurementabstractions of elements ofP. On the other hand, each soft-ware product inP has its measurement abstraction containedin M. We now look for a way to model conceptual distancesbetween the elements ofM. This will allow in later steps todistinguish the software products inP in terms of the

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–46 39

3 Two abstractions of a software product are non-equivalent when theycannot be mutually derived from each other without additional information.For instance, both the source code and the control-flow graph of a programmodule are non-equivalent abstractions that emphasise the length (in thesense of physical size) of the module. Whereas the control-flow graph canbe derived from the module’s source code, the opposite does not hold.

4 Each sub-attribute represents a particular perspective or point of viewon the attribute. The notion of module length captured in the source codeabstraction is different from the one captured in the control-flow graphabstraction. The latter abstraction does for instance not consider commentlines as contributing to the length of the module.

attribute of interestattr. Conceptual distances between theelements of M are defined in terms of elementarytransformations. These represent atomic changes that trans-form one element ofM into another element ofM. Intui-tively, the number of atomic changes required to transformone element into another element defines the conceptualdistance between these elements.5 These ideas are forma-lised below.Te � { t0; t1;…; tn} is a constructively completeset of elementary transformation typesti : M ! M if eachm [ M can be built by applying a finite sequence of elemen-tary transformationsti1;…; tik on an initial abstractionmI [ M.6 Te is inverse constructively complete if;ti [ Te :

'!t21i � tj [ Te : tj�ti�m�� � m; wherem [ M: The set of

elementary transformation typesTe is used to define a metricspace�M; d�. Let us introduce the following definitions:

• Let T be a sequence of elementary transformationsti1;…; tik. A T-derivation from m [ M to m0 [ M is asequence of abstractionsm0;m1;…;mk21;mk such thatm� m0;m

0 � mk andtij �mj21� � mj for 1 # j # k:• We say that a sequenceT of elementary transformations

ti1;…; tik takes m[ M to m0 [ M if it defines aT-deriva-tion from m [ M to m0 [ M. If T takesm to m0, wedenoteT asTm;m0 .

• The length of a sequenceT of elementary transforma-tions ti1;…; tik is k. If k � 0 thenT is empty. An emptysequence is denoted by the symbolB.

• Generally, there are many different sequences to takemto m0. The set of all sequences of elementary transforma-tions that takem [ M to m0 [ M is denoted byTm;m0 .

• The set of all shortest sequences of elementary transfor-mations that takem [ M to m0 [ M is STm;m0 # Tm;m0 :

• The sets of all sequences and shortest sequences ofelementary transformations that take anym [ M to anym0 [ M areT andST respectively.

3. Using the constructive procedure below, define ametricd : M × M ! R such that�M; d� is a metric space

In this step the conceptual distances inM that were definedusingTe are quantified. This is done by means of a metricspace. The following constructive procedure presents oneway to define a metric function onM.

(a) Let c be a positive real number. Then,;m;m0 [M;Tm;m0 [ Tm;m0 : w�Tm;m0 � � kc; where k is the lengthof Tm;m0 .(b) ;m;m0 [ M : d�m;m0� � w�Tm;m0 �; where Tm;m0 [STm;m0 :

Basically, the functiond returns for each pair of elements in

M the minimum number of elementary transformations (i.e.k) that are needed to take one element to the other element.This number may be multiplied by a positive constant (i.e.c), as the distance value must not equal the count of atomicchanges, but must only be derivable from this count by ascalar multiplication. It can be proven that a functionddefined with this constructive procedure satisfies the metricaxioms.7

We first need to define a partial function%: T × T ! Tthat is used to combine sequences of elementary transfor-mations. LetTm;m0 [ Tm;m0 be a sequence of elementarytransformations ti1;…; tik that defines the sequence ofabstractionsm0;m1;…;mk21;mk from m� m0 to m0 � mk;

wheretij �mj21� � mj for 1 # j # k: Let Tm0;m00 [ Tm0;m00 be asequence of elementary transformationstik11;…; tih thatdefines the sequence of abstractionsmk;mk11;…;mh21;mh

from m0 � mk to m00 � mh; wheretij �mj21� � mj for k , j #h: Then, % �Tm;m0 ;Tm0;m00 � is defined as the sequence ofelementary transformationsti1;…; tik; tik11;…; tih thatdefines the sequence of abstractionsm0;m1;…;mk21;

mk;mk11;…;mh21;mh from m� m0 to m00 � mh; wheretij �mj21� � mj for 1 # j # h: We say that% �Tm;m0 ;Tm0;m00 �takesm to m00 over m0. We also write% �Tm;m0 ;Tm0;m00 � asTm;m0 % Tm0;m00 .

Below each of the metric axioms is verified for a functiond defined with the constructive procedure.

• non-negativity

;m;m0 [ M : c . 0 andk $ 0) d�m;m0� $ 0

• identity

;m;m0 [ M :

(a) d�m;m0� � 0) w�Tm;m0 � � 0 and c . 0) k �0) m� m0

(b) m� m0 ) STm;m0 � { B} ) d�m;m0� � w�B� �0c� 0

• symmetry

Let Tm;m0 [ STm;m0 be the sequence of elementarytransformationsti1;…; tik that defines the sequence ofabstractionsm0;m1;…;mk21;mk from m� m0 to m0 �mk; wheretij �mj21� � mj for 1 # j # k: The sequenceof elementary transformationst21

ik ;…; t21i1 (notation:

inverse�Tm;m0 �) can be used to take m0 back to m. Asinverse�Tm;m0 � [ STm0;m; it holds that d�m;m0� �w�Tm;m0 � � kc� w�inverse�Tm;m0 �� � d�m0;m�

• the triangle inequality

Let Tm;m0 [ STm;m0 be the sequence of elementary trans-formationsti1;…; tik on M that defines the sequence ofabstractionsm0;m1;…;mk21;mk from m� m0 to m0 �mk; where tij �mj21� � mj for 1 # j # k: Let Tm0;m00 [STm0;m00 be the sequence of elementary transformations

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4640

5 In [47] it was proven that this definition of distance satisfies the empiri-cal properties of a proximity structure.

6 Each elementary transformationtij ; j [ {1 ; 2;…; k} ; in such a sequenceis of a typeti [ Te; but it is not required that all elementary transformationstij are of the same typeti [ Te for all j [ {1 ;2;…; k} :

7 It was further shown in Ref. [47] thatd satisfies the representationcondition for a measure of distance in the sense of measurement theory.

tik11;…; tih on M that defines the sequence of abstrac-tionsmk;mk11;…;mh21;mh from m0 � mk to m00 � mh;

wheretij �mj21� � mj for k , j # h:It holds that Tm;m0 % Tm0;m00 [ Tm;m00 ; but it is notimplied thatTm;m0 % Tm0;m00 [ STm;m00 .It also holds thatw�Tm;m0 % Tm0;m00 � � hc� w�Tm;m0 �1w�Tm0;m00 � � d�m;m0�1 d�m0;m00� � kc1 �h 2 k�c:Therefore, ;Tm;m00 [ STm;m00 : d�m;m00� � w�Tm;m00 � #hc� w�Tm;m0 �1 w�Tm0;m00 � � d�m;m0�1 d�m0;m00�:

4. Choose a reference modelr [ M that is the softwareproduct abstraction for which it holds that, for allp [ Pwith abs�p� � r, p has the theoretical lowest value ofattr.

The choice of reference model for an attribute is subjectiveas it is based on intuitive, empirical or theoretical argu-ments. However, if appropriately chosen, then it can beargued that, for a software productp, the value ofattr islow when abs(p) is ‘close to’ r and the value ofattr is highwhen abs(p) is ‘far from’ r. The expressions ‘close to’ and‘far from’ are of course relative concepts that must be moreformally defined in terms ofTe. If a metric space�M; d� is

defined usingTe, then we say thatattr of p [ P is thedistance from abs(p) to r as defined by the sequences ofelementary transformationsTabs�p�;r [ STabs�p�;r :

The assumption that a reference model can be found isessential to the distance-based approach to softwaremeasurement. Next we show that the assumption is easilymade for software attributes with even a limited level ofempirical understanding.

5. Define a functionm : P! R such that for allp [P;m�p� � d�abs�p�; r�

Let d : M × M ! R be a metric function that is definedusing the constructive procedure previously described. Ifone of the function arguments (e.g. the second argument)is held constant at the reference modelr, then d :

M × { r} ! R can be used to measure the distance fromany abstractionm [ M to the reference modelr [ M:

The functionm : P! R is a measure of the internal attri-bute attr of the software products inP if, for allp [ P;m�p� � d�abs�p�; r�.

To avoid any confusion that might arise, we explicitlystate at this point that not every distance valued�m;m0�,with m;m0 [ M; is a measurement of the software attributeof interest. For a set of software productsP characterised byan attributeattr, the set of measurements contains only themetric values d�abs�p�; r�; where abs�p� [ M is themeasurement abstraction of the software productp [ P;andr [ M is the reference abstraction. Distances involvingelements ofM that are not measurement abstractions ofsoftware products inP, and that are different from the refer-ence abstractionr, do not qualify as definitions of the soft-ware attributeattr. Similarly, the distance measurementsinvolving such elements ofM have nothing to do with themeasurement ofattr.

3.1. Illustration: aggregation coupling between objectclasses

Coupling between object classes is due to the representa-tion of associations between the classes (i.e. static coupling)

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–46 41

Fig. 1. Generalisation/specialisation and aggregation relationships betweenobject classes.

Fig. 2. Static coupling between object classes through the inheritancemechanism.

Fig. 3. Static coupling between object classes through the abstractionmechanism.

and the message passing between instances of the classes(i.e. dynamic coupling) [36]. To model associationsbetween object classes, most object-oriented analysismethods use some type of static model based on theconcepts of the (extended) entity-relationship diagrammingtechnique [37]. For instance, Fig. 1 shows generalisation/specialisation and aggregation relationships between objectclasses. Inside the abstract data type (ADT) specifications,these static coupling relationships are realised throughrespectively the inheritance (Fig. 2) and abstraction(Fig. 3) mechanisms.

The static coupling between an object class and itsenvironment (i.e. the other object classes in the model)may be evaluated from an inbound/importing/client or anoutbound/exporting/server perspective [2,38]. Whereas theformer refers to the incoming static coupling relationships,he latter type of static coupling refers to the outgoingrelationships.

Assume we wish to measure the inbound static couplingof an object class due to its is-part-of associations with theother object classes in the model. LetP be a set of objectclasses associated with some Universe of Discourse (i.e.domain or model). The application of the distance-basedapproach results in:

1. The definition of a set of measurement abstractionsP(P)and a function abs:P! P�P� that captures inboundaggregation coupling:8

;p [ P : abs�p� � { q [ Pup is part of q} :

It is hereby assumed that only direct is-part-of associa-tions must be taken into account. The measurementabstraction for an object classp in P is the set of objectclasses inP that aggregatep. The mapping abs is notsurjective, implying that not all subsets ofP are measure-ment abstractions of object classes inP. Put differently,there is some finite setF(P) of subsets ofP that containsall measurement abstractions for inbound aggregationcoupling.9

2. The definition of a setTe of elementary transformationtypes onP(P) that is constructively and inverse construc-tively complete:

Te � { t1; t2} ;

where

;m [ P�P� : t1�m� � m< { p} ; with p [ P;

;m [ P�P� : t2�m� � m2 { p} ; with p [ P

Since the elements ofP(P) are sets,Te must onlycontain an elementary transformation type that addsan object class to a set and an elementary transfor-mation type that deletes an object class from a set.Given two setsm and m0 of P(P), m can always be

transformed into m0 by first removing all objectclasses fromm that are not inm0 (through t2) andthen adding all object classes tom that are inm0 2m (through t1). If needed,m must be taken tom0 viathe empty element ofP(P), i.e. B.

3. The definition of a metric space (P(P),d ): Thedistance between two sets of object classesm andm0 is measured by the length of the sequences ofelementary transformations inSTm;m0 ; multiplied bya positive real numberc. Assumec is chosen to beequal to 1. As exactly one elementary transformationwill be needed for each object class ofP that iscontained in eitherm or m0, but not in both sets,the distance value is equal to the cardinality of thesymmetric difference betweenm and m0. Hence, ametric space�P�P�; d� is defined when

;m;m0 [ P�P� : d�m;m0� � umDm0u

� u�m2 m0�< �m0 2 m�u � um2 m0u 1 um0 2 mu

According to Suppes et al. [22] this metric takes theform of the symmetric difference model, which is aspecial case of Tversky’s contrast model that is usedto define a metric distance between sets of elements.Note that other values forc lead to other metricspaces. A further discussion is given later.

4. The definition of a reference abstractionr [ P�P� forinbound aggregation coupling: There exist objectclasses that are not part of other object classes.Therefore we chooser to be the empty set. Theinbound aggregation coupling of an object classp [P is now formally defined as the distance fromabs(p) to B.

5. The definition of an inbound aggregation couplingmeasurem : P! R:

;p [ P : m�p� � d�abs�p�;B� � uabs�P�DBu � uabs�p�uObserve that this measure actually counts the number ofobject classes thatp is part of. Given the choices thathave been made in the previous steps, the constructionof this measure is similar to the definition of the dataabstraction coupling (DAC) measure of Li and Henry[39], the measure of aggregation (MOA) of Bansiyaand Davis [40], and the OCAIC measure in the C-FOOD (Coupling measures For Object-Oriented Design)suite [41]. These measures have been developed from thedesire to measure the impact of specific couplingmechanisms on software quality. The abstractionmechanism that implements the is-part-of associationbetween an object classp and an aggregate object classq results in aq type declaration of an attributea in theADT of p. Defects or changes in the ADT ofq are propa-gated via the attributea in the ADT of p. On severaloccasions recent empirical research has providedevidence that inbound aggregation coupling is related

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4642

8 P�X� denotes the power set ofX, i.e. the set of all subsets ofX.9 F�X� denotes a finite set of subsets ofX, i.e. F�X� # P�X�:

to the probability of fault detection in the importing class(see [42–45] for an empirical validation of the OCAICmeasure and [42,44–45] for the DAC measure).10

In this example the choice of abstraction function andreference abstraction is not entirely subjective, as it isguided by the properties of the static coupling relationship.Suppose for instance that we wish to measure another typeof static coupling. In [46] object classes are related throughthe existence dependency relation which is complete in agiven model, i.e. every object class in the model is involvedin at least one existence dependency relationship. A refer-ence abstraction for existence dependency coupling (assum-ing a joint inbound and outbound perspective) must not beempty (for models with two or more object classes) as everyvalid object class is existence dependency coupled to at leastone other object class. In [30] the restriction of complete-ness of the existence dependency relation is dropped, but therelation itself is defined as a bag, i.e. an object class may bemore than once existent dependent of some other objectclass. If now a set abstraction is used for inbound existencedependency coupling, similar to the set abstraction forinbound aggregation coupling, then the number of existencedependency associations with a particular object class is nolonger taken into account. This may correspond to the intui-tive point of view on static coupling, but if it does not, then amulti-set abstraction, allowing duplicate elements, would bemore appropriate.

The use of less trivial abstractions is illustrated in Ref.[33], where regular expressions are used to model the lifecycle of object classes. The reference abstraction used forthe measurement of object class life cycle complexity is theregular expression that specifies a trivial object class lifecycle. The differences with the inbound aggregationcoupling reference abstraction are that the reference abstrac-tion for life cycle complexity is not necessarily the smallestregular expression that can be defined and that the referenceabstraction is relative to the object class, i.e. each objectclass has its own reference regular expression.

4. Evaluation

If software attributes are defined as distances, then axio-matic defined measures of distance (i.e. metrics) can be usedas software measures. However, a distance-based definitionof an attribute requires a minimum level of empirical under-standing. The non-negativity and identity axioms require thedistinction of at least two equivalence classes: one contain-ing pairs of abstractions having no distance between themand one containing pairs of abstractions with a positivedistance between them. This implies that for each softwareproductp we must be able to decide, prior to measurement,

whether the attribute of interestattr has the theoreticallowest value or not. Ifattr has the theoretical lowestvalue, then abs�p� � r andm�p� � d�abs�p�; r� � 0: If attrhas a value higher than the theoretical lowest value, thenabs�p� ± r and m�p� � d�abs�p�; r� . 0: Hence, the mini-mum level of empirical understanding is that of anordinal classification with two equivalence classes. Thecorresponding empirical relational system has the form�P;,p�, whereP is a set of software products and,p isa strict weak order (i.e. asymmetric and negatively tran-sitive)11 such that for all software productsp;q [P; p ,p q if and only if attr of p has the theoreticallowest value andattr of q has a value higher than thetheoretical lowest value.

The constructive measure definition procedure describedin the previous section does not result in a homomorphismfrom �P;,p� into �R;,�: Whereas it always holds thatp ,p

q) m�p� , m�q�; it does not always hold thatm�p� ,m�q� ) p ,p q: However, if the constructive procedure todefine metrics is simplified as follows:

;m and m0 in M; define d�m;m0� � 0 if STm;m0

� { B} and d�m;m0� � c . 0 otherwise;

thend is both a metric and a homomorphism from�P;,p�into �R;,�:

Of course, the two-class ordinal classification refers onlyto the minimum level of empirical understanding. In [47] weshowed that more sophisticated empirical relational systemsare supported as well. For instance, when more than twoequivalence classes are distinguished in an ordinal classifi-cation, then a distance-based attribute definition requiresmore than the existence of a strict weak order or a weakorder on the set of software products. One of the empiricalconditions implied by the metric axioms is that ifattr of phas a value not higher than the value ofattr of q, then thedifference in the degree thatattr characterisesq andp maynot be greater than the distance between abs(p) and abs(q).This conditon is directly derived from the triangle inequal-ity: if attr of p has a value not higher than the value ofattr ofq, then, given the definition of the attribute of interestattr, itholds that the distance from abs(p) to r is smaller or equalthan the distance from abs(q) to r. But the triangle inequalityalso implies that the distance from abs(q) to r is smaller orequal than the combined distance from abs(q) to abs(p) andfrom abs(p) to r (i.e. the distance form abs(q) to r viaabs(p)). Rewriting the latter condition results in the require-ment that the (conceptual) difference between the distancefrom abs(q) to r and the distance from abs(p) to r must besmaller or equal than the distance from abs(q) to abs(p).Hence, the (conceptual) difference in the degree thatattr

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–46 43

10 These empirical studies investigate the usefulness or external validityof the proposed inbound aggregation coupling measures. They do not aim atestablishing the internal validity of the measures.

11 The relation ,p# P × P is asymmetric if ;p;q [ P : p ,p q)not�q ,p p� and negatively transitive if;p;q; r [ P : not�p ,p q� andnot�q ,p r� ) not�p ,p r�:

characterizesq andp may not be greater than the distancebetween abs(p) and abs(q).

When we accept the empirical condition implied by thetriangle inequality, then a metric can be used to measure theattribute. The level of understanding required for a metricrepresentation is therefore higher than that required for theordinal level of measurement (in case more than two equiva-lence classes are distinguished).

This conclusion is somewhat similar to Zuse’s analysis ofthe properties of object-oriented software measures [48].Zuse shows that most object-oriented software measuresdo not assume an extensive structure (leading automaticallyto the ratio scale type). On the other hand, these measuressatisfy properties (i.e. the Kolmogoroff axioms, the belieffunction properties of Dempster and Shafer, and theaxioms of DeFinetti [20]) that allow them to be charac-terised above the ordinal level of measurement. Likewise,the metric axioms assume more than the existence of a(strict) weak order (which would lead to the ordinal scaletype).

A difference with the analysis presented in [48] is that themetric axioms do not require the definition of closed binaryoperations on software products or their abstractions. Thetriangle inequality requires the concatenation of distances,but does not require that the software products (or theirabstractions) themselves are concatenated.

To end this discussion, we draw attention to an admissibletransformation of scale that is contained within the construc-tive procedure to define a metric space. If (A,B,f) and(A,B,g) are scales, i.e. iff andg are homomorphisms fromthe same empirical relational system A into the same numer-ical relational system B, andf�f � � g; thenf is called anadmissible transformation of scale [19]. If for any scale(A,B,f) and any other scale (A,B,g) there is a functionf�f � � g; then the representation A! B is regular [19].The class of admissible transformations associated withthe regular representation A! B is used to define thescale type of the measures [19].

In the context of distance measurement the concept of anadmissible transformation of scale can be more preciselydefined. Let M be a set of abstractions. If�M; d� and�M; d 0� are metric spaces, thenf�d� � d 0 is an admissibletransformation of scale.

The constructive procedure to define a metric onMassigns the same positive real valuec to every elementarytransformation in a sequence of elementary transformationstakingm [ M to m0 [ M. If the shortest sequences takingmto m0contain k elementary transformations, then the metricvalue for the distance betweenm and m0 is equal to theproduct ofk andc. As an example, the inbound aggregationcoupling measure presented in Section 3 assumedc to beequal to 1. However, we could have chosen any otherpositive real value forc. Such a transformation is anadmissible transformation of scale assumed by the con-structive procedure. Any metricd on M can be transformedinto any other metricd 0 onM by a similarity transformation

d 0 � f�d� � ad; with a . 0:12 It is easy to show that a.d ,with a . 0, satisfies the metric axioms ifd is a metric:

(i) ;m;m0 [ M : d�m;m0� $ 0) ad�m;m0� $ 0(ii) ;m;m0 [ M : �d�m;m0� � 0 , m � m0� )�ad�m;m0� � 0, m� m0�(iii) ;m;m0 [ M : d�m;m0� � d�m0;m� ) ad�m;m0� �ad�m0;m�(iv) ;m;m0;m00 [ M : d�m;m0� # d�m;m00�1 d�m00;m0�) ad�m;m0� # a�d�m;m00�1 d�m00;m0�� ) ad�m;m0� #ad�m;m00�1 ad�m00;m0�

If the class of admissible transformations of scale are thesimilarity transformations, then the scale type of the metricswould be the ratio scale type. In [25] it is argued that themetric axioms imply a ratio scale type. Note for instancethat the class of admissible transformations of the nextlower scale type, i.e. the interval scale type, does notpreserve some of the metric axioms, asa:d 1 b; with a .0 andd a metric, does not satisfy the triangle inequality fornegative values ofb and does not satisfy the identity axiomunlessb � 0, which restricts the class of admissible trans-formations effectively to the similarity transformations.

However, as opposed to [25], we do not claim that everymetric representation leads to a ratio scale. According toZuse [49] “It is a widely spread misview that showing themeaningfulness of a statement also shows the scale type of ameasure”. It is true that the identity axiom is meaningful forthe ratio scale. However, it might also be meaningful forscale types that are not part of the usual categorisationnominal/ordinal/interval/ratio, and that are defined byother classes of admissible transformations. According tomeasurement theory textbooks (see e.g. Suppes et al. [22])a metric function has to satisfy additional axioms (e.g.segmental additivity [22]) to be qualified as a ratio measureof distance. It is our position that the distance-basedapproach allows to measure software attributes at a levelof measurement higher than the ordinal level (in case wehave more than two equivalence classes of distances), butthe exact determination of the scale type is a topic forfurther research.13

5. Conclusions

The axiomatic approach to software measurement offers aformal description of the empirical understanding of soft-ware attributes and allows for an exact definition of theproperties of software measures. Unfortunately, many ofthe contemporary axiomatic approaches are problematic.Apart from the problems identified in this paper we referto complementary work of Kitchenham et al. [21], Fenton

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4644

12 For instance, if a positive real numberc is used in the definition ofdand a positive real numberc0 is used in the definition ofd 0, thena� c0=c:

13 Recently, some or our preliminary research results were published inRef. [50].

[35], and Zuse [20]. In [9] we identified consistencyproblems with the generic axiomatic approach of Briandet al. [2]. Some of these issues have been addressed in recentwork [3,8]. In this paper we focused on the problem ofaxiom sufficiency.

The current axiomatic approaches to software measure-ment prescribe sets of desirable measure properties. Soft-ware measures that do not satisfy one or more of theproperties in a property set are invalidated in the sensethat they do not measure the software attribute such as itis understood by the developers of the property set. Tovalidate software measures, measure property sets must beboth necessary and sufficient. In this paper the distance-based approach to software measurement was presented. Itis an axiomatic approach that uses a set of necessary andsufficient axioms, i.e. the metric axioms. Metrics are func-tions that measure distances. If software attributes aredefined as distances (by means of proximity structures),then metrics can be used as software measures. As a conse-quence, the metric axioms may be used not only to invali-date software measures, but also to formally validate them.Moreover, the distance-based axiomatic approach is aconstructive procedure allowing not only to validate exist-ing measures, but also to define new software measures.Previously, the constructive procedure was used to defineobject class complexity measures [33]. In this paper theapproach was illustrated with the definition of an objectclass aggregation coupling measure.

Apart from offering necessary and sufficient measureproperties, the distance-based approach is generic, flexibleand formal. It is generic in the sense that the same axiomsare used to define measures for various internal attributes ofvarious types of software products. The approach isflexible in the sense that even for the same attributeof the same software product, alternative definitionswith their corresponding measures can be proposed.However, the generic and flexible character of theapproach is only realised through the subjective choiceof software product abstraction and reference abstraction.On the other hand, these aspects of subjectivity are stronglyformalised when the constructive measure definition pro-cedure is used. Therefore, we believe that subjectiveaspects of the attribute and measure definitions are easilyidentified such that their soundness can be properlyevaluated.

The minimum level of empirical understanding of a soft-ware attribute that is required for a distance-based definitionis relatively low, i.e. an ordinal classification with twoequivalence classes. But also higher levels of under-standing are supported. The metric axioms allow tocharacterise software measures above the ordinal level ofmeasurement. Further research is needed for the precisedefinition of the class of admissible transformations ofscale, in particular when the number of equivalence classesincreases up to the point where a continuous scale isapproximated.

Acknowledgements

This work was supported by a dissertation research grantfrom the Fund for Scientific Research, Flanders (F.W.O.)(Belgium). We thank the anonymous referees for theirinvaluable comments.

References

[1] L.C. Briand, J.W. Daly, J. Wu¨st, A unified framework for cohesionmeasurement in object-oriented systems, Emp. Soft. Engng J. 3(1998) 65–117.

[2] L.C. Briand, S. Morasca, V.R. Basili, Property-based software engi-neering measurement, IEEE TSE 22 (1996) 68–86.

[3] L.C. Briand, S. Morasca, V.R. Basili, Response to: comments onproperty-based software engineering measurement: refining the addi-tivity properties, IEEE TSE 23 (1997) 196–197.

[4] P. Devanbu, S. Karstu, W. Melo, W. Thomas, Analytical and empiri-cal evaluation of software reuse metrics, in: Proc. 18th Int. Conf. Soft.Engng, IEEE, Berlin, 1996.

[5] N. Fenton, A. Melton, Deriving structurally based software measures,JSS 12 (1990) 177–187.

[6] N.E. Fenton, R.W. Whitty, Axiomatic approach to software metrica-tion through program decomposition, The Computer J. 29 (1986)330–339.

[7] K.B. Lakshmanan, S. Jayaprakash, P.K. Sinha, Properties of control-flow complexity measures, IEEE TSE 17 (1991) 1289–1295.

[8] S. Morasca, L.C. Briand, Towards a theoretical framework formeasuring software attributes, in: Proc. METRICS’97, IEEE, Albu-querque, NM, 1997.

[9] G. Poels, G. Dedene, Comments on property-based software engi-neering measurement: refining the additivity properties, IEEE TSE23 (1997) 190–195.

[10] R.E. Prather, An axiomatic theory of software complexity measure,The Computer J. 27 (1984) 340–347.

[11] R.E. Prather, On hierarchical software metrics, Soft. Engng J. 2(1987) 42–45.

[12] M. Shepperd, D. Ince, Algebraic validation of software metrics, in:Proc. ESEC’91, Milan, 1991, 343–363.

[13] J. Tian, M.V. Zelkowitz, A formal program complexity model and itsapplication, JSS 17 (1992) 253–266.

[14] E.J. Weyuker, Evaluating software complexity measures, IEEE TSE14 (1988) 1357–1365.

[15] S.A. Whitmire, Object-Oriented Design Measurement, Wiley, NewYork, 1997.

[16] J.-P. Jacquet, A. Abran, Metrics validation proposals: a structuredanalysis, in: R. Dumke, A. Abran (Eds.), Software Measurement:Current Trends in Research and Practice, Gabler EditionWissenschaft, Wiesbaden, Germany, 1999, pp. 43–59.

[17] N.E. Fenton, S.L. Pfleeger, Software Metrics: A Rigorous and Prac-tical Approach, 2, PWS, London, 1997.

[18] L. Briand, K. El Emam, S. Morasca, Theoretical and empirical vali-dation of software product measures, Report ISERN-95-03, Interna-tional Software Engineering Research Network, 1995.

[19] F.S. Roberts, Measurement Theory with Applications to Decision-making, Utility, and the Social Sciences, Addison-Wesley, Reading,MA, 1979.

[20] H. Zuse, A Framework of Software Measurement, de Gruyter, Berlin,1998.

[21] B.A. Kitchenham, J.G. Stell, The danger of using axioms in softwaremetrics, IEE Proc. Soft. Engng 144 (1997) 279–285.

[22] P. Suppes, D.H. Krantz, R.D. Luce, A. Tversky, Foundations ofMeasurement. Volume II. Geometrical, Threshold, and ProbabilisticRepresentations, Academic Press, San Diego, CA, 1989.

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–46 45

[23] B. Kitchenham, S.L. Pfleeger, N. Fenton, Towards a framework forsoftware measurement validation, IEEE TSE 21 (1995) 929–944.

[24] B. Kitchenham, S.L. Pfleeger, N. Fenton, Reply to: comments ontowards a framework for software measurement validation, IEEETSE 23 (1997) 189.

[25] S. Morasca, L.C. Briand, V.R. Basili, E.J. Weyuker, M.V. Zelkowitz,Comments on towards a framework for software measurement vali-dation, IEEE TSE 23 (1997) 187–188.

[26] T.A. McCabe, A software complexity measure, IEEE TSE 2 (1976)308–320.

[27] F.B. Abreu, R. CarapuC¸ a, Object-oriented software engineering:measuring and controlling the development process, in: Proc.ICSQ’94, McLean, VA, 1994.

[28] L.O. Ejiogu, Five principles for the formal validation of models ofsoftware metrics, ACM SIGPLAN Notices 28 (1993) 67–76.

[29] J.K. Kearny, R.L. Sedlmeyer, W.B. Thompson, M.A. Gray, M.A.Adler, Software complexity measurement, Commun. ACM 29(1986) 1044–1050.

[30] M. Snoeck, G. Dedene, Existence dependency: the key to semanticintegrity between structural and behavioural aspects of object types,IEEE TSE 24 (1998) 233–251.

[31] D.A. Gustafson, J.T. Tan, P. Weaver, Software measure specification,ACM Soft. Engng Notes 18 (1993) 163–168.

[32] A.C. Melton, D.A. Gustafson, J.M. Bieman, A.L. Baker, A mathema-tical perspective for software measures research, Soft. Engng J. 5(1990) 246–254.

[33] G. Poels, G. Dedene, Complexity metrics for formally specified busi-ness requirements, in: Proc. AOWSM’97, Coeur d’Alene, Idaho,1997.

[34] R.R. Dumke, Softwaremetrie: Grundlagen und Ziele, Otto-von-Guricke-Universitat, Magdeburg, Germany, 1998.

[35] N. Fenton, Software measurement: a necessary scientific basis, IEEETSE 20 (1994) 199–206.

[36] F.B. Abreu, R. Esteves, M. Goula˜o, The design of eiffel programs:quantitative evaluation using the MOOD metrics, in: Proc.TOOLS’96, Santa Barbara, CA, 1996.

[37] P.P. Chen, The entity relationship model - towards a unified view ofdata, ACM Trans. Database Systems 1 (1976) 9–36.

[38] H. Lounis, H.A. Sahraoui, W.L. Melo, Defining, measuring and using

coupling metrics, in: environment, paper presented at OOPSLA’97workshop on Object-Oriented Product Metrics, Atlanta, USA,1997.

[39] W. Li, S. Henry, Object-oriented metrics that predict maintainability,JSS 23 (1993) 111–122.

[40] J. Bansiya, C. Davis, An object-oriented design quality assessmentmodel, unnumbered research report, Department of ComputerScience, University of Alabama, Huntsville, AL, 1997.

[41] L.C. Briand, P. Devanbu, W. Melo, An investigation into couplingmeasures for C11, in: Proc. 19th Int. Conf. Soft. Engng, IEEE,Boston, 1997.

[42] L.C. Briand, J.W. Daly, V. Porter, J. Wu¨st, A comprehensive empiri-cal validation of product measures for object-oriented systems, ReportISERN-98-07, IESE, Kaiserslautern, Germany, 1998.

[43] L.C. Briand, P. Devanbu, W.L. Melo, Quality modeling based oncoupling measures in a commercial object-oriented system, ReportISERN-98-01, IESE, Kaiserslautern, Germany, 1998.

[44] L.C. Briand, J. Wu¨st, S. Ikonomovski, H. Lounis, A comprehensiveinvestigation of quality factors in object-oriented designs: an indus-trial case study, in: Proc. 21st Int. Conf. Soft. Engng, IEEE, LosAngeles, 1999.

[45] L.C. Briand, J. Wu¨st, H. Lounis, Using coupling measurement forimpact analysis in object-oriented systems, Report ISERN-99-03,IESE, Kaiserslautern, Germany, 1999.

[46] G. Dedene, M. Snoeck, Formal deadlock elimination in an objectoriented conceptual schema, Data and Knowledge Engng 15 (1995)1–30.

[47] G. Poels, On the formal aspects of the measurement of object-orientedsoftware specifications, PhD dissertation, Catholic University ofLeuven, Belgium, 1999.

[48] H. Zuse, Foundations of object-oriented software measures, in: Proc.METRICS’96, IEEE, Berlin, 1996.

[49] H. Zuse, Reply to: property-based software engineering measure-ment, IEEE TSE 23 (1997) 533.

[50] G. Poels, On the use of a segmentally additive proximity structure tomeasure object class life cycle complexity, in: R. Dumke, A. Abran(Eds.), Software Measurement: Current Trends in Research and Prac-tice, Gabler Edition Wissenschaft, Wiesbaden, Germany, 1999, pp.61–79.

G. Poels, G. Dedene / Information and Software Technology 42 (2000) 35–4646