Systems-Modeling / SysML-v2-Pilot-Implementation

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization
GNU Lesser General Public License v3.0
123 stars 24 forks source link

ST6RI-699 Problem with the setting of the source feature of the transitionLink of a TransitionUsage #492

Closed seidewitz closed 1 year ago

seidewitz commented 1 year ago

This pull request includes the following changes:

  1. Revises the computation of TransitionUsage::source to be consistent with the specification: "The source of a TransitionUsage is given by the memberElement of its first ownedMembership, which must be an ActionUsage." (Previously it had been implemented as the sourceFeature of the succession of the TransitionUsage.)
  2. Revises SuccessionAsUsageAdapter::addSourceEnd to always set the sourceFeature of the succession of a TransitionUsage to the source of the TransitionUsage.
  3. Adds a computeSource transformation to TransitionUsageAdapter, which physically adds an alias Membership to the "previous feature" of a TransitionUsage, so that this becomes its source if one has not been parsed explicitly.
  4. Moves the getPreviousFeature method to UsageUtil and:
    • simplifies it to only search within the immediately owning Namespace
    • removes the allowance for a non-action ItemFlow as a previous feature
    • allows a FlowConnectionUsage that is a message connection to be a previous feature

As a result, warnings are no longer generated when the then succession shorthand is used on a message connection or when a "conditional succession" (parsed as a TransitionUsage) is used between message connections.