microsoft / verisol
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 710 units with 10,263 lines of code in units (83.3% of code).
    • 1 very complex units (156 lines of code)
    • 4 complex units (477 lines of code)
    • 25 medium complex units (1,849 lines of code)
    • 45 simple units (1,545 lines of code)
    • 635 very simple units (6,236 lines of code)
1% | 4% | 18% | 15% | 60%
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
cs1% | 4% | 18% | 15% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Sources/SolToBoogie2% | 6% | 23% | 18% | 48%
Sources/BoogieAST0% | 0% | 10% | 10% | 79%
Sources/VeriSol0% | 0% | 18% | 8% | 73%
Sources/SolToBoogieTest0% | 0% | 27% | 0% | 72%
Sources/SolidityAST0% | 0% | 0% | 6% | 93%
Sources/SolidityCFG0% | 0% | 0% | 11% | 88%
Sources/ExternalToolsManager0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
156 111 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
88 32 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
152 31 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
99 29 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
138 26 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
156 25 1
public void Generate()
in Sources/SolToBoogie/RevertLogicGenerator.cs
125 25 0
public void PerformModSetAnalysis()
in Sources/SolToBoogie/ModSetAnalysis.cs
94 22 0
private void generateRevertLogicForCmd()
in Sources/SolToBoogie/RevertLogicGenerator.cs
83 20 4
private void GenerateInitializationForMappingStateVar()
in Sources/SolToBoogie/ProcedureTranslator.cs
101 18 2
private void InsertStatementBeforeImpl()
in Sources/SolToBoogie/SolidityDesugaring.cs
67 18 3
public static BoogieIfCmd GenerateChoiceBlock()
in Sources/SolToBoogie/TransUtils.cs
74 18 3
public static BoogieType InferExprTypeFromTypeString()
in Sources/SolToBoogie/MapArrayHelper.cs
52 17 1
private void TranslateTypeCast()
in Sources/SolToBoogie/ProcedureTranslator.cs
76 17 3
public static string OpcodeToString()
in Sources/BoogieAST/BoogieAST.cs
38 16 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
83 16 1
private void GenerateConstructorWithBaseCalls()
in Sources/SolToBoogie/ProcedureTranslator.cs
97 15 2
private void PrintCounterexampleHelper()
in Sources/VeriSol/VeriSolExecuter.cs
73 15 1
private void GenerateDefaultConstructor()
in Sources/SolToBoogie/ProcedureTranslator.cs
83 14 1
public override string ToString()
in Sources/BoogieAST/BoogieAST.cs
55 13 0