STUD
← Plays

Calculate · Assess & Decide · Engineering

Cyclomatic complexity with refactor flags

McCabe cyclomatic complexity per function from its control-flow graph, with a refactor flag for any that exceed your threshold.

You receive: A reviewed complexity calculator + the passing test report, run on your control-flow graphs.

Part of Ship MVP

What's verified: STUD verifies the calculator computes McCabe cyclomatic complexity from each control-flow graph on held-out cases: M = edges - nodes + components (or + 2*components in the two-parameter mode), one row per graph in input order, flagged for refactor when M strictly exceeds your threshold. STUD does NOT derive the graph from real source code, nor judge whether a flagged function actually needs refactoring; it checks the arithmetic on the counts you provide.

Opens soon

Cost15 credits
ProtectionHeld until verified delivery

This play is verified and ready. It opens soon, once sign-in and payments are live.

Example

A sample of what this play produces. Your result is generated for your inputs.

Rows

NameComplexityExceeds threshold
normalize_submission2false
grade_submission10false
sync_catalog_apply15true
render_intake_field3false
Inputs
Graphs
NameEdgesNodesComponents
normalize_submission871
grade_submission21121
sync_catalog_apply30161
render_intake_field12101
Refactor threshold10
Component mode1p

Arithmetic recomputed against the tasks.py compute_cyclomatic_complexity oracle, 2026-08-08, one-parameter formula M = edges - nodes + components: normalize_submission 8 - 7 + 1 = 2, grade_submission 21 - 12 + 1 = 10 (exactly at the threshold of 10, not flagged, the refactor flag fires only when M strictly exceeds the threshold), sync_catalog_apply 30 - 16 + 1 = 15 (flagged to refactor), render_intake_field 12 - 10 + 1 = 3. Graph counts are illustrative example counts for functions in STUD's own judge and catalog code, in the order supplied; the calculator checks the arithmetic on the counts you provide, it does not derive the graphs from source.

Get early access to STUD the day it goes live.