Elamur Groupants⌕
☰

treeagree-tree

The groupant beside tools/treeagree/src/tree.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
approximantpartialmodel.md
astpartialsyntax.json
compositionpartialComposition
costpartialinvariant-and-cost
descriptantpresentdescriptant
invariantpartialinvariant-and-cost
testsbounded 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
shape_precedenceshape_precedencepartial source derived modelshape_precedence
punctuation_geometrypunctuation_geometrypartial source derived modelpunctuation_geometry
lex_tielex_tiepartial source derived modellex_tie
length_domainlength_domainpartial source derived modellength_domain

Parts

Model text

descriptant

Descriptant

blocks groups comments/rows; final comments-only suffix drops while a blank-terminated comments block remains. read_ref enforces ten columns and sequential ids then UPOS/FEATS/DEPREL/HEAD parsing; read_wit defaults missing fields. shape checks paired range/self/root-relation first, root count next and bounded parent walks last. violations emits first registry complaint per token, POS mismatches, then one shape error or punctuation crossings. no_worse requires shape and subset by exact Bad equality. Lex chooses maximum count then smallest key.

Epoch 2026-10-31

Prospective source reading identified conditional input alignment, information loss and failure order before tests. Existing production code is retained; added tests use actual helpers. Finite results update this source-bound model, not all parser/corpus semantics.

No executable percentage surrogate has a justified observation metric for these categorical/effectful APIs. Future profiles require metric, domain and real-reference evidence at caps 1/2/5/10%; no higher cap. Syntax is partial lexical Rust projection without macro expansion or semantic resolution.

approximant

Forward approximant

blocks groups comments/rows; final comments-only suffix drops while a blank-terminated comments block remains. read_ref enforces ten columns and sequential ids then UPOS/FEATS/DEPREL/HEAD parsing; read_wit defaults missing fields. shape checks paired range/self/root-relation first, root count next and bounded parent walks last. violations emits first registry complaint per token, POS mismatches, then one shape error or punctuation crossings. no_worse requires shape and subset by exact Bad equality. Lex chooses maximum count then smallest key.

Composition

Child fragments model one narrow helper each; their correctness alone does not establish orchestration.

The containing source wires this scoped relation to its callers. Treeagree proposal→gate→commit and treebanks parse→match→collect→render are actual joins; parsecmp is an independent diagnostic path. The external group model distinguishes these tags.

catalog

Typed models for treeagree-tree

Subject: source SHA-256 6e034fd13c47961fb03e46caddbd17d7ec53d236af64ea9cb2a46bdc3834f8fd; manifest supplies exact source/byte scope. Domain: admitted states in forward model, nonoverflow arithmetic and successful allocations. Observation: one terminating invocation, except explicitly described file trace. Source-derived partial relations; named finite tests constrain selected cases only. Each entry holds arguments and environment fixed except its stated intervention.

behavior_complement

With equal-length head/rel vectors, shape rejects self/out-of-range before cycles. no_worse never accepts malformed shape even when same error is in base. Successful read_ref does not establish shape validity.

Operator: inner exclusion on admitted domain. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

reverse_reconstruction

Parsed tokens preserve raw columns but comments metadata selects first matching key. Lex summaries admit permutations and count-preserving corpora; max/tie observations do not identify full learned distribution.

Operator: compatible antecedent relation, retaining ambiguity. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

shape_precedence

Per-token Head then RootRel precede Roots then Cycle; first ordered failure is reported, not complete graph diagnosis.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

punctuation_geometry

crossed uses strict endpoint interleaving, shared endpoints and root arcs are not crossings.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

lex_tie

Maximum frequency ties choose lexicographically smallest key, independent of insertion order on fixed nonoverflow counts.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

length_domain

shape zips heads/rels without equal-length validation; violations indexes by tokens. Valid lengths are a precondition, not guaranteed rejection behavior.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

tests

Bounded evidence — 2026-10-31

Source tools/treeagree/src/tree.rs at SHA-256 6e034fd13c47961fb03e46caddbd17d7ec53d236af64ea9cb2a46bdc3834f8fd. Selected actual-source tests in treeagree:

These names passed twice in debug and twice in release; the complete treebank/comparison slice has 25 target-qualified names and identical sorted outcomes in all four runs. Ten compiled behavior mutations (one per owned source) failed named runtime assertions; exact original/restored SHA-256 equality and positive reruns were checked. Zero assertion-only mutants, zero surviving exploratory mutants, zero production fixes. Fresh raw logs, numeric exits, commands and mutation hashes are external in the wave33 trees receipt set.

Scope and gaps

Only named finite assertions cover selected inputs; other branches and invalid-domain behavior remain source-derived. No corpus, network, downloads, annotation model, live teacher, full release build or site execution. The treebanks join is entirely in memory and parsecmp uses a tiny uniquely named temporary directory. Treeagree Registry::load uses the embedded UD registry. Tests are finite CPU observations, not universal semantic proof, title-match quality estimates or corpus accuracy.

invariant-and-cost

Invariant and cost

Parsing O(bytes); shape O(n²) parent hops and O(n) temporary vectors in callers; crossings O(n²) worst. Registry cost additional; Lex learning ordered maps O(tokens*log distinct) with string copies, get scans candidate counts. u32 frequency counters assume no overflow.

With equal-length head/rel vectors, shape rejects self/out-of-range before cycles. no_worse never accepts malformed shape even when same error is in base. Successful read_ref does not establish shape validity.

The complement and specialized catalog constrain preserved coordinates and effect boundaries. Empty/malformed domains are only guaranteed where explicitly admitted. No whole-program cost bound follows from a helper bound.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/treeagree/src/tree.rs.groupant/