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:
- The lexer recognizes tokens and retains source spans.
- The parser builds a spanned abstract syntax tree.
- Change generation lowers supported syntax into sourced
osmiron-enginechanges. - 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:
| Declaration | Purpose | Identity form |
|---|---|---|
condition | Defines a named set of condition variants. | Identifier |
entity | Describes an identity and its current components. | Quoted string |
mutation | Describes roles, requirements, resource uses, and transformations. | Quoted string |
task | Describes 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.