validateSubsettingUniquenessConformance is checked for a subsetting written in the source (:>, subsets), but not for one the feature gets implicitly.
package N {
action def A {
action b[*] nonunique;
}
}
b is a composite action owned by an action definition, so it implicitly subsets Actions::Action::subactions (checkActionUsageSubactionSpecialization). subactions is declared Action[0..*] with no nonunique (Systems Library/Actions.sysml:57), so it is unique, and a nonunique b cannot subset it.
| model |
sysml -validate (develop d9a97d6d8) |
expected (validateSubsettingUniquenessConformance) |
action b[*] nonunique; |
no errors |
the same error, at b: its implicit subsetting of subactions breaks the constraint |
action b[*] nonunique :> subactions; |
3:34: error: Subsetting/redefining feature cannot be nonunique if subsetted/redefined feature is unique |
this error |
action b[*]; |
no errors |
no errors |
The constraint is on the Subsetting, and an implied Subsetting is one too. Model.ConformanceViolations (internal/semantic/semantics/redefinition_conformance.go) walks only the written RelSubsets/RelRedefines relationships, plus the positional parameter counterparts for direction. validation-constraints.md lists the constraint as faithful, with only the written case (xpect/p04-nonunique-subsets-unique.kerml).
Other implicit subsettings of a unique library feature would be missed the same way. Examples are the other subactions-style features in Actions.sysml and Transfer::payload (Anything[1..*]) for a flow's payload.
validateSubsettingUniquenessConformanceis checked for a subsetting written in the source (:>,subsets), but not for one the feature gets implicitly.bis a composite action owned by an action definition, so it implicitly subsetsActions::Action::subactions(checkActionUsageSubactionSpecialization).subactionsis declaredAction[0..*]with nononunique(Systems Library/Actions.sysml:57), so it is unique, and a nonuniquebcannot subset it.sysml -validate(developd9a97d6d8)validateSubsettingUniquenessConformance)action b[*] nonunique;b: its implicit subsetting ofsubactionsbreaks the constraintaction b[*] nonunique :> subactions;3:34: error: Subsetting/redefining feature cannot be nonunique if subsetted/redefined feature is uniqueaction b[*];The constraint is on the Subsetting, and an implied Subsetting is one too.
Model.ConformanceViolations(internal/semantic/semantics/redefinition_conformance.go) walks only the writtenRelSubsets/RelRedefinesrelationships, plus the positional parameter counterparts for direction.validation-constraints.mdlists the constraint as faithful, with only the written case (xpect/p04-nonunique-subsets-unique.kerml).Other implicit subsettings of a unique library feature would be missed the same way. Examples are the other
subactions-style features inActions.sysmlandTransfer::payload(Anything[1..*]) for a flow's payload.