ontology-query-state
The groupant beside models/ontology-query-state.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
| component | label | where |
|---|---|---|
| approximant | partial | forward |
| ast | not materialized | |
| composition | partial | composition |
| cost | symbolic source derived | cost |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | see source local evidence | 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 |
|---|---|---|---|
behavior-complement | behavior_complement | partial source derived model | behavior-complement |
reverse-reconstruction | reverse_reconstruction | partial source derived model | reverse-reconstruction |
layer-proof-transport | representation_transport | partial source derived model | layer-proof-transport |
unit-gate-join | dimension_transport | partial source derived model | unit-gate-join |
snapshot-cursor | resource_boundary | partial source derived model | snapshot-cursor |
hs-selection | ordered_selection | partial source derived model | hs-selection |
Model text
descriptant
ontology-query-state: wave29
Graph Builder.finish (ontocore)→store.check/unpack→Kb.new is real CSR boundary. Kb.prop→query.prop_of→bridge.answer_question/pron.info/describe.describe preserves Known/Unknown/Undetermined distinctions except pron Tri merges latter two with reason. hs::parse main feature/NP→hsmap candidates/pick/isa_verdict→Kb ancestors/query.parts_of. Core SynMap last duplicate vs Graph first duplicate is invalid adapter unless keys unique. Bound.overlaps requires callers align attr/base/basis; hsmap shared gate checks attr/base but not basis, so cross-basis comparison is an explicit limitation.
This source-bound partial group organizes existing Mova code. Native evidence and excluded effects are recorded in source sidecars and the root wave29 report. Registration is not a universal proof or whole-system runtime claim.
model
ontology-query-state
forward
Snapshot bytes→store unpack/check→Graph→Kb indexed layers/assertions→query proofs→bridge/describe/pron observations. For query(c,p,L), A_l={ancestor seeds for p on l}; first nonempty visible layer l* decides, M removes dominated ancestor concepts, singleton values(M) gives Known with min(depth,index) witness, mixed gives Undetermined. HS tokens→Parsed→preference and candidate scoring s=WSD+state+chapter, then IsA/part/feature gates and derivatives.
invariant
Shape-valid Graph is necessary but not semantic consistency: store does not verify key sorting, duplicate synset uniqueness, lexfile IDs, inverse CSR or DAG. Kb requires valid Cids/layers, maintained indices and acyclic layer ancestry; read-only query consumers preserve graph. Valid offsets/unit dimensions/finite Rat and bounded token levels are explicit at respective joins.
cost
Store O(bytes+arrays), Kb BFS O(Va+Ea), property K candidate ancestry maps plus O(K²) specificity; query repeated traversal and bounded-depth broad parts. HS token scans may O(T²), mapping neighbour gates quadratic per heading; build retains all descriptions and writes sequentially. No measured speed claim.
composition
Graph Builder.finish (ontocore)→store.check/unpack→Kb.new is real CSR boundary. Kb.prop→query.prop_of→bridge.answer_question/pron.info/describe.describe preserves Known/Unknown/Undetermined distinctions except pron Tri merges latter two with reason. hs::parse main feature/NP→hsmap candidates/pick/isa_verdict→Kb ancestors/query.parts_of. Core SynMap last duplicate vs Graph first duplicate is invalid adapter unless keys unique. Bound.overlaps requires callers align attr/base/basis; hsmap shared gate checks attr/base but not basis, so cross-basis comparison is an explicit limitation.
domain
Finite synthetic checked four-node graph, sorted unique words/synset keys, valid Cids/CSR/UTF8, one-sense queries, valid short HS code strings, finite representable rationals, colon depth<=255, valid Kb layer parents, temp local files only. Layer-chain visibility assumes leak_all_layers=false. Multi-sense ranking additionally assumes finite scores; executed fixtures use one sense.
limitations
No live CSV/model/prior/teacher/corpus/DB effects executed. Native env ONTO_PRIOR points to isolated missing fixture; tested one-sense query avoids global prior path. main tested opt/wd_cfg only. Build/judge/confirm/load_kb live paths remain model-only; trusted malformed TSV/public graph may panic outside stated domain.
checks
- 15 exact named native tests in native-commands.json, twice debug/twice release, sorted outcomes equal
- Eight compiled source mutants each exit101 after actual assertions; old-code store overflow witness compiled and exit101; restoration and positive reruns
- Nine source syntax projections generated twice identically;18 source-scoped child ranges and shared AST paths
catalog
behavior-complement
When leak_all_layers=false: Visible-layer composition excludes fable seed effects on real queries; no-seed excludes Boolean property answer. Bridge exact tier excludes lower-tier replacement. Snapshot malformed remaining-length claim excludes accepted Graph/panic under cursor invariant. Meronym no-witness excludes No while IsA no-witness permits No.
reverse-reconstruction
For checked g, unpack(pack(g))=g; Graph does not reconstruct file path. Answer preimage is set of graphs/seeds/sense choices with identical selected proofs and verdict, admitting invisible layers/ignored alternatives. Parsed/derivative tables have many token/description antecedents due normalization/dedup and caps.
layer-proof-transport
Known(value,win,chain,beaten,l)→query Yes/No plus seed/chain text; pron maps value to Tri and persona; describe counts only noncharacter applicable-known props. Undetermined and Unknown both map Tri Unknown but why differs.
unit-gate-join
Rat endpoint values already in base units before hsmap compares shared attr/base intervals. Numeric overlap formula is dimensionless; basis compatibility is not checked by current hsmap shared predicate.
snapshot-cursor
p0=0≤B; guarded n≤B-p yields p'=p+n≤B, establishing safe addition/slicing. Typed enum and shape checks then feed Kb but do not establish graph DAG/CSR inverse semantics.
hs-selection
hs main=first deepest Item else Head; hsmap matches original kind/level/NP then compounds candidate phrases. State key live/food separates confirmations; first accepted Q vs last confirmation rules cannot be interchanged.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/models/ontology-query-state.groupant/