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
114 stars 23 forks source link

ST6RI-709 Resolutions from SysML v2 FTF Ballot #6 #506

Closed seidewitz closed 8 months ago

seidewitz commented 8 months ago

This PR primarily implements the resolution to the following issue, as approved in SysML v2 FTF Ballot 6:

SYSML2-28 Validation constraints are missing in the SysML abstract syntax

The following issues with resolutions in Ballot 6 that were also relevant to validation actually did not require changes to the already implemented functionality (except for a slight change for SYSML2-298):

SYSML2-298 validateDefinitionVariationMembership and validateUsageVariationMembership are too strict SYSML2-299 validateDefinitionVariationSpecialization and validateUsageVariationSpecialization OCL is wrong SYSML2-300 validateDefinitionNonVariationMembership and validateUsageNonVariationMembership are redundant with validateVariantMembershipOwningNamespace SYSML2-301 validateUsageOwningType constraint is too restrictive SYSML2-302 validateOccurrenceUsageIndividualDefinition OCL is wrong SYSML2-306 validateStateDefinitionIsParallelGeneralization and validateStateUsageIsParallelGeneralization constraints are too restrictive

Updates to SysMLValidator

  1. Constraints from the resolution to issue SYSML2-28, which were already implemented:

    • validateUsageIsReferential (satisfied automatically)
    • validateExhibitStateUsageReference
    • validateIncludeUseCaseUsageReference
  2. Constraints added from the resolution to issue SYSML2-28:

    • validateAssignmentActionUsageArguments
    • validateAssignmentActionUsageReferent
    • validateTriggerInvocationExpressionAfterArgument
    • validateTriggerInvocationExpressionAtArgument
    • validateTriggerInvocationExpressionWhenArgument
    • validateForLoopActionUsageLoopVariable
    • validateForLoopActionUsageParameters
    • validateIfActionUsageParameters
    • validateWhileLoopActionUsage
    • validateAssertConstraintUsageReference*
    • validateSatisfyRequirementUsageReference

    * See PR #507

  3. Constraints from the resolution of issues SYSML2-298, 299 and 302, which were already implemented:

    • validateDefinitionVariationOwnedFeatureMemberships – Implementation was updated to cover all owned features, not just owned usages
    • validateDefinitionVariationSpecialization
    • validateUsageVariationOwnedFeatureMemberships – Implementation was updated to cover all owned features, not just owned usages
    • validateUsageVariationSpecialization
    • validateOccurrenceUsageIndividualDefinition
  4. Constraints removed by the resolutions of issues SYSML2-300, 301 and 306, which were already commented out in the implementation:

    • validateDefinitionNonVariationMembership
    • validateUsageNonVariationMembership
    • validateUsageOwningType
    • validateStateDefinitionIsParallelGeneralization
    • validateStateUsageIsParallelGeneralization

Additional updates

  1. Minor updates were made to the implementation to follow more closely the OCL in the resolutions to the following issues from Ballot 6:

    SYSML2-190 The description and derivation of ForLoopActionUsage::seqArgument is wrong SYSML2-253 Additional cases when usages are required to be referential SYSML2-356 The OCL for the body of ConstraintUsage::namingFeature is incorrect

  2. New constraints implemented in the SysMLValidator resulted in the identification of other issues in need of resolution. These have been reported as new SysML v2 FTF issues. However, in order to successfully build, proposed resolutions for these issues have been implemented in this PR. Note that these resolutions have not yet been approved by the FTFs and, therefore, are subject to change.

    SYSML2-495 Textual notation BNF for TriggerExpression is wrong SYSML2-497 validateTriggerInvocationExpressionAfterArgument constraint is too strong SYSML2-498 validateTriggerInvocationExpressionWhenArgument constraint is wrong SYSML2-499 Assignments parsed without a target will fail validateAssignmentActionUsageArguments SYSML2-500 The derivation of AssignmentActionUsage::referent is wrong