code wiki / _hdl_build / nx_deltaclass_lib.nx

nx_deltaclass_lib.nx

buildroot/runtime/_hdl_build/nx_deltaclass_lib.nx

6667 B159 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_deltaclass_lib.nx nx_deltaclass.nx nx_deltaclass_gate.nx

imports: nx_syscalls.nx

imported by: nx_deltaclass.nxnx_deltaclass_gate.nx

structs

none

consts

24const DC_PERMIL: i64 = 1000
27const DCS_FLAT: i64 = 0
28const DCS_ADMIT: i64 = 1
29const DCS_RAISE: i64 = 2
30const DCS_LOWER: i64 = 3
33const DCE_FLAT: i64 = 0
34const DCE_GAIN: i64 = 1
35const DCE_LOSS: i64 = 2
38const DCV_CONVERGING: i64 = 0
39const DCV_SCOPE_BOUND: i64 = 1
40const DCV_DIVERGING: i64 = 2
41const DCV_STALLED: i64 = 3
42const DCV_THRASH: i64 = 4
46const DCV_REGRESSION: i64 = 5

functions

49func dc_unmeasured() -> i64 { return 0 - 1 }
51func dc_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 2: maindc_verdict
53func dc_permil(cur: i64, bar: i64) -> i64
62func dc_scope_class(bar0: i64, bar1: i64, dom0: i64, dom1: i64) -> i64
called by 2: dl_reportmain
71func dc_exec_class(cur0: i64, cur1: i64) -> i64
called by 1: main
78func dc_exec_effect(cur0: i64, cur1: i64, bar0: i64) -> i64
87func dc_scope_effect(cur1: i64, bar0: i64, bar1: i64) -> i64
95func dc_total(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64
104func dc_residual(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64
115func dc_gap(cur: i64, bar: i64) -> i64
called by 2: dl_reportdc_eta
122func dc_diverging(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64
132func dc_eta(cur0: i64, bar0: i64, cur1: i64, bar1: i64) -> i64
144func dc_verdict(cur0: i64, bar0: i64, cur1: i64, bar1: i64, moved: i64) -> i64