Skip to content

Make SysML validation more modular #2011

@flatombe

Description

@flatombe

Currently the SysML validation rules are defined in org.eclipse.syson.sysml.validation.SysMLv2ValidationRules and called through org.eclipse.syson.sysml.validation.SysMLv2Validator by org.eclipse.syson.sysml.validation.SysMLv2ValidationService.

All possible rules are always executed when possible, which in practice is a problem for SysON and downstream applications:

  • Some rules do not execute correctly, e.g. A warning has occurred with the expression 'aql:self.owningType <> null and not self.owningFeatureMembership.oclIsKindOf(sysml::ReturnParameterMembership) and (self.owningType.oclIsKindOf(sysml::Behavior) or self.owningType.oclIsKindOf(sysml::Step) and (self.owningType.oclIsKindOf(sysml::InvocationExpression) implies not self.ownedRedefinition->exists(e | not e.isImplied)) implies let i : Integer = self.owningType.ownedFeature->select(f | f.direction <> null)->reject(i | i.owningFeatureMembership.oclIsKindOf(sysml::ReturnParameterMembership))->indexOf(self) in self.owningType.ownedSpecialization.general->forAll(supertype | let ownedParameters : Sequence(sysml::Feature) = supertype.ownedFeature->select(f | f.direction <> null)->reject(i | i.owningFeatureMembership.oclIsKindOf(sysml::ReturnParameterMembership)) in ownedParameters->size() >= i implies self.redefines(ownedParameters->at(i)))': Couldn't find the 'redefines(EClassifier=ReferenceUsage,org.eclipse.acceleo.query.runtime.impl.Nothing)' service
  • Some rules are not actionable because the issue lies in SysON (e.g. a missing a implicit FeatureTyping)

Ideally the validation rules should be unit-tested and their performance tested, to ensure downstream applications can use them safely on large models. However this represents a significant development effort.

As a first step in this direction, we will make which SysML validation rules are applied more modular, allowing downstream applications to configure which rules they wish to see applied.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions