So far, we have examined attributes of individual modules, i.e., intra-modular measures. We now look at entities being collections of modules and inter-modular measures.A module is a separately compilable piece of code. Figure 8.17 contains an example of a graph describing the information flow between modules.
A module call-graph is a graph where the nodes are modules and an edge from node A to node B means that module A calls module B, see Figure 8.18.
A data dependency graph shows how data is computed based on data existing or computed earlier, see Figure 8.19.
There are several measures proposed for measuring modular structure like the morphology measure, tree impurity, internal reuse defined on some dependency graphs, see Figures 8.20 - 8.22.
Coupling is the degree of interdependence between modules, viewed as pairs. Coupling can be classified ordinally according to the relations as:
Modules are said to be loosely coupled for R1, R2, and tightly coupled for R4, R5. For a coupling model graph, see Figure 8.23.
- No coupling relation R0: Independent.
- Data coupling relation R1: x, y communicate by parameters.
- Stamp coupling relation R2: x, y accept the same record type as a parameter.
- Control coupling relation R3: x passes a parameter to y with the intention to control its behaviour.
- Common coupling relation R4: x, y refer to the same global data.
- Content coupling relation R5: x refers to (branches, change data, alter statement) the inside of y.