Mova0.6 pre-release

The Mova Logic Language

The Mova Logic Language (LL) is the token interchange between Mova's layers. Mova is being rebuilt so that every layer talks to the next through LL records, both ways:

AST → pragmatics → LL → world → LL → pragmatics → AST

A layer reads LL, does its work, and writes what it knows back as LL tokens. Where a layer cannot give something back, the difference is its residual: the round trip through LL is the diagnostic that shows where information is lost (the same idea as the round trip of the layers). The crate is tools/lobster; the Lobster  is the animal that keeps it (animals).

The principle: the more we know, the more tokens

Every piece of knowledge about a word adds tokens and never replaces any. Nothing is dropped because something else implies it: a word the world knows is longer than a word it does not. The class of a word does not replace its letters, its own token does not replace its class, and the world's tokens do not replace the parse.

A sentence

One line is one sentence: a header, then one record per token of Mova's tree (punctuation and function words included). A stream starts with a version line, @ll:0.6.

@prag @form:decl @act:assert @indirect:0 @hedge:0 @polarity:none @voice:narrator @conf 6 4 . 9 2 …
@frame 3 @shown @frame:Fact ( ^I IS S$ @w … @role:patient … @world @do:char @C 1 … @body
RECORD RECORD …

Header. @prag and Mova's prag row, one token per field in its column order (@form:, @act:, @indirect:, @hedge:, @polarity:, @voice:; the confidences after @conf, character by character). Then the frame rows: @frame and the row's frame count, @shown and the frames' text. In frame text a frame kind is one token (@frame:Event, Fact, Say, Bare), a role before = is one token (@role:patient, @role:of …), other words are spelled (bigrams, @w after each; a case flag before: @cap, @caps, or @mixed with @uK per upper-case position); digits and signs are themselves; a space is @sp. When the world has read the sentence, a @world block lists the changes the sentence made to it (@do:char @C 1, @do:event @E 7 @C 1 @O 2, @do:say @E 8). @body closes the header.

Record, always in this order:

#tokenspresent
1own tokenonly for a popular word of the registry
2<class>, the semantic classalways
3entity attributes: @ent:K @kind:X @gender:G @animacy:A @number:N @mainat the head of a mention of an entity (coreference)
4world tokens: @C 3 (the entity), @at @L 1, @has @O 2, @kin:mother @C 1, @age:young, @story:main; on a predicate @E 7, @t 5, @next @E 8, @cause @E 3where the world knows them
5language_enalways
6<upos>always
7@rel:REL (with subtype), @h±K (the head as a relative offset) or @rootalways
8UD features, one token each, in the FEATS column's orderwhen the token has them
9@cap / @caps: the case of the formwhen the form is title or upper case
10the n-grams of the lemmaalways
11@endalways
<function> language_en <det> @rel:det @h+1 Definite=Def PronType=Art @cap ^T ^TH TH THE HE HE$ E$ @end
london <location> @ent:10 @kind:location @number:sg @L 4 language_en <propn> @rel:conj @h-2 Number=Sing @cap ^L LO ON ND DO ON ON$ N$ @end

The vocabulary

The registry (registry.tsv: id range kind token evidence date) holds every token with the evidence that admitted it. Its first row is the version (@ll:0.6).

rangewhat
0–30kmarkers: UPOS, semantic classes, entity attributes, header markers (prag fields, frame kinds, roles, case), the tree (@rel:*, @root, @h-200…@h+200), UD features, the world writer's markers
30k–330kn-grams: all bigrams of the Latin, IPA, Greek, Cyrillic, Arabic and Hebrew alphabets with the digits and ' - ., admitted 3- and 4-grams, admitted CJK characters
330k–512kthe popular own tokens

Versions and compatibility

The language has no numbering of its own: its version is the Mova release it ships with. The current one is Mova Logic 0.6, for Mova 0.6.

lobster registry-check OLD NEW enforces this: against an earlier 0.x registry from 0.6 on it requires append-only; a new major version passes with the break declared; a rebuild of the same version needs --rebuild. A reader refuses a stream of another major version, a stream newer than itself, and an unversioned stream. The earlier experimental versions (v1–v4, from an earlier tokenizer project) are prehistory: Mova Logic does not continue their numbering.

The world reader and writer

LL → world (lobster::world4). A document's LL lines are read into a reading (tokens, entity marks, frames with their filler words, the prag row) and a builder turns it into Mova's change language (world::lang) through World::apply and its gates:

The same builder reads Mova's own products in memory (frames with their exact token anchors and tense, coreference marks): that world is the reference, and the LL world is compared with it.

World → LL (lobster::worldtok). The writer adds the world tokens of the record table and the header's @world block. Stripping them gives the LL line back exactly; that is a gate, with a negative control.

One document in memory: lobster::record and the parse service

lobster::record::document turns one parsed document (tree rows, the prag row; frame rows re-read by Mova from the tree when none are given) into its records with the world's tokens: v4::doc_lines (what write4 writes) and worldtok::with_world (read_ll → build → write_line, what world4 writes as plus.ll). It also lays each record out as a view: the events (each frame with its kind, verb, tense, negation, role fillers and their world ids, cause and next event), the entities of the sentence (world id and type, attributes, world facts, mentions) and the words. lobster logic runs it over a slice; the parse service (mova-serve) runs it per discourse unit and shows the view and the record beside the tree and the pragmatics, in every format. Measured on the first chapter of Alice's Adventures in Wonderland (26 paragraphs, 2026-11-17): lobster logic gives exactly world4's plus.ll, and the short-description index (lobster desc-index, read from disk by binary search) gives exactly the whole table's records.

The chain and its residual

lobster world4 runs the chain AST → LL → world → LL → AST on a slice and reports, per step, what survives: tokens and sentences of the tree through LL; entity marks registered, frames turned into events, roles filled and utterances; what the world alone gives back per record field (class, entity attributes, POS, lemma, case; the tree and the features are never in the world), per prag field and per frame field; and the residual by pattern with examples. Negative controls: a corrupted record must change the world, a dropped world-carried token must show up as residual, and a token dropped from a written line must turn the strip gate red.

The residual is where the debuggers look first: what the world does not hold is either outside its job (the tree, features, punctuation) or a gap of the world layer (number, neuter gender, frame kinds, obliques, links).

How to run

cd tools/lobster && cargo build --release --offline
L=$CARGO_TARGET_DIR/release/lobster
$L slice $STORE $DEV_TSV dev-store.tok && $L reframe dev-store.tok dev.tok
$L write4 registry.tsv $MOVA_DATA/raw/en-oewn/json shortdesc.tsv dev.tok dev.ll
$L check4 dev.tok dev.ll
$L world4 registry.tsv $MOVA_DATA/raw/en-oewn/json shortdesc.tsv dev.tok dev.ll chain/
$L desc-index shortdesc.tsv shortdesc-index.tsv          # the index the parse service reads
$L logic registry.tsv $MOVA_DATA/raw/en-oewn/json shortdesc-index.tsv dev.tok dev-world.ll dev-view.txt

Releases live outside the repository in <Mova release>.

Limits

This page in Markdown https://md.mova.elamur.ai/free/en/docs/repo-docs/logic-language/