Document Information

Analysed by SourceGraph (version 0.7.0.5) using Graphalyze (version 0.14.0.1)

Wednesday 20 November, 2013

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: 69

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

3.5 Overall root analysis

These functions are those that are inaccessible:

DNA.DNA, DNA.genDNA, DNA.newDNA, DNA.renderDNA, DNA.updateModel, Display.animate, Display.display, Display.handleReshape, DoubleHelix.extractHeight, DoubleHelix.genDHelix, DoubleHelix.renderDHelix, Helix.Helix, Helix.extractHeight, Helix.genHelix, Helix.newHelix, Helix.renderHelix, Input.input, Input.update, Main.init, Main.parseArgs, Math.distanceBetween, Math.fromTo, Math.phi, Misc.colour, Misc.evenScale, Misc.vec3f, Misc.ver3d, ProgramState.extractDNARef, ProgramState.extractInteractiveRef, ProgramState.extractLevelRef, ProgramState.extractModeRef, ProgramState.extractRXRef, ProgramState.extractRYRef, ProgramState.extractRZRef, ProgramState.extractTXRef, ProgramState.extractTYRef, ProgramState.extractUpdateRef, ProgramState.extractZoomRef, ProgramState.newProgramState

3.6 Function component analysis

The functions are split up into 4 components. You may wish to consider splitting the code up into multiple libraries.

3.7 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: 9

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

5 Analysis of each module

5.1 Analysis of DNA

5.1.1 Visualisation of DNA

Diagram of: DNA

5.1.2 Visualisation of levels in DNA

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

Levels within DNA

5.1.3 Cyclomatic Complexity of DNA

The cyclomatic complexity of DNA is: 6.

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

5.1.4 Component analysis of DNA

The module DNA has 2 components. You may wish to consider splitting it up.

5.2 Analysis of Display

5.2.1 Visualisation of Display

Diagram of: Display

5.2.2 Visualisation of levels in Display

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

Levels within Display

5.2.3 Cyclomatic Complexity of Display

The cyclomatic complexity of Display is: 3.

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

5.2.4 Component analysis of Display

The module Display has 3 components. You may wish to consider splitting it up.

5.3 Analysis of DoubleHelix

5.3.1 Visualisation of DoubleHelix

Diagram of: DoubleHelix

5.3.2 Visualisation of levels in DoubleHelix

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

Levels within DoubleHelix

5.3.3 Cyclomatic Complexity of DoubleHelix

The cyclomatic complexity of DoubleHelix is: 3.

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

5.3.4 Root analysis of DoubleHelix

These functions are those that are inaccessible:

extractHeight

5.3.5 Component analysis of DoubleHelix

The module DoubleHelix has 3 components. You may wish to consider splitting it up.

5.4 Analysis of Helix

5.4.1 Visualisation of Helix

Diagram of: Helix

5.4.2 Visualisation of levels in Helix

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

Levels within Helix

5.4.3 Cyclomatic Complexity of Helix

The cyclomatic complexity of Helix is: 2.

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

5.4.4 Component analysis of Helix

The module Helix has 2 components. You may wish to consider splitting it up.

5.5 Analysis of Input

5.5.1 Visualisation of Input

Diagram of: Input

5.5.2 Visualisation of levels in Input

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

Levels within Input

5.5.3 Cyclomatic Complexity of Input

The cyclomatic complexity of Input is: 17.

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

5.5.4 Chain analysis of Input

The module Input has the following chains:

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

5.6 Analysis of Main

5.6.1 Visualisation of Main

Diagram of: Main

5.6.2 Visualisation of levels in Main

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

Levels within Main

5.6.3 Cyclomatic Complexity of Main

The cyclomatic complexity of Main is: 2.

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

5.6.4 Root analysis of Main

These functions are those that are inaccessible:

init, parseArgs

5.6.5 Component analysis of Main

The module Main has 2 components. You may wish to consider splitting it up.

5.6.6 Chain analysis of Main

The module Main has the following chains:

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

5.7 Analysis of Math

5.7.1 Visualisation of Math

Diagram of: Math

5.7.2 Visualisation of levels in Math

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

Levels within Math

5.7.3 Cyclomatic Complexity of Math

The cyclomatic complexity of Math is: 4.

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

5.7.4 Component analysis of Math

The module Math has 3 components. You may wish to consider splitting it up.

5.8 Analysis of Misc

5.8.1 Visualisation of Misc

Diagram of: Misc

5.8.2 Visualisation of levels in Misc

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

Levels within Misc

5.8.3 Cyclomatic Complexity of Misc

The cyclomatic complexity of Misc is: 4.

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

5.8.4 Component analysis of Misc

The module Misc has 4 components. You may wish to consider splitting it up.

5.9 Analysis of ProgramState

5.9.1 Visualisation of ProgramState

Diagram of: ProgramState

5.9.2 Visualisation of levels in ProgramState

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

Levels within ProgramState

5.9.3 Cyclomatic Complexity of ProgramState

The cyclomatic complexity of ProgramState is: 12.

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

5.9.4 Component analysis of ProgramState

The module ProgramState has 12 components. You may wish to consider splitting it up.