DSM¶
The Digital Substrate Model (DSM) is a small declarative language for describing data models — namespaces, concepts, structures, attachments, function pools. It is the modeling layer of the dsviper ecosystem and the entry point of the code-generation pipeline.
DSM is standalone: authoring a .dsm file does not require Kibo, the
Viper runtime, or dsviper. You can use it as a typed contract between teams,
or feed it into code generation when typed code is needed. See
Value Chains for where DSM sits in the broader picture.
Place in the ecosystem¶
Depends on — nothing. DSM is the root of the toolchain value chain.
Consumed by — Kibo (generates code from
.dsmplus a template), dsviper (loads.dsmthrough its dynamic API), Commit Applications such asge-pyandge-qml.Source repository — digital-substrate/dsm. Carries the ANTLR4 grammar (
DSM.g4) and the canonical JSON wire format — producer-neutral, implemented by viper, kibo, and the IDE plugins.Related repositories —
digital-substrate/dsm-samples — reference DSM models (
Tuto,Ge,Re).digital-substrate/dsm-vscode — VS Code plugin.
digital-substrate/dsm-jetbrains — JetBrains plugin.
Install instructions: see IDE Integration.
Quickstart¶
A minimal DSM file, exercising the five fundamental notions (namespace, concept, key, document, attachment):
namespace Tuto {f529bc42-0618-4f54-a3fb-d55f95c5ad03} {
concept User;
struct Login {
string nickname;
string password;
};
attachment<User, Login> login;
};
Validate the syntax:
python3 tools/dsm_util.py check model.dsm
Generate a typed Python package (this delegates to Kibo with the viper template):
python3 tools/dsm_util.py create_python_package model.dsm
To use a model without code generation — load it through dsviper’s dynamic API at runtime — see DSM Processing.
Topics¶
Status¶
Part of DevKit 1.2.x (LTS, feature-locked).