state machines and their region names #1046

Open
vahdat-ab opened this Issue Apr 22, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@vahdat-ab
Member

vahdat-ab commented Apr 22, 2017

In Umple, the names of regions are assigned automatically by the compiler. The rule is that the name of a region is the name of its initial states. This rule is respected when we have orthogonal regions. However, when there is a composite state, it is not respected. The name of the region is assigned to be the name of the state.
In the following example, the name of the region for composite state on must be stop, but it is on.

class A{
  status{
    on{
      stop{}
      playing{}  
    }
  }
}
@vahdat-ab

This comment has been minimized.

Show comment
Hide comment
@vahdat-ab

vahdat-ab Apr 22, 2017

Member

when this change happens, please verify the composition algorithm for traits and also all code generators for state machines.

Member

vahdat-ab commented Apr 22, 2017

when this change happens, please verify the composition algorithm for traits and also all code generators for state machines.

@TimLethbridge

This comment has been minimized.

Show comment
Hide comment
@TimLethbridge

TimLethbridge Apr 22, 2017

Member

I understand this 'matters' perhaps for merging of traits. But does it matter in any other context? We don't refer to region names in the concrete Umple syntax. So regions names only exist in the metamodel (and hence are likely to be referred to by diagram generators and code generators).

Member

TimLethbridge commented Apr 22, 2017

I understand this 'matters' perhaps for merging of traits. But does it matter in any other context? We don't refer to region names in the concrete Umple syntax. So regions names only exist in the metamodel (and hence are likely to be referred to by diagram generators and code generators).

@vahdat-ab

This comment has been minimized.

Show comment
Hide comment
@vahdat-ab

vahdat-ab Apr 27, 2017

Member

It is used at the code generation level and developers might use it to set states. Having two rules might be confusing.
BTW, this change might not even be good because in that case, we won't be able to set a composite state with its name. The changes need to be explored and one solution needs to be adopted.

Member

vahdat-ab commented Apr 27, 2017

It is used at the code generation level and developers might use it to set states. Having two rules might be confusing.
BTW, this change might not even be good because in that case, we won't be able to set a composite state with its name. The changes need to be explored and one solution needs to be adopted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment