Skip to main content
Jump to: navigation, search


Revision as of 10:33, 5 July 2007 by (Talk | contribs) (changed KM3 paper reference)

< To: AMMA


  • KM3 has been defined at INRIA.
  • The reference manual may be found at: km3 intro.
  • There is an evolutive library of metamodels written in KM3.
  • This library contains about 180 KM3 metamodels and has been named a Zoo.
  • This collection of KM3 metamodels is intended for experimental purposes.
  • On the same site there are also a number of "mirror zoos" containing metamodels written in other languages like MOF, UML, Prolog, VB, etc.


Why genmodel gives me errors when I use Ecore model got from KM3-to-Ecore transformation ?

Because generated Ecore model has no nsURI, nsPrefix attributes setted for packages and no instanceClassName for datatypes.

KM3 is supposed to be a *kernel* metametamodel. That's why there is no EMF-Specific feature like, for instance, nsURI in packages.

Now, concerning the KM3-to-Ecore transformation nsUri, nsPrefix and instanceClassName things could have been hard-coded in it by some kinds of default values. We don't think it is a good solution: it is not configurable and not very beautiful (i.e. not generic regarding other KM3-to-XXX transformation where XXX is a metametamodel such as MDR).

The best one should be to do an ATL transformation taking the Ecore model from KM3-to-Ecore. This transformation copies the model while adding default values to nsURI, nsPrefix and instanceClassName attribute. This is not a very complicated transformation. Thus, you will be able to define your own default value for nsURI, instanceClassName etc.

Another solution is to wait for the next release of KM3 which will provide an model annotation framework and will use it to handle those EMF-specific metadata in a generic way.

What is the solution to use blanks, punctuation, and/or special characters in identifiers (e.g., class and attribute names)?

KM3 allows you to use whatever name you want for your packages, classes, attributes, references, enumerations, enumeration literals, and datatypes. You only need to put any name that is not a valid identifier between double quotes. For instance, the following is a valid KM3 excerpt:

 class "This is a long class name, with spaces and punctuation!" {}

although you probably do not want to use this kind of names very often ;-) .

This double-quote escaping mechanism is also available in ATL and TCS, and you may have recognized it from SQL.


Jouault, F, and Bézivin, J: KM3: a DSL for Metamodel Specification . In: Proceedings of 8th IFIP International Conference on Formal Methods for Open Object-Based Distributed Systems, LNCS 4037, Bologna, Italy, pages 171-185. 2006.

Back to the top