awslabs / aws-viewer-for-cbmc
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 416 units with 3,663 lines of code in units (77.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (296 lines of code)
    • 38 simple units (652 lines of code)
    • 367 very simple units (2,715 lines of code)
0% | 0% | 8% | 17% | 74%
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
py0% | 0% | 8% | 18% | 73%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cbmc_viewer0% | 0% | 8% | 20% | 71%
summary0% | 0% | 7% | 5% | 87%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def default_source_method()
in cbmc_viewer/optionst.py
40 19 1
def chart_projects_csv()
in summary/summary.py
19 19 1
def make_source()
in cbmc_viewer/sourcet.py
29 16 7
def handle_deprecated_arguments()
in cbmc_viewer/optionst.py
35 14 1
def parse_xml_step()
in cbmc_viewer/tracet.py
27 14 2
def parse_json_step()
in cbmc_viewer/tracet.py
27 14 2
def parse_symbol_table()
in cbmc_viewer/symbol_table.py
26 14 2
def __init__()
in cbmc_viewer/resultt.py
16 12 2
def merge_coverage_data()
in cbmc_viewer/coveraget.py
23 12 1
def split_code_into_blocks()
in cbmc_viewer/markup_code.py
27 12 1
def main()
in summary/summary.py
27 12 0
def make_symbol()
in cbmc_viewer/symbolt.py
20 10 6
def cbmc_text_sections()
in cbmc_viewer/resultt.py
23 10 1
def parse_text_traces()
in cbmc_viewer/tracet.py
34 10 3
def merge_dicts()
in cbmc_viewer/util.py
15 10 2
def select_source_files()
in cbmc_viewer/sourcet.py
10 9 4
def make_reachable()
in cbmc_viewer/reachablet.py
20 9 4
def make_relative_path()
in cbmc_viewer/srcloct.py
15 9 3
def make_loop()
in cbmc_viewer/loopt.py
19 9 4
def parse_json_assignment()
in cbmc_viewer/tracet.py
21 9 2