Analysis of haskell-updater

Document Information

Analysed by SourceGraph (version 0.7.0.0) using Graphalyze (version 0.11.0.0)

Wednesday 24 November, 2010

1 Legend

Two normal functions with f calling g .
Function Call
Two modules with module Foo importing Bar .
Module Import
Entities from different modules.
From module
Data type declaration.
Data type declaration
Class and instance declarations.
Class declaration
Entity location/accessibility classification.
Entity Location
Edge classification.
Edge Classification
Edge Widths
The width of each edge is calculated by: width = log (number of function calls) + 1

2 Notes

Please note that the source-code analysis in this document is not necessarily perfect: SourceGraph is not a refactoring tool, and it's usage of Classes is still premature.

Implicitly exported entities refer to class methods that are instantiated but defined elsewhere, or entities whose names start with an underscore . Note that even for Main modules, these implicit exports are included.

All graph visualisations link to larger SVG versions of the same graph.

3 Analysis of the entire codebase

3.1 Visualisation of the entire software

Entire Codebase

3.2 Visualisation of overall function calls

Here is the current module grouping of functions:

Current module groupings

Here is a proposed alternate module grouping:

Using the Chinese Whispers algorithm:

Chinese Whispers module suggestions

3.3 Visualisation of levels in the software

Visualises how far away from the exported root entities an entity is.

Levels within software

3.4 Overall Cyclomatic Complexity

The overall cyclomatic complexity is: 140

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

3.5 Overall root analysis

These functions are those that are inaccessible:

Distribution.Gentoo.PkgManager.dummy, Main.err

3.6 Overall chain analysis

The code has the following cross-module chains:

These chains can all be compressed down to a single function.

4 Analysis of module imports

4.1 Visualisation of imports

Import visualisation

4.2 Cyclomatic Complexity of imports

The cyclomatic complexity of the imports is: 5

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5 Analysis of each module

5.1 Analysis of Distribution.Gentoo.GHC

5.1.2 Visualisation of levels in Distribution.Gentoo.GHC

Visualises how far away from the exported root entities an entity is.

Levels within Distribution.Gentoo.GHC

5.1.3 Cyclomatic Complexity of Distribution.Gentoo.GHC

The cyclomatic complexity of Distribution.Gentoo.GHC is: 6.

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5.1.4 Chain analysis of Distribution.Gentoo.GHC

The module Distribution.Gentoo.GHC has the following chains:

  • checkLibDir -> isGhcLibDir

  • getBroken -> ghcPkgRawOut

  • matchConf -> tryMaybe

These chains can all be compressed down to a single function.

5.2 Analysis of Distribution.Gentoo.Packages

5.2.2 Visualisation of levels in Distribution.Gentoo.Packages

Visualises how far away from the exported root entities an entity is.

Levels within Distribution.Gentoo.Packages

5.2.3 Cyclomatic Complexity of Distribution.Gentoo.Packages

The cyclomatic complexity of Distribution.Gentoo.Packages is: 14.

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5.2.4 Chain analysis of Distribution.Gentoo.Packages

The module Distribution.Gentoo.Packages has the following chains:

  • hasContent -> parseContents

  • hasContentMatching -> pathOf

  • installedCats' -> installedCats

These chains can all be compressed down to a single function.

5.3 Analysis of Distribution.Gentoo.PkgManager

5.3.2 Visualisation of levels in Distribution.Gentoo.PkgManager

Visualises how far away from the exported root entities an entity is.

Levels within Distribution.Gentoo.PkgManager

5.3.3 Cyclomatic Complexity of Distribution.Gentoo.PkgManager

The cyclomatic complexity of Distribution.Gentoo.PkgManager is: 35.

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5.4 Analysis of Distribution.Gentoo.Util

5.4.2 Visualisation of levels in Distribution.Gentoo.Util

Visualises how far away from the exported root entities an entity is.

Levels within Distribution.Gentoo.Util

5.4.3 Cyclomatic Complexity of Distribution.Gentoo.Util

The cyclomatic complexity of Distribution.Gentoo.Util is: 3.

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5.4.4 Component analysis of Distribution.Gentoo.Util

The module Distribution.Gentoo.Util has 3 components. You may wish to consider splitting it up.

5.5 Analysis of Main

5.5.2 Visualisation of levels in Main

Visualises how far away from the exported root entities an entity is.

Levels within Main

5.5.3 Cyclomatic Complexity of Main

The cyclomatic complexity of Main is: 59.

For more information on cyclomatic complexity, please see: Wikipedia: Cyclomatic Complexity

5.5.4 Root analysis of Main

These functions are those that are inaccessible:

err

5.5.5 Chain analysis of Main

The module Main has the following chains:

  • allGetPackages -> getPackages

These chains can all be compressed down to a single function.