$ renode sim/equivalence.sh 1000

Can a verified kernel replace firmware logic on the device?

The decisions in open-source embedded Rust firmware (who may do what, which values are allowed, what state comes next) are moved into an h5i-app kernel and proved in Lean 4. Then the original firmware and the port run side by side on the target instruction set in Renode, on the same scripted input, and every difference a client or the device would observe is counted.

Overview

One row per firmware. Properties are the theorems gated by h5i app check (helper lemmas are not counted). The two equivalence columns are the share of scenarios in which the original firmware and the port behaved identically.

Firmware Device Interface Properties Normal input With malformed and edge-case input

Normal input: only what the firmware's own client or UI sends, within the ranges it allows, plus ordinary device events; every difference counts except a short named list of cosmetic ones. Mixed input adds malformed requests and boundary values.

Verified properties

Every property gated by h5i app check: no sorry, no native_decide, standard axioms only. Choose one for its Lean statement, the kernel Rust beside the upstream Rust it ports, the extracted Lean and the proof. A property covers the kernel's decision function, not the I/O around it.

TheoremTypePropertyStatus

Equivalence in detail

Every scenario ends in one of three classes. Identical: same responses, same device state. Explained: the difference is traced to the input that caused it and to a named cause (a cosmetic response, the port refusing input the original accepts, or the original's behaviour on that input). Unexplained: anything else; a port is not done while it has one.

Firmware Input Scenarios Identical Explained / cosmetic Unexplained / other

Mixed-input scenarios deliberately include malformed requests and boundary values, so their identical share mostly reflects how often the generator hits such input, not how often the firmwares disagree in normal use.

Method

Per firmware: audit the upstream source, port its decisions to an h5i-app kernel, prove properties of the kernel, make the rest of the port a drop-in for upstream's network path, then compare both on the target ISA.