Elamur Groupants⌕
☰

kg-main

The groupant beside kg/src/main.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

Facts

Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

Components

componentlabelwhere
approximantpartialapproximant
astpartialsyntax.json
compositionpartialcomposition
costpartialcost
descriptantpresentdescriptant
invariantpartialinvariant
testsexecuted bounded checkstests

Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
reader_policyreader_policypartial source derived modelreader_policy
fact_edge_joinfact_edge_joinpartial source derived modelfact_edge_join
effect_precedenceeffect_precedencepartial source derived modeleffect_precedence
evaluation_boundaryevaluation_boundarypartial source derived modelevaluation_boundary

Parts

Model text

descriptant

kg-main

CLI dispatch, compressed sentence reader, ingestion orchestration, graph displays/subgraphs, arbitrary TSV parsing.

Modeling epoch — 2026-10-31

Source read before tests and models; retained prospective notes accompany the parent. Current evidence uses bounded invented inputs only. This is partial modeling, not proof or corpus accuracy.

approximant

Forward relation

Exact argument-shape dispatch. Strict read_tatoeba requires numeric id+3 fields but ignores language. Ingestion computes vocab/Morph/names, parses/checks Facts, allocates Registry IDs/Edges, sorts/writes, then sid%10 train/evaluate generation. parse_lines skips malformed rows, loads names/Morph before output creation; sub parses mask before reading/filtering/writing.

Executable approximant gap

Exact categorical structure, identifiers, parser decisions and effects have no useful percentage metric established here. No executable surrogate, automatic substitution or 1/2/5/10% guarantee is claimed.

invariant

Invariant and domain

Edges retain lemma/relation IDs and predicate/member grammar/flags but lose member word index. CHECKED only means render completeness. sub writes columns without registry. Actual ingestion/held-out path unexecuted.

Cost and resources

All sentences/vocab/morph/kept Facts/edges retained; sum parser costs+E log E sort+compression+bounded DP. parse_lines retains rows; stats O(E)+R log R relation sorting. No cap.

cost

Cost and resources

All sentences/vocab/morph/kept Facts/edges retained; sum parser costs+E log E sort+compression+bounded DP. parse_lines retains rows; stats O(E)+R log R relation sorting. No cap.

composition

Composition

CLI dispatch, compressed sentence reader, ingestion orchestration, graph displays/subgraphs, arbitrary TSV parsing.

Exact argument-shape dispatch. Strict read_tatoeba requires numeric id+3 fields but ignores language. Ingestion computes vocab/Morph/names, parses/checks Facts, allocates Registry IDs/Edges, sorts/writes, then sid%10 train/evaluate generation. parse_lines skips malformed rows, loads names/Morph before output creation; sub parses mask before reading/filtering/writing.

The parent invokes scoped transformations through the actual functions named in their source ranges. Children partition useful observations, not a complete semantic proof; boundaries can omit helpers, tests and effects.

models

behavior_complement

Bad sub mask excludes store reads/output writes. parse_lines no-tab rows disappear and ok does not require render_check. Effects are nontransactional: names.tsv created before Registry::open requires existing store; partial writes possible.

reverse_reconstruction

Registry+edges recover lemma/relation/grammar but not word coordinates/member order without absent reconstruction adapter. sid keys constrain provenance. parse output loses malformed rows/read-error tail/alternatives. No kg-global index adapter.

reader_policy

read_tatoeba malformed rows error; parse_lines map_while(Result::ok) silently terminates at read error and filter_map drops no-tab rows.

fact_edge_join

One fid→sid provenance edge gs=f.gram,gd0; per-member fid→lemma with relation.local,gs=f.gram,gd=member.gram. Unchecked facts still stored.

effect_precedence

sub validates mask first; parse_lines reads input,names,Morph before truncating output. show/stats Registry::open may create keys/.

evaluation_boundary

sid%10 split fits order/frequencies on other ids; names inferred on all input. No held-out run here. stats equal-count tie order depends on HashMap.

tests

Evidence

Parent source checks (a fragment inherits only the behavior they actually exercise):

Selected kg tests: 15 named outcomes, twice debug/twice release, equal sorted outcomes. Standalone actual global/build.rs: 3 named outcomes per run, twice debug/twice optimized; build_child is normally no-op, parent fixture invokes it against isolated synthetic seeds. Eight compiled source mutations (one per source) each compiled successfully and exited101 on the focused assertion; exact source restoration followed by positive rerun.

This fragment's untested branches remain source-derived. No live graph, DB, corpus, teacher, GPU or held-out evaluation was used. Command specs and numeric exits are retained in the external wave29 graphlang receipt. Strict kg Clippy reports existing source lints; see receipt.

prospective

Prospective graph-language encoding model — 2026-10-31

Read all eight sources before edits. No optimization proposed. All executable fixtures are tiny invented strings, compressed temp files, or isolated subprocess directories; no repository corpus, live store, teacher, GPU or held-out execution.

Composition hypothesis: Morph::load uses Gram then uk::parse produces Fact; render_check gives only multiset completeness; main encodes each member into registry-backed parallel columns with grammar and flags; textgen consumes Fact/Morph not encoded Edges directly. No read-edges-to-Fact reconstruction adapter exists here. global's lexical concept indices have no established Registry Id translation. Complement and preimage relations must preserve these separate tags. No meaningful percentage surrogate for categorical parse, identifiers, codec or effects is established; record executable approximant as unsupported.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/kg/src/main.rs.groupant/