code wiki / (root) / nx_modelfacts.nx

nx_modelfacts.nx

buildroot/runtime/nx_modelfacts.nx

11011 B259 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_modelfacts.nx -- CLI for 3D model fact extraction into the refcorpus measured-facts plane. nx_modelfacts probe <file> nx_modelfacts sweep <listfile> <source> <provenance> <license> [put] The nx_mediafacts pattern applied to the model classes (GLB/STL/OBJ/PLY): bounded window read + a DRAIN pass so the true file size is known (binary STL detection and truncation honesty both need it), closed fact vocabulary, distribution rows through rc_put_row in-process so the k-anonymity floor physically gates what reaches the journal. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_modelfacts_lib.nx nx_mediafacts_lib.nx nx_refcorpus.nx nx_modelfacts.nx

imports: nx_syscalls.nxnx_modelfacts_lib.nxnx_mediafacts_lib.nxnx_refcorpus.nx

imported by: nobody (leaf or entry point)

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

main mdlc_e sys_write mdlc_slen sys_exit sys_mmap mdlc_read sys_openat_rd sys_read sys_mmap ↻ sys_close mdl_probe mdl_starts mdl_nlen mdl_u32le mdl_align4 mdl_count mdl_nlen ↻ mdl_num_after mdl_nlen ↻ mdl_looks_obj mdl_lines mdl_lines ↻ mdlc_print_probe mdlc_w sys_write ↻ mdlc_slen ↻ mdlc_fmtname mdlc_num sys_write ↻ sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read ↻ sys_close ↻ mdlc_w ↻ mdlc_num ↻ mdlc_row

structs

none

consts

15const MDLC_MAGIC_65536: i64 = 65536
17const MDLC_WINDOW: i64 = 4194304
18const MDLC_MAX_FILES: i64 = 4096
19const MDLC_PATH_MAX: i64 = 384

functions

21func mdlc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: mdlc_wmdlc_e
22func mdlc_w(s: *u8) -> i64 { sys_write(1, s, mdlc_slen(s)); return 0 }
23func mdlc_e(s: *u8) -> i64 { sys_write(2, s, mdlc_slen(s)); return 0 }
called by 1: main calls 2: sys_writemdlc_slen
24func mdlc_num(v: i64) -> i64
37func mdlc_itoa(v: i64, out: *u8) -> i64
called by 1: mdlc_row calls 1: sys_mmap
50func mdlc_fmtname(f: i64) -> *u8
60func mdlc_read(path: *u8, buf: *u8, sizebox: *i64) -> i64
82func mdlc_print_probe(facts: *i64) -> i64
called by 1: main calls 3: mdlc_wmdlc_fmtnamemdlc_num
97func mdlc_row(fmt: i64, metric: *u8, val: i64, unit: *u8, cnt: i64, src: *u8, prov: *u8, lic: *u8, do_put: i64, wrote: *i64) -> i64
118func mdlc_mmm(fmt: i64, base: *u8, arr: *i64, cnt: i64, unit: *u8, src: *u8, prov: *u8, lic: *u8, do_put: i64, wrote: *i64) -> i64
called by 1: main calls 3: mf_mediansys_mmapmdlc_row
145func main(argc: i64, argv: *i64) -> i64