prag-invariants-unsaid-anchors
The groupant beside prag/src/invariants.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 source model | forward |
| ast | partial | ../syntax.json |
| composition | partial source model | composition |
| cost | partial source model | cost |
| descriptant | partial source model | epoch-memory |
| invariant | partial source model | invariant |
| tests | partial source model | checks |
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 |
|---|---|---|---|
prag-invariants-unsaid-anchors-behavior-complement | behavior_complement | partial source model | behavior-complement |
prag-invariants-unsaid-anchors-reverse-reconstruction | reverse_reconstruction | partial source model | reverse-reconstruction |
prag-invariants-unsaid-anchors-intervention | counterfactual_relation | partial source model | intervention |
Model text
forward
With a frame-aligned predicate anchor, inspect direct children unused by any anchored role. For each unsaid slot in order, Agent matches passive OblAgent or nonpassive-subject Nsubj; Patient matches NsubjPass or non-time Obj; Recipient matches Iobj. First matching child emits a hit. Other slots abstain. Missing anchors/predicates suppress only this check.
invariant
Predicate/role token indices are zero-based, hits are one-based frame rows. Token use excludes the dependent regardless of which role consumed it. Frame order and anchor order must agree. Valid Tree cached children and anchor indices are premises; malformed public state can panic and is not silently repaired.
cost
For F frames, U unsaid slots, D direct children and R anchored roles per frame: O(sum UDR) worst-case linear membership checks plus text cost; O(R) temporary used-index storage per frame. No optimization or measured gain is asserted.
composition
Public APIs sentence, Spread::add/counts/hits consume the same ordered frames. Native fixtures construct Tree/Frame/Anchor directly. The papers frames-check caller invokes frames_of_tree and sentence before ctx.new_line, then Spread::add on retained frames; caller corpus/teacher/persistence paths are inspected only.
epoch-memory
2026-10-30 initial source-bound epoch. No production repair was warranted on the scoped valid-input domain. Independent finite frequency and dependency oracles support the existing smaller-class tie, occurrence counts and anchor exclusions. Malformed cached tree/anchor state, heuristic false positives beyond fixtures and lexical dependencies remain open. Costs are prospective source models; no optimization, timing gain or percentage-error guarantee is claimed.
checks
cargo test -p prag --lib invariants:: -- --test-threads=1; the wave12_models submodule contains new finite checks. File evidence.md binds old witnesses, repeated profiles and compiled production mutations. Syntax projections are partial and macro bodies opaque.
behavior-complement
Domain: finite inputs satisfying this fragment's forward premises and the parent API tag/state constraints; output is its scoped observation. Let J_fragment(x,y) impose the concrete relations: With a frame-aligned predicate anchor, inspect direct children unused by any anchored role. For each unsaid slot in order, Agent matches passive OblAgent or nonpassive-subject Nsubj; Patient matches NsubjPass or non-time Obj; Recipient matches Iobj. First matching child emits a hit. Other slots abstain. Missing anchors/predicates suppress only this check. Also require: Predicate/role token indices are zero-based, hits are one-based frame rows. Token use excludes the dependent regardless of which role consumed it. Frame order and anchor order must agree. Valid Tree cached children and anchor indices are premises; malformed public state can panic and is not silently repaired. The inner absent-behavior model is {(x,y): not J_fragment(x,y)}. This excludes wrong indices, selections or outputs, rather than treating a scope disclaimer as a behavioral predicate. Finite checks support selected cases; unknown external semantics remain outside this claim.
reverse-reconstruction
No hit admits absent anchors, absent dependent, used dependent, nonmatching slot or time-object exclusion. These antecedents remain distinct; no-hit cannot identify inheritance correctness. A hit retains slot/row/dependent relation but not all anchor roles or prior discourse.
Formally retain every parent-tagged input and compatible intermediate state satisfying the forward relation with the observed fragment output. Do not merge antecedents merely because their projected result agrees; no unique inverse or complete executed solver is claimed.
intervention
Anchor exclusion counterfactual fixes the tree/frame and marks a direct child used; its unsaid-own contribution vanishes. Forty finite relation/passive/used/anchor cases assert row 2 and exact hit cardinality. These supplied trees are created directly through Tree::of_words, without a live parser.
All typed records bind the exact source revision and scope in manifest.json. Domains, observations and operators are above. Stable dependencies and successful termination are premises. These partial relations retain ambiguous antecedents; no universal solver, unique inverse or actual causal inference is supplied.
This page in Markdown ā https://md.groupants.elamur.ai/free/en/mova/prag/src/invariants.rs.groupant/unsaid-anchors.groupant/