code wiki / (root) / nx_symdecl_lib.nx

nx_symdecl_lib.nx

buildroot/runtime/nx_symdecl_lib.nx

26351 B483 linesdepth 2pulls 2 transitivereach 154 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_symdecl_lib.nx -- THE ONE SYMBOL RULER for the compare surface (2026-08-23, lane L). "Does organ O carry symbol S?" was answered by THREE different rulers in three organs, and two of them disagreed with the third in public: nx_swcompare_matrix c_file_has -- bare SUBSTRING over the organ source (a comment, a call site, a gate name or a string literal containing S flips the cell) nx_compare_regen tr_contains -- the same substring rule, feeding the comparewatch- plane that every seat reads to pick up work nx_compare_rank rk_measure -- a TOP-LEVEL `func S(` declaration at line start, whose own comment claimed "presence measured EXACTLY as the emitter measures it" -- MEASURED FALSE 2026-08-23 Live consequence: lang LN8 (_ABSENT_:opt_eqsat_pass on runtime/nx_opt.nx, which only CALLS the pass) read LANDED on the page and in the plane while the ranker priced it OPEN. A completion signal that keys on a name rewards writing the name; the substring rule rewards a comment. THE RULE (one definition, four importers: nx_swcompare_lib -> both generators, nx_compare_rank, nx_compare_regen): S is DECLARED in O iff O's source carries, at the START of a line, one of the declaration keywords `func ` `const ` `struct ` `static ` followed by S followed by a character that cannot continue an identifier. Column 0 only -- NishiLang has no nested declarations, so an indented `func` is prose inside a comment block or a string, never a definition. Comments, call sites, gate names, and longer identifiers sharing the prefix (`sym` vs `symx`) do not count. The organ is read WHOLE (sys_read_file sizes its buffer from the file): the matrix generator's old 256 KiB read cap made every symbol past that offset invisible -- nx_parse.nx is 366 KB today. sd_declared returns -1 when the organ cannot be read at all, so a caller can say "organ unreadable" instead of the indistinguishable "symbol absent".

dependencies 1 imports · 22 importers

nx_syscalls.nx nx_symdecl_lib.nx nx_claim_binding_gate.nx nx_compare_rank.nx nx_compare_rank_artifact_20260910. nx_compare_rank_refresh_test_20260 nx_compare_regen.nx nx_compare_regen_scoped.nx nx_compare_regen_t138.nx nx_compare_shared_fit_lib_20260910 nx_market_ladder_lib.nx nx_measurement_binding_lib.nx

diagram shows first 10 each side; +0 more imports, +12 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_claim_binding_gate.nxnx_compare_rank.nxnx_compare_rank_artifact_20260910.nxnx_compare_rank_refresh_test_20260907.nxnx_compare_regen.nxnx_compare_regen_scoped.nxnx_compare_regen_t138.nxnx_compare_shared_fit_lib_20260910.nxnx_market_ladder_lib.nxnx_measurement_binding_lib.nxnx_rungclose.nxnx_swcompare_evidence.nxnx_swcompare_evidence_gate.nxnx_swcompare_evidence_lib_t138.nxnx_swcompare_growth_candidate_20260910.nxnx_swcompare_heading_lib_20260907.nxnx_swcompare_ladder_candidate.nxnx_swcompare_lib.nxnx_swcompare_preview_lib_t56.nxnx_swcompare_production_lib_20260907.nxnx_swcompare_release_candidate.nxnx_twincard_lib.nx

structs

none

consts

46const SD_KW_COUNT: i64 = 6
147const SD_RULE_DECL: i64 = 1
148const SD_RULE_JSDECL: i64 = 2
149const SD_RULE_EXISTS: i64 = 3
150const SD_RULE_MARKER: i64 = 4
151const SD_RULE_DATA: i64 = 5
309const SD_ABSTAIN: i64 = 2
370const CB_HOST: *u8 = "/volume1/homes/elderwesto/nishihost"
371const CB_BUILDROOT: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot"
372const CB_ABSENT: i64 = 0
373const CB_SOURCE_ONLY: i64 = 1
374const CB_SERVED: i64 = 2
375const CB_CLASS_CONSISTENT: i64 = 0
376const CB_CLASS_STALE_UNDER: i64 = 1
377const CB_CLASS_REFUSE: i64 = 2
453const CB_CWD_SERVING_UP: *u8 = ".."
454const CB_CWD_SERVING_HERE: *u8 = "."
455const CB_CWD_BUILD: *u8 = "."

functions

48func sd_ident_char(c: i64) -> i64
55func sd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
57func sd_kw(i: i64) -> *u8
called by 1: sd_decl_at
66func sd_decl_at(b: *u8, n: i64, i: i64, sym: *u8, sl: i64) -> i64
89func sd_declared_buf(b: *u8, n: i64, sym: *u8) -> i64
103func sd_declared(path: *u8, sym: *u8) -> i64
114func sd_substring_control(b: *u8, n: i64, sym: *u8) -> i64
152func sd_rule_name(r: i64) -> *u8
159func sd_ends(s: *u8, sfx: *u8) -> i64
called by 1: sd_is_code_organ calls 1: sd_slen
167func sd_is_ident(s: *u8) -> i64
calls 1: sd_ident_char
175func sd_is_organ_name(organ: *u8, sym: *u8) -> i64
called by 1: sd_rule_for calls 1: sd_slen
189func sd_is_all_caps(s: *u8) -> i64
195func sd_is_code_organ(organ: *u8) -> i64
called by 1: sd_rule_for calls 1: sd_ends
202func sd_after_func(sym: *u8) -> *u8
called by 2: sd_strip_funcsd_rule_for calls 1: sd_slen
207func sd_strip_func(sym: *u8, out: *u8) -> i64
214func sd_rule_for(organ: *u8, sym: *u8, ident_out: *u8) -> i64
230func sd_js_decl_at(b: *u8, n: i64, i0: i64, sym: *u8, sl: i64) -> i64
273func sd_js_declared_buf(b: *u8, n: i64, sym: *u8) -> i64
312func sd_abstain_name() -> *u8 { return "no-competence-js-dialect" as *u8 }
called by 2: ev_scaneg_board
317func sd_present_or_abstain_buf(b: *u8, n: i64, organ: *u8, sym: *u8, rule_out: *i64) -> i64
354func sd_present_buf(b: *u8, n: i64, organ: *u8, sym: *u8, rule_out: *i64) -> i64
378func cb_class_name(c: i64) -> *u8
383func cb_state_name(s: i64) -> *u8
388func cb_exists(path: *u8) -> i64
394func cb_app(dst: *u8, off: i64, s: *u8) -> i64
called by 1: cb_serve_state_at
401func cb_base(organ: *u8, out: *u8) -> i64
called by 1: cb_serve_state_at
414func cb_serve_state_at(serving_root: *u8, build_root: *u8, organ: *u8) -> i64
432func cb_serve_state(organ: *u8) -> i64
439func cb_classify(claim_present: i64, serve_state: i64) -> i64
456func cb_serve_state_cwd(organ: *u8) -> i64
466func ce_claim_binding(organ: *u8, claim_present: i64) -> i64
471func sd_present(organ: *u8, sym: *u8, rule_out: *i64) -> i64