nx_coq_ingest.nx
buildroot/runtime/nx_coq_ingest.nx
about
nx_coq_ingest.nx -- Coq stdlib + MathComp statement-level ingester (C0).
Coq's surface syntax for declarations:
Theorem NAME : TYPE. Proof. ... Qed.
Lemma NAME : TYPE. Proof. ... Qed.
Definition NAME : TYPE := VALUE.
Axiom NAME : TYPE.
Fixpoint NAME ... := ...
Inductive NAME : TYPE := ...
(* comment *)
We do NOT implement Coq's CIC kernel. Statement-level ingest only.
genealogy_id: coquand_huet_1988 + coq_team
lineage_id: formal_statement_parsing + dependent_type_theory
dependencies 4 imports · 6 importers
imports: nx_syscalls.nxnx_axioms.nxnx_lex.nxnx_ascii.nx
imported by: nx_coq_dir_ingest.nxnx_coq_ingest_test.nxnx_coq_stream_ingest.nxnx_coq_stream_ingest_test.nxnx_corpus_drive.nxnx_five_systems_test.nx
structs
| 40 | struct CoqDecl |
| 47 | struct CoqDb |
consts
| 28 | const NX_COQ_TOK_NONE: i64 = 0 |
| 29 | const NX_COQ_TOK_THEOREM: i64 = 1 |
| 30 | const NX_COQ_TOK_LEMMA: i64 = 2 |
| 31 | const NX_COQ_TOK_DEFINITION: i64 = 3 |
| 32 | const NX_COQ_TOK_AXIOM: i64 = 4 |
| 33 | const NX_COQ_TOK_FIXPOINT: i64 = 5 |
| 34 | const NX_COQ_TOK_INDUCTIVE: i64 = 6 |
| 35 | const NX_COQ_TOK_IDENT: i64 = 7 |
| 37 | const NX_COQ_MAX_NAME_LEN: i64 = 256 |
| 38 | const NX_COQ_MAX_DECLS: i64 = 65536 |
| 45 | const NX_COQ_DECL_BYTES: i64 = 16 |
functions
| 53 | func nx_coq_db_alloc() -> *CoqDb |
| 62 | func nx_coq_decl_at(db: *CoqDb, i: i64) -> *CoqDecl |
| 73 | func nx_coq_skip_ws(buf: *u8, pos: *i64, len: i64) -> i64 |
| 112 | func nx_coq_next_token(buf: *u8, pos: *i64, len: i64, out_label: *u8) -> i64 called by 1: nx_coq_ingest_corpus calls 3: nx_coq_skip_wsnx_ascii_is_id_startnx_lex_is_id_cont_qualified |
| 160 | func nx_coq_record_decl(db: *CoqDb, kind: i64, label: *u8) -> i64 |
| 176 | func nx_coq_ingest_corpus(buf: *u8, len: i64) -> *CoqDb called by 5: mainmainmaindrive_coqmain calls 4: nx_coq_db_allocsys_mmapnx_coq_next_tokennx_coq_record_decl |
| 217 | func nx_coq_count_kind(db: *CoqDb, kind: i64) -> i64 |