code wiki / (root) / nx_tptp_load.nx

nx_tptp_load.nx

buildroot/runtime/nx_tptp_load.nx

8191 B210 linesdepth 7pulls 12 transitivereach 7 importersview sourcekind librarytopic tptp
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_str.nx nx_result.nx nx_file_result.nx nx_unify.nx nx_resolution.nx nx_tptp_symtab.nx nx_tptp_term.nx nx_tptp_load.nx nx_avatar_solve_test.nx nx_casc_runner_test.nx nx_solve.nx nx_solve_test.nx nx_tptp_load_any.nx nx_tptp_load_test.nx nx_tptp_write_test.nx

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

38struct TptpLoaded

consts

36const NX_TPTP_LOAD_MAX_CLAUSES: nx_int = 256
44const NX_TPTP_LOADED_BYTES: nx_int = 24

functions

49func nx_tptp_load_skip(buf: *u8, n: nx_int, pos: *nx_int)
87func nx_tptp_load_read_ident(buf: *u8, n: nx_int, pos: *nx_int, out_buf: *u8) -> nx_int
122func nx_tptp_load_cnf_file(path: *u8, eq_sym: nx_int) -> *NxResult
206func nx_tptp_loaded_at(l: *TptpLoaded, i: nx_int) -> *Clause