code wiki / _hdl_build / nx_dup_detect.nx
nx_dup_detect.nx
buildroot/runtime/_hdl_build/nx_dup_detect.nx
about
nx_dup_detect.nx -- FUSED duplicate detection (operator 2026-07-16: "we dont know what's in what bucket ...
fuzzy vs exact"). Exact-match (imports) sees 0 dup; crude NAME-fuzzy over-merges verbs (add x999). This
FUSES two axes from the family graph: (1) canonical NAME (strip nx_/.nx + version/redundancy qualifiers)
AND (2) IMPORT-SIGNATURE (the order-independent set of files an organ imports = its structural fingerprint,
= sum of FNV(neighbor-name) over out-edges). Two organs are DUPLICATES only if BOTH match -> nx_bignum_add
and nx_p256_add share canon "add" but have DIFFERENT import signatures -> correctly SPLIT (the verb
false-merge dies). Supersedes nx_fuzzy_dup (name-only). Read-only over the eco_graph store.
nx_dup_detect <store-prefix> license_tier: ORIGINAL module: nishi-core.architect.dup_detect
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_eco_graph.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const DD_MAGIC_2166136261: i64 = 2166136261 |
| 12 | const DD_MAGIC_16777619: i64 = 16777619 |
| 13 | const DD_MAGIC_4294967295: i64 = 4294967295 |
| 14 | const DD_MAGIC_4611686018427387903: i64 = 4611686018427387903 |
| 15 | const DD_MAGIC_1000003: i64 = 1000003 |
| 17 | const DD_SLOTS: i64 = 131072 |
| 18 | const DD_ARENA: i64 = 4194304 |
functions
| 20 | func dd_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 21 | func dd_pn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; var k: i64 = 0; let t: *u8 = sys_mmap(24); if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48+(m%10)) as u8; m = m/10; k = k+1 } var i: i64 = 0; while i < k { b[i] = t[k-1-i]; i = i+1 } sys_write(1, b, k); return 0 } |
| 22 | func dd_streq_ao(a: *u8, ao: i64, al: i64, b: *u8) -> i64 |
| 29 | func dd_is_stop(buf: *u8, to: i64, tl: i64) -> i64 |
| 50 | func dd_canon(g: *EcoGraph, idx: i64, out: *u8) -> i64 |
| 69 | func dd_hash(s: *u8, l: i64) -> i64 { var h: i64 = DD_MAGIC_2166136261; var i: i64 = 0; while i < l { h = h ^ (s[i] as i64); h = (h * DD_MAGIC_16777619) & DD_MAGIC_4294967295; i = i + 1 } return h } called by 1: main |
| 71 | func dd_name_fnv(g: *EcoGraph, idx: i64) -> i64 called by 1: main |
| 78 | func main(argc: i64, argv: *i64) -> i64 |