code wiki / _hdl_build / nx_deltaclass_lib.nx
nx_deltaclass_lib.nx
buildroot/runtime/_hdl_build/nx_deltaclass_lib.nx
about
nx_deltaclass_lib.nx -- WHY a headline ratio moved: SCOPE vs EXECUTION, decomposed EXACTLY.
THE DEBT THIS EATS: the ecomat headline went 500 -> 418 permil over two weeks and READ AS DECAY.
It was not decay. Delivery rose 34 -> 51 levels (+250 permil at a FIXED bar) while the bar itself
rose 68 -> 122 (-332 permil of pure requirement growth). Net -82. Nobody could tell those apart
without deriving it by hand, so a marathon had no defined start and no defined end.
THE DECOMPOSITION IS EXACT, not a heuristic. For ratio = cur/bar:
exec_effect = permil(cur1,bar0) - permil(cur0,bar0) <- what DELIVERY did, bar held FIXED
scope_effect = permil(cur1,bar1) - permil(cur1,bar0) <- what the REQUIREMENT move did
total = permil(cur1,bar1) - permil(cur0,bar0)
residual = total - exec - scope <- integer truncation, EMITTED not hidden
Both effects are computed INDEPENDENTLY and the residual is PRINTED rather than derived away, so
truncation stays visible. Deriving one term from the other would force residual==0 by construction
and hide the very rounding the integer-truncation law says goes silent.
TWO ORTHOGONAL AXES, deliberately NOT collapsed into one label: a sample can raise the bar AND
deliver in the same window, and flattening that into a single enum is exactly how real progress
gets misread as thrashing.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_deltaclass.nxnx_deltaclass_gate.nx
structs
| none |
consts
| 24 | const DC_PERMIL: i64 = 1000 |
| 27 | const DCS_FLAT: i64 = 0 |
| 28 | const DCS_ADMIT: i64 = 1 |
| 29 | const DCS_RAISE: i64 = 2 |
| 30 | const DCS_LOWER: i64 = 3 |
| 33 | const DCE_FLAT: i64 = 0 |
| 34 | const DCE_GAIN: i64 = 1 |
| 35 | const DCE_LOSS: i64 = 2 |
| 38 | const DCV_CONVERGING: i64 = 0 |
| 39 | const DCV_SCOPE_BOUND: i64 = 1 |
| 40 | const DCV_DIVERGING: i64 = 2 |
| 41 | const DCV_STALLED: i64 = 3 |
| 42 | const DCV_THRASH: i64 = 4 |
| 46 | const DCV_REGRESSION: i64 = 5 |
functions
| 49 | func dc_unmeasured() -> i64 { return 0 - 1 } |
| 51 | func dc_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 53 | func dc_permil(cur: i64, bar: i64) -> i64 |
| 62 | func dc_scope_class(bar0: i64, bar1: i64, dom0: i64, dom1: i64) -> i64 |
| 71 | func dc_exec_class(cur0: i64, cur1: i64) -> i64 called by 1: main |
| 78 | func dc_exec_effect(cur0: i64, cur1: i64, bar0: i64) -> i64 |
| 87 | func dc_scope_effect(cur1: i64, bar0: i64, bar1: i64) -> i64 |
| 95 | func dc_total(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64 |
| 104 | func dc_residual(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64 |
| 115 | func dc_gap(cur: i64, bar: i64) -> i64 |
| 122 | func dc_diverging(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64 |
| 132 | func dc_eta(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64 |
| 144 | func dc_verdict(cur0: i64, bar0: i64, cur1: i64, bar1: i64, moved: i64) -> i64 |