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 |
| 185 | const DCA_UNMEASURED: i64 = 0 - 1 |
| 186 | const DCA_MAXROWS: i64 = 4096 // parsed census rows retained; overflow REFUSES loudly |
| 187 | const DCA_FIELDS: i64 = 16 // fields captured per row (index consts below) |
| 188 | const DCA_F_EPOCH: i64 = 0 |
| 189 | const DCA_F_DISTINCT: i64 = 1 |
| 190 | const DCA_F_IDENTICAL: i64 = 2 |
| 191 | const DCA_F_STALE: i64 = 3 |
| 192 | const DCA_F_BEHIND: i64 = 4 |
| 193 | const DCA_F_AHEAD: i64 = 5 |
| 194 | const DCA_F_RESIZED: i64 = 6 |
| 195 | const DCA_F_NOBUILD: i64 = 7 |
| 196 | const DCA_F_NOSERVED: i64 = 8 |
| 197 | const DCA_F_STAGEDPTR: i64 = 9 |
| 198 | const DCA_F_CONSIDERABLE: i64 = 10 |
| 199 | const DCA_F_REFFRESH: i64 = 11 |
| 200 | const DCA_F_REFFOSSIL: i64 = 12 |
| 201 | const DCA_F_UNDECLARED: i64 = 13 |
| 202 | const DCA_F_INFLIGHT: i64 = 14 |
| 203 | const DCA_CH_NL: i64 = 10 // ASCII newline |
| 204 | const DCA_CH_SP: i64 = 32 // ASCII space |
| 205 | const DCA_CH_0: i64 = 48 // ASCII '0' |
| 206 | const DCA_CH_9: i64 = 57 // ASCII '9' |
| 207 | const DCA_VCLASS: i64 = 32 // distinct nx_catalog VERDICT classes retained |
| 208 | const DCA_VCELL: i64 = 64 // one verdict-class name cell |
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 |
| 210 | func dca_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 211 | func dca_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } |
| 212 | func dca_catn(d: *u8, o: i64, v: i64) -> i64 |
| 224 | func dca_at(q: *u8, i: i64, e: i64, lit: *u8) -> i64 |
| 237 | func dca_field(q: *u8, ls: i64, le: i64, key: *u8) -> i64 |
| 270 | func dca_provenance(q: *u8, ls: i64, le: i64, reg: *u8) -> i64 |
| 292 | func dca_sums(f: *i64) -> i64 called by 1: dc_adopt_delta |
| 298 | func dca_drow(d: *u8, p: i64, name: *u8, a: i64, b: i64) -> i64 |
| 310 | func dc_adopt_delta(logp: *u8, reg: *u8, catp: *u8, d: *u8, cx: *i64) -> i64 |