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_SettingDelegate and inherit directedFeature computation.

TypeUtil

  • Changed getAllEndFeaturesOf(type) to call type.getEndFeature().
  • Changed getAllOwnedEndFeaturesOf(type) to call type.getOwnedEndFeature().
  • Changed getAllParametersOf(Type) to call type.getDirectedFeature(). Also removed the skip parameter.

Note. Testing with the SysMLInteractiveProfiler indicate that these changes actually slightly improve performance.

FeatureAdapter

  • Updated getRelevantFeatures(type) so that, if the target is an end feature, then, if the type is the owner of the target, it returns type.getOwnedEndFeature(), otherwise it returns type.getEndFeature(). Also removed the skip parameter.

ActionUsageAdapter
ExpressionAdapter
MultiplicityAdapter
RequirementUsageAdapter

  • Made ancillary changes due to removal of skip parameter of getRelevantFeatures.

SysMLValidator

  • In checkFlowDefinition, changed the call TypeUtil.getAllEndFeaturesOf(cdef) to cdef.endFeature.

Model Libraries

Kernel Semantic Library

TransitionPerformances

  • In TransitionPerformance::accept, removed the nested redefinition of reciever.
  • In TransitionPerformance, added a binding connector between accept.receiver and triggerTarget.

Systems Library

Actions

  • In Action::assignments, added a nested owned parameter target, which then implicitly redefines AssignmentAction::target and assignmentActions::target. As a result, target is the first parameter of assignments, followed by the inherited parameter replacementValues.