Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KISEMA-1534] Prio Java Code Generation produces wrong Behavior #43

Open
fabianheyer opened this issue May 11, 2022 · 2 comments
Open
Labels
bug Something isn't working jira Legacy issues migrated from old KISEMA Jira

Comments

@fabianheyer
Copy link

fabianheyer commented May 11, 2022

[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
}
@fabianheyer fabianheyer added bug Something isn't working jira Legacy issues migrated from old KISEMA Jira labels May 11, 2022
@fabianheyer
Copy link
Author

Links are now updated, thank you 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira Legacy issues migrated from old KISEMA Jira
Projects
None yet
Development

No branches or pull requests

2 participants