microsoft / BosqueLanguage
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,700 units with 25,327 lines of code in units (53.1% of code).
    • 7 very complex units (2,706 lines of code)
    • 15 complex units (2,140 lines of code)
    • 43 medium complex units (2,559 lines of code)
    • 87 simple units (2,946 lines of code)
    • 2,548 very simple units (14,976 lines of code)
10% | 8% | 10% | 11% | 59%
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
hpp19% | 19% | 10% | 11% | 39%
cpp13% | 0% | 6% | 21% | 57%
ts1% | 6% | 16% | 8% | 67%
js0% | 0% | 90% | 0% | 9%
h0% | 0% | 0% | 1% | 98%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
impl/build/include/headers15% | 15% | 8% | 8% | 52%
impl/src/tooling/icpp14% | 0% | 6% | 12% | 67%
impl/src/compiler6% | 0% | 6% | 9% | 77%
impl/src/tooling/verifier0% | 11% | 11% | 20% | 57%
impl/src/ast0% | 0% | 20% | 13% | 66%
bosque-language-tools/out0% | 0% | 98% | 0% | 1%
bosque-language-tools/src0% | 0% | 98% | 0% | 1%
impl/src/type_checker0% | 0% | 20% | 7% | 72%
impl/src/runtimes0% | 0% | 0% | 0% | 100%
impl/build0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool parse_msgpack_internal()
in impl/build/include/headers/json/json.hpp
339 273 0
bool parse_cbor_internal()
in impl/build/include/headers/json/json.hpp
383 233 2
token_type scan_string()
in impl/build/include/headers/json/json.hpp
488 212 0
void Evaluator::evaluateOpCode()
in impl/src/tooling/icpp/interpreter/op_eval.cpp
853 156 1
token_type scan_number()
in impl/build/include/headers/json/json.hpp
266 98 0
static jparse()
in impl/src/compiler/mir_ops.ts
119 57 1
void write_msgpack()
in impl/build/include/headers/json/json.hpp
258 56 1
void write_cbor()
in impl/build/include/headers/json/json.hpp
263 50 1
private initializeSMTAssembly()
in impl/src/tooling/verifier/smtdecls_emitter.ts
250 46 3
bool sax_parse_internal()
in impl/build/include/headers/json/json.hpp
205 41 1
bool get_msgpack_string()
in impl/build/include/headers/json/json.hpp
65 40 1
bool get_cbor_string()
in impl/build/include/headers/json/json.hpp
75 37 1
bool get_cbor_binary()
in impl/build/include/headers/json/json.hpp
79 37 1
void write_ubjson()
in impl/build/include/headers/json/json.hpp
171 35 4
bool get_msgpack_binary()
in impl/build/include/headers/json/json.hpp
93 34 1
basic_json patch()
in impl/build/include/headers/json/json.hpp
185 31 1
void dump()
in impl/build/include/headers/json/json.hpp
221 30 5
token_type scan()
in impl/build/include/headers/json/json.hpp
67 29 0
private walkAndGenerateHavocType()
in impl/src/tooling/verifier/smtdecls_emitter.ts
94 29 3
void dump_escaped()
in impl/build/include/headers/json/json.hpp
194 28 2