Fortran-FOSS-Programmers / Fortran-FOSS-Programmers/ford
Code metrics: Instability index
- Dominant language
- Python
- Stars
- 458
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
As defined by Martin in [Agile Software Development ...](http://amzn.to/1mVPolj) and cited by Rouson in [Scientific Software Design](http://amzn.to/1Q5zccX) it is possible to quantify coupling in a software package via and instability index, `I`

Here `Ca` is the number of afferent couplings and `Ce` is the number of efferent couplings. (Afferent couplings are things which depend _on_ the thing in question, e.g., number of children, efferent couplings are the number of things upon which the thing it question depends, e.g., number of parents.)
It seems that this principle is most commonly applied to abstract data types (i.e., abstract derived types) but I think it could be applied to modules, and even procedures.
Due to the call graph and module/type dependency graph information, I think FORD already has all the necessary information to compute these code metrics. For abstract derived types: `Ca` is the number of derived types that extend it or list it as a component. `Ca` is the number of abstract types it extends.
For modules, `Ca` is the number of modules, procedures, and programs that `use` the module in question. `Ce` is the number of modules it uses (even indirectly due to the transitive nature of module use association... of course with `private` this is less of an issue, but I still think it would make sense to count all transitive `use`s too. For example A uses B uses C, therefore A uses C).
Just a thought, and if it's not prohibitively a PITA to implement, a feature request.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.