Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "KM3"

m (FAQ: fixed typo)
(refactored Presentation section)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
==Presentation==
 
==Presentation==
* KM3 (Kernel Meta Meta Model) is a neutral language to write [http://en.wikipedia.org/wiki/Meta-model metamodels] and to define [http://en.wikipedia.org/wiki/Domain_Specific_Language Domain Specific Languages]
+
KM3 (Kernel Meta Meta Model) is an implementation-independent language to write [http://en.wikipedia.org/wiki/Meta-model metamodels], and thus to define abstract syntaxes of [http://en.wikipedia.org/wiki/Domain_Specific_Language Domain Specific Languages].
 +
It has been defined by the ATLAS [http://en.wikipedia.org/wiki/INRIA INRIA] team.
  
* KM3 has been defined at [http://en.wikipedia.org/wiki/INRIA INRIA].
+
The technical details required to use KM3 are presented in the [http://www.eclipse.org/gmt/am3/km3/doc/KernelMetaMetaModel%5Bv00.06%5D.pdf KM3 reference manual].  
  
* The reference manual may be found at: [http://www.eclipse.org/gmt/atl/doc/ manuels], [http://www.eclipse.org/gmt/atl/doc/KernelMetaMetaModel%5Bv00.06%5D.pdf km3 intro].
+
There is an evolutive library of open-source [http://en.wikipedia.org/wiki/Meta-model metamodels] written in KM3 called the [http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/ Atlantic Zoo], which contains 243 metamodels as of September 2007.
 
+
Contributions to this zoo are welcome ;-) (see [[KM3/How_to_Contribute_to_Atlantic_Zoo | "How to contribute to the Atlantic zoo"]] if you want to participate).
* There is an evolutive library of [http://en.wikipedia.org/wiki/Meta-model metamodels] written in KM3.
+
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: [http://www.eclipse.org/gmt/am3/zoos/atlantEcoreZoo/ in Ecore], [http://www.eclipse.org/gmt/am3/zoos/atlantMOF_MDRZoo/ in MOF 1.4], [http://www.eclipse.org/gmt/am3/zoos/atlanticUMLZoo/ in UML], [http://www.eclipse.org/gmt/am3/zoos/atlanticVBZoo/ in Visual Basic], [http://www.eclipse.org/gmt/am3/zoos/ etc.]
* This library of open source metamodels may be found at: [http://www.eclipse.org/gmt/am3/zoos/ AtlanticZoo]. The contribution to this zoo is open and welcome ;-). Please take a look to the following page: [[KM3/How_to_Contribute_to_Atlantic_Zoo | "How to contribute to the Atlantic zoo"]] if you want to participate.
+
 
+
* 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.
+
  
 
==FAQ==
 
==FAQ==
* '''Why genmodel gives me errors when I use Ecore model got from KM3-to-Ecore transformation ?'''
+
 
 +
===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.
 
Because generated Ecore model has no nsURI, nsPrefix attributes setted for packages and no instanceClassName for datatypes.
Line 27: Line 22:
 
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).
 
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 attribtue. This is not a very complicated transformation. Thus, you will be able to define your own default value for nsURI, instanceClassName etc.
+
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.
 
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.
  
 
== References ==
 
== References ==
[http://www.sciences.univ-nantes.fr/lina/atl/www/papers/KM3-FMOODS06.pdf KM3: a DSL for Metamodel Specification ]Jouault, F, and Bézivin, J (2006). In: Proceedings of 8th IFIP International Conference on Formal Methods for Open Object-Based Distributed Systems, LNCS 4037, Bologna, Italy, pages 171-185.  
+
Jouault, F, and Bézivin, J: [http://www.sciences.univ-nantes.fr/lina/atl/bibliography/FMOODS06 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.
  
 
[[Category:Modeling]]
 
[[Category:Modeling]]

Latest revision as of 18:32, 5 September 2007

< To: AMMA

Presentation

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.

FAQ

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.

References

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