Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Nov 3, 2023
Merged

Conversation

seidewitz
Copy link
Member

@seidewitz seidewitz commented Oct 30, 2023

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 ST6RI-709 (Update) Resolutions from SysML v2 FTF Ballot #6 #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

- Also revised validation of binding connector typing to allow
Expressions with Boolean results to conform to BooleanExpressions.
- Also revised the parsing of non-default initial feature values to be
consistent with the specification (i.e., to *not* use
FeatureWritePerformance/AssignmentActionUsage), in order to eliminate
validation violations.
AssignmentActionUsage::referent.
Revised validateDefinitionVariationMembership to
validateDefinitionVarationOwnedFeatureMembership and
validateUsageVariationMembership to
validateUsageVariationOwnedFeatureMembership, but the functionality is
essentially the same as was already implemented.
- Removed the following:
  validateDefinitionNonVariationMembership
  validateUsageNonVariationMembership
  validateUsageOwningType
  validateStateDefinitionIsParallelGeneralization
  validateStateUsageIsParallelGeneralization

- Since the code was already commented out, there is no change in
functionality.
@seidewitz seidewitz self-assigned this Oct 30, 2023
validateTriggerInvocationExpressionAfterArgument.
@seidewitz seidewitz requested review from hpdekoning and removed request for hpdekoning October 30, 2023 16:25
@seidewitz seidewitz merged commit 325a2d1 into master Nov 3, 2023
2 checks passed
Copy link
Member

@hpdekoning hpdekoning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had started a review and just finished scanning the changes.
I skipped the generated files.
Not much I can contribute to reviewing the java / xtext parts, the changes look very sensible.
No further comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants