scitools.com

← Architecture catalog

Visibility Matrix Cores is one of Understand's built-in architectures — automatic ways to group a codebase (by directory, git history, language, …) for graphs, metrics, and dependency analysis.

Visibility Matrix Cores

Languages: Any
Identify file dependency cycles

This architecture finds dependency cycles among files and groups files belonging to the same cyclical group together. The groups are called "Cores" following this research paper: (Baldwin, Carliss, Alan MacCormack, and John Rusnak. "Hidden structure: Using network methods to map system architecture." Research Policy  43.8 (2014): 1381-1397.)

Research

Dependency Matrices

Dependencies are first plotted in a matrix with files on the axis. If a file directly or indirectly depends on another file, the value at the matrix is true. The inclusion of indirect dependencies makes the matrix a "Visibility" matrix. The following metrics can be calculated from the matrix:


There are also versions of the above metrics that consider only direct dependencies: Direct Fan In, Direct Fan Out, and Direct Propagation Cost.

Project Classification

The authors found that plotting the Visible Fan In and Visible Fan Out values revealed a pattern.


The "Core" is the largest cyclical group in the project. There are metrics for the number and percentage of files in the core. The Visibility Matrix Cores architecture can be used to find all the cyclical groups in the project.

Most projects were "Core-Periphery" projects with a single core and periphery files. However, not all projects have a clear single core. "Hierarchical" projects have no core and "Multi-Core" projects have more than one. "Multi-Core" and "Hierarchical" projects are split into four groups using median visible fan metrics instead of the core's visible fan metrics. The Visibility Matrix architecture classifies the project and splits the files into the four groups.

See also the Project Quality solution and the blog article Dependency Networks with Understand ↗.