The Organization of UML - The Layered Metamodel

18 important questions on The Organization of UML - The Layered Metamodel

One way that it becomes possible to have a model of a modeling language is...?

to separate strictly the levels of discourse.

We call a model of a modeling language a ...?

METAMODEL

Therefore, all the MOF models used to provide the formal abstract syntax for UML are ..?

metamodels.

In philosophy and mathematics, this separation into levels is common to prevent malformed statements that can result in a paradox.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What are the Levels / Layers of MetaModeling.

There are 5 different models.

What is the M0 Layer?


  • The implementation world

  • Instances, database records, tables, executables are the elements here

  • In a Library system, the books and the patrons in the Library database are level M0. Generally, there is one M0 object to represent the M-1 things




What can you do with it?

You can implement this layer

What is the M1 Layer?


  • The modeling world

  • Your model lives here and describes the things in the M0 layer

  • Your model of the Library system is an M1 level description of the M0 implementation. The Book and Patron Classes live here



What can you do with it?
You can model in this layer

What is the M2 Layer?


  • The metamodeling world

  • The elements in this layer are the elements of UML. The M1 level uses the M2 elements. Models at this level give the abstract syntax, the grammar of UML MOF. The METACLASSES Class and Object lives here



What can you do with it?
You can read the specification in this layer

What is the M3 Layer?


  • The meta-metamodeling world

  • This layer describes the MOF elements. The MOF is used to write the grammar of UML and several other OMG languages. The meta-metaclasses MOF Class and MOF object live here


What can you do with it?
Not Much  

When we talk to people about the metamodel, we are talking about a ... ?

high-level model.

If you were making a system for a Library, there could be at least three things called Books.

What are they?




1.  The physical books (M-1)


2.  The books in the implementation (in the app, database table, runtime objects) (M0)


3.  The class Book in the model (M1)

We cannot put an implementation level element (MO) into the ...?

We cannot put an implementation level element (MO) into the model (M1), but we can show a representative example.

Not only are there too many book records in the Book table of the database, but essentially a model-level element is not an implementation element.

To distinguish the M0 objects from the M1 element version that represents them, we call the model versions, INSTANCE SPECIFICATIONS, though commonly we still call them OBJECTS

It is also possible to show some of the attributes of the class Book in the next compartment. You will find this useful because you can show the current values that the object has in these slots.

Why do we draw such objects (instances)?

We draw such objects (instances) when we need to illustrate the participants of a scenario or collaboration for sample purposes.

These diagrams are often useful to show examples to fellow workers or to help set up a test.

We can emphasize the relationship between the instance of a book and the Book class, by connecting them on a diagram.

What is the notation for this?

  • We use a dashed arrow pointing from the instance to the class.

  • This arrow indicates a nonspecific DEPENDENCY.

  • In this case, the object or instance DEPENDS on the class definition.

We can also represent in our models some M2 level elements.

In fact, all the abstract syntax diagrams are metamodels of that level.

Like a class, a metaclass is also ...?

shown in a class-like box with the name in the top compartment.

How do we mix diagrams?

When we mix levels on the same diagram, we flag the elements with the level they come from.

We place the terms «Metaclass» or «Class» above the names as shown in Fig. 4.6.

Why do we indicate that this is a Metaclass?

We should flag both «Metaclass» and «Class» in this diagram because it is a mixed-level diagram, but such flagging is optional on single-level diagrams.

In the abstract syntax diagrams within the UML specification, the «Metaclass» stereotype is omitted

As an example of the abstract syntax of UML, we show, in Fig. 4.7, a partial definition of a UML Class.

In this metamodel, we indicate that a  ....?

Class, based on the multiplicities, must have a Name (1) and may have zero or more Attributes (0..*).

In UML, the notation is not always sufficiently precise to determine the part of UML (element type) that is being modeled.

Therefore.... What can you use to clarify this?

tagging with a stereotype may be required.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo