code wiki / _hdl_build / nx_probe_castmut2_live.nx

nx_probe_castmut2_live.nx source

↩ module page · 16 lines · 764 B

1// nx_probe_castmut2_live.nx -- DISCRIMINATOR (2026-08-05): is the cast-mutation PER-VALUE or check-wide? 2// Here the prior cast targets a DIFFERENT local (c), then the proven-refusing shape pi_int3(b) follows. 3// If this REFUSES: mutation is per-value (only the cast local flips) => fix = cast must produce a NEW 4// Value (or the check must read declared types). If it BUILDS: something broader disables the check. 5// license_tier: ORIGINAL expect_exit: 0 6import "nx_syscalls.nx" 7func pk_int3(k: i64) -> i64 { return k } 8func pi_int3(k: i64) -> i64 { return k + 1 } 9func main(argc: i64, argv: *i64) -> i64 { 10 let b: *u8 = sys_mmap(64) 11 let c: *u8 = sys_mmap(64) 12 let r: i64 = pk_int3(c as i64) 13 let x: i64 = pi_int3(b) 14 sys_exit(0) 15 return 0 16}