google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Transition to great uncle state (sibling of parent) not recorded properly in metamodel #371

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following fails on code generation. Transitions to X and X1 go to the wrong 
state.

class X {
  sm {
    X {
      X0 {}
      X1 {
        e -> X2;
      }
      X2 {
        X2a {

          X2a1 { 
            check -> X1;
          }
          e2 -> X;
        }  
     }
      X3 {}
   }
 }
}

It seems that the failing cases are to transitions to a sibling of a 
grandparent state, and only cases where the sibling is listed before the 
grandparent state.

Original issue reported on code.google.com by TimothyCLethbridge on 20 Jan 2013 at 4:20

GoogleCodeExporter commented 9 years ago
Note there is a case of this in the Runway example too (in ump) where state 
Ready is not recognized

Original comment by TimothyCLethbridge on 20 Jan 2013 at 4:22

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 30 Jan 2013 at 1:55

GoogleCodeExporter commented 9 years ago
Change has been committed. The findState method now search from root instead of 
only from the parent of the current state machine. Revsion 2572.

Original comment by gabbour...@gmail.com on 5 Mar 2013 at 5:27

GoogleCodeExporter commented 9 years ago
The metamodel transition to this was fixed, however, the proper exits are not 
being called.

The attached file EnterExitTest.ump is a revision of the above with print 
statements:

When run, the trace is as follows, except that I have added * before items that 
do not appear

enterA
enterC
Constructed: Should have EnA (EnC)
exitC
e0-should ExC EnD
enterD
exitD
e1-should ExD EnE (EnF) (EnG)
enterE
enterF
enterG
exitG
e3-should ExG *ExF *ExE *ExA EnB
enterB
exitB
e2-should ExB *EnA EnE EnF *(EnG)
enterE
enterF
exitF
e2-should *(ExG) *ExF *ExE* ExA EnA EnC
enterA
enterC

A lot of the appropriate enter end exit actions are not being done. Note that 
those in parentheses are because this is the only substate of a superstate, so 
it ought to be entered by default.

Original comment by TimothyCLethbridge on 6 Mar 2013 at 2:28

Attachments:

GoogleCodeExporter commented 9 years ago
Marking mostly done. The issue of executing entries and exits needs further 
investigation/work

Original comment by TimothyCLethbridge on 30 Apr 2013 at 1:34

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 13 Dec 2013 at 3:56

GoogleCodeExporter commented 9 years ago
When the testcase provided is run as of version 1.21.0.4666 the output is as 
follows:

enterA
enterC
Constructed: Should have EnA (EnC)
exitC
e0-should ExC EnD
enterD
exitD
e1-should ExD EnE (EnF) (EnG)
enterE
enterF
enterG
exitG
e3-should ExG ExF ExE ExA EnB
enterB
exitB
e2-should ExB EnA EnE EnF (EnG)
enterE
enterF
exitF
e2-should (ExG) ExF ExE ExA EnA EnC
enterA
enterC

It appears that the missing entry and exit actions are now being run (the *'d 
messages are now appearing).

Original comment by CraigBry...@gmail.com on 8 Feb 2015 at 3:19