kieler/semantics

[KISEMA-1577] Deep Deferred defers inner states

fabianheyer opened this issue · 0 comments

[Issue KISEMA-1577 migrated from JIRA, first reported on 2020-08-02]

Deep Deferred suppresses not only the initial behavior of the deferred entered states but of all inner states when entered.
This should not happen, only initial behavior of the top level state should be preempted but including all nested states

scchart ComplexTransitions {
  input bool CD, SH, DH, D
  output int F, F2  
  
  initial state A {
    initial state Init
      immediate do F = 0 go to Count
    
    state Count {
      during do F++
      
      initial state Init
        immediate do F2 = 0 go to Count2
      
      state Count2 {
        during do F2++
      }
    }
  }
  if 3 CD go to Wait

  state Wait
  if SH go to A shallow history
  if DH go to A history
  if D go to A deep deferred
  go to A
}

In this example the reset of F2 is delayed by one tick.