Skip to main content

Metamodel Extensions

The Concerto metamodel defines the types of models that you can use Concerto to describe. The elements on the current metamodel are documented in the design specification.

The Concerto metamodel is a Goldilocks model, in as far as it offers just enough features to describe real-world domain models, whilst remaining relatively easy to map to a wide variety of code generation targets.

Concerto is a platform independent modelling language. The Concerto metamodel will never support all the features of a platform specific model, such as OWL, XML Schema, JSON Schema, TypeScript or Rust. It's value is in being able to capture a useful subset (lowest common denominator) of a wide variety of metamodels and to provide a CLI and runtime APIs to work with models as data.

Extending the Metamodel

Extensions to the Concerto metamodel do occur, but they are infrequent and are carefully considered, due to the extensive work involved in extending the complete Concerto stack to support new metamodel constructs. Backwards compatability is a major consideration.

Before undertaking an extension of the Concerto metamodel upstream impact must be considered. Upstream tools that use Concerto (both Open Source and commercial) should be consulted. Early and clear communication via the Accord Project Technology Working Group is vital for success.

Metamodel changes that are fundamentally hard to map to the majority of supported code generation targets are unlikely to be approved, as are metamodel changes that undermine the ability for downstream tools to implement static analysis over Concerto models, or user interface generation.

Note that the Concerto metamodel is itself a versioned Concerto model. It is deployed here:

Metamodel UML diagram Metamodel UML diagram

For reference, here are some of the areas that must be updated when new features are added to the Concerto metamodel.

concerto-metamodelPublish the metamodel for runtime access.
https://models.accordproject.orgPublish the metamodel to the web.
concerto-ctoCTO grammar changes to create AST. Convert AST back to CTO.
concerto-core/introspectCreate runtime classes from AST and implement semantic validation, imports etc.
concerto-core/serializerSerialize to/from JSON, Generate sample data.
concerto-core/IntrospectorUpdate high-level introspection APIs
concerto-analysisImplement change analysis
concerto-vocabularyGenerate Decorator Commands used for vocabulary terms
concerto-codegenUpdate dependencies. Update all code generation targets
concerto-docsDocument metamodel changes, update code samples, review code generation docs
concerto-cliUpdate dependencies.
concerto-typesUpdate TypeScript types.
vscode-web-extensionUpdate syntax highlighting