On the Relationship Between Modularity and Stability in Software Packages
Modular and well-written software is an ideal that programmers strive to achieve. However, real-world project constraints limit the amount of reusable and modular code that programmers can produce. Many techniques exist that refactor code automatically using graph-based measurements and increase the quality and modularity of a codebase. While these measures work in the graph domain, their effect on the stability of software has been uncertain. In this work, we provide mathematical proof that modularity measures are indeed in favor of software stability.
💡 Research Summary
The paper investigates the interplay between two fundamental software quality metrics: stability, as defined by Robert Martin’s instability index I = Ce / (Ca + Ce), and graph‑based modularity, originally introduced by Newman and Girvan. Stability measures how many other packages depend on a given package (afferent couplings, Ca) versus how many the package itself depends on (efferent couplings, Ce). An instability of 0 denotes a maximally stable package, while 1 indicates a completely unstable one. The Stability Dependencies Principle (SDP) states that a stable package must not depend on an unstable one; violations of SDP are considered design flaws.
The authors adapt the classic modularity formula to directed dependency graphs, yielding Q = (1/m) ∑₍i,j₎
Comments & Academic Discussion
Loading comments...
Leave a Comment