hbo-cli
The groupant beside tools/hbo/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-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 |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
flag_pairing | flag_pairing | partial source derived model | flag_pairing |
part_membership | part_membership | partial source derived model | part_membership |
alignment_head | alignment_head | partial source derived model | alignment_head |
cli_effects | cli_effects | partial source derived model | cli_effects |
Parts
Model text
descriptant
Descriptant
2026-10-31, prospective epoch: inspected source before edits and predicted Argument slice routes commands. flags consumes '--name value' pairs with empty missing value and last duplicate overwrite. Part parses inclusive chapter bounds, invalid chapter text becomes whole-book. prepare normalizes FORM/text and chooses Type or UPOS as XPOS. score aligns matching unpointed pieces within token positions and maps dependency heads.
Measured epoch: bounded supplied fixtures passed twice in debug and release; six behavioral mutants were rejected after compilation, each restored exactly. These observations support the scoped equations without extending them to corpus accuracy, semantic understanding or persistent learning. Production code bytes are unchanged; only isolated tests appended. No benchmark or percentage surrogate was introduced.
Retained caveats: Finite supplied-input checks only; no corpus, training, external annotator, GPU, throughput or semantic-understanding claim. Allocation exhaustion and malformed arbitrary model arithmetic are not exhaustively exercised. No useful numerical surrogate is implemented; future caps may only be 1/2/5/10% with a declared metric.
approximant
Forward relation
Argument slice routes commands. flags consumes '--name value' pairs with empty missing value and last duplicate overwrite. Part parses inclusive chapter bounds, invalid chapter text becomes whole-book. prepare normalizes FORM/text and chooses Type or UPOS as XPOS. score aligns matching unpointed pieces within token positions and maps dependency heads.
Domain: Pure-helper domain representable usize tallies and u32 chapter ranges. CLI IO/training/corpus/annotator paths modeled statically only. Word positions are1-based, root0; malformed head parsed0. Token identity check uses piece count/forms, not written token form or sentence IDs.
Source snapshot SHA-256: 0c6745dd24d6be0c80fc44c855adc88cceb66e5faf0890747f4e93c1cf49d62a. This is a partial source-derived mathematical relation, not an executable surrogate. Tests exercise actual production helpers with synthetic inputs.
composition
Local composition
Argument slice routes commands. flags consumes '--name value' pairs with empty missing value and last duplicate overwrite. Part parses inclusive chapter bounds, invalid chapter text becomes whole-book. prepare normalizes FORM/text and chooses Type or UPOS as XPOS. score aligns matching unpointed pieces within token positions and maps dependency heads.
Nested scopes isolate the transitions described in their manifests and share the whole-source syntax projection. Other declarations and test helpers remain represented by the parent model. Cross-file joins: text units/norm feed seg Piece coordinates; conllu Token/Word carries segmenter and lattice representations; library cut_as realizes lattice callbacks; main routes supplied helpers and external workflows. These joins do not validate arbitrary external parser alignment.
models
Typed model catalog
Subject: hbo-cli at SHA-256 0c6745dd24d6be0c80fc44c855adc88cceb66e5faf0890747f4e93c1cf49d62a. Domain and fixed state: Pure-helper domain representable usize tallies and u32 chapter ranges. CLI IO/training/corpus/annotator paths modeled statically only. Word positions are1-based, root0; malformed head parsed0. Token identity check uses piece count/forms, not written token form or sentence IDs.. Observation: return values, stated mutations and failure order of this scope. Models are partial source-derived relations; finite tests can falsify them but do not prove general completeness. Behavior complement is a scoped exclusion claim in the admitted transition universe. Reverse reconstruction retains compatible antecedents, not a unique historical cause. Specialized entries hold this domain fixed and isolate their named observation. Oracle: named actual-code fixtures in tests.md; unexecuted effect boundaries remain static hypotheses.
behavior_complement
flags cannot distinguish a flag-looking next token from a value; malformed chapter part does not reject. score cannot align partial pieces within a mismatched token; same sentence count alone cannot validate identities.
reverse_reconstruction
Flags map admits duplicate overwritten options and arbitrary order; Part(chapters=None) admits book-only and malformed chapter strings. Tally admits many tree pairs; equal counts/F1 are not recoverable trees or semantic equivalence.
flag_pairing
At '--k', consume following element even '--other'; no next element yields ''. Duplicate k overwrites. Unflagged positions append plain args. learn_opts defaults parse failures and leaves unsupported options ignored.
part_membership
holds(b,c) iff book matches and either no parsed range or a<=c<=z. Reversed valid interval admits no chapters; invalid bounds admit all same-book chapters. place defaults missing book/chapter to empty/0.
alignment_head
Only tokens with equal number of equal-unpointed word forms map predicted position to gold. UAS counts root equality or mapped predicted head=gold head; LAS adds relation equality. Token-count mismatch increments unaligned and skips all mapping.
cli_effects
choose --study writes study before choose validation and final output; split creates output after reading/preparing all input then writes partitions sequentially; parse annotation can leave temp effects on error. These are static effect models, not executed workflows.
tests
Bounded evidence
Primary actual-code fixture: wave32::flags_parts_prepare_and_score_boundaries. Run using cargo test --offline --locked -p hbo --bin hbo wave32::flags_parts_prepare_and_score_boundaries -- --exact --test-threads=1; repeat with --release. The external wave32 Hbo receipt set contains all 14 named outcomes twice per profile, numeric exit statuses, six compiled behavioral source negatives and byte-exact restoration hashes, and two identical source syntax projections. Source-local primary tests include assertions and caught expected panics. Fragments share these source witnesses; no claim of one test per branch.
Finite supplied-input checks only; no corpus, training, external annotator, GPU, throughput or semantic-understanding claim. Allocation exhaustion and malformed arbitrary model arithmetic are not exhaustively exercised. No useful numerical surrogate is implemented; future caps may only be 1/2/5/10% with a declared metric.
invariant-and-cost
Invariant and cost
Pure-helper domain representable usize tallies and u32 chapter ranges. CLI IO/training/corpus/annotator paths modeled statically only. Word positions are1-based, root0; malformed head parsed0. Token identity check uses piece count/forms, not written token form or sentence IDs.
Cost
A args: flags O(A log A) map comparisons and copies; prepare O(B+normalization); score O(B+W log W) maps per sentence, O(W) pointers/map; filesystem commands retain full input/output text and vectors; split sorts F paths O(F log F).
Resources must permit allocations; cost variables are source bytes, units, words and table entries as explicitly stated. No measured speed or universal error claim.
This page in Markdown ā https://md.groupants.elamur.ai/free/en/mova/tools/hbo/src/main.rs.groupant/