Analysis of <em >xmonad</em >
Author: Analysed by SourceGraph (version 0.1) using Graphalyze (version 0.3)
Date: Sunday 5 October, 2008

# Analysis of xmonad

# Document Information

> Analysed by SourceGraph (version 0.1) using Graphalyze (version 0.3)

> Sunday 5 October, 2008

# Analysis of each module

## Analysis of Main

### Visualisation of Main

### Collapsed view of Main

The collapsed view of a module collapses down all cliques, cycles, chains, etc. to make the graph tree-like.

### Core analysis of Main

The core of a module can be thought of as the part where all the work is actually done.

The module Main is a tree.

### Cyclomatic Complexity of Main

The cyclomatic complexity of Main is: 1.

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

### Chain analysis of Main

The module Main has the following chains:

binding -> guessKeys

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

## Analysis of XMonad

### Visualisation of XMonad

### Collapsed view of XMonad

The collapsed view of a module collapses down all cliques, cycles, chains, etc. to make the graph tree-like.

### Core analysis of XMonad

The core of a module can be thought of as the part where all the work is actually done.

The module XMonad is a tree.

### Cyclomatic Complexity of XMonad

The cyclomatic complexity of XMonad is: 0.

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

### Component analysis of XMonad

The module XMonad has 0 components. You may wish to consider splitting it up.

## Analysis of XMonad.Config

### Visualisation of XMonad.Config

### Collapsed view of XMonad.Config

The collapsed view of a module collapses down all cliques, cycles, chains, etc. to make the graph tree-like.

### Core analysis of XMonad.Config

The core of a module can be thought of as the part where all the work is actually done.

The module XMonad.Config is a tree.

### Cyclomatic Complexity of XMonad.Config

The cyclomatic complexity of XMonad.Config is: 1.

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

## Analysis of XMonad.Operations

### Visualisation of XMonad.Operations

### Collapsed view of XMonad.Operations

The collapsed view of a module collapses down all cliques, cycles, chains, etc. to make the graph tree-like.

### Core analysis of XMonad.Operations

The core of a module can be thought of as the part where all the work is actually done.

The module XMonad.Operations is a tree.

### Cyclomatic Complexity of XMonad.Operations

The cyclomatic complexity of XMonad.Operations is: 21.

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

### Root analysis of XMonad.Operations

These nodes are those that are in the export list and roots:

manage, unmanage, kill refresh, rescreen focus, sendMessage setLayout screenWorkspace extraModifiers cleanMask, initColor restart mouseMoveWindow mouseResizeWindow mkAdjust

These nodes are those that are not in the export list but roots:

windows, setWMState, hide, reveal clientMask, setInitialProperties clearEvents, tileWindow containedIn, nubScreens getCleanedScreenInfo, setButtonGrab setTopFocus, setFocusX broadcastMessage sendMessageWithNoRefresh updateLayout, withFocused isClient, floatLocation, float mouseDrag, applySizeHints applySizeHintsContents applySizeHints', applyAspectHint applyResizeIncHint applyMaxSizeHint

### Component analysis of XMonad.Operations

The module XMonad.Operations has 6 components. You may wish to consider splitting it up.

### Chain analysis of XMonad.Operations

The module XMonad.Operations has the following chains:

applySizeHintsContents -> applySizeHints'

getCleanedScreenInfo -> nubScreens -> containedIn

kill -> withFocused

mkAdjust -> applySizeHints

restart -> broadcastMessage

setFocusX -> setButtonGrab

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

# Analysis of module imports

## Visualisation of imports

## Visualisation of module groupings

Here is the current module groupings:

Here are two proposed module groupings:

## Cyclomatic Complexity of imports

The cyclomatic complexity of the imports is: 3For more information on cyclomatic complexity, please see:Wikipedia: Cyclomatic Complexity

## Import root analysis

These modules are those that are in the export list and roots:

Main

These modules are those that are in the export list but not roots:

XMonad

## Import component analysis

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

# Analysis of the entire codebase

## Visualisation of the entire software

## Visualisation of overall function calls

Here is the current module grouping of functions:

Here are two proposed module groupings:

## Collapsed view of the entire codebase

The collapsed view of code collapses down all cliques, cycles, chains, etc. to make the graph tree-like.

## Overall Core analysis

The core of software can be thought of as the part where all the work is actually done.

The code is a tree.

## Overall Cyclomatic Complexity

The overall cyclomatic complexity is: 47For more information on cyclomatic complexity, please see:Wikipedia: Cyclomatic Complexity

## Import root analysis

These functions are those that are available for use and roots:

Main.main

These functions are those that are available for use but not roots:

XMonad.Config.defaultConfig XMonad.Operations.cleanMask XMonad.Operations.extraModifiers XMonad.Operations.initColor XMonad.Operations.manage XMonad.Operations.mkAdjust XMonad.Operations.rescreen XMonad.Operations.unmanage

## Function component analysis

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

## Overall chain analysis

The functions have the following chains:

Main.binding -> Main.guessKeys

XMonad.Operations.applySizeHintsContents -> XMonad.Operations.applySizeHints'

XMonad.Operations.getCleanedScreenInfo -> XMonad.Operations.nubScreens -> XMonad.Operations.containedIn

XMonad.Operations.mkAdjust -> XMonad.Operations.applySizeHints

XMonad.Operations.restart -> XMonad.Operations.broadcastMessage

XMonad.Operations.setFocusX -> XMonad.Operations.setButtonGrab

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