Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

semantics precision on final nodes in orthogonal regions #3215

Closed
jdeantoni opened this issue Nov 13, 2020 · 3 comments
Closed

semantics precision on final nodes in orthogonal regions #3215

jdeantoni opened this issue Nov 13, 2020 · 3 comments

Comments

@jdeantoni
Copy link

I found a potential semantic hole in yakindu for final nodes in orthogonal states.

here is the example:
image

According to the documentation here: https://www.itemis.com/en/yakindu/state-machine/documentation/user-guide/quick_ref_final_state:

A final state denotes the end of the execution flow of a state machine or region. It can have multiple incoming transitions but no outgoing ones. Each region may contain at most one final state. In case of orthogonal regions, the execution flow stops when all regions' final states have been reached.

However, it is not clear when the transition from the orthogonal state should be taken ? For now it is taken as soon as the first final node is reached in one of the internal region. It seems strange to me since this behavior is encodable with exit nodes.

Not that in QT, they use the done.state.id stipulated in the scxml norm

(When all of the children reach final states, the element itself is considered to be in a final state, and a completion event done.state.id is generated, where id is the id of the element.)

image

Then my question is: how can I wait for all regions to be in a final state like in Qt ? Shouldn't it be the default behavior of the yakindu diagram above ?

@jdeantoni
Copy link
Author

any idea ? interest ?

@terfloth
Copy link
Contributor

terfloth commented Nov 26, 2020

@jdeantoni Thank you for the problem description. You unveiled a bug and a functional hole.

First the transition StateA --always--> StateB is taken before s1 or s2 have the chance to react. This is due to the fact that parent-first-execution is active which should not be the case unless you specify it explicitly. So this is a bug which we will fix with the next bugfix release.

Second you can check for active states in guards. But the final states are not provided as options. These are simply missing in the list of state identifiers. This is the missing functional aspect, We will add those identifiers so that you can specify:

`[ active( StateA.r1._final_) && active (StateA.r2._final_)]`

For our SCXML-statecharts (SCXML domain assigned) we consider to add the done.state.XXX pattern.

@terfloth
Copy link
Contributor

terfloth commented Jan 4, 2021

The issue related to the default execution precedence is fixed with release 4.0.4. Thus this issue will be closed.

The remaining topics relating to checking for final states are captutered by the tickets #3217 and #3218. These are scheduled for 4.1 release

@terfloth terfloth closed this as completed Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants