Elamur GroupantsโŒ•
โ˜ฐ

world-quant-expressions

The groupant beside world/src/quant.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

componentlabelwhere
approximantpartial source modelforward
astpartial../syntax.json
compositionpartial source modelcomposition
costpartial source modelcost
descriptantpartial source modelepoch-memory
invariantpartial source modelinvariant
testspartial source modelchecks

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.

idtypelabelwhere
world-quant-expressions-behavior-complementbehavior_complementpartial source modelbehavior-complement
world-quant-expressions-reverse-reconstructionreverse_reconstructionpartial source modelreverse-reconstruction
world-quant-expressions-rational-oracleconstraint_relationpartial source modelrational-oracle
world-quant-expressions-reference-normalizationinformation_losspartial source modelreference-normalization

Model text

Tokenizer, precedence parser, evaluator and literal collection.

forward

Sentence-prefix validation applies only to numeric literals. References read the current command-order state and carry no sentence provenance. Thus @2 set a.x=19 followed by @1 set b.x=a.x and @1 ask b.x remains green when 19 occurs only in sentence 2. This is a documented current limitation, not complete temporal provenance or a proposed behavior change.

Tokenize operators/whitespace; parse term before expression; atoms are parentheses, rationals or lowercase dotted references. eval recursively applies exact rational arithmetic; nums_of traverses literals left-to-right.

invariant

Accepted parse consumes all tokens. Undefined references and zero divisors fail. Direct Ex::Bin with an unknown operator falls into division; the model restricts to parser-produced operators.

cost

O(L) tokenization and O(E) node construction, recursive rational costs dependent on bit length; depth may reach O(E).

composition

Parsing feeds ordered execution; literal collection precedes evaluation against state, and check merges parse errors, execution diagnostics and gold inequality. Text extraction is an external exact dependency. Numeric-origin errors do not suppress effects, unlike evaluation and anchor errors; a parent must preserve this distinction. Dataset/teacher adapters do not establish script semantics.

epoch-memory

2026-10-30: regressions first demonstrated backward-anchor number leakage and destination credit from missing transfer sources. Prefix endpoints now restrict each command to its own sentence prefix while preserving incremental extraction; missing-source transfer skips effects. Diagnostic-only literal errors remain unchanged. No corpus or teacher calls.

checks

See ../tests.md and native quant::wave8_models tests. Models are source-derived partial relations, with finite evidence rather than general proof. Syntax projection excludes macro expansion, name resolution and inferred types. No executable approximant: exact gates and categorical choices have no justified percentage metric here.

behavior-complement

Universe: source strings and proposed parsed/evaluated results under fixed state. Trailing tokens, missing parentheses and unary minus exclude successful parsing; these form an inner absent set, not a full resource-safety model.

reverse-reconstruction

For state s and rational r retain all accepted expressions evaluating to r. Equivalent parenthesizations and arithmetic identities produce multiple preimages; AST still loses whitespace.

rational-oracle

For a,c in 0..8 and b in 1..8, ((a+c)/b)-ca=(a+c-ca*b)/b exactly. Tests compare 648 evaluations plus six malformed strings and zero division.

reference-normalization

Case variants map to the same lowercase Ref, whereas Num retains original numeric spelling. Reverse formatting therefore has different fibers for reference and numeric atoms.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/world/src/quant.rs.groupant/expressions.groupant/