Appendix C. Kermeta / Ecore mapping

[Warning]Text not verified for kermeta 2

Kermeta natively integrates Ecore defintions, however it uses an internal mapping in order to import ecore model as Kermeta models. In the other way round a Kermeta model can be translated into a pure ecore model. (for example in the compiler)

This annex indicates how Kermeta models are translated into Ecore models and vice versa.

[Note]Note

TODO : finish this by looking into kermeta2ecore transformation and the compiler specifications.

Kermeta concept

Ecore concept

Notes

Class

EClass

Constraint (invariant)

EAnnotation(source="kermeta.inv") + DetailEntry

Constraint (precondition|postcondition)

EAnnotation(source="kermeta.pre"|"kermeta.post") + DetailEntry

Constraint (postcondition)

EAnnotation(source="") + DetailEntry

Operation

EOperation

Tag (general case)

EAnnotation(source="kermeta") + DetailEntry

Most Tags are translated into an EAnnotation with source="kermeta" and one DetailEntry with key= NameOfTheTag and value= ValueOfTheTag . If this is a /** */ comment, the name of the tag is "documentation".

Tag (applied on Constraint)

EAnnotation(source="kermeta.inv.doc") + DetailEntry

EAnnotation.references points to the EAnnotation representing the Constraints. DetailEntry with key= NameOfTheTag and value= ValueOfTheTag . If this is a /** */ comment, the name of the tag is "documentation".