Measuring Coupling and Cohesion: An Information-Theory Approach

  • Authors:
  • Edward B. Allen;Taghi M. Khoshgoftaar

  • Affiliations:
  • -;-

  • Venue:
  • METRICS '99 Proceedings of the 6th International Symposium on Software Metrics
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

The design of software is often depicted by graphs that show components and their relationships. For example, a structure chart shows the calling relationships among components. Object-oriented design is based on various graphs, as well. Such graphs are abstractions of the software, devised to depict certain design decisions. Coupling and cohesion are attributes that summarizes the degree of interdependence or connectivity among subsystems and within subsystems, respectively. When used in conjunction with measures of other attributes, coupling and cohesion can contribute to an assessment or prediction of software quality. Let a graph be an abstraction of a software system and let a sub-graph represent a module (subsystem).This paper proposes information theory-based measures of coupling and cohesion of a modular system. These measures have the properties of system-level coupling and cohesion defined by Briand, Morasca, and Basili. Coupling is based on relationships between modules.We also propose a similar measure for intra-module coupling based on an intra-module abstraction of the software, rather than inter-module, but intra-module coupling is calculated in the same way as inter-module coupling. We define cohesion in terms of intra-module coupling, normalized to between zero and one. We illustrate the measures with example graphs. Preliminary analysis showed that the information-theory approach has finer discrimination than counting.