microsoft / Ironclad
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,741 units with 33,047 lines of code in units (52.6% of code).
    • 5 very complex units (1,723 lines of code)
    • 11 complex units (1,341 lines of code)
    • 53 medium complex units (3,672 lines of code)
    • 137 simple units (4,676 lines of code)
    • 2,535 very simple units (21,635 lines of code)
5% | 4% | 11% | 14% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs5% | 4% | 11% | 14% | 64%
py0% | 0% | 8% | 9% | 81%
cpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ironclad-apps/tools/DafnyCC27% | 13% | 12% | 10% | 35%
ironclad-apps/tools/DafnySpec18% | 11% | 15% | 11% | 42%
ironclad-apps/tools/NuBuild0% | 1% | 11% | 13% | 73%
ironclad-apps/tools/NuBuild20% | 1% | 12% | 13% | 73%
ironclad-apps/tools/BoogieAsm0% | 59% | 0% | 26% | 14%
ironfleet/src/IronSHTClient0% | 0% | 56% | 0% | 43%
ironfleet/tools/scripts0% | 0% | 11% | 6% | 82%
ironfleet/src/IronRSLKVClient0% | 0% | 25% | 19% | 54%
ironfleet/src/IronRSLKVServer0% | 0% | 12% | 30% | 57%
ironclad-apps/src/Clients0% | 0% | <1% | 23% | 75%
ironfleet/src/Dafny0% | 0% | 0% | 23% | 76%
ironclad-apps/tools/Dafny0% | 0% | 0% | 19% | 80%
ironclad-apps/tools/scripts0% | 0% | 0% | 100% | 0%
ironfleet/src/IronfleetCommon0% | 0% | 0% | 28% | 71%
ironfleet/src/TestIoFramework0% | 0% | 0% | 26% | 73%
ironfleet/src/IronLockServer0% | 0% | 0% | 36% | 63%
ironfleet/src/IronRSLCounterClient0% | 0% | 0% | 20% | 79%
ironfleet/src/RedisClient0% | 0% | 0% | 10% | 89%
ironfleet/src/IronSHTServer0% | 0% | 0% | 25% | 74%
ironclad-apps/src/DafnyTestDriver0% | 0% | 0% | 0% | 100%
ironfleet/src/CreateIronServiceCerts0% | 0% | 0% | 0% | 100%
ironclad-apps/src/Checked0% | 0% | 0% | 0% | 100%
ironfleet/tools/DepGraph0% | 0% | 0% | 0% | 100%
ironclad-apps/tools/standalone0% | 0% | 0% | 0% | 100%
ironfleet/src/IronRSLCounterServer0% | 0% | 0% | 0% | 100%
ironfleet/src/IronRSLClient0% | 0% | 0% | 0% | 100%
ironclad-apps/src/Dafny0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public RtlExp GhostExpressionRec()
in ironclad-apps/tools/DafnySpec/Compile.cs
387 110 3
public List Alloc()
in ironclad-apps/tools/DafnyCC/RegAlloc.cs
432 88 0
void AddExpression()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
330 71 2
public override void Compile()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
308 61 0
public void Compile()
in ironclad-apps/tools/DafnySpec/CompileFunction.cs
266 57 0
public override Expression Resolve()
in ironclad-apps/tools/DafnySpec/DafnySpecAst/DafnySpecAst.cs
59 42 2
void Jump()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
88 37 3
List GenerateAutoReqs()
in ironclad-apps/tools/DafnySpec/ParseMain.cs
156 36 2
void parseArgs()
in ironclad-apps/tools/NuBuild/NuBuild/Program.cs
140 32 1
void parseArgs()
in ironclad-apps/tools/NuBuild2/NuBuild/Program.cs
140 32 1
public void Merge()
in ironclad-apps/tools/BoogieAsm/SymdiffMerge.cs
115 30 3
public virtual void AddResolvedGhostStatement()
in ironclad-apps/tools/DafnySpec/Compile.cs
198 29 2
public void AddCall()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
100 28 8
void AddResolvedStatement()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
152 27 1
public void CompileInstruction()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
125 27 0
public void AddCallInstruction()
in ironclad-apps/tools/DafnyCC/CompileMethod.cs
68 26 6
public static void Resolve()
in ironclad-apps/tools/DafnySpec/ParseMain.cs
108 24 2
private static void Main()
in ironclad-apps/tools/NuBuild/ItemCacheTool/Program.cs
104 24 1
private static void Main()
in ironclad-apps/tools/NuBuild2/ItemCacheTool/Program.cs
104 24 1
private static void CheckResults()
in ironclad-apps/tools/NuBuild/ItemCacheTool/Program.cs
122 21 2