Text not verified for kermeta 2 | |
---|---|
This figure presents the main classes of the structure package. To design this package, we started from EMOF and completed it to build the Kermeta language. The choice of EMOF is motivated by two main reasons : firstly it is standardized by the OMG and secondly is is well-supported by tools such as Eclipse/EMF.
As MOF is not initially designed to be executable, several
concepts
have to be completed and
slightly modified to build an
executable
language. The first and most important modification is to
add
the
ability to define the behavior of operations. To achieve this we
define an action language
in the package
behavior
of Kermeta. The class
hierarchy of the package behavior is presented
on
???
. In practice, Kermeta expressions have
been designed by adding model
modification capabilities
(like assignment
of properties for
instance) to OCL expressions.
This represents the static part of the metamodel.
As a reminder, the structure of Kermeta is derived from EMOF from the OMG. During the build process, we merge and connect it with the behavior part.
So all the meaning of those metaclasses are very close to those described in the OMG standard specification.
This figure presents the element in the structure package that have a name. Kermeta relies on in various situation (For example in the typechecking process). The containment hierarchy is also presented since it is used in the identification process.
Class is a bit special, since its name is a derived property.
This figure presents the global view of all the metaclasses involved in Kermeta type system.
Basically, you can notice the split between Type and TypeDefinion needed in order to handle generics.
The containment is also represented here.
Please note that there is both
Type
and
TypeDefinition
. This is needed
because of the support of the generics. For example
in
var mycoll : Collection<String>
mycoll is a VariableDecl which point to a
Class
whose typeDefinition is the ClassDefinition
Collection
and has a TypeVariableBinding that lead to String.
TODO add an object diagram or a figure to illustrate.
TODO : if time : provide a set of small diagrams that focus of some elements of the type system.
This figure presents the global view of the main metaclasses involved in Kermeta ModelType.
This figure presents the view of the main metaclasses used by the ModelType adaptation.