FM3 or Fame meta-metamodel is a model to describe metamodels.
FM3 applies lessons learned and best practices from using EMOF in the Moose and Famix project:
lower: Integer and upper: Unlimited. As upper may possibly be unlimited, EMOF even introduces Unlimited as core primitive type, messing up any implementation. Analysis of existing models showed however that we use 0..1 and 0..* only! Hence, FM3 models multiplicity of properties using multivalued: Boolean, simple and no need for fancy primitives.See also:
is an abstract class with attributes
owner (derived)fullName (derived)namewith these constraints
name must be alphanumericfullName is dervied recursively, concatenating owner.fullName and namefullName is seperated by dots, eg FAMIX.Class.allAttributessubclasses NamedElement with attributes
abstractprimitive (derived)root (derived)superclasspackage (container, opposite Package.classes)allAttributes (derived, multivalued)attributes (multivalued, opposite Property.class)with these reserved instances
OBJECT := (FM3.Class (name 'Object') (root true)) BOOLEAN := (FM3.Class (name 'Boolean') (primitive true) (superclass (ref: Object))) NUMBER := (FM3.Class (name 'Number') (primitive true) (superclass (ref: Object))) STRING := (FM3.Class (name 'String') (primitive true) (superclass (ref: Object)))
for any other instance of MF3.Class, these constraints apply
owner is derived from packagesuperclass is not nilsuperclass must not be a primitivesuperclass chain may not include cyclespackage must not be nilallAttributes is derived as union of attributes and superclass.allAttributesallAttributes may have container = trueallAttributes must have unique namesattributes may have the name of any of superclass.allAttributes// TODO, I am not sure about this ... it does not allow overloading of attributes, does anyone need overloading?
subclasses NamedElement with attributes
classes (multivalued, opposite Class.package)extensions (multivalued, opposite Property.package)with these constraints
owner is nilclasses must have unique namesextentions, it class is not in classessubclasses NamedElement with attributes
composite (derived)containerderivedmultivaluedclass (container, opposite Class.attributes)typepackage (opposite Package.extensions)opposite (opposite Property.opposite)with these constraints
owner is derived from classcomposite is derived from opposite.containercontainer implies not multivaluedopposite.opposite must be selfopposite.class must be typeclass must not be niltype must not be niland these semantics
container property chains may not include cyclesopposite properties must refer to each otherfalsenull