Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< To: AMMA


KM3 (Kernel Meta Meta Model) is an implementation-independent language to write metamodels, and thus to define abstract syntaxes of Domain Specific Languages. It has been defined by the ATLAS INRIA team.

The technical details required to use KM3 are presented in the KM3 reference manual.

There is an evolutive library of open-source metamodels written in KM3 called the Atlantic Zoo, which contains 243 metamodels as of September 2007. Contributions to this zoo are welcome ;-) (see "How to contribute to the Atlantic zoo" if you want to participate). This collection of KM3 metamodels is primarily intended for experimental purposes. There are also a number of "mirror zoos" containing versions of these metamodels expressed: in Ecore, in MOF 1.4, in UML, in Visual Basic, 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