ST6RI-872 Library models have inherited member name collisions (KERML11-76, SYSML21-322)#679
Conversation
Kernel Semantic Library - FeatureReferencePerformances - Objects - Observation Kernel Function Library - VectorFunctions
Mostly, this involved just adding appropriate explicit redefinitions. But: - Flows was fixed in part by updating Connections::BinaryConnection and Transfers::FlowTransferBefore to re-order specializations. - Usages typed by metadata definitions in SysML were mostly fixed by the fix to Metadata. However, this did not fix usages typed by KerML metaobjects. To consistently resolve all problems, "subsets Metadata::metadataItems" was added to all metadata/metaobject item usages. - Views was fixed by adding a redefinition of "this" to View::viewpointConformance::viewpointSatisfactions, but with a default of "that.that" (which is basically the default value of "this" for View::viewpointSatisfactions; but see also SYSML21-323).
Geometry Library - ShapeItems (also required an update to Objects::StructuredSpaceObject from the Kernel Semantic Library). Quantities and Units Library - SI - USCustomaryUnits
Also needed to make changes in: - Occurrences - Items - Parts - SpatialItems - DerivationConnections
martynaslelevicius
approved these changes
Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR resolves diamond inheritance problems that cause name collisions between inherited members of types in several library models. It proactively resolve the following KerML and SysML issues, even though the RTFs have not voted on resolutions yet.
Validation
KerMLValidatorcheckNamespace– Previously, the implementation ofcheckNamespaceMembershipDistinguishibilitydid not include checking memberships inherited from different supertypes. It was necessary to implement this checking in order to detect the sort of distinguishibility problems in the library models from KERML11-76 and SYSML21-322 and then to show that they were corrected.Library Models
Kernel Semantic Library
FeatureReferencingPerformances– Added owned redefining features to:BooleanEvaluationResultMonitorPerformance::onOccurrence::monitoredOccurrenceBooleanEvaluationResultToMonitorPerformance::monitor1::endWhen(end features)BooleanEvaluationResultToMonitorPerformance::monitor2::endWhen(end features)Objects– Added the following structures nested inStructuredSpaceObject, each with an appropriate owned redefinition ofinnerSpaceDimension, and used them to type, respectively,StructuredSpaceObject::faces,edgesandvertices.StructuredSurface specializes StructuredSpaceObject, SurfaceStructuredCurve specializes StructuredSpaceObject, CurveStructuredPoint specializes StructuredSpaceObject, PointWhen one of the features
faces,edgesorverticesis the related element on an end of a connector that has an owned cross feature, one of these structures becomes the type of the cross feature. This ensures that theinnerSpaceDimensionredefinition is applied in the cross feature.Observation– Added a redefinition of end featuretargetto stepObserveChange::transfer.Occurrences– Replaced the redefinition ofOccurrence::spaceBoundary::isClosedbinding it to true with an invariant asserting that it is true. This avoids a name collision in cases when a subset or redefinition ofspaceBoundaryis typed with a shape that already redefinesisClosed.Transfers– Changed the order of specializations of the interactionFlowTransferBeforefromFlowTransfer, TransferBeforetoTransferBefore, FlowTransfer. This ensures thatFlowTransferBefore::selfproperly resolves toTransferBefore::self, due to the current dependency of name resolution in the Pilot Implementation on the order of specializations.Kernel Function Library
VectorFunctions– Added a redefinition ofdimensionin the result parameter ofCartesianThreeVectorOf.Systems Library
Actions– Added redefinitions ofpayloadinAcceptMessageAction::acceptedMessageSendAction::sentMessageTransitionAction::acceptedMessageConnections– Changed the order of specializations of the connection definitionBinaryConnctionfromConnection, BinaryLinkObjecttoBinaryLinkObject, Connection. This ensures thatBinaryConnection::participantproperly resolves toBinaryLinkObject::participant, due to the current dependency of name resolution in the Pilot Implementation on the order of specializations.Flows– Added a redefinition ofselfinSuccessionFlow.ItemsItem::envelopingShapes::innerSpaceDimensionbinding it to a computed value with an invariant asserting that it equal to that value. This avoids a name collision in cases when a subset or redefinition ofenvelopingShapesis typed with a shape that already redefinesinnerSpaceDimension.Item::boundingShapes::facesandedgesprivate, so they are not inherited. This avoids name collisions whenboundingShapesis redefined and typed with a shape that already redefinesfacesand/oredges.selfwithinItem::boundingShapesreferential.incomingTransferSortwithinItems::subitems, but made it private, avoiding name collisions in subsets or redefinitions ofsubitems(particularly when such subsetting is implied).Metadata– Added a redefinition ofselfinMetadata::MetadataItem.Parts– Changed the redfinition ofthisinPart::ownedActionsto explicitly redefine bothAction::thisandownedPerformances::this.Ports– Redefined the end featuressourceandtargetinPort::outgoingTransfrsFromSelf.SysML– Added "subsets Metadata::metadataItems" to all item usages. This ensures that the redefinition ofselfadded toMetadata::MetadataItemapplies, even if the item usage is typed by KerMLMetaobject, rather thanMetadataItem.Views– Added a redefinition ofthistoView::viewpointConformance::viewpointSatisfactions. (But see also SYSML21-323).Geometry Domain Library
ShapeItemsPathfromStructuredSpaceObject, CurvetoStructuredSpaceObjct::StructuredCurve.ShellfromStructuredSpaceObject, SurfacetoStructuredSpaceObjct::StructuredSurface.SpatialItemsSpatialItem, each with an appropriate owned redefinition oflocalClock.item subSpatialItems : SpatialItem[1..*] :> subitemspart subSpatialParts : SpatialItem[1..*] :> subSpatialItems, subpartspart componentParts : SpatialItem[1..*] :> componentItems, subSpatialPartscomponentItemsfromsubitemstosubSpatialItems.Quantities and Units Domain Library
SI– Added redefinitions ofquantityDimensionsto:henrykelvinnewton metreUSCustomaryUnits- Added redefinition ofquantityDimensionto:degree RankineRequirement Derivation Domain Library
DerivationConnections– Removed the redefinition ofparticipantinDerivationto avoid name collision whenDerivationis used to type a binary connection, sinceBinaryConnectionalready redefinesparticipant.Backward Incompatibilities
Vehicle::wheelsandTruck::wheelswithinSUV:SpatialItems::SpatialItemfrom the Geometry Model Library redefines the featurelocalClockso that it is typed byTime::Clockfrom the Quantities and Units Domain Library. However,localClockis also redefined inOccurrences::Occurrence::suboccurrences, which is indirectly specialized byItems::Item::subitems. As a result, declaring a subitem that is aSpatialItemwithin anotherSpatialItemnow results in a warning.localClockwithin every such subitem declaration, additional features have been added toSpatialItem:subSpatialItems– Subset this for subitems that areSpatialItems.subSpatialParts– Subset this for subparts that areSpatialItems.componentParts– Subset this for component items that are parts (instead of subsettingcomponentItems).