UML 2.6 RTF Avatar
  1. OMG Issue

UMLR — Stereotype must be owned by a Profile, but shows composition relationship to Package

  • Key: UMLR-826
  • Status: open  
  • Source: N/A ( Robert Hairgrove)
  • Summary:

    On page 322 under section 12.4.9.6 Constraints for Stereotypes, we have the following constraint:

    "generalize
    A Stereotype may only generalize or specialize another Stereotype."

    On the same page under section 12.4.9.4 Association Ends, we have:

    "/profile : Profile [1..1]{} (opposite A_profile_stereotype::stereotype)
    The profile that directly or indirectly contains this stereotype."

    If a given Stereotype is a nested Stereotype (assuming this is legal, since a Stereotype inherits Class), then its owner must be another Stereotype. Otherwise, its owner must be a Profile according to 12.4.9.4. If it is nested, then the operation "profile()" as described there should return the Profile containing (i.e. owning) the top-most, non-nested Stereotype in the hierarchy. Otherwise, "profile()" should return the owner of the Stereotype in question.

    However, in the diagram on page 295 (of the UML 2.5.1 specification PDF file), the composition relationship is drawn between Stereotype and Package, and not between Stereotype and Profile. Of course, a Profile "IS A" Package, but the ownership relationship would be much clearer if it were drawn between Stereotype and Profile.

    Ideally, one should use the

    {xor}

    constraint between two composition arrows, one self-directed for nested Stereotypes and one for Profiles, unless a Stereotype can have other types of owners...?

  • Reported: UML 2.5.1 — Mon, 6 May 2024 22:31 GMT
  • Updated: Tue, 7 May 2024 17:30 GMT