Software Metrics and Software Metrology

Software Metrics and Software Metrology Alain Abran IEEE Computer Society, 2010 ISBN 978-0-470-59720-0 |

Chapitre 1: Introduction

Chapitre 2: From Measurement Methods to Quantitative Models

Chapitre 3: Metrology and Quatity Criteria in Software Measurement

Chapitre 4: Quantification and Measurement are not the same

Chapitre 5: Design of Software Measurement Methods

Chapitre 6: Cyclomatic Complexity

Chapitre 7: Halstead's Metrics

Chapitre 8: Function Points

Chapitre 9: Use Case Points

Chapitre 10: ISO 9126

Chapitre 11: COSMIC: Design

Chapitre 12: COSMIC: Industrialization

Chapitre 13: Convertibility across measurements methods

Chapitre 14: Design of Standard Etalons

- Verification: provision of objective evidence that a given item fulfills specified requirements [ISO VIM 2007].
- Validation: verification, where the specified requirements are adequate for an intented use [ISO VIM 2007].

Scale Type | Description | Examples | Operations allowed | Misuse |

Nominal | used to name objects or events; used only in identifying requirements. | Telephone Area Code (514-Montreal, 418-Quebec City, etc) | ==, != | 514 is higher than 418 |

Ordinal | used to put objects in order, criterion may be subjective (preferably objective).. | Frequentness (0=very rare, 1=rare, 2=medium, 3=frequent, etc.) | nominal operations and, <, > | '2' is twice as frequent as '1' |

Interval (also called cardinal) | used to determine difference between ranks. | Temperature in Celcius, calendar time | ordinal operations and, +, -, average | +10C is twice warmer than +5C |

Ratio | has an absolute zero that is not arbritary; significant to multiply by a non-negative number. | Temperature in Kelvin, mass, distance. | interval operations and, *, /, percentage, | log(1 meter) = 0 log (3 feets) ~= 1.1 meters (or feets) are arbitrary echelons. |

Absolute | has a significant unit measure (echelon) that is not arbritary, significant to count entities. | Entity count. | ratio operations and, log() |

[page 141] Software Complexity

- "the degree to which a system or component has a design or implementation that is difficult to understand and verify" [IEEE 1990].
- "the degree of complication of a system or system component, determined by such factors as:
- the number and intricacy of interfaces,
- the number and intricacy of conditional branches,
- the degree of nesting, and
- the types of data structures " [Evans and Marciniak 1987].

[page 152] The measurement unit produced by log2

In
general, in engineering applications, we do not take the logarithm of a
dimensioned number, only that of a dimensionless quantity. For
instance, in calculating decibels, we take the logarithms of a ratio of
two quantities. A ratio of quantities with the same dimensions is
itself dimensuionless. We can write: log(a/b) = log(a) - log(b) making it appear that we are taking the logs of dimentioned quantities (a) and (b), but the dimensions "come out in the wash" : by the time we have finished (substracting one log from the other), we have effectively taken the log of a dimentionless quantity (a/b). We can regard units as factors in an expression, for instance: 8 meters = 8 * 1 meter 800 cm = 800 * 1 cm = 800 * 0.01 * 1 meter (..) The inconvenient term 8*log2(1m) is an additive term that depends on the units being used. If it is part of a valid engineering calculation, it will be canceled out somewhere in the process. It may be, for instance, that when we take the log of 8 meters, we are actually taking the log of a ratio of 8 meters to a one-meter standard length. |

[page 162] Two kinds of software size:

- technical size, mesured from a developer's perspective: number of LOC, classes, etc.
- functional size, measured from a user's perspective: must be independant of technical development and implementation decisions; thus can be to compare the productivity of different techniques and technologies.

[page 232] A real-time system:

- "A system in which computation is performed during the actual time that an external process occurs, in order that the computation results can be used to control, monitor or respond in a timely manner to the external process" [IEEE 610 1990].
- Any system in which the time at which the output is produced is significant, This is usually because the input corresponds to some movement in the physical world, and the output has to relate to that same movement in the physical world, and the output has to relate to some movement. The lag from input time to output time must be sufficiently small for acceptable timeliness." [Illingworth 1991].

v(G) = e - n + p e : nb edges n : nb vertices p: separate components |

Base measures: N _{1} : Total nb of occurrences of operatorsN _{2} : Total nb of occurrences of operarandsn _{1} : Nb of distinct operatorsn _{2} : Nb of distinct operandsn _{1}* : Nb of potential operators (minimum possible number of operators for a module)n _{2}* : Nb of potential operandsN = N _{1 } + N_{2}N : length of a program Pn = n _{1 } + n_{2}_{}n : vocabularyV = N * log2 n _{}V : volume of a program PV* = (2 + n _{2})_{ }log2 (2 + n_{2})_{ }V* : potential (minimal) volume of a program P L = V* / V _{}L : program level D = (n _{1 / }2) * (N_{1 }_{ / }n2)D : program difficulty E = V / L according [Abran], V * D according others E : programming effort T = E / S T : programming time in seconds S : the Stroud number, i.e. the number of mental discrimination per second, in the range of 5 to 20. S is set to 18 for software scientists. |

- ISO 9126
- ISO 14143
- ISO 14143
- ISO 14598
- ISO 15939
- ISO 19761
- ISO 20926
- ISO 20968
- ISO 24570
- ISO 25000
- ISO 29881
- ISO 90003

- [page 114] : Wrong cross-reference: "See also Tables 3.3 and 3.4 in Section 5.5 of Chapter 5" (in fact, it's Tables 8.3 and 8.4 in Section 8.4.2 of Chapter 8).
- [page 140] : Inconstitencies: "Lopez and Habra (..) threshold for the java programming language" and in page 155: In Java language, ..

- [page 140] : "[The] cyclomatic complexity measure correlates with errors in software modules [Watson and McCabe 1996]. Again this statement has led users of this CC number to associate low numbers of errors with a low cyclomatic number. Howeve, a coefficient of correlation (r) between two given variables X and Y does not mean that one variable implies the other, but simply expresses the fact that the two variables vary in the same direction."
- Any researcher should know the difference between a correlation and a cause/effect relationship!

- [page 155] Most of Halstead's metrics, which were disigned almost thirty years ago, do not meet key design criteria of measurement methods in engineering and the physical sciences.
- We should not mix up metrics (indices) and measurement methods!
- Is computing a physical science?

Dernière mise à jour: 26 novembre 2010.