wikt-idioms-text-command-plain-gloss
The groupant beside tools/wikt-idioms/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
| component | label | where |
|---|---|---|
| approximant | partial | approximant |
| ast | partial | ../syntax.json |
| cost | symbolic source derived | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | executed 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 |
|---|---|---|---|
wikt-idioms-text-command-plain-gloss-behavior_complement | behavior_complement | partial source derived model | behavior_complement |
wikt-idioms-text-command-plain-gloss-reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
wikt-idioms-text-command-plain-gloss-template_projection | template_projection | partial source derived model | template_projection |
wikt-idioms-text-command-plain-gloss-link_projection | link_projection | partial source derived model | link_projection |
wikt-idioms-text-command-plain-gloss-nested_depth | nested_depth | partial source derived model | nested_depth |
wikt-idioms-text-command-plain-gloss-whitespace_normalization | whitespace_normalization | partial source derived model | whitespace_normalization |
Model text
descriptant
wikt-idioms-text-command-plain-gloss
Epoch 2026-10-31
Full source read preceded changes. Prospective model predicted branch/order, resource and information-loss behavior. Tests exercise actual helpers on bounded synthetic inputs; command workflows remain unexecuted. Production source prefix is preserved; only inline tests added.
Scan Unicode char vector. Nested templates consumed by depth; keep l/m/link third param, w last, gloss/gl second parenthesized; otherwise drop. Links emit last pipe field; apostrophes dropped; collapse whitespace.
Executable percentage approximation is unsupported: categorical parsing/effects have no useful certified metric here. Partial syntax excludes macro expansion and name resolution.
approximant
Forward relation
Scan Unicode char vector. Nested templates consumed by depth; keep l/m/link third param, w last, gloss/gl second parenthesized; otherwise drop. Links emit last pipe field; apostrophes dropped; collapse whitespace.
Domain
Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted.
models
Typed source models
All models are partial source-derived relations at this manifest snapshot. Scope is one call/trace under the stated domain; no universal semantic proof.
behavior_complement
Unknown template payload cannot appear solely by template retention; apostrophes never emitted literally by ordinary-char branch.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
reverse_reconstruction
Plain gloss admits equivalent wiki links, dropped templates and arbitrary whitespace; unique reconstruction impossible even on valid markup.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
template_projection
l/m/link need>=3 fields and select index2; w selects last with>=2; gloss/gl parenthesizes index1.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
link_projection
First closing ]] ends link; rsplit pipe selects display text; non-ASCII byte search converted back to char count for index advance.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
nested_depth
Opening {{ increments and }} decrements; only depth0 ends template. Parameter split remains naive even for nested templates.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
whitespace_normalization
split_whitespace then join space removes leading/trailing and collapses internal Unicode whitespace; output empty allowed.
Domain: Arbitrary UTF-8; heuristic nesting and unfinished constructs admitted. Observation: UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
tests
Evidence
Selected exact tests: ["wave33::gloss_labels_and_emit_precedence"].
Each runs twice in debug and twice in release with normalized named outcomes compared. Compiled production-boundary mutants are recorded in the external wave33 text receipts with original/restored hashes and positive reruns. Existing negative assertions are separate from compiled mutants. No CLI, download, teacher, corpus or model execution. For this fragment, source-derived paths not reached by these tests remain unverified.
invariant-and-cost
Invariant and cost
Invariant
UTF-8 safe char indexing; nested template text not recursively expanded. Unknown templates erased. Unclosed template takes current truncated inner slice and consumes to EOF.
Cost
O(B^2) worst-case due remaining-link suffix copies on many openings; char/output memory O(B).
Arithmetic and allocation premises are conditional. No timing or percentage surrogate claimed.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/wikt-idioms/src/main.rs.groupant/plain-gloss.groupant/