mlab-table-columns
The groupant beside mlab/src/table.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 |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | partial bounded parent evidence | 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 |
column_transport | column_transport | partial source derived model | column_transport |
name_precedence | name_precedence | partial source derived model | name_precedence |
branch_relation | branch_relation | partial source derived model | branch_relation |
resource_cost | resource_cost | partial source derived model | resource_cost |
Model text
descriptant
mlab-table-columns
to_column rejects complex before char-row conversion or vector-shape check. make zips names/values, then name validity, duplicate, conversion, equal height. set_var broadcasts singleton to height and retains Date kind on numeric replacement.
Epoch 2026-10-31: isolated source-bound fragment over bytes [4747,11897); includes no claim beyond this relation. Source hash 7af3a65aabe33226d39f741909fd08d74c3b3e43390417c64e617a10704ac26b.
approximant
columns: forward relation
to_column rejects complex before char-row conversion or vector-shape check. make zips names/values, then name validity, duplicate, conversion, equal height. set_var broadcasts singleton to height and retains Date kind on numeric replacement.
Domain: Well-shaped public Table/Mat/StrArr, in-range zero-based internal indices, bounded i64 civil arithmetic. Malformed direct structs may panic.
Executable surrogate gap: no measured cheaper implementation with a useful scoped metric is supplied. Categorical/error/effect relations are exact obligations, not percent losses. Future numeric caps only1/2/5/10%.
invariant
columns: invariant and cost
make has no scalar broadcast; set_var does. zero columns means height0. Direct take_rows/select_vars require valid indices.
Unicode alphabetic/underscore name starts accepted; make_valid_name prefixes x for leading underscore unlike valid_name.
Scope-specific cost: O(nw) copied column values. make performs O(w²) duplicate-name comparisons; dedupe can retry O(i) colliding suffixes at position i with O(i) comparisons per retry, totaling O(w³) string comparisons plus generated/text bytes. set_var singleton broadcast O(height).
models
behavior_complement
Failed set_var conversion/height excludes mutation; make does not enforce equal names/values lengths beyond zip. Logical var_list does not bounds-check true positions.
reverse_reconstruction
Table columns admit row/column vector antecedents normalized to column shape; char rows and strings can agree. Scalar broadcast erases original orientation.
column_transport
make has no scalar broadcast; set_var does. zero columns means height0. Direct take_rows/select_vars require valid indices.
name_precedence
Unicode alphabetic/underscore name starts accepted; make_valid_name prefixes x for leading underscore unlike valid_name.
branch_relation
to_column rejects complex before char-row conversion or vector-shape check. make zips names/values, then name validity, duplicate, conversion, equal height. set_var broadcasts singleton to height and retains Date kind on numeric replacement.
resource_cost
O(nw) copied column values. make performs O(w²) duplicate-name comparisons; dedupe can retry O(i) colliding suffixes at position i with O(i) comparisons per retry, totaling O(w³) string comparisons plus generated/text bytes. set_var singleton broadcast O(height).
tests
Evidence boundary
See ../tests.md for the actual selected source test and mutant. These tests sample the file, not every fragment branch. Failed set_var conversion/height excludes mutation; make does not enforce equal names/values lengths beyond zip. Logical var_list does not bounds-check true positions. Other branches here are source-derived and unexecuted unless the parent test explicitly calls them.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/mlab/src/table.rs.groupant/columns.groupant/