blob: 671c59fd2166ce809af264280dfc64b3c7ef112e [file] [log] [blame]
#################################################################################
# Copyright (c) 2019 CEA LIST.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
##################################################################################
Bundle-Name=Papyrus SysML 1.6 Validation
Bundle-Description=This plug-in contains the rules for SyML 1.6 model validation
Bundle-Vendor=Eclipse Modeling Project
##### Non normative #####
inv_RequirementId=Requirement is missing an id
ocl_RequirementId=id <> ''
inv_RequirementText=Requirement is missing a text
ocl_RequirementText=text <> ''
# FIXME : there seems to be no constraint in the norm for Requirement id and text
inv_NestedConnectorEndMissing=NestedConnectorEnd stereotype should be applied to the <Connector end> {0}.
##### End Non normative #####
#Conform
inv_ConformGeneralClassifierViewpoint=Conform [1] The general classifier must be an element stereotyped by Viewpoint.
ocl_ConformGeneralClassifierViewpoint=Viewpoint.allInstances()->exists(v | v.base_Class = self.base_Generalization.general)
inv_ConformSpecificClassifierView=Conform [2] The specific classifier must be an element that is stereotyped by View.
ocl_ConformSpecificClassifierView=View.allInstances()->exists(v | v.base_Class = self.base_Generalization.specific)
#Rational
inv_StakeholderNotAssociation=Stakeholder [1] A Stakeholder stereotype can only be applied to UML::Actor or UML::Class which are not a UML::Association.
# Expose
inv_ExposeClientStereotypedByView=Expose [1] The client must be an element stereotyped by View.
#View
# FIXME: the constraint should only ensure one conform generalization
inv_ViewSingleViewpoint=View [1] A view must only conform to a single viewpoint.
#FIXME: not a constraint (query?): View [2] The derived value of the viewpoint is the classifier stereotyped by Viewpoint that is the general classifier of the generalization relationship stereotyped by Conform for which the View is the specific classifier.
#FIXME: not a constraint (query?): View [3] The derived values of the stakeholder attribute are the names of the classifiers stereotyped by Stakeholder that are the values of the stakeholder attribute of the general classifier of the generalization relationship stereotyped by Conform for which the View is the specific classifier.
#Viewpoint
#FIXME: not a constraint (query?):Viewpoint [1] The derived values of the method attribute are the names of the methods of the operations stereotyped by the UML Create stereotype on the classifier stereotyped by Viewpoint.
inv_ViewpointOwnedView=Viewpoint [2] The property ownedOperation must include at least one operation named «View» with the UML Create stereotype applied.
#Binding Connector
inv_BindingConnectorSameEndsType=Binding Connector [1] The two ends of a binding connector must have either the same type or types that are compatible so that equality of their values can be defined.
#FIXME can have more that 2 ends
#Block
inv_AssociationBlock=Block [1] For an association in which both ends are typed by blocks, the number of ends must be exactly two.
inv_BlockConnectorTwoEnds=Block [2] The number of ends of a connector owned by a block must be exactly two.
#(In SysML, a binding connector is not typed by an association, so this constraint is not implied entirely by the preceding constraint.)
inv_BlockPropertyNoName=Block [3] In the UML metamodel on which SysML is built, any instance of the Property metaclass that is typed by a block (a Class with the «block» stereotype applied) and which is owned by an Association may not have a name and may not be defined as a navigable owned end of the association. (While the Property has a «name» property as defined by its NamedElement
inv_BlockPropertyAssociationEnd=Block [4] In the UML metamodel on which SysML is built, a Property that is typed by a block must be defined as an end of an association. (An inverse end of this association, whether owned by another block or the association itself, must always be present so there is always a metamodel element to record the inverse multiplicity of the reference.)
#No Implementation [5] The following constraint under sub clause 9.3.6, «Connector» in the UML 2 Superstructure Specification is removed by SysML: «[3] The ConnectableElements attached as roles to each ConnectorEnd owned by a Connector must be roles of the Classifier that owned the Connector, or they must be ports of such roles.»
inv_BlockPropertyComposite=Block [6] If a property owned by a SysML Block or SysML ValueType is typed by a SysML ValueType, then the aggregation attribute of the property must be «composite.»
#FIXME: the ocl constraint and the text are not consistent inv_Blockcomposition_acyclic=Block [7] Within an instance of a SysML Block, the values of any property with composite aggregation (aggregation = composite) must not contain the block in any of its own properties that also have composite aggregation, or within any unbroken chain of properties that all have composite aggregation. (Within an instance of a SysML Block, the instances of properties with composite aggregation must form an acyclic graph.)
#FIXME: ocl_Blockcomposition_acyclic=self.base_Class->closure(part->select(p | p.type.oclIsKindOf(UML::Class)).type.oclAsType(UML::Class))->excludes(self.base_Class)
inv_BlockSpecialization=Block [8] Any classifier that specializes a Block must also have the Block stereotype or one of its specializations applied.
#No Implementation [9] The following constraint under sub clause 9.3.7, «ConnectorEnd» in the UML 2 Superstructure Specification is removed by SysML: «[3] The property held in self.partWithPort must not be a Port.»
#BoundReference
inv_BoundReference1=BoundReference [1] Properties to which BoundReference is applied must be the role of a connector end of at least one binding connector, or generalized by such a property through redefinition.
ocl_BoundReference1=BindingConnector.allInstances().base_Connector.end.role->exists(r | r=self.base_Property or self.base_Property->closure(redefinedElement)->includes(r))
inv_BoundReference2=BoundReference [2] The value of boundEnd must be a connector end of a binding connector, as identified in constraint BoundReference [1], opposite the property, as identified in constraint BoundReference [1].
ocl_BoundReference2=let opposite: UML::ConnectorEnd = BindingConnector.allInstances().base_Connector.end->any(e | e.role=self.base_Property or self.base_Property->closure(redefinedElement)->includes(e.role)) in self.boundEnd = opposite.owner.oclAsType(UML::Connector).end->any(e | e<>opposite)
#unclear-- [3] The role of boundEnd must be a property accessible by navigation from instances of the block owning the property to which BoundReference is applied, but must not be the property to which BoundReference is applied, or one that it is related to by redefinition.
inv_BoundReference4=BoundReference [4] The last value of bindingPath is the role of boundEnd, and the other values are the propertyPath of the NestedConnectorEnd applied to boundEnd, if any.
ocl_BoundReference4=self.boundEnd = self.bindingPath->last() and (let nce: NestedConnectorEnd = NestedConnectorEnd.allInstances()->any(n| n.base_ConnectorEnd=self.boundEnd) in nce->oclIsUndefined() or self.bindingPath->subSequence(1, self.bindingPath->size()-1) = nce.propertyPath)
inv_BoundReference5=BoundReference [5] Properties to which BoundReference is applied must either be a reference properties or value properties.
ocl_BoundReference5=ValueType.allInstances().base_DataType->includes(self.base_Property.type) or not self.base_Property.isComposite()
inv_BoundReference6=BoundReference [6] Properties with BoundReference applied that have an upper multiplicity greater than one must be ordered and non-unique.
ocl_BoundReference6=self.base_Property.upper > 1 implies self.base_Property.isOrdered and not self.base_Property.isUnique
inv_BoundReference7=BoundReference [7] BoundReferences must not be applied to properties that are related by redefinition to other properties with BoundReference applied.
ocl_BoundReference7=self.base_Property.redefinedElement->notEmpty() implies BoundReference.allInstances().base_Property->excludesAll(self.base_Property.redefinedElement)
inv_BoundReference8=BoundReference [8] The binding connector identified in constraint BoundReference [1] must not have the same property on both ends, or properties related by redefinition.
ocl_BoundReference8=let e1: UML::ConnectorEnd = self.boundEnd.owner.oclAsType(UML::Connector).end->at(1) in let e2: UML::ConnectorEnd = self.boundEnd.owner.oclAsType(UML::Connector).end->at(2) in e1.role <> e2.role and (e1.role.oclIsKindOf(UML::Property) and e2.role.oclIsKindOf(UML::Property) implies e1.role.oclAsType(UML::Property).redefinedElement->excludes(e2.role) and e2.role.oclAsType(UML::Property).redefinedElement->excludes(e1.role))
#ClassifierBehaviorProperty
inv_ClassifierBehaviorPropertyOnBlock=ClassifierBehaviorProperty [1] ClassifierBehaviorProperty may only be applied to properties owned (not inherited) by blocks that have classifier behaviors.
inv_ClassifierBehaviorPropertyIsComposite=ClassifierBehaviorProperty [2] Properties to which ClassifierBehaviorProperty applied must be composite.
ocl_ClassifierBehaviorPropertyIsComposite=base_Property.isComposite()
inv_ClassifierBehaviorPropertyTypedBy=ClassifierBehaviorProperty [3] Properties to which ClassifierBehaviorProperty applied must be typed by the classifier behavior of their owning block or a generalization of the classifier behavior.
#ConnectorProperty
inv_ConnectorPropertyOnlyOnBlock=ConnectorProperty [1] ConnectorProperty may only be applied to properties of classes stereotyped by Block.
#inv inv_ConnectorPropertyOnlyOnBlock: self.base_Property.owner.getAppliedStereotype('Blocks::Block')->notEmpty()
inv_ConnectorPropertyReferOwnedConnector=ConnectorProperty [2] The connector attribute of the applied stereotype must refer to a connector owned or inherited by a block owning the property on which the stereotype is applied.
inv_ConnectorPropertyOnlyComposite=ConnectorProperty [3] The aggregation of a property stereotyped by ConnectorProperty must be composite.
ocl_ConnectorPropertyOnlyComposite=base_Property.isComposite()
inv_ConnectorPropertyTypedByAssociationBlock=ConnectorProperty [4] The type of the connector referred to by a connector attribute must be an association class stereotyped by Block.
inv_ConnectorPropertySameName=ConnectorProperty [5] A property stereotyped by ConnectorProperty must have the same name and type as the connector referred to by the connector attribute.
#DirectedRelationshipPropertyPath
inv_DirectedRelationshipPropertyPathRequireSourceContext=DirectedRelationshipPropertyPath [_1] source#context must have a value when sourcePropertyPath has a value.
inv_DirectedRelationshipPropertyPathRequireTargetContext=DirectedRelationshipPropertyPath [_2] target#context must have a value when targetPropertyPath has a value.
inv_DirectedRelationshipPropertyPathSourceContextIfProperty=DirectedRelationshipPropertyPath [1] sourceContext shall have a value when source is a property, otherwise it shall not have a value.
ocl_DirectedRelationshipPropertyPathSourceContextIfProperty=base_DirectedRelationship.source->exists(s | s.oclIsKindOf(UML::Property)) xor sourceContext->isEmpty()
inv_DirectedRelationshipPropertyPathTargetContextIfProperty=DirectedRelationshipPropertyPath [2] targetContext mast have a value when target is a property, otherwise it must not have a value.
ocl_DirectedRelationshipPropertyPathTargetContextIfProperty=base_DirectedRelationship.target->exists(s | s.oclIsKindOf(UML::Property)) xor targetContext->isEmpty()
inv_DirectedRelationshipPropertyPathSourcePropertyPathImpliesProperty=DirectedRelationshipPropertyPath [3] source must be a property when sourcePropertyPath has a value.
ocl_DirectedRelationshipPropertyPathSourcePropertyPathImpliesProperty=sourcePropertyPath->notEmpty() implies base_DirectedRelationship.source->forAll(s | s.oclIsKindOf(UML::Property))
inv_DirectedRelationshipPropertyPathTargetPropertyPathImpliesProperty=DirectedRelationshipPropertyPath [4] target must be a property when targetPropertyPath has a value.
ocl_DirectedRelationshipPropertyPathTargetPropertyPathImpliesProperty=targetPropertyPath->notEmpty() implies base_DirectedRelationship.target->forAll(s | s.oclIsKindOf(UML::Property))
inv_DirectedRelationshipPropertyPathSourceFirst=DirectedRelationshipPropertyPath [5] The property in the first position of the sourcePropertyPath list, if any, must be owned by the sourceContext or one of its generalizations.
inv_DirectedRelationshipPropertyPathTargetFirst=DirectedRelationshipPropertyPath [6] The property in the first position of the targetPropertyPath list, if any, must be owned by the targetContext or one of its generalizations.
#TODO [7] The property at each successive position of the sourcePropertyPath and targetPropertyPath, following the first position, must be owned by the Block or ValueType that types the property at the immediately preceding position, or a generalization of the Block or ValueType.
inv_DirectedRelationshipPropertyPathSourceLast=DirectedRelationshipPropertyPath [8] The type of the property at the last position of the sourcePropertyPath list must own or inherit the source of the stereotyped directed relationship.
inv_DirectedRelationshipPropertyPathTargetLast=DirectedRelationshipPropertyPath [9] The type of the property at the last position of the targetPropertyPath list must own or inherit the target of the stereotyped directed relationship.
#DistributedProperty
inv_DistributedPropertyTypedBy=DistributedProperty [1] The DistributedProperty stereotype may be applied only to properties of classifiers stereotyped by Block or ValueType.
#inv inv_DistributedPropertyOnlyOnBlock: self.base_Property.owner.getAppliedStereotype('Blocks::Block')->notEmpty() or self.base_Property.owner.getAppliedStereotype('Blocks::ValueType')->notEmpty()
#ElementPropertyPath
inv_ElementPropertyPathPropertiesOwner=ElementPropertyPath [1] The property at each successive position of the propertyPath attribute, following the first position, must be owned by the Block or ValueType that types the property at the immediately preceding position, or a generalization of the Block or ValueType.
#EndPathMultiplicity
inv_EndPathMultiplicityBoundReferenceProperty=EndPathMultiplicity [1] Properties to which EndPathMultiplicity is applied must be related by redefinition to a property to which BoundReference is applied.
inv_EndPathMultiplicityNotNegative=EndPathMultiplicity [2] endPathLower must be non-negative.
ocl_EndPathMultiplicityNotNegative=lower >= 0
#NestedConnectorEnd
inv_NestedConnectorEndFirstProperty=NestedConnectorEnd [1] The first property in propertyPath must be owned by the block that owns the connector, or one of the block's generalizations.
inv_NestedConnectorEndLastProperty=NestedConnectorEnd [2] The type of the property at the last position of the propertyPath list must own or inherit the role property of the stereotyped connector end.
inv_NestedConnectorEndOnlyConnectorEnds=NestedConnectorEnd [_3] NestedConnectorEnd may only be applied to connector ends
#ParticipantProperty
inv_ParticipantPropertyOnlyAssociationBlock=ParticipantProperty [1] ParticipantProperty may only be applied to properties of association classes stereotyped by Block.
inv_ParticipantPropertyNoAssociationMemberEnds=ParticipantProperty [2] ParticipantProperty may not be applied to properties that are member ends of an association.
inv_ParticipantPropertyOnlyNoneAggregation=ParticipantProperty [3] The aggregation of a property stereotyped by ParticipantProperty must be none.
inv_ParticipantPropertySameEnd=ParticipantProperty [4] The end attribute of the applied stereotype must refer to a member end of the association block owning the property on which the stereotype is applied.
inv_ParticipantPropertySameType=ParticipantProperty [5] A property stereotyped by ParticipantProperty must have the same type as the property referred to by the end attribute.
inv_ParticipantPropertyEndMultiplicity=ParticipantProperty [6] The property referred to by end must have a multiplicity of 1.
#PropertySpecificType
inv_PropertySpecificTypeUniqueProperty=PropertySpecificType [1] A classifier to which the PropertySpecificType stereotype is applied must be referenced as the type of one and only one property.
inv_PropertySpecificTypeMissingName=PropertySpecificType [_2] The name of a classifier to which a PropertySpecificType is applied must be missing. (The «name» attribute of the NamedElement metaclass must be empty.)
#ValueType
inv_ValueTypeSpecializationsAreValuetypes=ValueType [1] Any classifier that specializes a ValueType must also have the ValueType stereotype applied.
inv_ValueTypeUnit=ValueType [2] The unit of a ValueType, if any, must be an InstanceSpecification classified by SysML's Unit block in the UnitAndQuantityKind model library or a specialization of it.
inv_ValueTypeQuantityKind=ValueType [3] The quantityKind of a ValueType, if any, must be an InstanceSpecification classified by SysML's QuantityKind block in the UnitAndQuantityKind model library or a specialization of it.
#AcceptChangeStructuralFeatureEventAction
inv_AcceptChangeStructuralFeatureEventActionOneTrigger=AcceptChangeStructuralFeatureEventAction [1] The action has exactly one trigger, the event of which must be a change structural feature event.
ocl_AcceptChangeStructuralFeatureEventActionOneTrigger=self.base_AcceptEventAction.trigger->size()=1 and let trigger: UML::Trigger = self.base_AcceptEventAction.trigger->any(true) in ChangeStructuralFeatureEvent.allInstances().base_ChangeEvent->includes(trigger.event)
inv_AcceptChangeStructuralFeatureEventActiontwoResultPin=AcceptChangeStructuralFeatureEventAction [2] The action has two result pins with type and ordering the same as the type and ordering of the structural feature of the trigger event, and multiplicity compatible with the multiplicity of the structural feature.
ocl_AcceptChangeStructuralFeatureEventActiontwoResultPin=let event: ChangeStructuralFeatureEvent = ChangeStructuralFeatureEvent.allInstances()->any(e | e.base_ChangeEvent = self.base_AcceptEventAction.trigger->any(true).event) in self.base_AcceptEventAction.result->size() = 2 and self.base_AcceptEventAction.result->forAll(r | r.type = event.structuralFeature.type and r.isOrdered = event.structuralFeature.isOrdered and r.lower <= event.structuralFeature.lower and r.upper >= event.structuralFeature.upper)
inv_AcceptChangeStructuralFeatureEventActionContextOwnsStructuralFeature=AcceptChangeStructuralFeatureEventAction [3] The structural feature of the trigger event must be owned by or inherited by the #context of the behavior containing the action. (The #context of a behavior is either its owning block or itself if it is not owned by a block. See definition in the UML 2 Superstructure Specification.)
ocl_AcceptChangeStructuralFeatureEventActionContextOwnsStructuralFeature=let event: ChangeStructuralFeatureEvent = ChangeStructuralFeatureEvent.allInstances()->any(e | e.base_ChangeEvent = self.base_AcceptEventAction.trigger->any(true).event) in self.base_AcceptEventAction._'context'->notEmpty() and self.base_AcceptEventAction._'context'.allFeatures()->includes(event.structuralFeature)
inv_AcceptChangeStructuralFeatureEventActionCanAccessStructuralFeature=AcceptChangeStructuralFeatureEventAction [4] Visibility of the structural feature of the trigger event must allow access to the object performing the action.
ocl_AcceptChangeStructuralFeatureEventActionCanAccessStructuralFeature=let event: ChangeStructuralFeatureEvent = ChangeStructuralFeatureEvent.allInstances()->any(e | e.base_ChangeEvent = self.base_AcceptEventAction.trigger->any(true).event) in if event.structuralFeature.visibility = UML::VisibilityKind::private then self.base_AcceptEventAction._'context'.feature->includes(event.structuralFeature) else if event.structuralFeature.visibility = UML::VisibilityKind::protected then self.base_AcceptEventAction._'context'.allFeatures()->includes(event.structuralFeature) else if event.structuralFeature.visibility = UML::VisibilityKind::_'package' then let thePackage: UML::Package = event.structuralFeature.allNamespaces()->select(n | n.oclIsKindOf(UML::Package))->first().oclAsType(UML::Package) in (not thePackage.oclIsUndefined()) and ( let index: Integer = event.structuralFeature.allNamespaces()->indexOf(thePackage) in event.structuralFeature.allNamespaces()->subOrderedSet(1, index) ->iterate(n; acc: Boolean=true | acc and not (n.visibility=UML::VisibilityKind::private or n.visibility=UML::VisibilityKind::protected)) ) else true endif endif endif
#No implementation[5] The constraint under sub clause 11.3.2, «AcceptEventAction» in the UML 2 Superstructure Specification, «[2] There are no output pins if the trigger events are only ChangeEvents,» is removed for accept event actions that have AcceptChangeStructuralFeatureEventAction applied.
#AddFlowPropertyValueOnNestedPortAction
inv_AddFlowPropertyValueOnNestedPortActionFeatureFlowProperty=AddFlowPropertyValueOnNestedPortAction [1] The structural feature referred by actions with this stereotype applied must have FlowProperty applied.
ocl_AddFlowPropertyValueOnNestedPortActionFeatureFlowProperty=FlowProperty.allInstances().base_Property->includes(self.base_AddStructuralFeatureValueAction.structuralFeature)
inv_AddFlowPropertyValueOnNestedPortActionOnNestedPortFirstOwnedByTargetType=AddFlowPropertyValueOnNestedPortAction [2] The port at the first position in the onNestedPort list shall be owned by the block that types the objectpin of the stereotyped action, or one of that block's generalizations.
ocl_AddFlowPropertyValueOnNestedPortActionOnNestedPortFirstOwnedByTargetType=self.base_AddStructuralFeatureValueAction.object.type.oclAsType(UML::Classifier).feature->includes(self.onNestedPort->first())
inv_AddFlowPropertyValueOnNestedPortActionPathConsistency=AddFlowPropertyValueOnNestedPortAction [3] The port at each successive position of the onNestedPort attribute, following the first position, shall be owned by the Block that types the port at the immediately preceding position, or a generalization of that Block
inv_AddFlowPropertyValueOnNestedPortActionOnNestedPortLastTypeOwnsInvocationOnPort=AddFlowPropertyValueOnNestedPortAction [4] The type of the port at the last position of the onNestedPort list shall own or inherit the flow property that is the structural feature of the stereotyped action
ocl_AddFlowPropertyValueOnNestedPortActionOnNestedPortLastTypeOwnsInvocationOnPort=self.onNestedPort->last().type.oclAsType(UML::Classifier).allFeatures()->includes(self.base_AddStructuralFeatureValueAction.structuralFeature)
#ChangeStructuralFeatureEvent
inv_ChangeStructuralFeatureEventNotStatic=ChangeStructuralFeatureEvent [1] The structural feature must not be static.
#inv inv_StructuralFeatureNotStatic: self.base_Class. FIXME : structural feature <- Property what is the link with the base_Class?
inv_ChangeStructuralFeatureEventOneFeaturingClassifier=ChangeStructuralFeatureEvent [2] The structural feature must have exactly one featuringClassifier.
#DirectedFeature
inv_DirectedFeatureOnlyBehavioral=DirectedFeature [1] DirectedFeature can only be applied to behavioral features, or to properties that do not have FlowProperty applied, including on subsetted or redefined features.
#FIXME: what is the link? non-provided direction enum, but no idea for the rest
#TODO [2] A non-provided operation cannot be associated with a behavior as its method.
#FlowProperty
inv_FlowPropertyTypedBy=FlowProperty [1] A FlowProperty is typed by a ValueType, Block, or Signal.
#FullPort
inv_FullPortNotProxyPort=FullPort [1]: Full ports cannot also be proxy ports. This applies even if some of the stereotypes are on subsetted or redefined ports.
inv_FullPortNotBoundToFullPort=FullPort [2] Binding connectors cannot link full ports (either directly or indirectly through other binding connectors) to other composite properties of the block owning the full port (or that block's generalizations or specializations), unless the composite properties are non-full ports.
ocl_FullPortNotBoundToFullPort=let fullPorts: Set(UML::Port) = FullPort.allInstances().base_Port->asSet() in BindingConnector.allInstances().base_Connector->select(c | c.end.role->includes(self.base_Port))->forAll(c | fullPorts->excludesAll(c.end.role->reject(r | r=self.base_Port)))
inv_FullPortNotBehavioral=FullPort [3]: Full ports cannot be behavioral (isBehavior=false).
ocl_FullPortNotBehavioral=base_Port.isBehavior = false
#InterfaceBlock
inv_InterfaceBlockNoBehavior=InterfaceBlock [1] Interface blocks cannot own or inherit behaviors, have classifier behaviors, or methods for their behavioral features.
inv_InterfaceBlockNoCompositeProperty=InterfaceBlock [2] Interface blocks cannot have composite properties that are not ports.
inv_InterfaceBlockPortType=InterfaceBlock [3] Ports owned by interface blocks can only be typed by interface blocks.
inv_InterfaceBlockIsConjugatedNotUsed=InterfaceBlock [4] Any port typed by an InterfaceBlock shall have its isConjugated property set to false.
ocl_InterfaceBlockIsConjugatedNotUsed=UML::Port.allInstances()->forAll(p | p.type = self.base_Class implies p.isConjugated=false)
#InvocationOnNestedPortAction
inv_InvocationOnNestedPortActionRequiredOnPort=InvocationOnNestedPortAction [1] The onPort property of an invocation action must have a value when this stereotype is applied.
inv_InvocationOnNestedPortActionOnNestedPortFirstOwnedByTargetType=InvocationOnNestedPortAction [2] The port at the first position in the onNestedPort list must be owned (directly or via inheritance) by a block that types the target pin of the invocation action, or one of the block's generalizations.
ocl_InvocationOnNestedPortActionOnNestedPortFirstOwnedByTargetType=let target: UML::InputPin = if self.base_InvocationAction.oclIsKindOf(UML::CallOperationAction) then self.base_InvocationAction.oclAsType(UML::CallOperationAction).target else if self.base_InvocationAction.oclIsKindOf(UML::SendSignalAction) then self.base_InvocationAction.oclAsType(UML::SendSignalAction).target else if self.base_InvocationAction.oclIsKindOf(UML::SendObjectAction) then self.base_InvocationAction.oclAsType(UML::SendObjectAction).target else invalid endif endif endif in not target.oclIsUndefined() and (let target_type: UML::Class = Block.allInstances()->any(b | b.base_Class = target.type).base_Class in not target_type.oclIsUndefined() and target_type.allFeatures()->includes(self.onNestedPort->first()))
inv_InvocationOnNestedPortActionPathConsistency=InvocationOnNestedPortAction [3] The port at each successive position of the onNestedPort attribute, following the first position, shall be owned by the Block that types the port at the immediately preceding position, or a generalization of that Block.
inv_InvocationOnNestedPortActionOnNestedPortLastTypeOwnsInvocationOnPort=InvocationOnNestedPortAction [4] The type of the port at the last position of the onNestedPort list must own or inherit the onPort port of the stereotyped invocation action.
ocl_InvocationOnNestedPortActionOnNestedPortLastTypeOwnsInvocationOnPort=self.onNestedPort->last().type.oclAsType(UML::Classifier).allFeatures()->includes(self.base_InvocationAction.onPort)
#ItemFlow
#TODO inv_ItemFlowSourceAndTargetLinked=ItemFlow [1] A Connector or an Association, or an inherited Association must exist between the source and the target of the InformationFlow.
#ocl_ItemFlowSourceAndTargetLinked=let target: UML::NamedElement = self.base_InformationFlow.informationTarget->any(true) in let targets: Set(UML::NamedElement) = if target.oclIsKindOf(UML::Classifier) then target.oclAsType(UML::Classifier)->closure(general)->including(target) else target->asSet() endif in let source:UML::NamedElement = self.base_InformationFlow.informationSource->any(true) in let sources: Set(UML::NamedElement) = if source.oclIsKindOf(UML::Classifier) then source.oclAsType(UML::Classifier)->closure(general)->including(source) else source->asSet() endif in UML::Association.allInstances()->exists(a | a.memberEnd->intersection(targets)->notEmpty() and a.memberEnd->intersection(sources)->notEmpty()) or UML::Connector.allInstances()->exists(c | c.end->intersection(targets)->notEmpty() and c.end->intersection(sources)->notEmpty())
inv_ItemFlowSamePropertyTypedBy=ItemFlow [2] An ItemFlow itemProperty is typed by a ValueType, Block, or Signal.
#TODO inv_ItemFlowItemPropertyCommonOwner=ItemFlow [3] itemProperty is a property of the common (possibly indirect) owner of the source and the target.
#ocl_ItemFlowItemPropertyCommonOwner=self.itemProperty->notEmpty() implies (let target: UML::Element = self.base_InformationFlow.informationTarget->any(true) in let source: UML::Element = self.base_InformationFlow.informationSource->any(true) in target.oclIsKindOf(UML::Property) and source.oclIsKindOf(UML::Property) and let owners: Set(UML::Classifier) = target->closure(owner)->select(o1 | o1.oclIsKindOf(UML::Classifier))->asSet() ->intersection(source->closure(owner)->select(o2 | o2.oclIsKindOf(UML::Classifier))).oclAsType(UML::Classifier)->asSet() in owners.attribute->flatten()->includes(self.itemProperty))
inv_ItemFlowAssociationXorItemProperty=ItemFlow [4] itemProperty cannot have a value if the item flow is realized by an Association.
ocl_ItemFlowAssociationXorItemProperty=self.base_InformationFlow.realization->exists(r | r.oclIsKindOf(UML::Association)) implies self.itemProperty->isEmpty()
inv_ItemFlowSameType=ItemFlow [5] If an ItemFlow has an itemProperty, one of the classifiers of conveyed items must be the same as the type of the item property.
ocl_ItemFlowSameType=self.itemProperty->notEmpty() implies self.base_InformationFlow.conveyed->includes(self.itemProperty.type)
# FIXME the item flow doesn't have a name (should be information flow)
inv_ItemFlowSamePropertyName=ItemFlow [6] If an ItemFlow has an itemProperty, its name should be the same as the name of the item flow.
#ProxyPort
inv_ProxyPortNotFullPort=ProxyPort [1] Proxy ports cannot also be full ports. This applies even if some of the stereotypes are on subsetted or redefined ports.
inv_ProxyPortTypedByInterfaceBlock=ProxyPort [2] Proxy ports can only be typed by interface blocks.
inv_ProxyPortForceInnerProxyPort=ProxyPort [3] Ports owned by the type of a proxy port must be proxy ports.
#TriggerOnNestedPort
inv_TriggerOnNestedPortSingleProxyPort=TriggerOnNestedPort [1] The port property of the stereotyped trigger must have exactly one value, and the value cannot be a full port.
ocl_TriggerOnNestedPortSingleProxyPort=self.base_Trigger.port->size()=1 and FullPort.allInstances().base_Port->excludes(self.base_Trigger.port)
inv_TriggerOnNestedPortNoFullPort=TriggerOnNestedPort [2] The values of the onNestedPort property must not be full ports.
ocl_TriggerOnNestedPortNoFullPort=FullPort.allInstances().base_Port->excludesAll(self.onNestedPort)
inv_TriggerOnNestedPortOnNextedPortFirstOwnedByContext=TriggerOnNestedPort [3] The port at the first position in the onNestedPort list must be owned by a block in which the trigger is used, or one of the block's generalizations.
ocl_TriggerOnNestedPortOnNextedPortFirstOwnedByContext=let theContext: UML::Classifier = if self.base_Trigger.owner.oclIsKindOf(UML::Action) then self.base_Trigger.owner.oclAsType(UML::Action)._'context'.oclAsType(UML::Class) else self.base_Trigger.owner.oclAsType(UML::Transition).containingStateMachine()._'context'.oclAsType(UML::Class) endif in let owners: Set(UML::Classifier) = theContext->closure(general)->including(theContext) in owners->includes(self.onNestedPort->first().owner)
inv_TriggerOnNestedPortPathConsistency=TriggerOnNestedPort [4] The first constraint of ElementPropertyPath applies to onNestedPort.
#inv_TriggerOnNestedPortOnNestedPortLastTypeOwnsTriggerPort=TriggerOnNestedPort [5] The type of the port at the last position of the onNestedPort list must own or inherit the port port of must own or inherit the port port of
#ocl_TriggerOnNestedPortOnNestedPortLastTypeOwnsTriggerPort=self.onNestedPort->last().type.oclAsType(UML::Classifier).allFeatures()->includes(self.base_Trigger.port)
# seems strange since self.base_trigger.port has [0.*] as multiplicity
#ConjugatedInterfaceBlock
inv_ConjugatedInterfaceBlockEnforcedName=ConjugatedInterfaceBlock [1] The name of an ~InterfaceBlock shall be the name of its original InterfaceBlock with a tilde ("~") character prepended
ocl_ConjugatedInterfaceBlockEnforcedName=self.base_Class.name = '~'+self.original.base_Class.name
#ConstraintBlock
inv_ConstraintBlockComposite=ConstraintBlock [3] Any property of a block that is typed by a ConstraintBlock shall have composite aggregation.
#ControlOperator
inv_ControlOperatorOneParameterControlValue=ControlOperator [1] When the «ControlOperator» stereotype is applied, the behavior or operation shall have at least one parameter typed by ControlValue. If the stereotype is not applied, the behavior or operation may not have any parameter typed by ControlValue.
inv_ControlOperatorOperationMethod=ControlOperator [2] A behavior shall have the «ControlOperator» stereotype applied if it is a method of an operation that has the «ControlOperator» stereotype applied.
#Discrete
inv_DiscreteNoContinuous=Discrete [1] The «discrete» and «continuous» stereotypes cannot be applied to the same element at the same time.
#NoBuffer
inv_NoBufferNoOverwrite=NoBuffer [1] The «nobuffer» and «overwrite» stereotypes cannot be applied to the same element at the same time.
ocl_NoBufferNoOverwrite=base_ObjectNode.getAppliedStereotype('SysML::Activities::Overwrite')->isEmpty()
#Overwrite
inv_OverwriteNoNoBuffer=Overwrite [1] The «overwrite» and «nobuffer» stereotypes cannot be applied to the same element at the same time.
ocl_OverwriteNoNoBuffer=base_ObjectNode.getAppliedStereotype('SysML::Activities::NoBuffer')->isEmpty()
#Optional
inv_OptionalParameterMultiplicity=Optional [1] Optional parameter lower value has to be 0
ocl_OptionalParameterMultiplicity=base_Parameter.lower = 0
#Probability
inv_ProbabilityBaseElement=Probability [1] The «probability» stereotype can only be applied to activity edges that have decision nodes or object nodes as sources, or to output parameter sets.
inv_ProbabilityAllEdges=Probability [2] When the «probability» stereotype is applied to an activity edge, then it must be applied to all edges coming out of the same source.
inv_ProbabilityToAllParameterSet=Probability [3] When the «probability» stereotype is applied to an output parameter set, it must also be applied to all the parameter sets of the behavior or operation owning the original parameter set. .
inv_ProbabilityOutputParameters=Probability [4] When the «probability» stereotype is applied to an output parameter set, all the output parameters must be in some parameter set.
#Rate
inv_RateParameterIsStream=Rate [1] When the «rate» stereotype is applied to a parameter, the parameter must be streaming.
inv_RateParameterLessInout=Rate [2] The rate of a parameter must be less than or equal to rates on edges that come into or go out from pins and parameters nodes corresponding to the parameter.
#Allocate(from Allocations)
inv_AllocateOneClientSupplier=Allocate [2] A single «allocate» dependency shall have only one client (from) and one supplier (to).
#AllocateActivityPartition(from Allocations)
%inv_AllocateActivityPartitionActionsOnClientEnds=AllocateActivityPartition [1] An Action appearing in an "AllocateActivityPartition" shall be the /client (from) end of an "allocate" dependency. The element that represents the "AllocateActivityPartition" shall be the /supplier (to) end of the same "allocate" dependency. In the «AllocateActivityPartition» name field, Properties are designated by the use of a fully qualified name (including colon, e.g., "part_name:Block_Name"), and Classifiers are designated by a simple name (no colons, e.g., "Block_Name").
#No implementation [2] The «AllocateActivityPartition» maintains the constraints, but not the semantics, of the UML2::ActivityPartition. Classifiers or Properties represented by an «AllocateActivityPartition» do not have any direct responsibility for invoking behavior depicted within the partition boundaries. To depict this kind of direct responsibility, the modeler is directed to the UML 2 Superstructure specification, sub clause 12.3.10, «ActivityPartition,» Semantics topic.
#Copy
inv_CopyBetweenRequirementsModelConstraint=Copy [1] A Copy dependency may only be created between two NamedElements that have a subtype of the abstractRequirement stereotype applied.
inv_CopyReadOnlyModelConstraint=Copy [2] The text property of the client requirement is constrained to be a read-only copy of the text property of the supplier requirement and this applies recursively to all subrequirements.
#DeriveReqt
inv_DeriveReqtSupplierModelConstraint=DeriveReqt [1] The supplier shall be an element stereotyped by a subtype of AbstractRequirement.
inv_DeriveReqtClientModelConstraint=DeriveReqt [2] The client shall be an element stereotyped by a subtype of AbstractRequirement.
#Refine
inv_RefineOneClientSupplierModelConstraint=Refine [2] Abstractions with a Refine stereotype or one of its specializations applied shall have exactly one client and one supplier.
#Requirement
inv_RequirementEmptyOwnedOperation=Requirement [1] The property "ownedOperation" shall be empty.
ocl_RequirementEmptyOwnedOperation=base_Class.ownedOperation->isEmpty()
inv_RequirementEmptyOwnedAttribute=Requirement [2] The property "ownedAttribute" shall be empty.
ocl_RequirementEmptyOwnedAttribute=base_Class.ownedAttribute->isEmpty()
inv_RequirementNoAssociationModelConstraint=Requirement [3] Classes stereotyped by «requirement» shall not participate in associations.
inv_RequirementNoGeneralizationModelConstraint=Requirement [4] Classes stereotyped by «requirement» shall not participate in generalizations.
inv_RequirementNestedRequirementModelConstraint=Requirement [5] A nested classifier of a class stereotyped by Requirement or one of its specializations shall also be stereotyped by Requirement or one of its specializations.
inv_RequirementNotType=Requirement [6] Classes stereotyped by «requirement» shall not be used to type any other model element.
#TestCase
inv_TestCaseParameterVerdictKindModelConstraint=TestCase [1] The type of return parameter of the stereotyped model element shall be VerdictKind.
#Satisfy
inv_SatisfySupplierModelConstraint=Satisfy [1] The supplier shall be an element stereotyped by any subtype of «AbstractRequirement».
#Trace
inv_TraceOneClientSupplierModelConstraint=Trace [2] Abstractions with a Trace stereotype or one of its specializations applied shall have exactly one client and one supplier.
#Verify
inv_VerifySupplierModelConstraint=Verify [1] The supplier shall be an element stereotyped by any subtype of «AbstractRequirement».