code wiki / _hdl_build / nx_uiq_atree_lib.nx
nx_uiq_atree_lib.nx
buildroot/runtime/_hdl_build/nx_uiq_atree_lib.nx
about
nx_uiq_atree_lib.nx -- F106b ARIA-tree snapshot + Zhang-Shasha tree edit distance (experiential).
SOTA axis (banked 07-21): ARIA-tree snapshots + ZSS TED = the deterministic STRUCTURAL regression
signal (Playwright aria-snapshot analog), computed sovereignly. A page becomes a role tree
(landmarks/headings/links/buttons/inputs/imgs/lists/tables/forms + explicit role= overrides,
names from aria-label > alt > inner text), rooted at a virtual document node; TED between two
trees = insert/delete/rename cost 1 (classic Zhang-Shasha keyroot DP). TED 0 = structurally
identical BY CONSTRUCTION; a removed nav link, a demoted heading, an inserted wrapper each = 1.
HONEST ENVELOPE: static source scan; script bodies masked; generic div/span skipped unless role=;
node cap 512 + depth cap 64 DECLARED (capped tree -> TED refused, never silently truncated).
license_tier: ORIGINAL genealogy: F106b; family nx_uiq_color/contrast/perf/console
dependencies 1 imports · 3 importers
imports: nx_uiq_console_lib.nx
imported by: nx_uiq_atree.nxnx_uiq_atree_gate.nxnx_uiq_sentinel_lib.nx
structs
| none |
consts
| 13 | const AT_CAP_NODES: i64 = 512 |
| 14 | const AT_CAP_DEPTH: i64 = 64 |
| 15 | const AT_S_ROLE: i64 = 16 |
| 16 | const AT_S_AUX: i64 = 528 |
| 17 | const AT_S_NOFF: i64 = 1040 |
| 18 | const AT_S_NLEN: i64 = 1552 |
| 19 | const AT_S_PAR: i64 = 2064 |
| 20 | const AT_SLOTS: i64 = 2576 |
| 21 | const AT_FIX_A: *u8 = "<header><h1>Site</h1></header><nav><a href=\"/x\">X</a><a href=\"/y\">Y</a></nav><main><section><h2>S</h2><img src=\"i.png\" alt=\"pic\"></section></main><footer></footer>" as *u8 |
| 22 | const AT_FIX_C: *u8 = "<header><h1>Site</h1></header><nav><a href=\"/x\">X</a></nav><main><section><h2>S</h2><img src=\"i.png\" alt=\"pic\"></section></main><footer></footer>" as *u8 |
| 23 | const AT_FIX_D: *u8 = "<header><h2>Site</h2></header><nav><a href=\"/x\">X</a><a href=\"/y\">Y</a></nav><main><section><h2>S</h2><img src=\"i.png\" alt=\"pic\"></section></main><footer></footer>" as *u8 |
| 24 | const AT_FIX_E: *u8 = "<header><h1>Site</h1></header><nav><a href=\"/x\">X</a><a href=\"/y\">Y</a></nav><main><article><section><h2>S</h2><img src=\"i.png\" alt=\"pic\"></section></article></main><footer></footer>" as *u8 |
| 25 | const AT_FIX_MASK2: *u8 = "<nav><a href=\"/x\">X</a></nav><script>let s='<nav><a href=\"/z\">Z</a></nav>'</script>" as *u8 |
functions
| 27 | func at_arr(t: *i64, slot: i64) -> *i64 |
| 33 | func at_min3(a: i64, b: i64, c: i64) -> i64 called by 1: at_ted |
| 41 | func at_attr_val(mk: *u8, s: i64, g: i64, pat: *u8, out: *i64) -> i64 |
| 56 | func at_tag_eq(mk: *u8, off: i64, len: i64, lit: *u8) -> i64 |
| 65 | func at_tagrole(mk: *u8, toff: i64, tlen: i64, out: *i64) -> i64 |
| 96 | func at_build(buf: *u8, n: i64, t: *i64) -> i64 |
| 248 | func at_rolename(r: i64, a: i64) -> i64 |
| 274 | func at_snap(t: *i64) -> i64 |
| 305 | func at_names_eq(ba: *u8, oa: i64, la: i64, bb: *u8, ob: i64, lb: i64) -> i64 called by 1: at_lcost |
| 313 | func at_lcost(ta: *i64, x: i64, tb: *i64, y: i64) -> i64 |
| 332 | func at_order(t: *i64, po: *i64, poidx: *i64, lpo: *i64, kr: *i64) -> i64 |
| 395 | func at_ted(ta: *i64, tb: *i64) -> i64 |
| 480 | func at_ted_html(ba: *u8, na: i64, bb: *u8, nb: i64) -> i64 |
| 489 | func at_selftest() -> i64 |