slicc: support for transitions with a wildcard next state
Review Request #2790 - Created May 11, 2015 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10820:5064fb0968bb
---------------------------
slicc: support for transitions with a wildcard next state
This patches adds support for transitions of the form:
transition(START, EVENTS, *) { ACTIONS }
This allows a machine to collapse states that differ only in the next state
transition to collapse into one, and can help shorten/simplfy some protocols
significantly.
When * is encountered as an end state of a transition, the next state is
determined by calling the machine-specific getNextState function. The next
state is determined before any actions of the transition execute, and
therefore the next state calculation cannot depend on any of the transition
actions.
Posted (May 12, 2015, 1:47 p.m.)
There are two problems I have with this patch. Firstly, it changes the generally accepted meaning of '*'. Secondly, it is adding another keyword to the language which is, in my opinion, not required. Instead, the transition construct should be upgraded so that it recognizes that the final state argument can be anything whose type is state. This would allow us to name the function whatever we want it to be.
Posted (May 12, 2015, 3:09 p.m.)
I'm going to echo what Nilay has said in a other reviews: Could you give an example of how this is used? Say, an example getNextState() function. I'm having a hard time visualizing how this is supposed to work in a protocol.
Ship It!
Review request changed
Updated (May 26, 2015, 12:45 p.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+40 -5) |
Posted (May 28, 2015, 5:34 p.m.)
Any more comments on the updated patch?
