treebanks-refs-identifier-grammar
The groupant beside tools/treebanks/src/refs.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
| component | label | where |
|---|---|---|
| approximant | partial | model.md |
| ast | partial | ../syntax.json |
| composition | partial | Composition |
| cost | partial | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | bounded checks | tests |
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.
| id | type | label | where |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
old_width | old_width | partial source derived model | old_width |
venue_boundary | venue_boundary | partial source derived model | venue_boundary |
year_syntax | year_syntax | partial source derived model | year_syntax |
record_separation | record_separation | partial source derived model | record_separation |
Model text
descriptant
Descriptant
Accept old exactly eight bytes uppercase letter/two digits/hyphen/four digits, or new three dot fields with four-digit year, lowercase alphanumeric interior-hyphen venue, and nonempty numeric suffix.
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
Accept old exactly eight bytes uppercase letter/two digits/hyphen/four digits, or new three dot fields with four-digit year, lowercase alphanumeric interior-hyphen venue, and nonempty numeric suffix.
Composition
This fragment is the exact byte-scoped helper identified in the manifest; its relation is restricted to the operations above.
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 treebanks-refs-identifier-grammar
Subject: source SHA-256 478c68b66f1dd86a691861bb26d634ffce9dd47aef7572e437a7fa1cc6e95db5; 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
Lowercase old prefix and new middle field without hyphen are rejected; valid syntax does not imply record existence.
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
Boolean true has infinitely many syntactic new suffix strings; the predicate retains no canonical identifier or known-record membership.
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.
old_width
W17-0401 accepted while W17-040 and w17-0401 fail exact byte shape.
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.
venue_boundary
Leading/trailing venue hyphens reject but internal repeated hyphens are allowed by grammar.
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.
year_syntax
New year is four ASCII digits without chronological range check, so 0000 is syntactically possible.
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.
record_separation
Matcher distinguishes accepted unknown ids from indexed hits; grammar acceptance alone supplies no paper.
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
Scoped evidence
Parent native slice and exact names are in ../tests.md.
Only named finite assertions cover selected inputs; other branches and invalid-domain behavior remain source-derived.
This fragment has no independent full-coverage claim. Its byte range and source hash bind the source-derived relation; parent test success is evidence only where that helper is actually reached.
invariant-and-cost
Invariant and cost
O(id bytes), split vector allocation for new form; no network lookup.
Lowercase old prefix and new middle field without hyphen are rejected; valid syntax does not imply record existence.
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/treebanks/src/refs.rs.groupant/identifier-grammar.groupant/