MathewWi / umple

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

State table generation fails when dealing with guarded transitions #677

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Choose an example with guarded transitions (eg. Car Transmission)
2. Generate state tables

What is the expected output? What do you see instead?
The results cannot be read from the umple compiler.

In the car transmission example, if the transitions involving guards are 
removed, then the state tables can be generated.

Original issue reported on code.google.com by CraigBry...@gmail.com on 21 Feb 2015 at 1:57

GoogleCodeExporter commented 9 years ago
This occurs only when the guarded transition is within a nested state.

This code works:
class PoweredThing
{
  boolean stayOn;

  status {
    On 
    { 
      power [stayOn] -> Sleep;
      power [!stayOn]-> Off; 
    }
    Sleep 
    {
      power -> On; 
    }
    Off { power -> On; }
  }
}

This code gives the error:
class PoweredThing
{
  boolean stayOn;

  status {
    On 
    { 
      OnOn 
      {
        power [stayOn] -> Sleep;
        power [!stayOn]-> Off; 
      }
      Sleep 
      {
        power -> OnOn; 
      }
    }
    Off { power -> On; }
  }
}

Original comment by CraigBry...@gmail.com on 21 Feb 2015 at 2:13

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r5138.

Original comment by CraigBry...@gmail.com on 22 Feb 2015 at 5:35