Conversation
- Need to handle redefining subjects and objectives that are not directly owned by general types.
martynaslelevicius
approved these changes
Jul 23, 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.
Previously, if a requirement definition/usage or case definition/usage was parsed without an owned subject and/or objective, then a subject or objective element was physically inserted into the parse tree by the relevant adapter. This resolved difficulties with managing required redefinitions of subject and objective features from general types of a requirement or case, but it is not conformant with the SysML Specification. This PR removes these automatic insertions.
Key Changes
CaseDefinitionAdapter,CaseUsageAdapter,RequirementDefinitionAdapter,RequirementUsageAdapter– Removed the overrides ofaddAdditionalMembers.RequirementUsageAdapter– Updated computation of the implicit redefinitions of an objective requirement to handle redefining subjects and objectives that are not directly owned by general types. (This is already handle for a subject parameter by the general rules for implied redefinitions of a parameter.)SysMLValidator– Updated validation checks on subject and objective features to handle if they are inherited.Other Fixes
Type_directionOf_InvocationDelegate– Revised the implementation of the operationType::directionOfto handle implied specializations.Type_input_SettingDelegate,Type_output_SettingDelegate– Corrected the computation of the derived propertiesType::inputandType::output.StateTransitionAction::payloadfromouttoinout.Backwards Incompatibilities
While this makes the Pilot Implementation more conformant with the SysML specification, it also results in some backward incompatibility with past Pilot Implementation behavior. In particular, the previous insertion of subjects meant that the validation checks for the subject being the first parameter were satisfied even if the subject was not declared explicitly and there were additional parameters. This is no longer necessarily the case.
For example, the following requirement definition would previously have not produced an error, but now results in a "Subject must be first parameter" validation error.
In particular, stakeholders and actors are kinds of parameters, so a subject must always be explicitly declared if stakeholders and/or actors are also declared.
Note that this is the case even when specializing a supertype with an inheritable subject: