code wiki / _hdl_build / nx_cap_type_classify.nx

nx_cap_type_classify.nx

buildroot/runtime/_hdl_build/nx_cap_type_classify.nx

6842 B153 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_type_classify.nx -- the census CAPABILITY-TYPE classifier (L7 of the sovereign-data-substrate roadmap). Pure NishiLang, NO SQL. Maps a capability's name/path to a normalized capability-type via a DATA-DRIVEN keyword rule table (Rule #11), first-match-wins, so nx_dedup_audit's clustering can run ACROSS subsystems. Tutored by Claude (the LLM novel-module rung); the gate below is self-contained (no enumerator dependency) so the Engineer can verify it now. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_cap_type_classify.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ck classify sys_mmap _contains _slen _puts sys_write pr_n sys_mmap ↻ sys_write ↻ _puts ↻ pr_n ↻ sys_exit

structs

none

consts

10const CT_OTHER: i64 = 0
11const CT_IMAGE_GEN: i64 = 1
12const CT_GARMENT: i64 = 2
13const CT_CHARACTER: i64 = 3
14const CT_SCENE: i64 = 4
15const CT_CAPTION: i64 = 5
16const CT_QUALITY: i64 = 6
17const CT_FORENSICS: i64 = 7
18const CT_SCRAPE: i64 = 8
19const CT_STORAGE: i64 = 9
20const CT_SEARCH: i64 = 10
21const CT_UI: i64 = 11
22const CT_API: i64 = 12
23const CT_DEPLOY: i64 = 13
24const CT_ORCH: i64 = 14
25const CT_GOVERN: i64 = 15
26const CT_TRAIN: i64 = 16
27const MAXR: i64 = 64

functions

29func pr_n(v: i64) -> i64
called by 2: ckmain calls 2: sys_mmapsys_write
38func _puts(s: *u8) -> i64
called by 2: ckmain calls 1: sys_write
44func _slen(s: *u8) -> i64
called by 1: ck
51func _contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64
called by 1: classify
72func classify(name: *u8, nlen: i64) -> i64
called by 1: ck calls 2: sys_mmap_contains
129func ck(name: *u8, want: i64) -> i64
called by 1: main calls 4: classify_slen_putspr_n
137func main() -> i64