Text not verified for kermeta 2 | |
---|---|
As Kermeta is designed to be used in a model driven environment, its structure is given as a model. This section presents the metamodel of Kermeta which corresponds to the abstract syntax of Kermeta.
This metamodel may be useful for many use cases. For example, you can use it to manipulate your Kermeta code for analysis or even generate some Kermeta code. This may be useful to understand how Kermeta works too.
Note | |
---|---|
All the code samples in this section are for illustration of the given concepts. |
The goal of the Kermeta language is to provide an action language for MOF models. The idea is to start from MOF, which provides the structure of the language, and to add an action model. Using the MOF to define the structure of the Kermeta language has an important impact on the language. In fact, as MOF concepts are Object-Oriented concepts, Kermeta includes most of the classical Object-Oriented mechanisms. Yet, MOF only defines structures, and the operational semantic corresponding to MOF concepts has to be defined in Kermeta. For instance MOF does not provide a semantic for behavior inheritance (concepts like method redefinition, abstract method, etc does not have any sense in the MOF).
Text not verified for kermeta 2 | |
---|---|
Kermeta has been designed to be fully compatible with the OMG standard meta-data language EMOF. The metamodel of Kermeta is divided into two packages :
structure which corresponds to EMOF
behavior which corresponds to the actions. This section gives an overview of these two packages and their relationships.
Thanks to this reuse, Kermeta is fully compatible with EMOF. This is useful in the promotion of Kermeta as a metalanguage.
The link between structure and behavior is made through the
property
body
of class
Operation
which allows to define the behavior of an operation using a Kermeta
expression.
A more detailed description of the architecture of Kermeta is presented in next sections.