-
Key: SYSML2-280
-
Status: closed
-
Source: oose Innovative Informatik eG ( Mr. Tim Weilkiens)
-
Summary:
ElementMain_Mapping::ownedRelationship deals with owned comments and tries to create an ownership relationship thanks to ElementOwnership_Mapping.
Instead, this is an Annotation relationship that shall be used here. We can get it thanks to the CommentAnnotation_Mapping.However, CommentAnnotation_Mapping misses the computation of ownedRelatedElement that is left to its default value, meaning that the ownership of a comment is never set.
-
Reported: SysML 2.0a1 — Sun, 2 Jul 2023 06:46 GMT
-
Disposition: Resolved — SysML 2.0b2
-
Disposition Summary:
Make comments owned by an Annotation in all cases
Based on the KerML specification, an Annotation does not own its annotating element by default. It is actually possible that an annotation owns its annotating element but this is not mandatory and, at a first glance at least, this is not the best translation in case of transformation from a UML::Comment. Indeed, in UML (and SysML) Comments actually "own" their references to the annotated elements, rather than the opposite. In addition, UML::Comments owner are not always listed as "annotated elements", even if we can assume that it is in general implicitly the user intent. This topic was discussed in a meeting early July.
The point is that, since the Relationship metaclass has been made abstract, the ElementOwnership_Mapping cannot create an instance of it anymore and it shall itself be abstract.
The only concrete specialization of Relationship that could make sense for representing the comment ownership would Membership. The point is that:
1. It is restricted to Namespaces. That is another solution shall be found for element that are not namespaces and the only one that can works is to have the comment owned by an annotation relationship
2. In UML, comments owned by a Namespace are not members of it.Considering the above, it looks like making a comment translated from an UML/SysML model owned by Annotation relationship is the solution that has the lowest semantic impact. In addition, it has the advantages to be usable in all cases, i.e. whether the owned in the source model is translated as a SysMLv2 Namespace or not.
A new mapping class is needed for creating the annotation that will support the comment ownership and ElementMain_Mapping is not the only mapping class to be fixed. Comment_Mapping and CommentAnnotation_Mapping are impacted as well. The latter shall be modified to owns the comment in case the source comment has its owner listed by its annotatedElement property, and the former shall trigger, if required, the creation of the annotation that will set its ownership. Also Comment_Main::ownedRelationship() shall be fixed to be consistent with the fix requested on its ElementMain_Mapping ancestor.
-
Updated: Tue, 1 Jul 2025 14:49 GMT
-
Attachments:
- SYSML2-384-Modified.txt 7 kB (text/plain)
SYSML2 — ElementMain_Mapping::ownedRelationship is wrong
- Key: SYSML2-280
- OMG Task Force: Systems Modeling Language (SysML) 2.0 FTF