code wiki / (root) / nx_corpus_drive.nx

nx_corpus_drive.nx

buildroot/runtime/nx_corpus_drive.nx

4360 B143 linesdepth 6pulls 16 transitivereach 0 importersview sourcekind tooltopic corpus
docsdependenciesstructsconstsfunctions

about

nx_corpus_drive.nx -- unified theorem-corpus ingestion driver. Reads a source file (any of MetaMath / Lean / Mizar / Coq / HOL / Isabelle), dispatches to the appropriate adapter, emits one JSONL record per identified declaration to stdout. Usage: nx_corpus_drive <file_path> <source_type> where <source_type> is one of: metamath lean mizar coq hol isabelle Output format per line: {"source":"<type>","file":"<basename>","kind":N,"number":N} This is the auto-ingestion entry point. Bash driver nx_corpus_drive.sh walks a corpus directory and invokes this for every recognized file, accumulating the unified corpus JSONL.

dependencies 8 imports · 0 importers

syscalls.nx runtime.nx nx_theorem_ingest.nx nx_lean_ingest.nx nx_mizar_ingest.nx nx_coq_ingest.nx nx_hol_ingest.nx nx_isabelle_ingest.nx nx_corpus_drive.nx

imports: syscalls.nxruntime.nxnx_theorem_ingest.nxnx_lean_ingest.nxnx_mizar_ingest.nxnx_coq_ingest.nxnx_hol_ingest.nxnx_isabelle_ingest.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main println strlen sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close streq strlen ↻ strneq drive_metamath nx_ingest_corpus nx_ingest_db_alloc nx_mm_next_token nx_mm_skip_ws nx_lex_is_ws nx_loop_begin sys_mmap ↻ nx_loop_step nx_clock_monotonic_ns nx_loop_break nx_lex_is_ws ↻ nx_ingest_th_at nx_loop_begin ↻ nx_loop_step ↻ nx_loop_break ↻ nx_deriv_chain_alloc nx_ingest_axiom_lookup nx_deriv_add_axiom nx_axiom_is_valid nx_deriv_node_at nx_deriv_add_step nx_drule_arity nx_deriv_node_at ↻ nx_deriv_mark_theorem nx_deriv_node_at ↻ nx_deriv_verify nx_deriv_node_at ↻

structs

none

consts

none

functions

37func emit_record(source: *u8, kind: i64, number: i64) -> i64
50func drive_metamath(buf: *u8, len: i64) -> i64
called by 1: main calls 2: nx_ingest_corpusemit_record
61func drive_lean(buf: *u8, len: i64) -> i64
72func drive_mizar(buf: *u8, len: i64) -> i64
83func drive_coq(buf: *u8, len: i64) -> i64
94func drive_hol(buf: *u8, len: i64) -> i64
105func drive_isabelle(buf: *u8, len: i64) -> i64
118func main(argc: i64, argv: *i64) -> i64