-
Notifications
You must be signed in to change notification settings - Fork 15
The Meta metamodel NMeta
NMF contains its own meta-metamodel called NMeta. NMeta is similar to Ecore but contains dedicated support for type system features widely used on the .NET platform such as structures or events. Furthermore, it also supports an extension mechanism closely related to stereotypes as well as refinements. The semantics of NMeta is clearly defined through a mapping to category theory. Though there is a high semantic overlap with the Essential Meta Object Facility (EMOF) standard, there are also some features that do not have a counterpart in NMeta, in particular factories and generic types.
Sorry, Figure 1 is not yet moved to the Github Wiki
An excerpt of NMeta is depicted in Figure 1. Similar to Ecore, it describes classes by inheritance, attributes and references (and operations, omitted in Figure 1). References are allowed to be containments and to define opposite references. However, both attributes and references may also refine other attributes and references and an additional InstanceOf relation supports deep modelling, though we omit a detailed description in this paper due to space limitations. However, since Ecore is the meta-metamodel most often used in MDE, NMF contains a model transformation from Ecore to NMeta. This transformation is based on the extensible Model Transformation Language NTL and thus support for other types can be easily extended. The resulting NMeta metamodel is compliant with the original Ecore metamodel if the latter only contains basic structures (packages, classes, attributes and references). Here, compliant means that serialized instances of the original Ecore metamodel can be deserialized with the NMeta metamodel (if no custom XMI handlers are used) and vive versa. In particular, the XMI serialization of the metamodels is equivalent and the NMF serializer uses the same addressing scheme for cross references as the EMF serializer uses for Ecore. This allows developers to easily use Ecore-based models in .NET applications and already allowed us to participate in several TTC cases.
Similar to Ecore, NMeta is bootstrapped and the classes ModelElement and Model are the only ones with a custom implementation, the implementation of all other classes originate directly from the code generator.