Le 18/10/2016 à 15:45, Otto Behrens a écrit :
for things like that, I would consider looking into the SmaCC visitor automatic generation. From an grammar, SmaCC creates the class, respecting an eventual inheritance constraint you specify, adds the instance variables, and generates the visitor (and an equality test too).
Nice. Will have a look. Thanks.
The thing is basically SmaCC is a automaton compiler, with two different generation strategies based on the type of automaton you are interested in. Plus a tree / visitor generation code.
Regarding state machines generation, what class of automatons are you looking at? Because I'm looking at automatons generation by reusing SmaCC (for a tentative hardware architecture subject).
We have some domain specific objects, for example investment instructions, that go through some domain specific state transitions. It is not enormous, but a state transition model helps to understand what valid transitions there are. As a simplistic example, when we receive an investment instruction, one user "submits" the instruction, another "authorises". From there it moves into a processing state and then complete when the investment is placed.
What will be nice is to set up guards on transitions, entry / exit actions and more nice things that can be done with a state machine. Reading the state machine then gives a nice overview of the logic. What will be nice is to see that in the form of a graph, with all the annotations.
We do not currently use complexities like concurrency and nesting, but have seen that working before.
Does this answer what you're asking?
Yes, I think I understand, including the need for a graphical representation. I'm interested in finding opportunities for automata as a way to compute (and synthesize hardware). I've seen very interesting results with synthesis of automata co-processors on FPGAs (and the Micron Automata processor as well). I suggested an internship in my lab, and it was bumped up to a possible post-doc opportunity. But I'm more into expressing them as a RE / as a Grammar than explicitely... studying a way to convert between the different representations could be interesting. Thierry