code wiki / (root) / nx_ice_distribution_test.nx

nx_ice_distribution_test.nx

buildroot/runtime/nx_ice_distribution_test.nx

11821 B215 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic ice
docsdependenciesstructsconstsfunctions

about

nx_ice_distribution_test.nx -- gate for the derived geometric coupling. THE CLAIM UNDER TEST is that nx_ice_recrystal's asserted coupling was not merely unproven but WRONG IN A KNOWN DIRECTION, and that the right value falls out of a size distribution as exact arithmetic. T4 is the measurement that matters: the number fraction of crystals lost is far larger than the mass fraction melted, so a coupling of 1.0 -- which is the claim that they are equal -- under-states how fast the mean size grows. T5 puts a number on how wrong, and T6 states the direction as a verdict rather than leaving a reader to work it out. T2 is the conservation law that keeps the rest honest: melting and redepositing must not change total mass, and if it did, every growth figure here would be an artefact of losing or inventing ice. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_ice_distribution.nx nx_ice_recrystal.nx nx_ice_distribution_test.nx

imports: nx_syscalls.nxnx_ice_distribution.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 dist_reference dist_new 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 ↻ dist_set dist_is_ascending dist_total_count dist_total_mass dist_mean_diameter dist_total_count ↻ tw sys_write ↻ tn sys_mmap ↻ sys_write ↻ dist_apply_cycle dist_is_ascending ↻ dist_total_mass ↻ iabs dist_number_fraction_permi dist_count_melted dist_is_ascending ↻ dist_total_mass ↻ dist_total_count ↻ dist_derived_coupling dist_volume_growth_permil

structs

none

consts

none

functions

21func 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
22func 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
23func iabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
25func main() -> i64