school-sents-text-command-verse-mapping
The groupant beside tools/school-sents/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 |
|---|---|---|---|
school-sents-text-command-verse-mapping-behavior_complement | behavior_complement | partial source derived model | behavior_complement |
school-sents-text-command-verse-mapping-reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
school-sents-text-command-verse-mapping-flag_text_invariance | flag_text_invariance | partial source derived model | flag_text_invariance |
school-sents-text-command-verse-mapping-marker_predecessor | marker_predecessor | partial source derived model | marker_predecessor |
school-sents-text-command-verse-mapping-short_fallback | short_fallback | partial source derived model | short_fallback |
school-sents-text-command-verse-mapping-parse_domain | parse_domain | partial source derived model | parse_domain |
Model text
descriptant
school-sents-text-command-verse-mapping
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.
hebrew_mark parses parenthesized u32 chapter-verse. verse_sentences removes recognized marks, normalizes whitespace, runs prose cut with fallback only if all cuts empty; search cleaned sentence start monotonically and assign last prior eligible mark.
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
hebrew_mark parses parenthesized u32 chapter-verse. verse_sentences removes recognized marks, normalizes whitespace, runs prose cut with fallback only if all cuts empty; search cleaned sentence start monotonically and assign last prior eligible mark.
Domain
Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU.
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
Marker inside a sentence cannot force a sentence split; flag false cannot change input c,v; exception chapters cannot follow marks.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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
Observed text/address accepts any removed marker sequence consistent with predecessor relation; whitespace and ignored markers ambiguous.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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.
flag_text_invariance
Both flags execute identical clean/cut/search; only follow predicate changes selected address. Finite fixture compares text projections.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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.
marker_predecessor
Offsets stored as clean.len before adding next separator; eligibility <=start+1 accounts for that separator.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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.
short_fallback
If all cut fragments rejected and clean nonempty, retain clean whole. If any fragment survives, short rejected siblings remain lost.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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.
parse_domain
(c-v) succeeds only u32 parse of both fields after exact parentheses; malformed/overflow markers remain literal text.
Domain: Valid UTF-8 text and u32 verse coordinates, markers whitespace-delimited; book strings exact EXO/DEU. Observation: Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address. 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: ["tests::scans_close_pages_and_hyphens","tests::english_filter_and_hebrew_count","tests::quoted_stops","tests::hebrew_verses","wave33::normalization_and_verse_identity"].
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
Text projection identical for hebrew false/true; numbering is latest predecessor in cleaned UTF-8 byte coordinates; exception chapters keep input address.
Cost
O(B) cleaning and mark storage; sentence cutting/searching conservative O(B^2), each sentence reverse scans up to M marks so O(SM).
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/school-sents/src/main.rs.groupant/verse-mapping.groupant/