nx_research_report.nx
buildroot/runtime/nx_research_report.nx
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
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
| 12 | func 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 |
| 13 | func rp_is_alnum(c: i64) -> i64 |
| 19 | func 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 |
| 20 | func 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 } |
| 21 | func rp_catn(dst: *u8, off: i64, v: i64, cap: i64) -> i64 |
| 32 | func rp_contains(buf: *u8, blen: i64, needle: *u8) -> i64 |
| 48 | func rp_is_letter(c: i64) -> i64 called by 1: rp_report_grounded |
| 53 | func rp_is_digit(c: i64) -> i64 { if c >= 48 { if c <= 57 { return 1 } } return 0 } called by 1: rp_report_grounded |
| 55 | func rp_parse_cite(body: *u8, blen: i64, i: i64, outp: *i64) -> i64 |
| 61 | func rp_report_grounded(body: *u8, blen: i64, nsrc: i64, out: *i64) -> i64 |
| 117 | func rp_clean_body(body: *u8, blen: i64, nsrc: i64, out: *u8, cap: i64) -> i64 |
| 173 | func rp_assemble(title: *u8, heads: *i64, bodies: *i64, nsec: i64, srcs: *i64, nsrc: i64, buf: *u8, cap: i64) -> i64 |
| 201 | func rp_report(title: *u8, heads: *i64, questions: *i64, nsec: i64, srcs: *i64, nsrc: i64, buf: *u8, cap: i64, out: *i64) -> i64 |