Demo · AI engineering

Where does AI catch the firmware bug?

Eight AI integrations, one for each stage of embedded C development, were run against a small sample firmware project with seven defects planted on purpose. Each stage flagged some of them. Switch stages on and off to see where each bug gets caught first, and how the cost of fixing it changes when it slips to a later stage.

Which stages have AI?

Cost to fix, by phase

Units are relative: 1 is the cost of a fix during requirements and design. Published ratios between that and a fix after delivery run from about 5:1 for small, noncritical systems to about 100:1 for large ones (Boehm and Basili, IEEE Computer, 2001), and the evidence behind such curves is thin. The defaults sit in between; change them to match your own history.

Seven planted defects

Same defects, five ways to deploy AI

Total relative fix cost for common setups, using the multipliers above. Shorter is cheaper.

What each stage found in the sample run

How it's calculated

The sample project, its requirements, rig logs and crash dumps are synthetic, and every defect was planted. The eight stages were run once, offline, with rule-based checks, cppcheck, clang-tidy and sanitizers; no model was called. The table records which stages flagged each defect in that run. A defect is fixed at the first enabled stage that flags it before release. If none does, it reaches the field, where crash triage (stage 8) finds it but the fix costs the after-release multiplier.

Simplifications: every flag is treated as found and fixed, false positives cost nothing, and the cost multiplier depends only on the phase, not on the defect. Real catch rates depend on the codebase, and planted defects are easier to catch than ones nobody knows about. Stages 3, 4 and 5 overlap almost completely here: they find the same code defects at the same phase cost, so the gains come from the stages before and after the code.