Chapter 4.  Kermeta framework

[Warning]Text not verified for kermeta 2

Kermeta is bundled with a framework that provides the base functionalities for metamodel engineering.

[Tip]Tip

When you write require kermeta at the head of your file, you are importing the file framework.km located in the Kermeta plugin.

Currently, it provides the following packages :

Packages in Kermeta framework

kermeta::interpreter

This package defines some classes related to Kermeta interpreter and also to Kermeta surface syntax. Some uses of this package are illustrated in Section 2.20, “ Dynamic evaluation of Kermeta expressions ” .

kermeta::persistence

This package defines the notion required to serialize and deserialize models. This is illustrated in Section 2.12, “ Loading and saving models ” and in the EMF tutorial document ( http://www.kermeta.org/documents/emfTutorial/ )

kermeta::kunit

This is a basic support for unitary tests (like Junit but for Kermeta).

kermeta::language::structure

It contains the classes of Kermeta structure. Note that it slightly differs from the kermeta_java.ecore due to an inheritance to the classes in Kermeta::reflexion. However, it proposes the very same functionalities.

kermeta::language::behavior

It contains the classes for the behavior of Kermeta.

kermeta::exceptions

It defines various exceptions that you can use in Kermeta. Inheriting from kermeta::exceptions::Exception allows to give more information to the end user because it will also provide a stack trace (which would not be available otherwise).

kermeta::io

This package provides basic support for input/output with Kermeta. It is voluntary minimal because that not the main role of Kermeta to provide such primitives. In the future, this package may even disappear and be replaced by the ability to directly call Java libraries.

kermeta::reflection

This package contains all the abstract classes needed for the reflexivity of Kermeta. The concrete implementation are in kermeta::standard or kermeta::structure.

kermeta::utils

This package defines various tool classes that cannot be part of the core of the language, but are important enough to be part of the framework.

kermeta::standard

This package defines all the basic objects needed for a typical Kermeta application. For example, it defines data types, collections, etc.

[Note]Note

For more details about the content of these packages, please look at the generated documentation available on line: http://www.kermeta.org/docs/KermetaFramework/framework.km.html