code wiki / (root) / nx_ice_recrystal_test.nx

nx_ice_recrystal_test.nx

buildroot/runtime/nx_ice_recrystal_test.nx

10819 B191 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic ice
docsdependenciesstructsconstsfunctions

about

nx_ice_recrystal_test.nx -- gate for ice recrystallisation. THE LIAR-KILL IS THE CUBE-LAW ROUND TRIP (T2/T3): recover k from a pair of observed crystal sizes, then run the model forward and land back on the observation it was recovered from. A wrong exponent or a wrong cube root cannot survive that, because both directions use the full arithmetic. THE FINDING IS T7: two storage histories with the SAME mean temperature give different ice cream. It is measured, with a flat-history control (T8) proving the difference comes from the cycling and not from the model adding damage to everything it touches. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_icecream.nx nx_ice_recrystal.nx nx_ice_recrystal_test.nx

imports: nx_syscalls.nxnx_icecream.nxnx_ice_recrystal.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ir_icbrt ir_cube tw sys_write ir_k_from_observation ir_cube ↻ ir_size_isothermal ir_cube ↻ ir_icbrt ↻ tn sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ iabs ir_k_is_recovered nx_ice_mix_new sys_mmap ↻ ir_cycled_fraction_permil ic_frozen_water_permil ic_fpd_milli_c ic_water_g ic_total_solids_g ic_total_solute_umol ic_sugar_umol ic_lactose_umol ic_milk_salt_umol

structs

none

consts

none

functions

17func tw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
18func tn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m } let t: *u8 = sys_mmap(24); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { b[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, b, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func iabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
21func main() -> i64