nx_tptp_formula.nx
buildroot/runtime/nx_tptp_formula.nx
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
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
| 49 | func nx_tptp_parse_literal(buf: *u8, n: nx_int, pos: *nx_int, |
| 113 | func nx_tptp_parse_cnf_clause(buf: *u8, n: nx_int, pos: *nx_int, |