Cohesion Metrics for Improving Software Quality
Mäkelä, Sami (2016-05-24)
Cohesion Metrics for Improving Software Quality
Mäkelä, Sami
(24.05.2016)
Turku Centre for Computer Science
Julkaisun pysyvä osoite on:
https://urn.fi/URN:ISBN:978-952-12-3388-3
https://urn.fi/URN:ISBN:978-952-12-3388-3
Kuvaus
Siirretty Doriasta
Tiivistelmä
Abstract
Software product metrics aim at measuring the quality of software. Modu-
larity is an essential factor in software quality. In this work, metrics related
to modularity and especially cohesion of the modules, are considered. The
existing metrics are evaluated, and several new alternatives are proposed.
The idea of cohesion of modules is that a module or a class should consist
of related parts. The closely related principle of coupling says that the
relationships between modules should be minimized.
First, internal cohesion metrics are considered. The relations that are
internal to classes are shown to be useless for quality measurement. Second,
we consider external relationships for cohesion. A detailed analysis using
design patterns and refactorings confirms that external cohesion is a better
quality indicator than internal. Third, motivated by the successes (and
problems) of external cohesion metrics, another kind of metric is proposed
that represents the quality of modularity of software. This metric can be
applied to refactorings related to classes, resulting in a refactoring suggestion
system.
To describe the metrics formally, a notation for programs is developed.
Because of the recursive nature of programming languages, the properties of
programs are most compactly represented using grammars and formal lan-
guages. Also the tools that were used for metrics calculation are described.
Software product metrics aim at measuring the quality of software. Modu-
larity is an essential factor in software quality. In this work, metrics related
to modularity and especially cohesion of the modules, are considered. The
existing metrics are evaluated, and several new alternatives are proposed.
The idea of cohesion of modules is that a module or a class should consist
of related parts. The closely related principle of coupling says that the
relationships between modules should be minimized.
First, internal cohesion metrics are considered. The relations that are
internal to classes are shown to be useless for quality measurement. Second,
we consider external relationships for cohesion. A detailed analysis using
design patterns and refactorings confirms that external cohesion is a better
quality indicator than internal. Third, motivated by the successes (and
problems) of external cohesion metrics, another kind of metric is proposed
that represents the quality of modularity of software. This metric can be
applied to refactorings related to classes, resulting in a refactoring suggestion
system.
To describe the metrics formally, a notation for programs is developed.
Because of the recursive nature of programming languages, the properties of
programs are most compactly represented using grammars and formal lan-
guages. Also the tools that were used for metrics calculation are described.
Kokoelmat
- Väitöskirjat [2882]