code wiki / (root) / nx_tptp_formula.nx

nx_tptp_formula.nx

buildroot/runtime/nx_tptp_formula.nx

6289 B158 linesdepth 6pulls 10 transitivereach 10 importersview sourcekind librarytopic tptp
docsdependenciesstructsconstsfunctions

about

nx_tptp_formula.nx -- TPTP CNF formula body parser. Per Vampire-displacement roadmap Phase 1.6: closes the BLOCKED axis from the CASC bench harness. Reads a TPTP CNF formula body and emits a *Clause ready for the saturation loop. Grammar handled (TPTP CNF subset): clause ::= [ "(" ] literal { "|" literal } [ ")" ] literal ::= [ "~" ] atom atom ::= predicate-application | term "=" term (equality) | term "!=" term (inequality) term ::= delegated to nx_tptp_term Equality is mapped to a caller-supplied eq_sym (a normal binary predicate sym_id reserved for "="). Inequality literal flips the sign of the surrounding literal. Bits-up parsing. Returns null on parse failure (the smoke test covers both the success and failure paths). FOF (quantifiers, &, =>, <=>, etc.) is Phase 2 -- CNF alone is what the CASC FOF division accepts after a TPTP-tooled CNF transformation, and is what TPTP-Easy provides directly.

dependencies 9 imports · 10 importers

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

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_str.nxnx_result.nxnx_unify.nxnx_resolution.nxnx_tptp_symtab.nxnx_tptp_term.nx

imported by: nx_avatar_solve_test.nxnx_casc_runner_test.nxnx_solve.nxnx_solve_test.nxnx_tptp_emit_test.nxnx_tptp_formula_test.nxnx_tptp_load.nxnx_tptp_load_any.nxnx_tptp_load_test.nxnx_tptp_write_test.nx

structs

none

consts

none

functions

49func nx_tptp_parse_literal(buf: *u8, n: nx_int, pos: *nx_int,
113func nx_tptp_parse_cnf_clause(buf: *u8, n: nx_int, pos: *nx_int,