Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composed states unrecognized #886

Closed
ahochheiden opened this issue Sep 24, 2016 · 2 comments
Closed

Composed states unrecognized #886

ahochheiden opened this issue Sep 24, 2016 · 2 comments
Assignees
Labels
bug Crashes or wrong results Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users stateMachines Related to state machine syntax, semantics, diagrams or code generation ucosp Suitable for 4th year capstone projects

Comments

@ahochheiden
Copy link

Consider the following example:

class DeepHistoryCourse
{
  Sm {
    S1 {
      toS2HStar -> S2.HStar;
      Ss1 {
        Sss1{
          toSs2Sss2 -> Ss2.Sss2;
          toS2 -> S2;
        }
        Sss2{
          toS2 -> S2;
        }
      }
      Ss2 {
        Sss1{
          toSss2 -> S1.Sss2;
          toS2 -> S2;
        }
        Sss2{
          Ssss1{
            toSsss2 -> Ssss2;
            toS2Ss2 -> S2.Ss2;
          }
          Ssss2{
            toS2 -> S2;
            toSsss1 -> Ssss1;
          }
        }
      }
    }
    S2 {
      toDeepHistory -> S1.HStar;
      toS1Ss2 -> S1.Ss2;
      Ss1{
        toS1 -> S1;
      }
      Ss2{
        -> S1.HStar;
      }
    }
  }
}

The above code generates the following warnings:

Warning on line 11 : State 'Sss2' from StateMachine 'Ss1' is non-reachable.. More information (67)
Warning on line 17 : State 'S1.Sss2' has not been declared, it is being treated as an new state. More information (50)

These warnings are incorrect, as:

  • on line 8 we have toSs2Sss2 -> Ss2.Sss2;`, which makes it reachable.
  • on line 20 S1.Sss2 is declared

In umpleOnline, when using GraphViz State to view the state diagram, you can see that the state diagram is incorrect. (Sss1 -> toSs2Sss2)

@ahochheiden ahochheiden added bug Crashes or wrong results Priority-Medium This problem or request is likely to be of significant benefit if dealt with stateMachines Related to state machine syntax, semantics, diagrams or code generation labels Sep 24, 2016
@vahdat-ab vahdat-ab added Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users Diffic-Easy Should be obvious how to fix it and doable in less than a week by an experienced Umple developer and removed Priority-Medium This problem or request is likely to be of significant benefit if dealt with Diffic-Easy Should be obvious how to fix it and doable in less than a week by an experienced Umple developer labels Sep 24, 2016
@TimLethbridge TimLethbridge added the ucosp Suitable for 4th year capstone projects label Oct 4, 2016
@tlaport4
Copy link
Contributor

I believe this is working as intended already.

For the first warning
Warning on line 11 : State 'Sss2' from StateMachine 'Ss1' is non-reachable.. More information (67)
I believe it is referring to the state S1.Ss1.Sss2. The transition toSs2Sss2 -> Ss2.Sss2; as mentioned in the ticket, is referring to the state S1.Ss2.Sss2.

So, S1.Ss1.Sss2 actually is non-reachable.

For the second warning
Warning on line 17 : State 'S1.Sss2' has not been declared, it is being treated as an new state. More information (50)
I believe it doesn't know which S1.Sss2 to go to (S1.Ss1.Sss2 or S1.Ss2.Sss2), and since it can't decide which one to use, it treats it as a new state.

If you change

Ss2 {
    Sss1{
        toSss2 -> S1.Sss2;
            toS2 -> S2;
        }

to

Ss2 {
    Sss1{
        toSss2 -> S1.Ss1.Sss2;
            toS2 -> S2;
        }

it resolves both of the warnings. So I think these warnings are correct.

@vahdat-ab
Copy link
Member

vahdat-ab commented Dec 13, 2016

Yes, I checked. There was an issue in the original code. Thanks @tlaport4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crashes or wrong results Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users stateMachines Related to state machine syntax, semantics, diagrams or code generation ucosp Suitable for 4th year capstone projects
Projects
None yet
Development

No branches or pull requests

4 participants