macula-tanakh
The groupant beside tools/macula/src/tanakh.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 |
licence_order | licence_order | partial source derived model | licence_order |
sparse_coordinates | sparse_coordinates | partial source derived model | sparse_coordinates |
book_transport | book_transport | partial source derived model | book_transport |
union_multiplicity | union_multiplicity | partial source derived model | union_multiplicity |
Parts
Model text
descriptant
Descriptant
Prospective epoch
2026-10-31 source review predicted: edition parses JSON, exact Public Domain admission, then chapter/verse strings through html_text/NFC retaining sparse coordinates. targums writes declared layers/provenance. by_verse appends ids per whitespace verse; index unions three maps/tagged Targum refs, sorts Tanakh order, skips unknown books, writes per-book TSV. Resource model: Edition O(B); R records,V verses,F files: maps O(R log V), files O(F log F), union O(V log V), memory O(R+output). No real filesystem benchmark. 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.
Edition/order helpers tested; filesystem outputs unexecuted.
approximant
Forward relation
edition parses JSON, exact Public Domain admission, then chapter/verse strings through html_text/NFC retaining sparse coordinates. targums writes declared layers/provenance. by_verse appends ids per whitespace verse; index unions three maps/tagged Targum refs, sorts Tanakh order, skips unknown books, writes per-book TSV.
Domain: Licence precedes text shape validation; empty/nonstrings omit without renumbering. Missing sources empty, duplicate ids retained. Book order differs from library. Writes partial/nontransactional.
invariant
Invariant and cost
Invariant
Licence precedes text shape validation; empty/nonstrings omit without renumbering. Missing sources empty, duplicate ids retained. Book order differs from library. Writes partial/nontransactional.
Cost
Edition O(B); R records,V verses,F files: maps O(R log V), files O(F log F), union O(V log V), memory O(R+output). No real filesystem benchmark.
Limits
Edition/order helpers tested; filesystem outputs unexecuted. 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
edition parses JSON, exact Public Domain admission, then chapter/verse strings through html_text/NFC retaining sparse coordinates. targums writes declared layers/provenance. by_verse appends ids per whitespace verse; index unions three maps/tagged Targum refs, sorts Tanakh order, skips unknown books, writes per-book TSV.
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
Non-PD cannot yield copied verses. Unknown book not written by index. Missing translation cannot remove verse present elsewhere: union, not intersection.
reverse_reconstruction
Output allows removed markup/empty positions compatible with retained ids and ignored metadata. Index row allows inputs yielding same ordered id lists; missing versus empty files indistinguishable.
licence_order
Bad JSON parse first; valid JSON wrong/missing license fails before text shape. Exact case-sensitive Public Domain admission.
sparse_coordinates
Emit BOOK.(i+1).(j+1) for nonempty cleaned strings; no compacting, nonarray chapter empty.
book_transport
Tanakh key Torah/Prophets/Writings vs MACULA ordinal. Code-based remap required; unknown key39.
union_multiplicity
by_verse preserves occurrence duplicates; Targum refs tagged. All-three counts field presence, not semantic alignment.
tests
Checks and evidence
Named source/helper checks: tanakh::tests::public_domain_only, tanakh::tests::tanakh_order.
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.
Edition/order helpers tested; filesystem outputs unexecuted.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/macula/src/tanakh.rs.groupant/