Conversation
- Also added a JUnit test on when isComposite is set to false.
AxelRICHARD
reviewed
Jun 17, 2026
Contributor
|
@seidewitz I don't have any other comments on this pull request. You can merge it. |
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 corrects the computation of an effective
featuringTypeof aUsagein thepostProcessmethod forUsageAdapter.Background
Previously, the
UsageAdapter::postProcessmethods contained the code:The comment note in this code is incorrect. A variant usage is owned by a
VariantMembership, which is not aFeatureMembership,but, per semantic constraintcheckUsageVariationUsageTypeFeaturing, has the same featuring types as its owning variation, which can be non-empty.Note that the reason
getFeaturingTypeisn’t just called here is to avoid computing derived values during parse post-processing.Changes
In project
org.omg.sysml.logic:UsageUtil– Added:getExpectedFeaturingType– Gets the expectedfeaturingTypefor aUsage, assuming limitations in the SysML syntax. This is computed recursively as theowningTypeof the nearest non-variation container if this exists. Note that the specialfeaturingTypesfor variable features are skipped in this computation (not necessary for how this utility is used in postprocessing).hasFeaturingType– WhethergetExpectedFeaturingTypeis non-null, meaning theUsagewill have aFeaturingType.UsageAdapter– Revised the methodpostProcessto useUsageUtil.hasFeaturingTypein the condition on whether to setisCompositeto false.PortAdapter– Revised the methodpostProcessto useUsageUtil.getExpectedFeaturingType. This revision was necessary because the change toUsageAdapterresulted in variantPortUsagesbeing considered composite, violating the constraintvalidatePortUsageIsReference.Test
org.omg.sysml.logic.UsagePostProcessTest