[KISEMA-1534] Prio Java Code Generation produces wrong Behavior
[Issue KISEMA-1534 migrated from JIRA, first reported on 2019-11-11]
[Original links are dead as of 2022-05-11, links updated for new source files on 2022-05-17]
The java prio code generation produces code that fails the trace of this model: https://git.informatik.uni-kiel.de/ag-rtsys/kieler/models-private/-/blob/master/sccharts/simulation-tests/kolja/weak_suspend_simple.sctx All other code generations (prio C and netlist) yield the correct behavior.
Please reactivate test when fixed by deleting the following property file: https://git.informatik.uni-kiel.de/ag-rtsys/kieler/models-private/-/blob/master/sccharts/simulation-tests/kolja/weak_suspend_simple.properties
kisema-1534.sctx
scchart WeakSuspension {
input bool WS
output int x
weak suspend if WS
initial state A
do x += 1 go to B
state B
do x = 0 go to A
}
kisema-1534-weaksuspend.sctx
scchart WeakSuspension2 {
input bool WS
output int x
bool _wsFlag = false
int _WeakSuspension = 0
bool _lastWishDone
during do _wsFlag = WS
immediate during do _lastWishDone = false
state A {
entry if !_wsFlag do _WeakSuspension = 0
}
do x += 1 go to B
immediate if _wsFlag go to _WS
state B {
entry if !_wsFlag do _WeakSuspension = 1
}
do x = 0 go to A
immediate if _wsFlag go to _WS
state _WS {
entry do _lastWishDone |= true
}
immediate if _WeakSuspension == 0 go to A deferred
immediate if _WeakSuspension == 1 go to B deferred
initial state _Init
immediate if _wsFlag && _lastWishDone go to _WS
immediate go to A
}
I think the updated links are https://git.informatik.uni-kiel.de/ag-rtsys/kieler/models-private/-/blob/master/sccharts/simulation-tests/kolja/weak_suspend_simple.sctx and https://git.informatik.uni-kiel.de/ag-rtsys/kieler/models-private/-/blob/master/sccharts/simulation-tests/kolja/weak_suspend_simple.properties respectively
Links are now updated, thank you 🙌