Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Osmiron Schema Language (OSL)

OSL is the declarative source language for Osmiron. A source file describes changes to an operational model: condition vocabularies, entities, permitted mutations, tasks, and explicit removals.

OSL is intentionally small. It is not a general-purpose programming language or, in the current MVP, a general-purpose data query language.

The current pipeline has four stages:

  1. The lexer recognizes tokens and retains source spans.
  2. The parser builds a spanned abstract syntax tree.
  3. Change generation lowers supported syntax into sourced osmiron-engine changes.
  4. Dependency ordering arranges changes while retaining their source spans for diagnostics.

The osmiron-dsl check command runs these stages. It does not apply the changes to an engine, validate them against stored twin state, or persist a commit.

Declarations

The parser accepts four top-level declarations:

DeclarationPurposeIdentity form
conditionDefines a named set of condition variants.Identifier
entityDescribes an identity and its current components.Quoted string
mutationDescribes roles, requirements, resource uses, and transformations.Quoted string
taskDescribes predicates for a desired state.Quoted string

Prefix any top-level declaration kind with drop to request its removal.

Every currently supported condition, entity, mutation, and task entry lowers to a semantic change. Those changes are not yet validated against a stored digital twin or applied. See Current limitations for the exact boundary.

Read Language structure for lexical rules and block syntax. The complete example is the representative parser fixture checked by the documentation recipe.