code wiki / (root) / nx_strconv_gate.nx

nx_strconv_gate.nx

buildroot/runtime/nx_strconv_gate.nx

5343 B126 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_strconv_gate.nx -- the gate for the parse/format vocabulary 59 modules import. WHY: nx_gensota's gen-3 worklist, rank 2 after nx_str closed. Its own header promises the callers agree on "edge cases (negative MIN_I64, leading +, overflow detection, hex prefix tolerance)" -- and a PROMISE IN A HEADER IS NOT A TEST. Every claim in that sentence is a tooth below. ★DESIGN NOTE ON THE MIN_I64 TOOTH: I did not guess a constant. The tooth asserts the SAFETY property -- parsing the i64 minimum either yields the exact value OR reports overflow, and NEVER a silently-wrong number. A gate that pins a guessed value is a coin flip; a gate that pins the safety envelope is correct whichever branch the implementation takes. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_strconv.nx nx_strconv_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_strconv.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap gv_head gv_puts sys_write sys_mmap ↻ nsc_set nx_strconv_parse_i64 nx_ascii_is_digit gv_check gv_puts ↻ nx_strconv_parse_hex nx_strconv_is_hex_digit nx_ascii_is_digit ↻ nx_strconv_hex_digit_val nx_strconv_format_i64 nsc_eq gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close sys_munmap ↻ sys_exit

structs

none

consts

15const NSC_BUF: i64 = 64
16const NSC_I64_MIN_STR_LEN: i64 = 20

functions

18func nsc_set(p: *u8, s: *u8) -> i64
called by 1: main
24func nsc_eq(a: *u8, b: *u8) -> i64
called by 1: main
34func main() -> i64