code wiki / _hdl_build / nx_sharpgrade.nx

nx_sharpgrade.nx

buildroot/runtime/_hdl_build/nx_sharpgrade.nx

6749 B184 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_sharpgrade.nx -- THE MATH PARTY of the small-sharp-tool grade (operator 2026-07-20: "linux small sharp philosophy, thats really the grade... out-linux linux... three parties agree: you, the nishi ecosystem, and the math"). Objective cohesion measure of ONE organ: does it do ONE thing (SHARP) or several disjoint things that should SPLIT into separate small sharp tools? THE MATH: parse the organ's functions, build the intra-organ CALL GRAPH, compute CONNECTED COMPONENTS (union-find). 1 component = one cohesive responsibility = SHARP. K>1 components = K responsibilities. Refine with VOCABULARY: a component split whose function-name PREFIXES are all one family (sd_*, st_*) = a cohesive utility lib (SHARP-LIB, theme-cohesion); distinct prefix families across components = genuinely separate tools = SPLIT-K (the nx_clock time-primitive-vs-scheduler defect, made computable). Also EMITS the function inventory (name|prefix|component) = the mining-archive substrate (rule 13). argv: <organ-source.nx> verdict SHARP | SHARP-LIB | SPLIT-<k>. exit 0 always (a grade is data). Reproducible/deterministic. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_seat_drive_lib.nx nx_deploy_lib.nx nx_syscalls.nx nx_sharpgrade.nx

imports: nx_seat_drive_lib.nxnx_deploy_lib.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 sd_w sys_write sys_exit sys_mmap dp_read sys_openat_rd sys_read sys_close sg_isid sg_calls sg_call_at sg_isid ↻ sg_union sg_find sg_find ↻ sg_pref_eq sg_preflen sys_write ↻ sd_num sys_mmap ↻

structs

none

consts

18const SG_SRCCAP: i64 = 4194304
19const SG_MAXF: i64 = 512

functions

21func sg_isid(c: i64) -> i64
called by 2: sg_call_atmain
29func sg_find(parent: *i64, x: i64) -> i64
called by 2: sg_unionmain
34func sg_union(parent: *i64, a: i64, b: i64) -> i64
called by 1: main calls 1: sg_find
42func sg_call_at(buf: *u8, p: i64, n: i64, name: *u8, no: i64, nl: i64) -> i64
called by 1: sg_calls calls 1: sg_isid
51func sg_calls(buf: *u8, s: i64, e: i64, name: *u8, no: i64, nl: i64) -> i64
called by 1: main calls 1: sg_call_at
60func sg_preflen(name: *u8, no: i64, nl: i64) -> i64
called by 1: sg_pref_eq
65func sg_pref_eq(name: *u8, ao: i64, al: i64, bo: i64, bl: i64) -> i64
called by 1: main calls 1: sg_preflen
74func main(argc: i64, argv: *i64) -> i64