onto-wdwalk
The groupant beside onto/src/wdwalk.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 | approximant |
| ast | partial | syntax.json |
| composition | partial | composition |
| cost | partial | Cost |
| descriptant | present | descriptant |
| invariant | partial | model.md |
| tests | executed bounded checks | 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 |
coordinate_join | coordinate_join | partial source derived model | coordinate_join |
confidence_selection | confidence_selection | partial source derived model | confidence_selection |
quantity_units | quantity_units | partial source derived model | quantity_units |
truth_boundary | truth_boundary | partial source derived model | truth_boundary |
Parts
Model text
descriptant
onto-wdwalk
rank partitions Low/Class/Super/High. p171_region stops at class except superclass step, selects lowest reachable classes and drops bypass. folk_ancestors relaxes unrestricted P279 plus regions. read_core domain→duplicate→explicit synset/member/lexfile else bridge. anchors first accepted.9 else best>=2sources.7 else single.6, optional taxon. run confidence=anchorrank_factor.85^d, drops<.4, merges2670/527; quantities unit-converted own first else descendant distribution.
Epoch 2026-10-31
Full source reviewed before changes; prospective predictions retained in the external wave29 receipt. Added tests preserve production behavior. Three existing synthetic folk/path/anchor/unit/distribution tests executed. read_core/full walker/real controls/file candidates unexecuted. Registration is partial modeling, not semantic proof.
approximant
Forward relation
rank partitions Low/Class/Super/High. p171_region stops at class except superclass step, selects lowest reachable classes and drops bypass. folk_ancestors relaxes unrestricted P279 plus regions. read_core domain→duplicate→explicit synset/member/lexfile else bridge. anchors first accepted.9 else best>=2sources.7 else single.6, optional taxon. run confidence=anchorrank_factor.85^d, drops<.4, merges2670/527; quantities unit-converted own first else descendant distribution.
Scoped equation
Main=first accepted(.9) else argmin(-n_src,d,q) among n_src>=2(.7) else same among single(.6). Optional taxon argmin(rankpref,d,q) non-unsupported if main not/reaches taxon. Dist: n=|v|>0, mean=Σv/n, sd=sqrt(Σ(v-mean)^2/(n-1)) iff n>=2, extrema over v∪bounds.
Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.
Executable approximant gap: no useful percentage metric established for these categorical/effectful observations. No surrogate or production substitution. Future caps 1/2/5/10% require a metric/domain and evidence; no numerical error bound follows here.
invariant
Invariant
Rank coordinates match CSR. dist n/mean/sample sd use values, range includes bounds; empty None, singleton sdNone. Unknown unit None. read_align malformed depth99 then u16 sum. descendants cap0 may return1 post-push. Full run writes candidates even with controls false.
Cost
Region vector membership/reverse scans can O(V²+VE); repeated folk expansion exceeds simple BFS. Full graph/shards retained; numeric descendants400, generic20000 caps not global memory bounds. u16/u32 safe ranges assumed.
Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.
composition
Composition
rank partitions Low/Class/Super/High. p171_region stops at class except superclass step, selects lowest reachable classes and drops bypass. folk_ancestors relaxes unrestricted P279 plus regions. read_core domain→duplicate→explicit synset/member/lexfile else bridge. anchors first accepted.9 else best>=2sources.7 else single.6, optional taxon. run confidence=anchorrank_factor.85^d, drops<.4, merges2670/527; quantities unit-converted own first else descendant distribution.
Fragment anchors-and-distribution covers bytes [17842,20036); its equation contributes the indicated local relation. Other source branches/effects remain in the parent model; fragment does not inherit a whole-file proof.
Actual joins: wdx::Tsv emits rank-bearing unquoted schemas read by wdgraph and wdlex; wdgraph rebuilds local indices so wdwalk/rank_kinds must remap Q IDs. wdalign source masks serialize through src_names into wdwalk::n_sources_str (all16 categories checked). Wd uses first-step P31 even for present graph nodes, whereas wdwalk::run only adds P31 for absent graph Qs: these are distinct adapters. wdwalk candidates feed coresel confirmation; wdvmm parsing does not prove truth. wsd consumes model::Graph, kb::up/ancestors, query::lookup and core::of_concept; eval scores query::Answer rather than proof correctness. build::Builder consumes Zip::read; central/local offsets and method gates are not full ZIP validation.
models
behavior_complement
Exclude P171 beyond class except superclass but permit P279. Unknown units skipped. Unsupported two-source main anchor is allowed; unsupported taxon extra excluded. Nonfinite stats not prevented.
reverse_reconstruction
Folk outputs admit discarded bypass paths and duplicate edges. Anchor q/.7 admits no accepted row and q optimal >=2source. Dist moments permit many ordered value/bound sequences; n preserves count only. Actual f64 sum/variance use source order, so arbitrary permutation need not preserve moments.
coordinate_join
rank_kinds in nodes order; alignment P31 union includes graph nodes, run walker P31 only when absent from graph.
confidence_selection
Preferred factor1 else.9, threshold.4; merge2670→527, strict larger confidence wins first tie.
quantity_units
kg,m,year,km/h; year365.25days, month1/12; bounds not mean/sd.
truth_boundary
Candidates require coresel confirmation; controls boolean includes dataset-specific cycle, no transactional output.
tests
Executed checks
Native command: cargo test --offline -p onto --bin onto -- --exact --test-threads=1 wdwalk::t::anchors_and_units wdwalk::t::fish_grade_and_shark_and_bat wdwalk::t::whale_is_mammal_not_fish (add --release before -- for optimized profile). These exact names were included in the inspected selected command, twice per profile. All 21 sorted named outcomes matched across four runs. This source's compiled mutant returned exit101 with a failing assertion; exact source restoration followed by its passing test.
Three existing synthetic folk/path/anchor/unit/distribution tests executed. read_core/full walker/real controls/file candidates unexecuted.
Syntax generated twice identically after restoring source. Evidence receipts: debug-1/debug-2/release-1/release-2 logs, outcomes and exit files; negative-wdwalk, restored-wdwalk, controls.json and native-commands.json in external wave29 ontowiki run.
No strict Clippy claim: inherited dependency/target warnings observed; no production logic changed, focused rustfmt applied to added test modules only.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/onto/src/wdwalk.rs.groupant/