Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feature/add missing fields in plain scxml #63
Feature/add missing fields in plain scxml #63
Changes from all commits
3465c59
7a6689a
d2dfab5
c3c4261
f827c07
028dbbc
2b1489e
bbff834
46cc214
8ce74d7
971501e
7282e77
cb16d2d
eae7ad6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EnricoGhiorzi on this one I am not entirely sure: there are cases in which we send an event, but we define no transition for it.
This might be desired in case the developer wants to expose a specific information from a single automaton only for referring to it in a property.
For now, I decided to add a "NONE" target for such cases, but we can find other alternatives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the use for such a feature, but I worry about aligning the model with the implementation. Would this be how the real system implements such a feature? In other words, is it possible to monitor a topic that has a publisher but no subscribers? (I guess the monitor itself is a subscriber, but that is not modelled.)
Reguarding the "NONE" syntax, I looked up the SCXML specification but is provided no insight: there is no way to send an event into the void, and having a non-existing target would raise an error.
Another option could be to automatically create such a "NONE" automaton and just let it process any event it receives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To monitor a topic, you need to subscribe to it, and as you mentioned above, the monitor will do exactly that.
If you are fine with it, you can assume to have the NONE automaton that acts as a receiver for all events (though I am not sure it makes sense to auto-generate it: maybe it is easier to have a script removing the send events with a NONE target)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it: if we remove these sends, the events will not be observable in SCAN either. I think we either need to send the events into the void (as it is now) and allow that in SCAN, or to generate a target NONE automaton, either at AS2FM or SCAN level, possibly consistently with the actual implementation. @SofiaFaraci might have some insight on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment about (optionally) removing the NONE events was only for executing system outside of SCAN. Otherwise, I would be happy to keep it as is and allow the NONE target in SCAN, if that works for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the actual implementation there is no need for a target for the send tag, the events are directly handled by the generated C++ code of the SMs that sends the event.