Elamur GroupantsโŒ•
โ˜ฐ

kg-gram

The groupant beside kg/src/gram.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
tag_ordertag_orderpartial source derived modeltag_order
zero_unknownzero_unknownpartial source derived modelzero_unknown
subject_projectionsubject_projectionpartial source derived modelsubject_projection
representation_domainrepresentation_domainpartial source derived modelrepresentation_domain

Model text

descriptant

kg-gram

Packed u32 VESUM grammar projection, implicit-subject constructor and dotted display.

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

First colon token sets POS(unknown13,empty0); recognized subsequent tags overwrite fields, unknown tags ignored; gender implies SG only when number0. implicit_subject copies number/gender/person into fresh noun+NAZ+PRON+IMPLICIT.

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

Masked setters preserve disjoint fields. Parser-generated values fit display tables; arbitrary public Gram(u32) need not. flag/with require bit<32. Implicit projection clears verb tense/aspect/negation.

Cost and resources

O(tag bytes), bounded field lookup; O(1) packed state and bounded display names allocation.

cost

Cost and resources

O(tag bytes), bounded field lookup; O(1) packed state and bounded display names allocation.

composition

Composition

Packed u32 VESUM grammar projection, implicit-subject constructor and dotted display.

First colon token sets POS(unknown13,empty0); recognized subsequent tags overwrite fields, unknown tags ignored; gender implies SG only when number0. implicit_subject copies number/gender/person into fresh noun+NAZ+PRON+IMPLICIT.

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

Ignored tags cannot introduce features. Dot display is not VESUM input; NEG/IMPLICIT display names are not parsed back. Arbitrary u32 display can panic.

reverse_reconstruction

Packed grammar admits ignored/overwritten tag sequences. implicit_subject permits any antecedent tense/aspect/flags/animacy matching copied coordinates. Display provides no unique source-tag reconstruction.

tag_order

noun:p:f stays plural, noun:p:s becomes singular; repeated case last recognized wins.

zero_unknown

Empty input yields POS0; alien yields other13. Unknown trailing tags leave state unchanged.

subject_projection

Fresh noun/nominative plus copied number/gender/person and two flags; selected-coordinate projection is idempotent.

representation_domain

POS5bits admits31 but display ends13; NUM3,TENSE7,ASPECT3 also exceed display tables. Bitwidth validity is weaker than enum validity.

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/gram.rs.groupant/