O'Reilly logo

Model-Driven Software Development: Technology, Engineering, Management by Bettina von Stockfleth, Krzysztof Czarnecki, Simon Helsen, Arno Haase, Jorn Bettin, Markus Völter, Thomas Stahl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6

Metamodeling

Metamodeling is one of the most important aspects of Model-Driven Software Development. Metamodeling knowledge is needed for dealing with the following MDSD challenges:

  • Construction of domain-specific modeling languages (DSLs): the metamodel describes the abstract syntax of such a language (see Chapter 4).
  • Model validation: models are validated against the constraints defined in the metamodel.
  • Model-to-model transformations: such transformations are defined as mapping rules between two metamodels.
  • Code generation: the generation templates refer to the metamodel of the DSL.
  • Tool integration: based on the metamodel, modeling tools can be adapted to the respective domain.

This list helps to justify why we dedicate an entire chapter to this subject.

6.1 What Is Metamodeling?

Metamodels are models that make statements about modeling. More precisely, a metamodel describes the possible structure of models – in an abstract way, it defines the constructs of a modeling language and their relationships, as well as constraints and modeling rules – but not the concrete syntax of the language. We say that a metamodel defines the abstract syntax and the static semantics of a modeling language (see Chapter 4). Vice versa, each formal language, such as Java or UML, possesses a metamodel.

Metamodels and models have a class-instance relationship: each model is an instance of a metamodel. To define a metamodel, a metamodeling language is therefore required that in turn is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required