mova-hard-cases-policy
The groupant beside tools/hard-cases/src/policy.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 | Forward approximant |
| ast | partial | syntax.json |
| composition | partial | Composition |
| cost | partial | Cost |
| descriptant | present | Descriptant |
| invariant | partial | Invariant |
| tests | finite 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 |
Model text
Descriptant
What a case may become: licence class -> training track (shipped, internal, measure; CC BY-SA internal by default), document -> split (train/dev/measure by SHA-256 of source and document), admitted judge kinds, markup filter. Source: tools/hard-cases/src/policy.rs.
Forward approximant
class(licence) by tokens: nc/nd/research/nonexclusive -> restricted; cc0; public domain; ours; cc+by(+sa) -> cc-by(-sa); else unknown. track = tracks[class] or measure. split = (u32(first 8 hex of sha256(source NUL document)) mod 100) against train% and train%+dev%. markup(t) = wiki table/template/link/tag tokens or >=3 pipes.
Invariant
Restricted and unknown licences never map to a training track unless configured explicitly; a document's split is a pure function of its id; validate refuses unknown track names and dev% = 0.
Cost
O(len(licence)) per case.
Composition
Used by wave (selection), judge (sample) and main (list).
behavior_complement
Does not read licence texts or verify a source's licence statement; licence strings are as the sources state them. Evidence status: source-derived model with finite checks, not a proof.
reverse_reconstruction
Track and split do not determine the licence or document: many licences/documents share one class/split.
Tests
policy::tests (2026-11-04): licence classes and tracks with red controls (NC, ND, research, arXiv non-exclusive, empty, all rights reserved -> measure; invalid track name refused); split proportions on 2000 documents and stability; kinds; markup. Finite fixtures and live samples; not a proof.
This page in Markdown ā https://md.groupants.elamur.ai/free/en/mova/tools/hard-cases/src/policy.rs.groupant/