Innovation

Model transformations and validations

Why create a gigantic, complex metamodel that describes everything, when designing an application is feasible with small steps and the serial transformation of simpler, easy-to-use models?

Download Ebook or Read on

Blackbelt

March 4, 2020

Why create a gigantic, complex metamodel that describes everything, when designing an application is feasible with small steps and the serial transformation of simpler, easy-to-use models?

The essence of model-based application development is that a commissioned project doesn’t involve separate modeling and developing, but rather the creation of the model is followed by a series of transformations and validations which allow single or multiple operators to shape and supplement it, and if necessary, use increasingly detailed data. This model will serve as the basis of the future application and can be used to integrate the entire process on a higher level.

In order to use the method, let’s first go over the basic concepts of “model” (an abstract simplification of something that describes something we’d like to deal with) and “metamodel” (the description that defines the model, the metamodel describes how the various elements can be combined when making the model. If the model were pieces of a model airplane then the metamodel would be the set of instructions to build it).

Metamodels must contain the following elements:

  • abstract syntax that defines the structural elements and correlations in the definition of the model
  • concrete syntax which describes language elements of the abstract syntax with textual or graphic representation
  • semantic information that describes the higher-level meaning of the elements and the conditions of their use

A state machine that accepts only even numbers is a good example of a model. It can be used to demonstrate the usage of a metamodel and how it differs from other definition options, such as grammar.

Some of the main differences between metamodeling and grammar:

  • While the metamodel also allows describing the graph structure (directed graph), grammar supports parse trees better (an exponent can take the environment into consideration, yet cannot span great distances).
  • Whilst the metamodel defines the structure that the model will contain, grammar fundamentally defines the concrete syntax.
  • While a metamodel can describe what the structure looks like, we can wait to decide which form this can be described in. However, with grammar, the rules of textual representation must be defined.
  • Whilst in the case of metamodels, the metamodel and its copy, the model follows similar rules (thus, even the metamodel has a metamodel, the meta-metamodel) and can be loaded in many devices in a similar manner, this isn’t present in the case of grammar. The grammar rules must be defined in a different structure than the sentences of the grammar itself.

The advantages of using metamodels include the following:

  • They display and allow the processing of large-size documentation (formal description), similar to grammars.
  • They allow production of valid, well-defined texts (models), similar to grammars.
  • The verification of rules is defined in a declarative, business language on a model copy; performing conversions based on declaratively described transformational rules.
  • One can generate text-based documentation from the model.

Read next