OCUP 2 Advanced study materials
OCUP 2 Advanced study resources

OCUP 2 Advanced: Metamodeling based on other specifications in the UML family (Alf, fUML and MOF)

OCUP 2 Advanced · Work through your exam, one topic at a time.

All guide sections

Metamodeling based on other specifications in the UML family (Alf, fUML and MOF)

Scope and intent

This domain tests metamodeling across the UML family: MOF, fUML and ALF. You must distinguish M3/M2/M1/M0, know MOF's role and EMOF/CMOF, know fUML's executable subset and semantics, and know how ALF's textual action syntax maps to fUML.

Core rules

  • MOF is a meta-metamodel. A MOF model defines metaclasses, meta-associations, properties and constraints; the UML metamodel is a MOF model at M2, a user model is M1, and runtime objects are M0. MOF is not a diagram notation.
  • MOF Class has isAbstract; Property has multiplicity, isComposite, isDerived, isReadOnly and an opposite; Association owns memberEnds. EMOF is the essential subset; CMOF adds reflective and extension constructs.
  • fUML defines execution semantics for a subset of UML: classes, objects, links, values, activities, actions, control and object flows, and event dispatch. It is not full UML; state machines and interactions are outside its execution scope.
  • ALF is a textual action language whose abstract syntax maps to fUML actions. It provides statements and expressions, sequence, if, while, for, instance creation, invocation and link operations. It is not a general-purpose language and does not replace UML action metaclasses; it maps to them.

Worked example

Define a MOF metamodel for workflow with Class Task and a composite association from Task to Subtask. At M1, a workflow model instantiates Task objects. To make Task.execute executable, define an fUML Activity with a CallOperationAction targeting Task.execute and object-flow edges carrying the task and arguments. ALF text such as this.owner.approve() is parsed into fUML call and object-flow actions; at runtime, tokens carry the target object and argument values. The MOF layer defines allowed structure, fUML supplies behavior semantics, and ALF supplies concrete syntax. Do not claim the MOF model itself executes.

Traps

  • Confusing a UML Profile with MOF: a profile extends UML, while MOF defines metamodels.
  • Assuming fUML executes every UML diagram.
  • Treating ALF as a separate runtime; it maps to fUML.
  • Forgetting that M0 instances are not M1 model elements.
  • Using CMOF-only reflective constructs in an EMOF metamodel without checking conformance.