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-723 Resolution SYSML2-467 from SysML v2 FTF Ballot #8 #511

Closed seidewitz closed 10 months ago

seidewitz commented 10 months ago

This PR implements the resolution to the following issue, as approve in SysML v2 FTF ballot #8:

SYSML2-467 RequirementConstraintUsage should not have a RequirementBody

Specifically:

  1. Previously, the textual notation production RequirementConstraintUsage allowed a require or assume declaration to have a RequirementBody, even though the production produced a ConstraintUsage, for which requirement-specific nested declarations are not actually allowed. This has now been changed to a CalculationBody, which is what is used in other productions for ConstraintUsages.
  2. The ConstraintUsageAdapter no longer physically inserts subject features into requirements constraints (which was not consistent with the specification).
  3. SysMLValidator::checkSubjectMembership no longer makes an exception to validateSubjectMembershipOwningType for requirement constraints.

This means that it is now syntax error to have subject, require and assume declarations in the bodies of requirement constraints in all cases. (In some cases, require and assume declarations were syntactically allowed previously, but still violated the validateRequirementConstraintMembershipOwningType constraint.)