Issue 12789: constraint [4] on AcceptEventAction and unordered result:OutputPin property (uml2-rtf) Source: NASA (Dr. Nicolas F. Rouquette, nicolas.f.rouquette(at)jpl.nasa.gov) Nature: Uncategorized Issue Severity: Summary: Source: UML 2.2 Superstructure document and XMI http://www.omg.org/cgi-bin/doc?ptc/08-05-05 http://www.omg.org/cgi-bin/doc?ptc/08-05-12 Nature: Unspecified OCL constraint Summary: The following constraint on AcceptEventAction (11.3.2) is unspecified: [4] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. The number of result output pins must be the same as the number of attributes of the signal. The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. This constraint implicitly requires that the AcceptEventAction.result property should be ordered to enable order-sensitive comparison with corresponding properties in Signal.ownedAttribute. • result: OutputPin [0..*] Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved. {Subsets Action::output} The -- [4a] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. -- [4b] The number of result output pins must be the same as the number of attributes of the signal. -- [4c] The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. -- [4d] The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. self.isUnmarshall implies (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->asOrderedSet()->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Discussion: OCL 101. Revised Text: Change the specification of the result property to the following: • result: OutputPin [0..*] Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved. This association end is ordered. {Subsets Action::output} Change the specification of the constraint to the following: [4] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. The number of result output pins must be the same as the number of attributes of the signal. The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Note: if the result property is not ordered, this constraint can be approximated in the following manner: (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->asOrderedSet()->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Change the Superstructure XMI accordingly. Resolution: Revised Text: Actions taken: August 15, 2008: received issue Discussion: End of Annotations:===== te: Sat, 16 Aug 2008 02:30:22 -0700 From: Nicolas Rouquette User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) To: uml2-rtf@omg.org Subject: Unspecified constraint [4] on AcceptEventAction and unordered result:OutputPin property X-Source-IP: vpn-149-242-034.jpl.nasa.gov [128.149.242.34] X-Source-Sender: nicolas.rouquette@jpl.nasa.gov X-AUTH: Authorized Source: UML 2.2 Superstructure document and XMI http://www.omg.org/cgi-bin/doc?ptc/08-05-05 http://www.omg.org/cgi-bin/doc?ptc/08-05-12 Nature: Unspecified OCL constraint Summary: The following constraint on AcceptEventAction (11.3.2) is unspecified: [4] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. The number of result output pins must be the same as the number of attributes of the signal. The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. This constraint implicitly requires that the AcceptEventAction.result property should be ordered to enable order-sensitive comparison with corresponding properties in Signal.ownedAttribute. . result: OutputPin [0..*] Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved. {Subsets Action::output} The -- [4a] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. -- [4b] The number of result output pins must be the same as the number of attributes of the signal. -- [4c] The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. -- [4d] The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. self.isUnmarshall implies (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->asOrderedSet()->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Discussion: OCL 101. Revised Text: Change the specification of the result property to the following: . result: OutputPin [0..*] Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved. This association end is ordered. {Subsets Action::output} Change the specification of the constraint to the following: [4] If isUnmarshalled is true, there must be exactly one trigger for events of type SignalEvent. The number of result output pins must be the same as the number of attributes of the signal. The type and ordering of each result output pin must be the same as the corresponding attribute of the signal. The multiplicity of each result output pin must be compatible with the multiplicity of the corresponding attribute. (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Note: if the result property is not ordered, this constraint can be approximated in the following manner: (self.trigger->size() = 1 and let e:Event = self.trigger.event->asSequence()->first() in e.oclIsKindOf(SignalEvent) and let s:Signal = e.oclAsType(SignalEvent).signal in Set{1..s.ownedAttribute->size()}->forAll(i| let ai:Property=s.ownedAttribute->at(i) in let ri:OutputPin= self.result->asOrderedSet()->at(i) in ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper)) Change the Superstructure XMI accordingly. -- Nicolas.