code wiki / _hdl_build / nx_hang_resolve_test.nx

nx_hang_resolve_test.nx

buildroot/runtime/_hdl_build/nx_hang_resolve_test.nx

3316 B42 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_hang_resolve_test.nx -- the team solves problems within the operator's SLA (<=3 steps/30s; Engineer optimal 1 step/<10s). The codegen hang is a KNOWN pattern, so the Engineer resolves it in 1 step (apply the known fix = SPLIT the offending function) -> OPTIMAL. An unknown issue costs 3 steps but stays within SLA. A sloppy 5-step/45s resolution VIOLATES the principle and is flagged. Exit 0 on 7/7. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_hang_resolve.nx nx_syscalls.nx nx_hang_resolve_test.nx

imports: nx_hang_resolve.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ht_puts sys_write hr_resolution_steps hr_grade hr_is_optimal hr_within_sla hr_fix_for ht_num sys_mmap sys_write ↻ sys_mmap ↻ hr_codegen_hang_optimal hr_is_optimal ↻ hr_resolution_steps ↻ hr_within_sla ↻ sys_exit

structs

none

consts

none

functions

10func ht_puts(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
11func ht_num(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
13func main() -> i64