code wiki / (root) / nx_paper_forge.nx

nx_paper_forge.nx

buildroot/runtime/nx_paper_forge.nx

5802 B135 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind librarytopic paper
docsdependenciesstructsconstsfunctions

about

nx_paper_forge.nx -- SOVEREIGN arXiv-shaped MANUSCRIPT COMPILER, engine half (AS-1). A paper here is not prose someone typed: it is COMPILED from an evidence ledger. Every quantitative claim in the body is written as a placeholder {ID}; the forge resolves ID against the ledger and emits `<value> [ev:ID]`. Two hard refusals live in this engine and are exercised by nx_paper_forge_gate: REFUSE-UNCITED a {ID} with no ledger row -> pf_expand returns -1 -> the CLI writes NOTHING. Inherited from nx_paper_gen's cite-or-refuse doctrine and made total: you cannot forget a citation, because the paper will not exist without it. REFUSE-UNSTRUCTURED a manuscript missing a section the ruler grades -> pf_required returns >0 -> the CLI writes NOTHING. The forge cannot emit a paper that its own ruler would structurally reject. pf_required calls nx_paperbench's pb_find, so the FORGE and the RULER share ONE definition of "does this manuscript contain X" (DRY, rule 15) and cannot drift apart. Integer, deterministic, byte-reproducible for a fixed (conf, ledger) pair. No hw writes (Rule 26). license_tier: ORIGINAL module: nishi-core.research.paper_forge depends: nx_paperbench.nx, nx_syscalls.nx genealogy_id: nx_paper_gen_cite_or_refuse + reforms_required_sections

dependencies 2 imports · 3 importers

nx_paperbench.nx nx_syscalls.nx nx_paper_forge.nx nx_paper_audit.nx nx_paper_forge_cli.nx nx_paper_forge_gate.nx

imports: nx_paperbench.nxnx_syscalls.nx

imported by: nx_paper_audit.nxnx_paper_forge_cli.nxnx_paper_forge_gate.nx

structs

none

consts

none

functions

29func pf_app(dst: *u8, off: i64, s: *u8) -> i64
36func pf_appn(dst: *u8, off: i64, src: *u8, a: i64, b: i64) -> i64
called by 2: pf_expandmain
43func pf_eol(buf: *u8, n: i64, i: i64) -> i64
53func pf_lookup(led: *u8, ln: i64, id: *u8, idn: i64, out: *i64) -> i64
called by 3: pa_auditpf_expandmain calls 1: pf_eol
90func pf_expand(dst: *u8, off: i64, src: *u8, ab: *i64, led: *i64) -> i64
126func pf_required(doc: *u8, n: i64, miss: *i64) -> i64
called by 2: mainmain calls 1: pb_find