code wiki / (root) / nx_fof.nx

nx_fof.nx

buildroot/runtime/nx_fof.nx

3452 B100 linesdepth 5pulls 5 transitivereach 8 importersview sourcekind librarytopic fof
docsdependenciesstructsconstsfunctions

about

nx_fof.nx -- TPTP FOF (First-Order Form) formula tree. Per Vampire-displacement roadmap Phase 2. CNF (already shipped via nx_tptp_formula.nx) covers conjunctive-normal-form clauses; FOF is the richer language with explicit quantifiers (forall, exists) and the full connective set (&, |, =>, <=>, ~). The CASC FOF division uses FOF directly; problems must be CNF-converted (Skolemize + distribute) before saturation, but the parser produces the FOF tree as a separate primitive so callers can inspect, transform, and convert at their leisure. Sealed kind enum. Each node holds the operator + 1-2 child Fof pointers + (for quantified nodes) a bound-variable id from the shared TptpSymtab.

dependencies 5 imports · 8 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_fof.nx nx_casc_runner_test.nx nx_fof_cnf.nx nx_fof_cnf_test.nx nx_fof_parse.nx nx_fof_parse_test.nx nx_fof_tseitin.nx nx_fof_tseitin_test.nx nx_tptp_load_any.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nx

imported by: nx_casc_runner_test.nxnx_fof_cnf.nxnx_fof_cnf_test.nxnx_fof_parse.nxnx_fof_parse_test.nxnx_fof_tseitin.nxnx_fof_tseitin_test.nxnx_tptp_load_any.nx

structs

38struct Fof

consts

29const NX_FOF_ATOM: nx_int = 1
30const NX_FOF_NEG: nx_int = 2
31const NX_FOF_AND: nx_int = 3
32const NX_FOF_OR: nx_int = 4
33const NX_FOF_IMP: nx_int = 5 // a => b
34const NX_FOF_IFF: nx_int = 6 // a <=> b
35const NX_FOF_FORALL: nx_int = 7 // ![X]: a
36const NX_FOF_EXISTS: nx_int = 8 // ?[X]: a
46const NX_FOF_BYTES: nx_int = 40

functions

49func nx_fof_atom(a: *Term) -> *Fof
59func nx_fof_neg(child: *Fof) -> *Fof
69func nx_fof_binary(kind: nx_int, l: *Fof, r: *Fof) -> *Fof
79func nx_fof_quantified(kind: nx_int, var_id: nx_int, body: *Fof) -> *Fof
90func nx_fof_kind_name(k: nx_int) -> *u8
called by 1: report