I would like to be able to force a transition as soon as a condition becomes true.
For example in this Example, I would like to force the transition from the system next from the state S0 to S1 as soon as the global variable a becomes 5. The guard is not enough because a can still be incremented once it reach 5 before the transition is fired. I really need the transition to be triggered and then continue to increment a.
Is there a simple way to do it? I tried by adding invariant in the state but it is creating deadlocks.