nx_robot_hal_gate.nx
buildroot/runtime/nx_robot_hal_gate.nx
about
nx_robot_hal_gate.nx -- R-ROBO-5 GATE: the fail-safe hardware-write driver, never-brick PROVEN
MECHANICALLY (the proof #26 demands -- not a promise). VERIFIES:
(1) safe-default on init (all outputs 0);
(2) clamp HIGH: a huge command lands as exactly HW_SAFE_MAX;
(3) clamp LOW: a hugely-negative command lands as exactly HW_SAFE_MIN;
(4) pass-through: an in-envelope command lands unchanged;
(5) EXHAUSTIVE never-brick: sweep commands incl. extremes (+/-1e9) -- the actual written value is
ALWAYS within [HW_SAFE_MIN, HW_SAFE_MAX] (0 escapes -> the mechanical never-brick proof);
(6) e-stop latches and forces every output safe (0), and stays safe after;
(7) watchdog overrun auto-e-stops (fail-safe on a stalled loop);
(8) sensor range-check flags out-of-range readings invalid;
(9) NEGATIVE CONTROL: the raw (non-fail-safe) write path DOES escape the envelope -- proving the
clamp is what provides the guarantee.
100% sovereign, integer-only. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_robot_hal.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func sw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 19 | func sn(v: i64) -> i64 |
| 29 | func check(name: *u8, cond: i64, tot: *i64) -> i64 |
| 36 | func main() -> i64 |