code wiki / _hdl_build / nx_cap_register_test.nx

nx_cap_register_test.nx

buildroot/runtime/_hdl_build/nx_cap_register_test.nx

4750 B64 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_register_test.nx -- prove the Librarian's lint+register catches the EXACT bug Claude made by hand (caps at lay 6/7/8 with nlayers=6 -> invisible) and that the team's validated registration EXCEEDS the manual process. Exit 0 on 10/10. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_cap_register.nx nx_syscalls.nx nx_cap_register_test.nx

imports: nx_cap_register.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 ct_puts sys_write sml_check_cap sml_layer_valid sml_status_valid sml_code_label sys_mmap sml_count_invisible sml_layer_valid ↻ ct_num sys_mmap ↻ sys_write ↻ cr_can_register sml_check_cap ↻ cr_refusal_reason sml_check_cap ↻ sys_openat_wr sys_close sys_openat_append cr_write_entry cr_w sys_write ↻ cr_wn sys_mmap ↻ sys_write ↻ sys_openat_rd sys_read ct_has sml_registry_clean sml_check_cap ↻ sys_exit

structs

none

consts

none

functions

8func ct_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
9func ct_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
10func ct_has(buf: *u8, n: i64, ndl: *u8, nl: i64) -> i64 { var i: i64=0; while i<=n-nl { var j: i64=0; var ok: i64=1; while j<nl { if buf[i+j]!=ndl[j] {ok=0;j=nl} j=j+1 } if ok==1 {return 1} i=i+1 } return 0 }
called by 1: main
12func main() -> i64