This article compares meta-meta-models of LionWeb, C#, EMOF, Ecore, Essential, Freon, Java, KerML, MPS, and TypeScript. A meta-meta-model, also known as M3, describes what kind of structures can be represented in a (modeling) system. We show that all of these M3s are similar, and highlight the most important differences.
Summary
All systems describe structural aspects in a similar way, only differing in details. The foundational ideas are well understood and stable.
Everybody supports Classifiers (including the variations of Concept vs. Interface) and some variant of contained Features. Not very surprising, as this is the basic building block for composing structures.
Modeling systems distinguish between features with identity-free values (Properties), parent/child semantics (Containments) and relation semantics (References), whereas programming languages treat them all the same.
Out of necessity, everybody supports Primitive types. Enumerations are supported by every system except KerML (they are present in SysMLv2). Identity-free Structured data types are supported by newer systems, both model-oriented and programming languages.
A few aspects are present in several systems, but not supported by LionWeb.
Methods are out of scope for LionWeb. This is a deliberate choice: our protocols are meant to transmit state, not behavior. It also avoids nasty edge cases for inheritance, especially diamond inheritance.
Only programming languages and Ecore support generics. Experience shows that generic data structures aren’t worth the additional complexity — and without behavior LionWeb wouldn’t have a use case for them.
Similarly, LionWeb has no use for special type support. We can transport information about types as derived models, but don’t need to represent them in M3.
Comparison tables
Supported by LionWeb
| Annotation |
Declares an additional piece of information attached to potentially any element. |
| Classifier |
A container for Features. |
| Concept |
Declares a category of elements sharing the same structure. |
| Containment |
Declares a parent/child relation between Classifiers. |
| DataType |
A value without identity. |
| Enumeration |
Declares a DataType with finite, pre-defined, known set of possible values. |
| EnumerationLiteral |
Declares one of the possible values of an Enumeration. |
| Feature |
A part of a Classifier. |
| Field |
Declares a part of a StructuredDataType. |
| IKeyed |
An element of M2 that can be addressed from M1. |
| INamed |
An element with a name. |
| Interface |
Declares a category of Classifiers sharing some similar structure. |
| Language |
Declares a grouping of M2 elements. |
| LanguageEntity |
A part of a Language. |
| Link |
A relation between classifiers. |
| Node |
The base thing every Classifier inherits from. |
| PrimitiveType |
Declares an atomic DataType. |
| Property |
Declares a part of a Classifier with identity-free value. |
| Reference |
Declares an unrestricted relation between Classifiers. |
| StructuredDataType |
Declares a DataType with pre-defined structure. |
| LionCore | C# | EMOF | Ecore | Essential | Freon | Java | KerML | MPS | TypeScript |
|---|---|---|---|---|---|---|---|---|---|
Comment |
EAnnotation |
Attribute |
AnnotatingElement |
NodeAttribute |
|||||
Type |
Classifier |
EClassifier |
Classifier |
AbstractConceptDeclaration |
|||||
class |
Class |
EClass interface=false |
Class |
Concept |
class |
Class |
ConceptDeclaration |
class |
|
property |
Association |
EReference containment=true |
Property composition=true |
PartProperty |
field |
Feature |
LinkDeclaration metaClass=aggregation |
property |
|
DataType |
EDataType |
DataType |
DataTypeDeclaration |
||||||
enum |
Enumeration |
EEnum |
Enumeration |
enum |
EnumerationDeclaration |
enum |
|||
enum literal |
EnumerationLiteral |
EEnumLiteral |
EnumerationItem |
LimitedConcept |
enum literal |
EnumerationMemberDeclaration |
enum literal |
||
StructuralFeature |
EStructuralFeature |
Property |
Feature |
||||||
property |
Property |
field |
Feature |
property |
|||||
NamedElement |
EModelElement |
Element |
INamedStructureElement |
||||||
ENamedElement |
Element |
||||||||
interface |
Class |
EClass interface=true |
Class abstract=true |
Interface |
interface |
Class |
InterfaceConceptDeclaration |
interface |
|
namespace |
Package |
EPackage |
Class root=true |
Language |
package |
Package |
(Language)[1] |
||
PackageableElement |
EClassifier |
Element |
IStructureElement |
||||||
property |
Association |
EReference |
field |
Feature |
LinkDeclaration |
property |
|||
object |
Element |
EObject |
Object |
Object |
Element |
Node |
object |
||
ValueType |
PrimitiveType |
EDataType |
PrimitiveType |
DataType |
PrimitiveDataTypeDeclaration |
||||
Property |
EAttribute |
Property |
PrimitiveProperty |
Feature |
PropertyDeclaration |
||||
property |
Association |
EReference containment=false |
Reference |
ReferenceProperty |
field |
Feature |
LinkDeclaration metaClass=reference |
property |
|
struct |
Class structure=true |
value object |
Structure |
Not supported by LionWeb
| Description | C# | EMOF | Ecore | Freon | Java | KerML | MPS | TypeScript |
|---|---|---|---|---|---|---|---|---|
method |
method |
Operation |
EOperation |
method |
Behavior |
ConceptMethodDeclaration |
function |
|
method parameter |
parameter |
Parameter |
EParameter |
parameter |
Feature |
ParameterDeclaration |
parameter |
|
typed element |
TypedElement |
ETypedElement |
||||||
generic type |
type |
EGenericType |
type |
type |
||||
generic type parameter |
generic type parameter |
ETypeParameter |
type parameter |
type parameter |
||||
type |
type |
Type |
type |
Type |
type |
Singular elements
EMOF
-
Feature
Ecore
-
EFactory
-
EStringToStringMapEntry
KerML
-
AssociationStructure
-
BindingConnector
-
Comment
-
Conjugation
-
Connector
-
CrossSubsetting
-
Differencing
-
Disjoining
-
Documentation
-
ElementFilterMembership
-
EndFeatureMembership
-
Expression
-
FeatureChaining
-
FeatureValue
-
Flow
-
Function
-
Import
-
Interaction
-
Intersecting
-
MembershipImport
-
Metaclass
-
MetadataFeature
-
Multiplicity
-
Namespace
-
ParameterMembership
-
Predicate
-
Redefinition
-
ReferenceSubsetting
-
Relationship
-
ResultExpressionMembership
-
ReturnParameterMembership
-
Specialization
-
Step
-
Subsetting
-
Succession
-
SuccessionFlow
-
TextualRepresentation
-
Unioning
MPS
-
ChildrenIncomingReferencesPolicy
-
ConstrainedDataTypeDeclaration
-
EnumerationMemberIdentifierPolicy
-
IConceptAspect
-
INamedAspect
-
InstanceIncomingReferencesPolicy
-
LinkMetaclass
-
MarkerInterfaceAttribute
-
StaticScope
Data sources
We compare the following meta-meta-models:
| C# |
Microsoft’s C# programming language. |
| EMOF |
OMG’s (Object Management Group) Essential MetaObject Facility, the basis of UML. |
| Ecore |
EMF’s (Eclipse Modeling Framework) meta-meta-model. |
| Essential |
Metadev’s Essential, a language workbench. |
| Freon |
Freon’s Language structure, the basis for their language workbench. |
| Java |
Oracle’s Java programming language. |
| KerML |
OMG’s (Object Management Group) Kernel Modeling Language, the basis for SysML v2. |
| LionCore |
LionWeb’s meta-meta-model. |
| MPS |
JetBrains MPS (Meta Programming System) Structure language. |
| TypeScript |
Microsoft’s TypeScript programming language. |