Résumé

Among the code structuration mechanisms in object oriented systems, class hierarchies based on the generalization relationship play a prominent role. Indeed it is used to represent and code hierarchies of abstractions supposed to help with code understanding, maintenance and extension. But it is common to see class hierarchies and the associated inheritance mechanism be diverted from this noble role to become a mere code sharing mechanism. In this case, rather than helping, the inheritance mechanism confuses the understanding of the code. Hence, we have developed a metric to analyze the inheritance mechanism at work in a running system, what we have called the inheritance pattern. Although the metrics measuring inheritance are numerous, our approach is original since it observes the actual inheritance in the running code at the class level as well as among the packages (i.e. among the classes through package). In some sense, this metric measures how well the inheritance mechanism has been leveraged in the software. But interpreting raw numbers can be hard. Then we developed a visual and hierarchical representation of the metric values at the scale of a whole system. This helps to assess the quality of the code from the point of view of code abstraction.

Détails

Actions

PDF