Open FE-EnricoSartori opened 3 years ago
Agree, s3 should transition to X in this case :thinking: Seems like an issue :bug: I'll take a look, thanks for reporting it @FE-EnricoSartori :+1:
For some reason, I cannot reproduce it. sm.is(X,X,X)
is always true
no matter how many defer
s are used, which is also a strange behavior..
Hmm, master seems to yield the correct result :thinking:
The program ends with (X,X,X)
even if no defer
is used.
Is this the expected behavior?
Orthogonal regions all process the event. There is no need to add defer to allow all state machine to transition to X.
Defer is used to allow the next state to handle the event, in your case it would allow X to use the event (which has no sense).
Le mer. 18 nov. 2020 à 01:24, Zheng Qu notifications@github.com a écrit :
The program ends with (X,X,X) even if no defer is used.
Is this the expected behavior?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boost-ext/sml/issues/416#issuecomment-729295540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3DS4JLOXRMGM7WXG2F5ZTSQMH3DANCNFSM4TYMWW6A .
@GuiCodron Thanks for the explanation. Just out of curiosity, is there a way to only allow the "first" (or a certain) state in the orthogonal region to handle the event?
I don't know of a built-in way to do it, I think it goes a bit against how orthogonal regions are meant to be used.
My guess would be to use different events if you want each region to behave differently. If this event is not meant to be caught by a region if another region handles it, it might mean that using orthogonal regions is not the right solution for your problem but you need distinct states (not orthogonal).
If you can share a representation of your state machine and how you would like to use this event disabling feature, we could try to help you.
Le mer. 18 nov. 2020 à 09:54, Zheng Qu notifications@github.com a écrit :
@GuiCodron https://github.com/GuiCodron Thanks for the explanation. Just out of curiosity, is there a way to only allow the "first" (or a certain) state in the orthogonal region to handle the event?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boost-ext/sml/issues/416#issuecomment-729533418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3DS4KRN6AIPBPWAMUNYVDSQODUDANCNFSM4TYMWW6A .
In the following example, a state machine containing 3 initial states is proposed. All these states should transit to the exit state when the event e1 is received. In order to propagate such event to all the initial states, it is deferred two times. The expectation is not satisfied since only the first defer works properly.
Example:
Is this the correct behavior? How can I implement the expected behavior?