Minimal Partition - modelint/shlaer-mellor-metamodel GitHub Wiki
A Generalization abstracts a general set that has been partitioned at least once to yield two proper subsets. Each additional partition yields one more subset. The general set is abstracted as a Superclass and each proper subset is abstracted as a Subclass.
images/relationship-subsystem/minimal-partition-10.png
As illustrated above, the set abstracted by a Superclass requires a minimal partition to yield the required minimum of two Subclasses. The Subclasses on either side of this Minimal Partition are arbitrarily designated A and B.
This constraint has been formalized to preclude the abuse, in Executable UML, of modeling a Generalization with only one Subclass. In set theory, an improper subset is a subset that includes the entire superset. This sounds reasonable enough, but what does it mean in terms of object oriented analysis? Once a Class is defined, why abstract it again?
One motivation is to slap two lifecycles on a Class. But the one-lifecycle rule is the foundation of Class definition, so the need for two distinct lifecycles implies that the analysis is flawed and that there are in fact two distinct Classes required (or the subject matter Domain is abstracted poorly or any number of possible analysis errors).
The history of programming languages has repeatedly demonstrated that the best intentioned language cannot police itself against clever abuse. That’s always going to happen, and not always for the worse. On the other hand, there is no reason to provide features ripe for mischief that have no other utility.
Identifiers
- Rnum + Domain
Attributes
No non-referential attributes