Skip to content
#Architecture

Modeling Levels in UML and Why They Are All 4Not more. (Category Architecture)

#Architecture #Software #Architect #SystemDesign #SoftwareArchitecture #Processes

I’ve talked about how I taught UML. (1 and 2)Today I want to talk about UML modeling levels and why there are only four, not more. Let me describe all these levels. M0 - Real World/Instances - The Real World (Objects) This layer represents actual instances or objects in a real system. Object diagram is considered a level model 0which is a copy of the class diagram. It shows specific instances of objects and their relationships at a given time. - M1 - Models (Model) This layer contains actual UML models created by users to represent systems. Class diagrams are examples of level models 1 (M1). These models contain simulation elements such as actors, use cases, classes, and packages that describe specific system perspectives. I actually talked about them in the post.Useful charts from UML" - M2 - Metamodel - Metamodel (Rules for modelling) The UML specification itself exists at this level. It is a metamodel that defines the language and structure used to create UML models. The M2 layer defines concepts such as "Class", "Association" and "Atribute" that are used to create the M1 models. - M3 - Meta-metamodel - Meta-metamodel This higher level is represented Meta-Object Facility (MOF)It provides a language for specification of metamodels. MOF can be used as a meta-meta-model not only for UML but also for other languages. This hierarchical structure follows the principle of “a model is an instance of a metamodel” and “a metamodel is a model”, creating a consistent structure for modeling at different levels of abstraction.

From the construction, it seems that you can add the next level in the form of meta-meta-metamodel, but the authors of the UML settled on the following: 4 levels for several reasons n - MOF self-description (Meta-Object Facility) At the M3 level is the MOF, which is self-descriptive. This means that MOFs are defined by their own designs. The MOF meta-metamodel describes itself, eliminating the need for an additional layer of abstraction. This approach is called “reflexive” or “self-descriptive.”

  • Preventing Infinite Recursion If there were a level of M4, it would be logical to assume that M5 would be necessary to describe it, and so on indefinitely. Because of this, the M3 level is self-descriptive, so there is no need for an M4 level. - Practical sufficiency Four levels of abstraction (M0-M3) enough to solve almost all modeling problems in software engineering. Additional levels of abstraction would increase complexity without significant practical advantages.

Let's look at examples of levels from several areas M0 - Employee Ivan Petrov, born 15.03.1990 M1 - Class "Employee" with fields name, date / birth M2 - Concepts "Class", "Attribute", "Communication" in UML M3 - "Meta-Class" - template for M2 classes, "Meta-Atribute" - rule for M2 attributes.

Or a slightly less formal example from the construction sector. M0 - Furniture and people in rooms (real-world); M1 - room plans (Where the table is, how the beds are arranged); M2 - Architecture of the building (How many floors, where are the stairs?); M3 - building codes (how to design buildings).

Or a language example. M0: "Ivan is reading a book" M1 - Rules of the Russian language (verbs); M2 - Linguistic Terms ("phoneme," "morpheme."); M3 - Philosophy of Language ("What is a language?").

The four-tier model of UML and MOF provides a balance between flexibility and complexity. The absence of a fifth level is not a limitation, but a consequence of thoughtful design.

#Software #Architect #SystemDesign #SoftwareArchitecture #Processes