-
Notifications
You must be signed in to change notification settings - Fork 768
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
complementary AND-decomposition #504
Comments
Stateless doesn't support being in multiple concurrent states. It sounds like you may need multiple state machines to model this. There's a similar discussion in issue #442: #442 (comment), where @HenningNT suggested a few approaches. I hope this helps. I'd be interested to find out how you end up approaching this. |
I'm not aware of any plans to add support for orthogonal states currently (I can't speak for the other maintainers; perhaps they know different?). Adding support for this sounds like a really interesting project but it would need some careful thought given that the library is currently based on the principle of being in exactly one state at all times. If you have any thoughts on how to approach it, I'd be really interested to hear them. |
I am currently implementing state machines according to UML diagrams provided by a standard but they are using what they call 'AND substates', or what wikipedia calls 'complementary AND-decomposition', 'Such decomposition means that a composite state can contain two or more orthogonal regions (orthogonal means compatible and independent in this context) and that being in such a composite state entails being in all its orthogonal regions simultaneously'. In practice this means that I need to have two or more active states at one time, does this library support that?
For some context, it's a representation for the connection state of a piece of equipment. During the initialization the equipment simultaneously attempts a connection to the host and listens for an incoming connection from the host. If any of these are successful we transition out of the composite state and into the connected state. How could I best represent this using this library?
It is possible to manually rewrite these composite states to non-composite ones but that results in a bunch of extra transitions and the possibility of me making mistakes during the rewriting.
The text was updated successfully, but these errors were encountered: