microsoft / uprove-csharp-sdk
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 353 units with 6,190 lines of code in units (32.8% of code).
    • 1 very complex units (612 lines of code)
    • 2 complex units (310 lines of code)
    • 10 medium complex units (596 lines of code)
    • 39 simple units (1,411 lines of code)
    • 301 very simple units (3,261 lines of code)
9% | 5% | 9% | 22% | 52%
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
cs9% | 5% | 9% | 22% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
UProveTestVectors60% | 0% | 14% | 5% | 18%
UProveCrypto0% | 12% | 10% | 24% | 53%
UProveUnitTest0% | 0% | 10% | 30% | 58%
UProveCrypto/Math0% | 0% | 5% | 22% | 72%
UProveParams0% | 0% | 0% | 31% | 68%
UProveSample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
internal static void GenerateTestVectors()
in UProveTestVectors/TestVectors.cs
612 84 7
internal static PresentationProof Generate()
in UProveCrypto/PresentationProof.cs
176 36 12
public void Verify()
in UProveCrypto/PresentationProof.cs
134 27 8
public void TestEndToEnd()
in UProveUnitTest/EndToEndTest.cs
113 20 0
public virtual void Validate()
in UProveCrypto/CollaborativeIssuance.cs
54 19 0
public static PreIssuanceProof CreateProof()
in UProveCrypto/CollaborativeIssuance.cs
87 14 3
public override bool Equals()
in UProveCrypto/Math/bc/SubgroupGroupBCImpl.cs
35 14 1
public void Validate()
in UProveCrypto/Prover.cs
22 14 0
static void Main()
in UProveTestVectors/Program.cs
86 14 1
public static void Hash()
in UProveTestVectors/ProtocolHelper.cs
64 14 2
public HashFunction()
in UProveCrypto/HashFunction.cs
37 11 1
internal void OnDeserialized()
in UProveCrypto/IssuerParameters.cs
48 11 1
public void FuzzTest()
in UProveUnitTest/EndToEndTest.cs
50 11 0
internal void OnDeserialized()
in UProveCrypto/PresentationProof.cs
30 10 1
public static GroupElement VerifyProof()
in UProveCrypto/CollaborativeIssuance.cs
88 9 3
public void Validate()
in UProveCrypto/IssuerSetupParameters.cs
38 9 0
public override GroupElement DeriveElement()
in UProveCrypto/Math/bc/SubgroupGroupBCImpl.cs
56 9 3
43 9 3
static void Main()
in UProveParams/Program.cs
55 9 1
public void GetRandomElementsTest()
in UProveUnitTest/FieldZqTest.cs
37 9 0