Elamur GroupantsโŒ•
โ˜ฐ

wikt-count-text-command-english-sections

The groupant beside tools/wikt-count/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
astpartial../syntax.json
costsymbolic source derivedinvariant-and-cost
descriptantpresentdescriptant
invariantpartialinvariant-and-cost
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
wikt-count-text-command-english-sections-behavior_complementbehavior_complementpartial source derived modelbehavior_complement
wikt-count-text-command-english-sections-reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
wikt-count-text-command-english-sections-header_ownershipheader_ownershippartial source derived modelheader_ownership
wikt-count-text-command-english-sections-template_presencetemplate_presencepartial source derived modeltemplate_presence
wikt-count-text-command-english-sections-no_language_sampleno_language_samplepartial source derived modelno_language_sample
wikt-count-text-command-english-sections-formonly_partitionformonly_partitionpartial source derived modelformonly_partition

Model text

descriptant

wikt-count-text-command-english-sections

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.

page increments pages; /translations counts translation templates separately and returns. Otherwise L2 starts a section, flush previous body and counters; final flush; no-L2 increments bounded sample. flush gathers focus-language template occurrences and section presence.

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

page increments pages; /translations counts translation templates separately and returns. Otherwise L2 starts a section, flush previous body and counters; final flush; no-L2 increments bounded sample. flush gathers focus-language template occurrences and section presence.

Domain

UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation.

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

/translations cannot also increment langs in same call; language other than English/Ukrainian cannot contribute focus tpl map.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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

Counts identify compatible number of sections and sightings, not text or order. Identical tpl occurrence totals can have different per-section presence.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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.

header_ownership

L2 line starts included byte body but is not passed to en_line; following lines until next L2 belong to current section.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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_presence

For each local name n>0, tpl.occ+=n and tpl.sections+=1, so presence<=occurrences.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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.

no_language_sample

No L2 increments pages_nolang; sample retains first30 such titles in input order; later titles unrecoverable.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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.

formonly_partition

defs==0 increments nodefs; else defs_formof==defs increments formonly. The two classifications are disjoint.

Domain: UTF-8 wikitext heading heuristic; non-overflowing counters; no macro expansion or semantic template evaluation. Observation: Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section. 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::entities_sections_and_translation_partition"].

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

Each ordinary L2 causes exactly one flush, sections preserve repeated language counts. tpl occurrence count counts all sightings; section count increments once per template per section.

Cost

O(B+T) scanning plus hash map expected operations; focus template local map memory O(distinct templates); report sorting O(L log L+T log T).

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-count/src/main.rs.groupant/english-sections.groupant/