UML 2.2 RTF Avatar
  1. OMG Issue

UML22 — constraint [4] on AcceptEventAction and unordered result:OutputPin property

  • Key: UML22-431
  • Legacy Issue Number: 12789
  • Status: closed  
  • Source: NASA ( Nicolas Rouquette)
  • 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 in
    let ri:OutputPin= self.result->asOrderedSet()->at 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 in
    let ri:OutputPin= self.result->at 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 in
    let ri:OutputPin= self.result->asOrderedSet()->at in
    ai.type = ri.type and ri.lower <= ai.lower and ri.upper >= ri.upper))

    Change the Superstructure XMI accordingly.

  • Reported: UML 2.1.2 — Fri, 15 Aug 2008 04:00 GMT
  • Disposition: Resolved — UML 2.2
  • Disposition Summary:

    Merged with 8702

  • Updated: Fri, 6 Mar 2015 20:58 GMT