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)name
with these constraints
name
must be alphanumericfullName
is dervied recursively, concatenating owner.fullName
and name
fullName
is seperated by dots, eg FAMIX.Class.allAttributes
subclasses NamedElement with attributes
abstract
primitive
(derived)root
(derived)superclass
package
(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 package
superclass
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.allAttributes
allAttributes
may have container = true
allAttributes
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 classes
subclasses NamedElement with attributes
composite
(derived)container
derived
multivalued
class
(container, opposite Class.attributes)type
package
(opposite Package.extensions)opposite
(opposite Property.opposite)with these constraints
owner
is derived from class
composite
is derived from opposite.container
container
implies not multivalued
opposite.opposite
must be selfopposite.class
must be type
class
must not be niltype
must not be niland these semantics
container
property chains may not include cyclesopposite
properties must refer to each otherfalse
null