Analysis of graphviz

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.

2.1 Parsing Failures

The following source files were unable to be parsed; this may result in some analysis failures:

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 Overall Core analysis

The core of software is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Overall core

3.4 Visualisation of levels in the software

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

Levels within software

3.5 Overall Cyclomatic Complexity

The overall cyclomatic complexity is: 8751

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

3.6 Overall root analysis

These functions are those that are inaccessible:

Data.GraphViz.AttributeGenerator.A, Data.GraphViz.AttributeGenerator.AS, Data.GraphViz.AttributeGenerator.Bl, Data.GraphViz.AttributeGenerator.Cust, Data.GraphViz.AttributeGenerator.Dbl, Data.GraphViz.AttributeGenerator.EStrng, Data.GraphViz.AttributeGenerator.Integ, Data.GraphViz.AttributeGenerator.Strng, Data.GraphViz.AttributeGenerator.arbitraryFor, Data.GraphViz.AttributeGenerator.arbitraryFor', Data.GraphViz.AttributeGenerator.arbitraryInstance, Data.GraphViz.AttributeGenerator.asRows, Data.GraphViz.AttributeGenerator.attributes, Data.GraphViz.AttributeGenerator.attrs, Data.GraphViz.AttributeGenerator.attrs', Data.GraphViz.AttributeGenerator.atts, Data.GraphViz.AttributeGenerator.bool, Data.GraphViz.AttributeGenerator.cnst, Data.GraphViz.AttributeGenerator.comment, Data.GraphViz.AttributeGenerator.createAlias, Data.GraphViz.AttributeGenerator.createDefn, Data.GraphViz.AttributeGenerator.docLen, Data.GraphViz.AttributeGenerator.docList, Data.GraphViz.AttributeGenerator.dollar, Data.GraphViz.AttributeGenerator.dot, Data.GraphViz.AttributeGenerator.firstOthers, Data.GraphViz.AttributeGenerator.forClusters, Data.GraphViz.AttributeGenerator.forEdges, Data.GraphViz.AttributeGenerator.forGraphs, Data.GraphViz.AttributeGenerator.forNodes, Data.GraphViz.AttributeGenerator.forSubGraphs, Data.GraphViz.AttributeGenerator.genArbitrary, Data.GraphViz.AttributeGenerator.genCode, Data.GraphViz.AttributeGenerator.main, Data.GraphViz.AttributeGenerator.makeAttr, Data.GraphViz.AttributeGenerator.name, Data.GraphViz.AttributeGenerator.parseDef, Data.GraphViz.AttributeGenerator.parseInstance, Data.GraphViz.AttributeGenerator.parseNames, Data.GraphViz.AttributeGenerator.sameAttributeFunc, Data.GraphViz.AttributeGenerator.showInstance, Data.GraphViz.AttributeGenerator.shrinkFor, Data.GraphViz.AttributeGenerator.tab, Data.GraphViz.AttributeGenerator.tpNm, Data.GraphViz.AttributeGenerator.unknownAttr, Data.GraphViz.AttributeGenerator.usedByFunc, Data.GraphViz.AttributeGenerator.valtype, Data.GraphViz.AttributeGenerator.vsep, Data.GraphViz.AttributeGenerator.vtype, Data.GraphViz.AttributeGenerator.vtypeCode, Data.GraphViz.AttributeGenerator.wrap, Data.GraphViz.Testing.Test, Data.GraphViz.Testing.blankLn, Data.GraphViz.Testing.defaultTests, Data.GraphViz.Testing.desc, Data.GraphViz.Testing.die, Data.GraphViz.Testing.lookupName, Data.GraphViz.Testing.name, Data.GraphViz.Testing.runChosenTests, Data.GraphViz.Testing.runTest, Data.GraphViz.Testing.runTests, Data.GraphViz.Testing.spacerLn, Data.GraphViz.Testing.test, Data.GraphViz.Testing.test_dotizeAugment, Data.GraphViz.Testing.test_dotizeAugmentUniq, Data.GraphViz.Testing.test_findAllEdges, Data.GraphViz.Testing.test_findAllEdgesG, Data.GraphViz.Testing.test_findAllNodes, Data.GraphViz.Testing.test_findAllNodesE, Data.GraphViz.Testing.test_findAllNodesEG, Data.GraphViz.Testing.test_findAllNodesG, Data.GraphViz.Testing.test_generalisedSameDot, Data.GraphViz.Testing.test_noGraphInfo, Data.GraphViz.Testing.test_noGraphInfoG, Data.GraphViz.Testing.test_parsePrettyID, Data.GraphViz.Testing.test_preProcessingID, Data.GraphViz.Testing.test_printParseGID, Data.GraphViz.Testing.test_printParseID, Data.GraphViz.Testing.test_printParseID_Attributes, Data.GraphViz.Types.Common.EdgeError, Data.GraphViz.Types.Common.GraphError, Data.GraphViz.Types.Common.NodeError, Data.GraphViz.Types.Common.invalidEdge, Data.GraphViz.Types.Common.invalidGlobal, Data.GraphViz.Types.Common.invalidNode, Data.GraphViz.Types.State.toDotNodes, Data.GraphViz.Util.descapeQuotes, Data.GraphViz.Util.escapeQuotes, Data.GraphViz.Util.isSingle, Main.dg

3.7 Function component analysis

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

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

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

4.3 Import root analysis

These modules are those that are inaccessible:

Data.GraphViz.AttributeGenerator, Data.GraphViz.Testing, Data.GraphViz.Testing.Instances, Data.GraphViz.Testing.Instances.FGL, Main

4.4 Import component analysis

The imports have 2 components. You may wish to consider splitting the code up.

5 Analysis of each module

5.1 Analysis of Data.GraphViz

5.1.2 Visualisation of levels in Data.GraphViz

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

Levels within Data.GraphViz

5.1.3 Cyclomatic Complexity of Data.GraphViz

The cyclomatic complexity of Data.GraphViz is: 35.

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

5.1.4 Component analysis of Data.GraphViz

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

5.2 Analysis of Data.GraphViz.AttributeGenerator

5.2.2 Visualisation of levels in Data.GraphViz.AttributeGenerator

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

Levels within Data.GraphViz.AttributeGenerator

5.2.3 Cyclomatic Complexity of Data.GraphViz.AttributeGenerator

The cyclomatic complexity of Data.GraphViz.AttributeGenerator is: 396.

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

5.2.4 Root analysis of Data.GraphViz.AttributeGenerator

These functions are those that are inaccessible:

attrs, attrs', bool

5.2.5 Component analysis of Data.GraphViz.AttributeGenerator

The module Data.GraphViz.AttributeGenerator has 2 components. You may wish to consider splitting it up.

5.2.6 Chain analysis of Data.GraphViz.AttributeGenerator

The module Data.GraphViz.AttributeGenerator has the following chains:

  • asRows -> docLen

  • genArbitrary -> arbitraryInstance

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

5.3 Analysis of Data.GraphViz.Attributes

5.3.2 Core analysis of Data.GraphViz.Attributes

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Attributes

5.3.3 Visualisation of levels in Data.GraphViz.Attributes

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

Levels within Data.GraphViz.Attributes

5.3.4 Cyclomatic Complexity of Data.GraphViz.Attributes

The cyclomatic complexity of Data.GraphViz.Attributes is: 1760.

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

5.4 Analysis of Data.GraphViz.Attributes.Colors

5.4.2 Core analysis of Data.GraphViz.Attributes.Colors

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Attributes.Colors

5.4.3 Visualisation of levels in Data.GraphViz.Attributes.Colors

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

Levels within Data.GraphViz.Attributes.Colors

5.4.4 Cyclomatic Complexity of Data.GraphViz.Attributes.Colors

The cyclomatic complexity of Data.GraphViz.Attributes.Colors is: 2936.

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

5.4.5 Chain analysis of Data.GraphViz.Attributes.Colors

The module Data.GraphViz.Attributes.Colors has the following chains:

  • hexColor -> word8Doc

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

5.5 Analysis of Data.GraphViz.Attributes.HTML

5.5.2 Core analysis of Data.GraphViz.Attributes.HTML

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Attributes.HTML

5.5.3 Visualisation of levels in Data.GraphViz.Attributes.HTML

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

Levels within Data.GraphViz.Attributes.HTML

5.5.4 Cyclomatic Complexity of Data.GraphViz.Attributes.HTML

The cyclomatic complexity of Data.GraphViz.Attributes.HTML is: 254.

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

5.6 Analysis of Data.GraphViz.Attributes.Internal

5.6.2 Core analysis of Data.GraphViz.Attributes.Internal

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Attributes.Internal

5.6.3 Visualisation of levels in Data.GraphViz.Attributes.Internal

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

Levels within Data.GraphViz.Attributes.Internal

5.6.4 Cyclomatic Complexity of Data.GraphViz.Attributes.Internal

The cyclomatic complexity of Data.GraphViz.Attributes.Internal is: 72.

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

5.7 Analysis of Data.GraphViz.Parsing

5.7.2 Core analysis of Data.GraphViz.Parsing

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Parsing

5.7.3 Visualisation of levels in Data.GraphViz.Parsing

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

Levels within Data.GraphViz.Parsing

5.7.4 Cyclomatic Complexity of Data.GraphViz.Parsing

The cyclomatic complexity of Data.GraphViz.Parsing is: 74.

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

5.7.5 Component analysis of Data.GraphViz.Parsing

The module Data.GraphViz.Parsing has 2 components. You may wish to consider splitting it up.

5.8 Analysis of Data.GraphViz.PreProcessing

5.8.2 Visualisation of levels in Data.GraphViz.PreProcessing

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

Levels within Data.GraphViz.PreProcessing

5.8.3 Cyclomatic Complexity of Data.GraphViz.PreProcessing

The cyclomatic complexity of Data.GraphViz.PreProcessing is: 4.

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

5.8.4 Chain analysis of Data.GraphViz.PreProcessing

The module Data.GraphViz.PreProcessing has the following chains:

  • preProcess -> parseOutUnwanted

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

5.9 Analysis of Data.GraphViz.Printing

5.9.2 Core analysis of Data.GraphViz.Printing

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Printing

5.9.3 Visualisation of levels in Data.GraphViz.Printing

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

Levels within Data.GraphViz.Printing

5.9.4 Cyclomatic Complexity of Data.GraphViz.Printing

The cyclomatic complexity of Data.GraphViz.Printing is: 20.

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

5.9.5 Component analysis of Data.GraphViz.Printing

The module Data.GraphViz.Printing has 3 components. You may wish to consider splitting it up.

5.9.6 Chain analysis of Data.GraphViz.Printing

The module Data.GraphViz.Printing has the following chains:

  • addQuotes -> needsQuotes

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

5.10 Analysis of Data.GraphViz.Testing

5.10.2 Visualisation of levels in Data.GraphViz.Testing

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

Levels within Data.GraphViz.Testing

5.10.3 Cyclomatic Complexity of Data.GraphViz.Testing

The cyclomatic complexity of Data.GraphViz.Testing is: 87.

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

5.11 Analysis of Data.GraphViz.Testing.Instances

5.11.2 Core analysis of Data.GraphViz.Testing.Instances

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Testing.Instances

5.11.3 Visualisation of levels in Data.GraphViz.Testing.Instances

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

Levels within Data.GraphViz.Testing.Instances

5.11.4 Cyclomatic Complexity of Data.GraphViz.Testing.Instances

The cyclomatic complexity of Data.GraphViz.Testing.Instances is: 812.

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

5.11.5 Clique analysis of Data.GraphViz.Testing.Instances

The module Data.GraphViz.Testing.Instances has the following cliques:

  • arbHtmlText, arbHtmlTexts

5.11.6 Chain analysis of Data.GraphViz.Testing.Instances

The module Data.GraphViz.Testing.Instances has the following chains:

  • arbHtmlTexts -> simplifyHtmlText

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

5.12 Analysis of Data.GraphViz.Testing.Instances.FGL

5.12.2 Core analysis of Data.GraphViz.Testing.Instances.FGL

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Testing.Instances.FGL

5.12.3 Visualisation of levels in Data.GraphViz.Testing.Instances.FGL

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

Levels within Data.GraphViz.Testing.Instances.FGL

5.12.4 Cyclomatic Complexity of Data.GraphViz.Testing.Instances.FGL

The cyclomatic complexity of Data.GraphViz.Testing.Instances.FGL is: 5.

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

5.12.5 Chain analysis of Data.GraphViz.Testing.Instances.FGL

The module Data.GraphViz.Testing.Instances.FGL has the following chains:

  • Class: Arbitrary, Data: (g n e) -> Class: Arbitrary

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

5.13 Analysis of Data.GraphViz.Types.Clustering

5.13.2 Core analysis of Data.GraphViz.Types.Clustering

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Types.Clustering

5.13.3 Visualisation of levels in Data.GraphViz.Types.Clustering

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

Levels within Data.GraphViz.Types.Clustering

5.13.4 Cyclomatic Complexity of Data.GraphViz.Types.Clustering

The cyclomatic complexity of Data.GraphViz.Types.Clustering is: 25.

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

5.13.5 Clique analysis of Data.GraphViz.Types.Clustering

The module Data.GraphViz.Types.Clustering has the following cliques:

  • treeToDot, treesToDot

5.14 Analysis of Data.GraphViz.Types.Common

5.14.2 Core analysis of Data.GraphViz.Types.Common

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Types.Common

5.14.3 Visualisation of levels in Data.GraphViz.Types.Common

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

Levels within Data.GraphViz.Types.Common

5.14.4 Cyclomatic Complexity of Data.GraphViz.Types.Common

The cyclomatic complexity of Data.GraphViz.Types.Common is: 126.

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

5.14.5 Component analysis of Data.GraphViz.Types.Common

The module Data.GraphViz.Types.Common has 3 components. You may wish to consider splitting it up.

5.15 Analysis of Data.GraphViz.Types.Generalised

5.15.2 Core analysis of Data.GraphViz.Types.Generalised

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Types.Generalised

5.15.3 Visualisation of levels in Data.GraphViz.Types.Generalised

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

Levels within Data.GraphViz.Types.Generalised

5.15.4 Cyclomatic Complexity of Data.GraphViz.Types.Generalised

The cyclomatic complexity of Data.GraphViz.Types.Generalised is: 120.

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

5.15.5 Clique analysis of Data.GraphViz.Types.Generalised

The module Data.GraphViz.Types.Generalised has the following cliques:

  • generaliseStatements, generaliseSubGraph

  • statementEdges, stmtEdges

  • statementNodes, stmtNodes

  • statementStructure, stmtStructure

5.15.6 Chain analysis of Data.GraphViz.Types.Generalised

The module Data.GraphViz.Types.Generalised has the following chains:

  • statementEdges -> stmtEdges

  • statementNodes -> stmtNodes

  • statementStructure -> stmtStructure

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

5.16 Analysis of Data.GraphViz.Types.State

5.16.2 Core analysis of Data.GraphViz.Types.State

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Types.State

5.16.3 Visualisation of levels in Data.GraphViz.Types.State

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

Levels within Data.GraphViz.Types.State

5.16.4 Cyclomatic Complexity of Data.GraphViz.Types.State

The cyclomatic complexity of Data.GraphViz.Types.State is: 40.

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

5.16.5 Component analysis of Data.GraphViz.Types.State

The module Data.GraphViz.Types.State has 2 components. You may wish to consider splitting it up.

5.16.6 Chain analysis of Data.GraphViz.Types.State

The module Data.GraphViz.Types.State has the following chains:

  • mergeCInfos -> append

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

5.17 Analysis of Data.GraphViz.Util

5.17.2 Core analysis of Data.GraphViz.Util

The core of a module is calculated by recursively removing roots and leaves of the call graph; as such, it can be considered as the section where all the "real work" is done.

Core of Data.GraphViz.Util

5.17.3 Visualisation of levels in Data.GraphViz.Util

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

Levels within Data.GraphViz.Util

5.17.4 Cyclomatic Complexity of Data.GraphViz.Util

The cyclomatic complexity of Data.GraphViz.Util is: 14.

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

5.17.5 Component analysis of Data.GraphViz.Util

The module Data.GraphViz.Util has 9 components. You may wish to consider splitting it up.