semantics icon indicating copy to clipboard operation
semantics copied to clipboard

[KISEMA-1600] Incomplete GO Conditional Merger breaks Assignment Order

Open fabianheyer opened this issue 3 years ago • 0 comments

[Issue KISEMA-1600 migrated from JIRA, first reported on 2020-08-14]

In the following example the GO conditionals are only partially merged and moved into reset resulting in an invalid assignment order and wrong behavior.

go

scchart Main {
  input int I
  output int A, B, C, D
  
  initial state Init ""
  immediate do A = 1; B = 2
  go to Compute
  
  state Compute "" {
    region {
      initial state A ""
      immediate do D = I 
      go to B
      
      connector state B
      immediate do A += C 
      go to C
      
      state C ""
      go to D
      final state D ""
    }
    region {
      initial state A ""
      immediate do C = I
      go to B
      
      connector state B
      immediate do B *= D 
      go to C
      
      state C ""
      go to D
      final state D ""
    }
  }
  join to End 
  
  final state End ""
  
}

go-broken

fabianheyer avatar Apr 19 '22 10:04 fabianheyer