Boldsea Semantic Language (BSL)
- BSL is a declarative DSL that specifies executable ontologies using immutable event-based models, ensuring explicit causality and runtime adaptability.
- Its compact, BNF-based syntax and static analysis tools facilitate immediate validation and debugging without the need for traditional compilation.
- BSL’s integration into game AI, business workflows, and distributed systems demonstrates its impact on real-time decision making and process automation.
The Boldsea Semantic Language (BSL) is a formally grounded, domain-specific language (DSL) serving as the core of the boldsea framework. BSL enables the declarative specification of executable ontologies, unifying schema modeling, semantic business logic, and process execution within a dataflow event architecture. Events, rather than mutable states or imperative scripts, constitute the irreducible modeling primitive. This approach facilitates architectural advancements in fields such as game AI, distributed workflows, and enterprise systems, by ensuring explicit causality, monotonic histories, and runtime adaptability through semantic models (Boldachev, 12 Jan 2026, Boldachev, 20 Oct 2025, Boldachev, 11 Sep 2025).
1. Core Structure and Syntax
BSL models are defined declaratively, distinguishing concepts (“models”), attributes, relations, and logical behaviors using a compact, line-oriented syntax and formal BNF grammar.
- Concepts and Models: Specify domain entities and their schemas.
- Attributes/Relations: Typed fields or references; can bear conditions or computed formulas.
- Events (Reifications): Instances (“individuals”) of models, recording immutable, subject-centric facts.
A canonical excerpt (Winter Feast scenario):
2
The BSL grammar enables complex guard expressions (φ-language), as given by:
where atoms may involve type, field, existential count, last-write-maximality (ExistsMax), or causal orderings (Boldachev, 20 Oct 2025, Boldachev, 11 Sep 2025).
2. Subject-Event Ontological Foundations
BSL operationalizes a subject-event ontology in which every fact, action, or correction is appended as a new, immutable event:
- Event Structure:
- Causality: Ordering is induced strictly via explicit “refs” (causal edges), not timestamps—realized as the happens-before () relation, (transitive closure).
- Epistemic Filters: Each model acts as a schema and a filter, limiting which events a subject may “fixate” based on conceptual and payload criteria.
- Presumption of Truth: Once an event enters the append-only global history , its content is operationally true for all guard evaluations. Contradictions are resolved solely via further corrective events, without removal or rollback.
The axiomatic basis is summarized below:
| Axiom | Description |
|---|---|
| A1 | Events available for computation upon inclusion in |
| A2–A3 | Only explicit causal links (refs) induce |
| A4 | Multiperspective: conflicting facts coexist |
| A5 | Presumption-of-truth: events are trusted as fixed |
| A6 | Corrections as new events, not deletions |
| A7–A9 | Last-write-wins per actor/key, key partitions, model-based event admission |
| I1–I3 | Monotonicity, acyclicity, traceability of the event graph |
3. Dataflow Execution Semantics
BSL replaces imperative update loops with a pure dataflow execution model. Instead of polling or replanning:
- Model conditions (“guards”) are activated by incoming events matching their dependency predicates.
- Execution proceeds by iteratively applying: until a fixpoint.
- SetValue attributes are auto-recomputed as their dependencies change.
- SetDo effects are declared as side-effects, issued only when all conditions are met.
- Priority and interruption semantics (e.g., in AI agents) arise strictly from the (in)validity of semantic predicates:
For any agent, if becomes true, all actions requiring 0 are withdrawn. No imperative interrupt logic is coded (Boldachev, 12 Jan 2026).
4. Comparison with Other Paradigms
BSL departs fundamentally from Behavior Trees (BT), Goal-Oriented Action Planning (GOAP), and standard BPM/OO semantic frameworks:
- BT/GOAP: Model behaviors or plans (“how”/“what” to do), require explicit polling or replanning, and often hardcode priority/preemption.
- BSL: Models world-facts and event-possibilities (“when” actions are semantically permissible) via logical conditions, with no global state to mutate or poll.
- BPMN/Petri-nets: Impose rigid imperative flows, isolated from domain semantics; model changes require full redeployment.
- OO Semantic Technologies (RDF/OWL, SPARQL): Provide schemas and queries, but lack temporality and executable process logic.
- Event Sourcing: Records changes as untyped streams, generally without tight integration of semantic conditions or types.
A key architectural property is that BSL’s executable ontologies offer direct model evolution and interpretation with no need for compilation or explicit workflow scripting (Boldachev, 12 Jan 2026, Boldachev, 11 Sep 2025).
5. Engine Architecture and Integration
BSL runs as a semantic layer above (for example) game ECS/physics loops or enterprise execution engines:
- Execution Layering: BSL operates at moderate frequency (10–20 Hz for world state integration), emitting commands (SetDo) for lower-level systems (e.g., animation, physics) executing at higher rates.
- Validator Module: Enforces models’ type, constraint, and authorization rules when new events are formed.
- Subscription Mechanism: Every model property with a Condition or SetValue participates in a dependency index; only affected predicates are reevaluated when source events change.
- LLM-Driven Model Authoring: Designers provide intent in natural language; LLMs emit candidate BSL models, which are statically checked for type/reachability before deployment. The process is iterative with immediate feedback if models are malformed or incomplete.
Integration into pre-existing engines or infrastructures proceeds by emitting/consuming event streams (BSL events) at well-defined boundaries, enabling concurrent, parallel processing of unrelated event keys (via partition 1) (Boldachev, 12 Jan 2026, Boldachev, 11 Sep 2025).
6. Debugging, Tooling, and Reproducibility
- Temporal Event Graph: Every event records its actor, model, direct causes, and payload. The event DAG is immutable and forms the ground-truth for debugging, as opposed to ephemeral logs or replay systems.
- Static Analysis: At load or model-edit time, dependency indices reveal unreachable/unused conditions, attribute mismatches, and permission holes. Unreachable models or events are caught prior to execution.
- Reproducibility and Multi-Perspectivity: Partial histories, corresponding to client-server interactions or multi-agent views, can be rehydrated to reproduce specific behaviors. Conflicting beliefs are represented as independent concurrent branches, visible and analyzable in isolation.
- Correction and Auditability: Corrections are new events with explicit edges, never deletions; audits can trace full causal cones per event.
These properties underpin robust inspection, rapid debugging, and process transparency across applications (Boldachev, 12 Jan 2026, Boldachev, 20 Oct 2025).
7. Application Domains and Impact
- Game AI: Supports emergent, semantically valid agent behaviors with no imperative scripting; agent “decisions” are the product of logical ineligibility or eligibility as encoded in domain models—bridging the semantic-process gap endemic to traditional AI architectures.
- Business Workflows and Compliance: Enables native “no-code” process authoring, strict audit trails, runtime model evolution, and automatic parallelism in process execution.
- Distributed and Decentralized Systems: The event-based ontology and explicit key partitioning support distributed execution, including multi-perspective, decentralized ledger, and microservice settings.
- AI-driven Model Generation and Validation: BSL's immediate static validation and symbolic execution make it well suited for AI-assisted, iterative semantic model design.
The adoption of BSL entails a shift from imperative control and mutable state, to declarative world modeling via executable ontologies, with lasting consequences for semantic traceability, validation, and automation (Boldachev, 12 Jan 2026, Boldachev, 20 Oct 2025, Boldachev, 11 Sep 2025).