Elamur GroupantsāŒ•
☰

formula-syntax

The groupant beside models/formula-syntax.groupant 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
approximantpartialforward
astnot materialized
compositionpartialcomposition
costsymbolic source derivedcost
descriptantpresentdescriptant
invariantpartialinvariant
testssee source local evidencechecks

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
behavior-complementbehavior_complementpartial source derived modelbehavior-complement
reverse-reconstructionreverse_reconstructionpartial source derived modelreverse-reconstruction
table-transportrepresentation_transportpartial source derived modeltable-transport
marker-disciplinesubstream_boundarypartial source derived modelmarker-discipline
canonical-adaptersroundtrip_adapterpartial source derived modelcanonical-adapters
resource-guardsresource_boundarypartial source derived modelresource-guards

Model text

descriptant

formula-syntax: wave28

Generated enum order must match canonical arrays. Stack reversal preserves expansion order. Printer relax adapters prevent unknown swallowing groups and aligned swallowing brackets; optional rbrack and trailing-row compensation preserve parser structure. Span quotient cannot validate original coordinates.

This source-bound partial group organizes existing Mova code. Native evidence and excluded effects are recorded in source sidecars and the root wave28 report. Registration is not a universal proof or whole-system runtime claim.

model

formula-syntax

forward

Ordered command rows compile to enums/lookups. Lex(source)->positioned tokens; scan(preamble)->macro map; parse_with(tokens,map)->Result<Node,Error>; print(Node)->canonical bytes; gate compares reparsed Node modulo Span. Text is a separate lossy projection.

invariant

Local macros shadow document definitions, CmdRaw preserves captured built-ins. Normalized parser trees retain unknown names and presentation structure; coordinates are outside equality.

cost

Build O(B+V²+E) expected hash work; lex O(B); parse cost depends on expanded tokens and substitution copies, not input bytes alone. LaTeX O(nodes+output); text nested temporary copies conservatively O(depth*output+nodes). No speed claim.

composition

Generated enum order must match canonical arrays. Stack reversal preserves expansion order. Printer relax adapters prevent unknown swallowing groups and aligned swallowing brackets; optional rbrack and trailing-row compensation preserve parser structure. Span quotient cannot validate original coordinates.

domain

Finite valid UTF-8, representable u32 positions, available memory/filesystem. Roundtrip restricted to normalized supported parser trees, not arbitrary public AST.

limitations

Generated include matches command table. No semantic TeX engine, precedence inference or live effects. Build compile evidence does not inject write/read failures.

checks

catalog

behavior-complement

Exclude tuples violating byte coordinates, local-first expansion, stop errors and supported fixture canonicalization; no universal arbitrary-AST contract.

reverse-reconstruction

Canonical tree preimages contain aliases, whitespace/comments, dropped styles and macro programs. Original coordinates/definitions are not uniquely recoverable.

table-transport

Ordered build rows induce discriminants/arrays and lookup Entry joins parser dispatch.

marker-discipline

End markers delimit parser substreams. Stream group_tokens/opt_tokens and macros collect_until explicitly restore End on their failure paths. Macro match_pattern literal matching consumes the next token before comparison and can consume End on mismatch; read_let can likewise consume an invalid End target. No universal scan-failure preservation law is claimed.

canonical-adapters

relax, rbrack and row compensation preserve parsing boundaries.

resource-guards

Depth and expansion thresholds are local; pre-expansion token check does not bound peak substituted vector.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/models/formula-syntax.groupant/