ST6RI 877 Parameter and end features are computed incorrectly / ST6RI-878 Problems with parameters in TransitionPerformances and Actions models (KERML11-79, SYSML21-327) by seidewitz · Pull Request #683 · Systems-Modeling/SysML-v2-Pilot-Implementation
This PR fixes the computations of the parameters and end features of a type, which are used in determining the implied redefinitions of those features. The PR also proactively fixes a couple issues with library models that were discovered once the code fix was made:
- KERML11-79 TransitionPerformance::accept is incorrect
- SYSML21-327 AssignmentAction parameters get reordered
Code
Behavior_parameter_SettingDelegate
Step_parameter_SettingDelegate
- Changed to extend
Type_directedFeature_SettingDelegateand inheritdirectedFeaturecomputation.
TypeUtil
- Changed
getAllEndFeaturesOf(type)to calltype.getEndFeature(). - Changed
getAllOwnedEndFeaturesOf(type)to calltype.getOwnedEndFeature(). - Changed
getAllParametersOf(Type)to calltype.getDirectedFeature(). Also removed theskipparameter.
Note. Testing with the SysMLInteractiveProfiler indicate that these changes actually slightly improve performance.
FeatureAdapter
- Updated
getRelevantFeatures(type)so that, if thetargetis an end feature, then, if thetypeis the owner of thetarget, it returnstype.getOwnedEndFeature(), otherwise it returnstype.getEndFeature(). Also removed theskipparameter.
ActionUsageAdapter
ExpressionAdapter
MultiplicityAdapter
RequirementUsageAdapter
- Made ancillary changes due to removal of
skipparameter ofgetRelevantFeatures.
SysMLValidator
- In
checkFlowDefinition, changed the callTypeUtil.getAllEndFeaturesOf(cdef)tocdef.endFeature.
Model Libraries
Kernel Semantic Library
TransitionPerformances
- In
TransitionPerformance::accept, removed the nested redefinition ofreciever. - In
TransitionPerformance, added a binding connector betweenaccept.receiverandtriggerTarget.
Systems Library
Actions
- In
Action::assignments, added a nested owned parametertarget, which then implicitly redefinesAssignmentAction::targetandassignmentActions::target. As a result,targetis the first parameter ofassignments, followed by the inherited parameterreplacementValues.