macula-converter
The groupant beside tools/macula/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 |
| composition | partial | composition |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| 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 |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
head_transport | head_transport | partial source derived model | head_transport |
head_precedence | head_precedence | partial source derived model | head_precedence |
validation_boundary | validation_boundary | partial source derived model | validation_boundary |
effect_partition | effect_partition | partial source derived model | effect_partition |
Parts
Model text
descriptant
Descriptant
Prospective epoch
2026-10-31 source review predicted: XML event reader builds words/groups. tree splices function groups, chooses ordered heads, attaches relations and postprocesses lemor/relative/fixed/article rules. check validates roots and walks heads. surface_order transports arcs under stable id sort. conllu expands words/punctuation/MWT and transports heads again. Main splits strict Aramaic majority then writes books/maps; lessons/compare unexecuted. Resource model: Parse O(B); tree repeated leaves/scans O(n*d+n²) or larger repeated subtree work on pathological nesting; check O(n²), sort O(n log n), conllu O(n²+output bytes). Depth/allocation bounded in fixtures, batch buffers retained. No speed claim. External prospective.md predates test additions and preserves APIs, effect order, hazards and interaction hypotheses.
Observed epoch
Bounded real helper checks in tests.md constrain these models; syntax is a partial lexical projection with no macro expansion, name resolution or proof. Production expressions unchanged; five inline test modules added. Compiled mutants are temporary and exactly restored. Existing malformed-input and nonfinite domains remain explicit, not silently repaired. Parent composes this scope with siblings without adding overlapping costs twice.
Synthetic XML/tree/helpers only; all relation combinations, malformed XML, effects and teacher workflows untested.
approximant
Forward relation
XML event reader builds words/groups. tree splices function groups, chooses ordered heads, attaches relations and postprocesses lemor/relative/fixed/article rules. check validates roots and walks heads. surface_order transports arcs under stable id sort. conllu expands words/punctuation/MWT and transports heads again. Main splits strict Aramaic majority then writes books/maps; lessons/compare unexecuted.
Domain: Node indices0-based, heads1-based/0 root. Nonempty valid tree required for conllu. Majority tie Hebrew. Actual reorder clears top. check roots first; transitive later invalid head may panic before global validation. XML errors panic; incomplete sentence omitted.
invariant
Invariant and cost
Invariant
Node indices0-based, heads1-based/0 root. Nonempty valid tree required for conllu. Majority tie Hebrew. Actual reorder clears top. check roots first; transitive later invalid head may panic before global validation. XML errors panic; incomplete sentence omitted.
Cost
Parse O(B); tree repeated leaves/scans O(n*d+n²) or larger repeated subtree work on pathological nesting; check O(n²), sort O(n log n), conllu O(n²+output bytes). Depth/allocation bounded in fixtures, batch buffers retained. No speed claim.
Limits
Synthetic XML/tree/helpers only; all relation combinations, malformed XML, effects and teacher workflows untested. No percentage surrogate is implemented: categorical parsing/effect observations lack an admitted numerical error metric. Any future profile must define its metric/domain and use only1/2/5/10 percent caps.
composition
Local composition
XML event reader builds words/groups. tree splices function groups, chooses ordered heads, attaches relations and postprocesses lemor/relative/fixed/article rules. check validates roots and walks heads. surface_order transports arcs under stable id sort. conllu expands words/punctuation/MWT and transports heads again. Main splits strict Aramaic majority then writes books/maps; lessons/compare unexecuted.
Children select narrow source functions with their exact byte intervals. Remaining branches stay in the file model; fragments are not exhaustive partitions. Calls and state joins follow the forward relation, not folder order. Shared scans/helpers are counted once in whole-file costs. Complement of composition is not union of complements; reverse composition retains compatible intermediates and caller premises.
models
Typed source-bound relations
Subject: exact source SHA-256 in manifest. Domain and resource premises are in invariant.md. Each model is partial, source-derived, over a single helper invocation or the described finite trace. Complements are proposed inner exclusions under those premises; reverse relations retain all compatible antecedents, with no unique inverse claim. The oracle is the named checks in tests.md; unexecuted cases remain hypotheses. No numerical approximation certificate.
behavior_complement
Main excludes empty/book-filtered sentences. Half Aramaic cannot choose A. check success within valid-index domain excludes cycles/multiple roots/self-head. No semantic-domain fields emitted; lessons not executed.
reverse_reconstruction
CoNLL-U admits different source groupings/order/metadata. Arcs invert only with permutation; original top cannot be recovered after reorder. Majority admits all assignments satisfying counts. Output cannot reconstruct omitted/bad sentences.
head_transport
Old->new permutation p gives h'=0 or p(h-1)+1; conllu then maps through first-row offsets. Synthetic reorder checks exact arcs/idempotence.
head_precedence
ClCl2 last content, NumpNP noun side, noun-like prep, copula predicate precede clause v/p/cl/content fallback. Rules are ordered, not votes.
validation_boundary
Roots counted first, each direct head validated then ancestors walked; later bad parent may panic. Existing direct bad-head/cycle checks not total validation proof.
effect_partition
Sorted file reads, check before accumulation, book/map writes later and nontransactional. Compare/lessons source-reviewed only; no teacher/corpus effects.
tests
Checks and evidence
Named source/helper checks: tests::genesis_1_1, tests::surface_order_and_aramaic, tests::number_before_noun, tests::clause_before_the_head_clause, tests::copula, tests::saying, tests::lists, tests::valid_conllu, tests::aramaic, tests::check_shows_red, tests::verses, wave31::majority_tie_and_empty_parser.
Wave31 on2026-10-31:30 distinct exact tests passed twice debug and twice release, with equal sorted named outcomes. This node claims only its listed subset; empty subset means source review only. Six actual source-behavior mutants compiled, failed assertions, restored exact bytes/hash, and passed focused green reruns. No assertion-only mutants; existing swapped-input controls are separate. Receipt bundle: $MOVA_DATA/runs/octopus-wave31-corpus-2026-10-31 (native-commands.json, source-test-map.json, mutation-results.json, .status/.log). No live corpus, teacher, frozen assessment, download or production data used.
Synthetic XML/tree/helpers only; all relation combinations, malformed XML, effects and teacher workflows untested.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/macula/src/main.rs.groupant/