scitools.com

← Metric catalog

Coupled Packages is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Coupled Packages

API IDCountPackageCoupled
TargetsPackages
LanguagesAda
CategoriesCoupling Object Oriented
CostSlow

Number of other packages coupled to.

Package A is coupled to package B if package A depends on (Ada's with) something declared in package B. Only the depending package counts the coupling — the package being depended on doesn't count as coupled to its dependents.

For example:

with Essential_Demo;

package Essential_Helper is

   procedure Use_Essential (X : in out Integer);

end Essential_Helper;

Essential_Helper depends on Essential_Demo (calling Essential_Demo.Simple_Proc), giving Essential_Helper's CountPackageCoupled = 1. Essential_Demo itself has no dependencies of its own, so its CountPackageCoupled = 0, even though another package depends on it.

This is the package-level counterpart to Coupled Classes (Chidamber & Kemerer's CBO), which measures the same kind of coupling between classes.

Targets By Language: