code wiki / (root) / nx_research_report.nx

nx_research_report.nx

buildroot/runtime/nx_research_report.nx

11230 B244 linesdepth 11pulls 23 transitivereach 5 importersview sourcekind librarytopic research
docsdependenciesstructsconstsfunctions

about

nx_research_report.nx -- S3 of the Tesla ladder: the GROUNDED REPORT WRITER (low-resource analog of Paper Orchestra's writing stage -- no LaTeX theatre, a rigorously-grounded Markdown report). It assembles multi-section S1 synthesis into a report with a numbered References section, and ENFORCES a report-level grounding guarantee: every non-empty sentence must carry >=1 citation [n], and every [n] must resolve to a real reference (1..nsrc). A report with an uncited sentence or a dangling citation is NOT grounded -- the trustworthiness guarantee FARS/PaperOrchestra prose can't make. Assembly + grounding are deterministic/$0; section synthesis composes S1 (rsq_synth), model-gated. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_research_synth_qwen.nx nx_text_sentences.nx nx_research_report.nx nx_research_report_gate.nx nx_research_unified.nx

imports: nx_syscalls.nxnx_research_synth_qwen.nxnx_text_sentences.nx

imported by: nx_research_report_gate.nxnx_research_unified.nx

structs

none

consts

none

functions

12func rp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: rp_contains
13func rp_is_alnum(c: i64) -> i64
19func rp_cat(dst: *u8, off: i64, s: *u8, n: i64, cap: i64) -> i64 { var i: i64=0; var o: i64=off; while i<n { if o<cap { dst[o]=s[i]; o=o+1 } i=i+1 } return o }
called by 1: rp_report
20func rp_cats(dst: *u8, off: i64, s: *u8, cap: i64) -> i64 { var i: i64=0; var o: i64=off; while s[i]!=(0 as u8) { if o<cap { dst[o]=s[i]; o=o+1 } i=i+1 } return o }
21func rp_catn(dst: *u8, off: i64, v: i64, cap: i64) -> i64
32func rp_contains(buf: *u8, blen: i64, needle: *u8) -> i64
called by 1: main calls 1: rp_slen
48func rp_is_letter(c: i64) -> i64
called by 1: rp_report_grounded
53func rp_is_digit(c: i64) -> i64 { if c >= 48 { if c <= 57 { return 1 } } return 0 }
called by 1: rp_report_grounded
55func rp_parse_cite(body: *u8, blen: i64, i: i64, outp: *i64) -> i64
61func rp_report_grounded(body: *u8, blen: i64, nsrc: i64, out: *i64) -> i64
117func rp_clean_body(body: *u8, blen: i64, nsrc: i64, out: *u8, cap: i64) -> i64
173func rp_assemble(title: *u8, heads: *i64, bodies: *i64, nsec: i64, srcs: *i64, nsrc: i64, buf: *u8, cap: i64) -> i64
called by 1: main calls 2: rp_catsrp_catn
201func rp_report(title: *u8, heads: *i64, questions: *i64, nsec: i64, srcs: *i64, nsrc: i64, buf: *u8, cap: i64, out: *i64) -> i64