The Cohesive Systems Language (CSL) is a declarative language for defining what a system is, not just how it is implemented.
In Cohesive, CSL describes domains in terms of entities, fields, relationships, invariants, and state transitions, along with the workflows and processes that evolve them over time. These definitions form an executable model: a precise specification that can be compiled into running systems, queries, projections, user interfaces, and distributed workflows.
Unlike traditional programming languages that entangle domain logic with infrastructure, CSL cleanly separates semantic intent from execution mechanics. The same CSL definition can drive persistence, indexing, APIs, UIs, orchestration, and observability, while remaining stable as technologies and architectures change.
CSL is designed to be:
- Declarative – expresses meaning, constraints, and transitions rather than control flow
- Executable – definitions are not documentation; they run
- Composable – models, projections, and workflows can be layered and extended
- Infrastructure-agnostic – compiles to multiple storage, compute, and UI backends
- AI and tool-friendly – readable by humans, machines, and automated systems alike
At its core, CSL treats software as a living system: a formal domain model equipped with a runtime that faithfully executes, observes, and presents that model under real-world constraints.
- Underlying Principles
- Language as the Primary Artifact
- Deep Embedding with Multiple Interpreters
- Deterministic Semantics by Design
- Algebraic Structure Over Ad-Hoc Code
- Decoupled Specification and Execution
- Designed for Machine and Human Authors
- Systems as Semantic Graphs, Not Services
- Intellectual Lineage
- Language-Oriented Programming (LOP)
- Denotational and Algebraic Semantics
- Deep Embedding and Multiple Interpreters
- Multi-Stage Compilation
- Beyond Functional vs Object-Oriented
- References
Underlying Principles
Many modern frameworks and large codebases already drift toward an internal mini-language — fluent builders, query DSLs, configuration objects, rule engines — in order to make intent clearer and reduce incidental complexity. Cohesive Systems Language formalizes this instinct. Instead of ad-hoc internal DSLs scattered across infrastructure, CSL provides a structured, typed semantic substrate with explicit compilation and interpretation boundaries.
Cohesive Systems Language is not just a DSL. It is built on a set of structural principles about how software should be specified, compiled, and executed.
Language as the Primary Artifact
In traditional systems, code is the primary artifact and infrastructure adapts around it.
In Cohesive, the language is primary.
You define:
- Shapes
- Relations
- Transitions
- Processes
These are not runtime objects first. They are semantic definitions. From them, multiple execution artifacts are derived.
The system you run is a compilation target of the language you define.
Deep Embedding with Multiple Interpreters
Cohesive definitions are represented as explicit, typed intermediate representations (IR).
This enables:
- Compilation to in-memory execution
- Compilation to SQL or other query backends
- Materialized projections in search indexes
- Durable process orchestration
- Static analysis and validation
- LLM-assisted generation
A single semantic definition can have many interpreters. Each interpreter is a controlled execution strategy over the same specification.
Specification is stable. Execution is pluggable.
Deterministic Semantics by Design
The core language avoids:
- Implicit I/O
- Hidden global state
- Unbounded recursion
- Non-deterministic execution
This ensures:
- Reproducibility
- Safe compilation
- Predictable incremental recomputation
- Formal analyzability
Side effects are introduced only at controlled boundaries.
Algebraic Structure Over Ad-Hoc Code
Cohesive models systems as structured compositions:
- Relations compose
- Mappings compose
- Transitions compose
- Processes compose
This compositionality enables:
- Refactoring without semantic drift
- Incremental evolution
- Independent optimization of execution strategies
- Formal reasoning about coverage and completeness
Systems are not scripts. They are structured algebras over domain concepts.
Decoupled Specification and Execution
Join semantics are defined independently of physical storage.
Transition semantics are defined independently of hosting.
Process semantics are defined independently of infrastructure.
This separation allows:
- Multi-store joins
- Rebuild vs incremental projection strategies
- Durable orchestration across distributed nodes
- Future execution backends without redefining domain logic
Execution changes. Semantics do not.
Designed for Machine and Human Authors
The language is:
- Structured and typed for deterministic compilation
- Compact and regular for machine generation
- Explicit enough for static validation
- Expressive enough for real-world domain modeling
Cohesive is intended to be equally usable by engineers and by AI systems that generate or transform specifications.
Natural language is ambiguous. Traditional code is too operational.
Cohesive sits between them: a structured semantic substrate.
Systems as Semantic Graphs, Not Services
Instead of fragmenting logic across microservices, handlers, and ad-hoc pipelines, Cohesive treats the system as a unified semantic graph:
- Entities define state
- Relations define derived views
- Transitions define state evolution
- Processes define coordination
From this graph, multiple operational forms are derived.
The result is a system that evolves coherently instead of accreting accidental complexity.
Intellectual Lineage
Cohesive Systems Language is not invented in isolation. It builds on established traditions in programming language theory and systems design, adapted for practical engineering.
Language-Oriented Programming (LOP)
Treats language design as a first-class engineering activity. Instead of writing ad-hoc infrastructure code, you define domain languages and derive execution artifacts from them.
Denotational and Algebraic Semantics
Separates specification from execution. A system is defined as a structured semantic model; execution strategies are interpretations of that model.
Deep Embedding and Multiple Interpreters
Represents the language explicitly as a typed intermediate representation (IR). From that IR, multiple interpreters can be derived: in-memory execution, SQL compilation, search index materialization, durable orchestration, static analysis.
Multi-Stage Compilation
Recognizes that modern systems often require several compilation layers: specification → IR → backend targets → runtime artifacts. Cohesive formalizes this pipeline rather than leaving it implicit in infrastructure code.
These traditions share a common principle:
Define semantics once. Execute them many ways.
Cohesive brings this principle into the domain of real-world systems engineering — where state, projections, transitions, and processes must remain coherent across evolving execution environments.
Beyond Functional vs Object-Oriented
Cohesive does not position itself as functional or object-oriented. It sits at a different layer of abstraction.
Functional programming emphasizes purity, total functions, and explicit transformation of values.
Object-oriented programming emphasizes world modeling, encapsulated state, and behavior attached to entities.
Both paradigms ultimately describe systems in terms of state and state evolution; they differ primarily in how those concepts are structured and composed.
Cohesive abstracts one level higher:
- It adopts purity and totality from functional programming for specifications and derived projections.
- It adopts explicit world modeling and identity from object-oriented design for entities and lifecycle.
- It formalizes state transitions and coordination as first-class semantic constructs rather than incidental method calls or implicit side effects.
The result is neither FP nor OO, but a semantic layer above both: a structured language for describing state, derivation, and evolution, which can then be compiled into functional, imperative, or distributed runtime forms as required.
Importantly, CSL is not tied to a single implementation language. The semantic model can be implemented in C#, Rust, TypeScript, or other host environments. The host language provides tooling and ergonomics; CSL provides the semantic contract. This separation reinforces its role as a language-level abstraction rather than a framework bound to a particular ecosystem.
These traditions share a common principle:
Define semantics once. Execute them many ways.
Cohesive brings this principle into practical systems engineering, where state, projections, transitions, and processes must remain coherent across evolving execution environments.