nx_tptp_load.nx
buildroot/runtime/nx_tptp_load.nx
about
nx_tptp_load.nx -- end-to-end TPTP CNF file loader.
Per user directive 2026-05-15: all functionality native to NishiLang,
no shell preprocessing or Python. Reads a TPTP file via the native
sys_read_file primitive, walks the buffer parsing each cnf(name,
role, FORMULA). statement, returns an array of *Clause ready for the
saturation loop.
Phase 1.6 closure: this is what flips the vs-Vampire CASC bench
status from BLOCKED_ON_TPTP_FORMULA_PARSER to UNBLOCKED_FOR_CNF.
(FOF formulas still queued for Phase 2; CASC FOF division entries
must be CNF-converted before the substrate can solve them today.)
Result-typed throughout (per cardinal: no null-as-error sentinels).
Caller unwraps via nx_result_unwrap; on error inspects err_code
(NX_ERR_FILE_NOT_FOUND / NX_ERR_PARSE_FAILED / NX_ERR_OVERFLOW).
dependencies 11 imports · 7 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_str.nxnx_result.nxnx_file_result.nxnx_unify.nxnx_resolution.nxnx_tptp_symtab.nxnx_tptp_term.nxnx_tptp_formula.nx
imported by: nx_avatar_solve_test.nxnx_casc_runner_test.nxnx_solve.nxnx_solve_test.nxnx_tptp_load_any.nxnx_tptp_load_test.nxnx_tptp_write_test.nx
structs
| 38 | struct TptpLoaded |
consts
| 36 | const NX_TPTP_LOAD_MAX_CLAUSES: nx_int = 256 |
| 44 | const NX_TPTP_LOADED_BYTES: nx_int = 24 |
functions
| 49 | func nx_tptp_load_skip(buf: *u8, n: nx_int, pos: *nx_int) |
| 87 | func nx_tptp_load_read_ident(buf: *u8, n: nx_int, pos: *nx_int, out_buf: *u8) -> nx_int |
| 122 | func nx_tptp_load_cnf_file(path: *u8, eq_sym: nx_int) -> *NxResult |
| 206 | func nx_tptp_loaded_at(l: *TptpLoaded, i: nx_int) -> *Clause |