sml icon indicating copy to clipboard operation
sml copied to clipboard

internal transition must have an action or a guard to be recognized as such

Open osmeest opened this issue 6 years ago • 2 comments

Although the general format for transitions is from_state + event [ guard ] / action = target_state (with event, guard and action being optional), and although internal transitions (avoiding on_exit/on_entry) would drop the = target_state part, it seems impossible write a rule like "state + event". It is not recognized as an internal transition on event. One has to add a dummy action "[] {}" or a dummy guard "[internal]" ( with internal= []{return true;} ) to have it recognized. The compiler emits a whole lot of error messages which give no clue about the real error.

osmeest avatar Dec 04 '19 10:12 osmeest

What's the point of an internal transition with no action?

Rijom avatar Jan 13 '20 20:01 Rijom

To ignore an event (eventually in some guarded condition), without triggering state entry/exit.

osmeest avatar Jan 21 '20 12:01 osmeest