microsoft / verisol
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 710 units with 10,263 lines of code in units (83.3% of code).
    • 7 very long units (931 lines of code)
    • 30 long units (2,060 lines of code)
    • 92 medium size units (2,745 lines of code)
    • 149 small units (2,067 lines of code)
    • 432 very small units (2,460 lines of code)
9% | 20% | 26% | 20% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs9% | 20% | 26% | 20% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Sources/SolToBoogie13% | 27% | 26% | 17% | 15%
Sources/VeriSol0% | 18% | 66% | 11% | 4%
Sources/SolToBoogieTest0% | 27% | 40% | 24% | 7%
Sources/BoogieAST0% | 6% | 17% | 23% | 53%
Sources/SolidityAST0% | 0% | 14% | 30% | 54%
Sources/SolidityCFG0% | 0% | 41% | 23% | 35%
Sources/ExternalToolsManager0% | 0% | 28% | 37% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
156 25 1
156 111 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
152 31 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
138 26 1
public void Generate()
in Sources/SolToBoogie/RevertLogicGenerator.cs
125 25 0
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
103 12 1
private void GenerateInitializationForMappingStateVar()
in Sources/SolToBoogie/ProcedureTranslator.cs
101 18 2
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
99 29 1
private void GenerateConstructorWithBaseCalls()
in Sources/SolToBoogie/ProcedureTranslator.cs
97 15 2
public void PerformModSetAnalysis()
in Sources/SolToBoogie/ModSetAnalysis.cs
94 22 0
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
88 32 1
private void GenerateDefaultConstructor()
in Sources/SolToBoogie/ProcedureTranslator.cs
83 14 1
public override bool Visit()
in Sources/SolToBoogie/ProcedureTranslator.cs
83 16 1
private void generateRevertLogicForCmd()
in Sources/SolToBoogie/RevertLogicGenerator.cs
83 20 4
public static bool IsUintConst()
in Sources/SolToBoogie/TransUtils.cs
78 9 4
private void TranslateTypeCast()
in Sources/SolToBoogie/ProcedureTranslator.cs
76 17 3
public override bool Visit()
in Sources/SolToBoogie/ModifierCollector.cs
74 12 1
public static BoogieIfCmd GenerateChoiceBlock()
in Sources/SolToBoogie/TransUtils.cs
74 18 3
private void PrintCounterexampleHelper()
in Sources/VeriSol/VeriSolExecuter.cs
73 15 1
public int BatchExecute()
in Sources/SolToBoogieTest/RegressionExecutor.cs
72 12 0