This pull request implements validation constraints that are in the SysML 2.0 Beta 1 abstract syntax, but which were not previously implemented in the pilot implementation. In addition, the org.omg.sysml.xtext.SysMLValidator.xtend class has been reorganized so that there is one check method per metclass, with each validation constraint for the metaclass checked within that method. Further, the normative constraint names are now used as the error codes for the corresponding validation checks.
The following newly implemented constraints could potentially result in errors being flagged in models where they had not been before.
The following constraints are automatically satisfied by models parsed from the textual notation. However, they have been implemented anyway, because it is possible that they might be violated due to modifications made directly on the abstract syntax representation of a model.
The following constraints have not been implemented, either for implementation reasons or because there are outstanding specification issues related to them.
validateDefinitionNonVariationMembership (see SYSML2-300)
validateUsageNonVariationMembership (see SYSML2-300)
validateStateDefinitionIsParallelGeneralization (see SYSML2-306)
validateStateUsageIsParallelGeneralization (see SYSML2-306)
There are also validation checks that are implemented in the pilot implementation but are not currently in the Beta 1 specification. Certain of these have been proposed to the SysML v2 Finalization Task Force for inclusion in the final specification (see SYSML2-28). They are identified in the validator code with TODO: Add... comments (meaning to be "added" to the specification).
The PR also includes the following changes necessary to avoid problems with the new validations:
Updated LifeClassImpl so isSufficient() always returns true.
Updated UsageAdapter to add a subject parameter as the first, rather than last, parameter.
In the standard library model Connections, updated the end features of MessageConnection, FlowConnection and SuccessionFlowConnection to be occurrence usages (see also SYSML2-305).
This pull request implements validation constraints that are in the SysML 2.0 Beta 1 abstract syntax, but which were not previously implemented in the pilot implementation. In addition, the
org.omg.sysml.xtext.SysMLValidator.xtend
class has been reorganized so that there is one check method per metclass, with each validation constraint for the metaclass checked within that method. Further, the normative constraint names are now used as the error codes for the corresponding validation checks.The following newly implemented constraints could potentially result in errors being flagged in models where they had not been before.
validateDefinitionVariationSpecialization
validateUsageVariationSpecialization
validateEventOccurrenceUsageReference
validateOccurrenceUsageIndividualDefinition
validatePortDefinitionOwnedUsagesNotComposite
validatePortUsageNestedUsagesNotComposite
validatePerformActionUsageReference
validateTransitionFeatureMembershipGuardExpression
validateRequirementDefinitionSubjectParameterPosition
validateRequirementUsageSubjectParameterPosition
validateCaseDefinitionSubjectParameterPosition
validateCaseUsageSubjectParameterPosition
The following constraints are automatically satisfied by models parsed from the textual notation. However, they have been implemented anyway, because it is possible that they might be violated due to modifications made directly on the abstract syntax representation of a model.
validateOccurrenceDefinitionLifeClass
validatePortDefinitionConjugatedPortDefinition
validateConjugatedPortDefinitionConjugatedPortDefinition
validateConjugatedPortDefinitionOriginalPortDefinition
validateAcceptActionUsageParameters
validateControlNodeOwningType
validateSendActionUsageParameters
validateStateSubactionMembershipOwningType
validateTransitionFeatureMembershipEffectAction
validateTransitionFeatureMembershipTriggerAction
validateTransitionFeatureMembershipOwningType
validateTransitionUsageParameters
validateTransitionUsageSuccession
validateActorMembershipOwningType
validateFramedConcernMembershipConstraintKind
validateRequirementConstraintMembershipIsComposite
validateRequirementConstraintMembershipOwningType
validateSubjectMembershipOwningType
validateObjectiveIsComposite
validateObjectiveMembershipOwningType
validateRequirementVerificationMembershipOwningType
validateExposeOwningNamespace
validateViewRenderingMembershipOwningType
The following constraints have not been implemented, either for implementation reasons or because there are outstanding specification issues related to them.
validateDefinitionNonVariationMembership
(see SYSML2-300)validateUsageNonVariationMembership
(see SYSML2-300)validateUsageOwningType
(see SYSML2-301)validateAttributeDefinitionFeatures
(pending KERML-4)validateAttributeUsageFeatures
(pending KERML-4)validateControlNodeIncomingSuccessions
validateControlNodeOutgoingSuccessions
validateDecisionNodeIncomingSuccessions
validateDecisionNodeOutgoingSuccessions
validateForkNodeIncomingSuccessions
validateJoinNodeOutgoingSuccessions
validateMergeNodeIncomingSuccessions
validateMergeNodeOutgoingSuccessions
validateStateDefinitionIsParallelGeneralization
(see SYSML2-306)validateStateUsageIsParallelGeneralization
(see SYSML2-306)There are also validation checks that are implemented in the pilot implementation but are not currently in the Beta 1 specification. Certain of these have been proposed to the SysML v2 Finalization Task Force for inclusion in the final specification (see SYSML2-28). They are identified in the validator code with
TODO: Add...
comments (meaning to be "added" to the specification).The PR also includes the following changes necessary to avoid problems with the new validations:
LifeClassImpl
soisSufficient()
always returns true.UsageAdapter
to add a subject parameter as the first, rather than last, parameter.Connections
, updated the end features ofMessageConnection
,FlowConnection
andSuccessionFlowConnection
to be occurrence usages (see also SYSML2-305).