google-code-export / umple

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

When there are substates with the same name in different states, transitions are wrong. There is a need to allow specific control #519

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the following code, all transitions to sb go to the sb in s1. There is no 
warning about this.

The following fixes are needed:

a) It should be possible to specify that the destination more precisely, using 
a notation such as sb.s1  (currently this syntax raises error 152) Note that 
this is a prerequisite for issue 238 and issue 239 since the ability to 
correctly specify history would be needed.

b) If there are ambiguities, there should be a warning (lower priority)

class X {
  sm {
    s1 {
      sa {
        e -> sb;
      }
      sb {
        e1 -> sa;
        e2 -> s2;
      }
    }
    s2 {
      sa {
        e -> sb;
      }
      sb {
        e1 -> sa;
        e2 -> s1;
      }
    }
  }
}

Original issue reported on code.google.com by TimothyCLethbridge on 22 Feb 2014 at 2:05

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 22 Feb 2014 at 2:05

GoogleCodeExporter commented 9 years ago
The most recent patch I sent adds dot-notation functionality. However there are 
two remaining issues I am aware of right now.
1: If there is a transition to a state that doesn't exist, in dot notation, the 
state will be created with name = dot notation name. so e -> non.existing.state 
would create and end state with stateName = non.existing.state. This will 
generate non functional code.
2: Right now dot notation doesn't work after auto transitions, this should be a 
very small fix coming soon

Original comment by erictel...@gmail.com on 29 Mar 2014 at 4:47

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 27 Jun 2014 at 6:20

GoogleCodeExporter commented 9 years ago

Original comment by PedroAug...@gmail.com on 7 Jul 2014 at 3:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
2: Right now dot notation doesn't work after auto transitions, this should be a 
very small fix coming soon.

This bug is already fixed.

Original comment by PedroAug...@gmail.com on 15 Jul 2014 at 7:25

GoogleCodeExporter commented 9 years ago
When there is a transition specifying the destiny state with dot notation we 
can find 4 scenarios:

Considering a transition e -> s3.ss.sa;

a) The state "s3.ss.sa" exists -> Normal generation.
b) "s3.ss" exists, ss has a nestedSm but "sa" does not exist-> (Warning 50) 
Create a new state "sa" inside "s3.ss";
c) "s3.ss" exists, "ss" does not have a nestedSm and "sa" does not exist-> 
(Warning 50) New state "sa" will be added to the top level sm;
d) "s3.ss" or "ss" does not exist -> (Warning 68) The whole transition is 
disconsidered.

The following patch allows support to 4th case.

Original comment by PedroAug...@gmail.com on 15 Jul 2014 at 7:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 24 Jul 2014 at 2:55