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. Suchgraphs 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 inconjunction 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 subgraph 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-levelcoupling and cohesion defined by Briand, Morasca, and Basili.Coupling is based on relationships between modules. We also propose a similar measure for intramodule coupling based on an intramodule abstraction of the software, rather than intermodule, but intramodule coupling is calculated in the same way asintermodule coupling. We define cohesion in terms of intramodule 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 thancounting.
展开▼