When are IsRoot, IsAbstract & IsLeaf in UML used?

  • isRoot no longer exists in UML2. In UML 1 it means (from the specification) :

isRoot: Specifies whether the GeneralizableElement is a root GeneralizableElement with no ancestors. True indicates that it may not have ancestors, false indicates that it may have ancestors (whether or not it actually has any ancestors at the moment).

  • isAbstract means that the element is incomplete and cannot be instantiated.

If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers (e.g., as the target of general metarelationships or generalization relationships). Default value is false.

  • isLeaf means that you cannot redefine the element, same as final in some programming languages.

Indicates whether it is possible to further redefine a RedefinableElement. If the value is true, then it is not possible to further redefine the RedefinableElement. Default value is false.


Not real-life examples, but links to some.

  1. isRoot: I think this is no longer part of UML. That article is from 2004, which was around the time UML 2 came out, and I doubt Visio supported it. It still may not support it.
  2. isAbstract: it's a good idea to make all superclasses abstract so that you cannot create an instance that is not a member of the subclasses. Classes are essentially sets of instances. What does it mean for an instance to be a member of a superset and none of the subsets? It's unclear exactly what the classification of such an instance is, and it may inadvertently change over time. It's also a good idea to make the subclasses disjoint (non-overlapping) and covering (all known subclasses specified). There's more details and a real-life example of this using Avians in Lahman's book.
  3. isLeaf: essentially keeps people from overriding your code. I can't verify this quotation, but supposedly the The Unified Modeling Language Reference Manual says:

    Being a leaf or being constrained to be a leaf are not fundamental semantic properties but rather software engineering mechanisms to control human behavior.

Does that help?