Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 510315 - [UML-RT] UML specific implementation for state machines
Summary: [UML-RT] UML specific implementation for state machines
Status: CLOSED FIXED
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P2 enhancement
Target Milestone: 0.9.0   Edit
Assignee: Christian Damus CLA
QA Contact: Peter Cigehn CLA
URL:
Whiteboard:
Keywords:
Depends on: 467545 511942 512387
Blocks:
  Show dependency tree
 
Reported: 2017-01-11 16:16 EST by Christian Damus CLA
Modified: 2017-03-03 10:41 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2017-01-11 16:16:21 EST
Bug 467545 introduced an implementation of the UML Metamodel for UML-RT semantics of inheritance and redefinition in Capsule Structure and Protocols:  the concepts defined in the UMLRealTime profile.

Similar support is required for inheritance and redefinition in the behavioural concepts defined in the UMLRTStateMachines profile.
Comment 1 Eclipse Genie CLA 2017-01-31 09:42:37 EST
New Gerrit change created: https://git.eclipse.org/r/89958
Comment 2 Peter Cigehn CLA 2017-01-31 11:02:31 EST
In the legacy tooling a capsule was always required to own a state-machine, which made it obvious how to handle the inheritance of the state-machine whenever a generalization was added to the capsule.

But since the state-machine profile now is optional, and thus it is also optional for a capsule to own a state-machine, there are some additional cases that needs to be considered, e.g. when either superclass, or the subclass, capsule does not own a state-machine when the generalization is established, and the cases when a state-machine is added to the superclass, or the subclass, capsule at a later point in time after the generalization have been established.

One such example is the "interface capsule pattern" (see example legacy model based on this pattern attached to Bug 511211 Comment 0) where an "interface capsule" is a pattern which only have relay ports and no internal structure and no behaviour. It would be rather natural to leave the interface capsule without having a state-machine, to really indicate that it is not supposed to have any behavior defined. But then in the "implementation subclass", which inherits the "interface capsule", it would then be natural to have a state-machine where its behavior is added.

Another aspect to consider here is also the three initial elements added to a UML-RT state-machine at creation, i.e. the initial pseudostate, the first state, and the initial transition between them. Whenever a generalization is established, then these elements shall automatically be removed in the subclass capsule's state-machine to avoid them being defined "double", i.e. both being inherited and both defined locally. At this point in time it is sufficient to inherit them, and thus the locally defined ones shall be removed. When removing a generalization, these elements can be re-added again. This is how the legacy tooling handles these three initial elements.

It probably needs to be elaborated in which situations the local elements cannot/shall not be removed, e.g. if outgoing transitions have been added to the first state, in which case it probably is not a good idea to simply remove the first state. But for "empty" state-machines, where only the three initial and automatically created elements exist, then it should be just to removed the local ones, and let them be inherited from the superclass capsule instead.
Comment 4 Eclipse Genie CLA 2017-02-06 09:40:11 EST
New Gerrit change created: https://git.eclipse.org/r/90419
Comment 6 Eclipse Genie CLA 2017-02-07 16:07:35 EST
New Gerrit change created: https://git.eclipse.org/r/90586
Comment 8 Eclipse Genie CLA 2017-02-08 15:44:20 EST
New Gerrit change created: https://git.eclipse.org/r/90677
Comment 10 Eclipse Genie CLA 2017-02-10 07:56:23 EST
New Gerrit change created: https://git.eclipse.org/r/90828
Comment 11 Eclipse Genie CLA 2017-02-10 07:56:36 EST
New Gerrit change created: https://git.eclipse.org/r/90827
Comment 12 Christian Damus CLA 2017-02-10 08:26:36 EST
Blocking bug 511942 is resolved in Papyrus.
Comment 15 Eclipse Genie CLA 2017-02-10 16:46:46 EST
New Gerrit change created: https://git.eclipse.org/r/90865
Comment 17 Eclipse Genie CLA 2017-02-12 11:38:59 EST
New Gerrit change created: https://git.eclipse.org/r/90891
Comment 19 Eclipse Genie CLA 2017-02-13 18:03:57 EST
New Gerrit change created: https://git.eclipse.org/r/91007
Comment 21 Eclipse Genie CLA 2017-02-14 12:03:41 EST
New Gerrit change created: https://git.eclipse.org/r/91078
Comment 23 Eclipse Genie CLA 2017-02-16 10:12:45 EST
New Gerrit change created: https://git.eclipse.org/r/91296
Comment 24 Eclipse Genie CLA 2017-02-16 10:14:08 EST
New Gerrit change created: https://git.eclipse.org/r/91297
Comment 26 Eclipse Genie CLA 2017-02-16 12:45:09 EST
New Gerrit change created: https://git.eclipse.org/r/91317
Comment 28 Eclipse Genie CLA 2017-02-20 19:51:30 EST
New Gerrit change created: https://git.eclipse.org/r/91512
Comment 30 Eclipse Genie CLA 2017-02-21 12:19:04 EST
New Gerrit change created: https://git.eclipse.org/r/91561
Comment 32 Eclipse Genie CLA 2017-02-21 13:35:52 EST
New Gerrit change created: https://git.eclipse.org/r/91565
Comment 33 Eclipse Genie CLA 2017-02-21 15:06:05 EST
New Gerrit change created: https://git.eclipse.org/r/91574
Comment 36 Eclipse Genie CLA 2017-02-22 12:48:08 EST
New Gerrit change created: https://git.eclipse.org/r/91635
Comment 38 Eclipse Genie CLA 2017-02-22 14:26:34 EST
New Gerrit change created: https://git.eclipse.org/r/91642
Comment 40 Eclipse Genie CLA 2017-02-22 18:08:11 EST
New Gerrit change created: https://git.eclipse.org/r/91663
Comment 41 Eclipse Genie CLA 2017-02-22 18:08:24 EST
New Gerrit change created: https://git.eclipse.org/r/91662
Comment 44 Eclipse Genie CLA 2017-02-23 11:48:50 EST
New Gerrit change created: https://git.eclipse.org/r/91718
Comment 46 Eclipse Genie CLA 2017-02-23 14:23:11 EST
New Gerrit change created: https://git.eclipse.org/r/91729
Comment 48 Christian Damus CLA 2017-02-24 13:24:20 EST
Marking this as resolved because the UML-RT implementation and façade for state machines are effectively complete, including JUnit tests (72% coverage overall, with much of the uncovered code being what EMF/UML2 generates and our use cases have no interest in).

Depending on how the decision whether to inherit automatically (in the API) the state machine behaviour of a capsule lands (https://goo.gl/b0tIZS), that would best be handled by a new bugzilla.
Comment 49 Peter Cigehn CLA 2017-03-03 10:40:56 EST
Kind of hard verify all aspects of this bug. But since the work has progressed pretty much and we have started to track individual issues with separate bugs, I put this one into verified/closed fixed.
Comment 50 Peter Cigehn CLA 2017-03-03 10:41:12 EST
Closing as verified fixed.