treestore-columnar-store
The groupant beside models/treestore-columnar-store.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 | executed bounded checks | 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.
| relation | 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
The compressed, randomly accessible store of annotated articles (tools/treestore): typed columns per field, a meta-dictionary of tree fragments, per-stream zstd dictionaries or a primed context coder, lossless byte for byte. Epoch 2026-11-06: the Wikipedia tier 1 (50 000 articles) converted; measurements in tools/treestore/README.md.
Forward
Records โ json (envelope + string fields) โ codec (fields โ typed streams, with model tables, splits, fragments) โ cols (per-article byte streams) โ store (groups; per stream the smallest of zstd+dictionary, zstd, cm, stored; footer with hashes) โ dir (title index). Reading runs the chain backwards for one group.
Invariant
decode โ encode = id per record, checked per field at write, per frame at write, and per article (length, SHA-256 prefix) at every read. Deterministic files for fixed input, model and settings.
Cost
Size โ ฮฃ streams min(coders) per group: about 4.2 bytes per token on tier 1 (2.9ร below the per-article zstd 9 source, 2.1ร below one zstd 19 long frame per shard); writing O(bytes) with level-19 zstd and the context coder; reading one article = one group decompression.
Composition
The field dependencies are the joins: Markdown is the context of sentence rows (text offsets), rows of trees and pragmatics (row deltas), trees of frames (references). A field that falls back to raw is still context for later fields (read from the envelope), so a fallback never breaks the chain.
Behavior complement
Does not annotate, does not update in place, does not deduplicate across files, does not quantise, and does not derive frames or pragmatics from trees.
Reverse reconstruction
Exact recovery of every record given its file and the store's model; the footer alone gives titles, lengths and hashes.
Checks
cargo test -p treestore (unit tests and tests/roundtrip.rs); treestore verify over the converted tier 1.
Provenance
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/models/treestore-columnar-store.groupant/