C ++ State Generator

Do you know about any open source state generator generators (which will work on Linux)? Ideally, the tool outputs the entire logic of the state machine and the stub. In addition, he would accept UML or humanoid manifest files as input.

+7
source share
6 answers

You should take a look at Yakinda: http://statecharts.org/

+5
source

Ragel has a pretty good reputation.

(I have no specific experience).

+4
source

You can find my STTCL infrastructure interesting. This is not a generator, but the available (base) classes map very well with UML user-defined character definitions.
http://makulik.github.com/sttcl/

+1
source

The closest thing I've seen that might work for you is StateProto. But it outputs C # code.

You should check StateProto and QHSM. An open source project is here: http://code.google.com/p/gqhsm/

StateProto is open source, and the output functions can be changed to output C ++ code for you. But he uses delegates.

I would recommend you use data driven instead. StateProto will output XML state machines and there is C # code for loading XML and retrieving the state machine from the data.

You can find many QHSM implementations in C ++. I do not know if there are any XML downloaders.

0
source

Take a look at the open source QP / C ++ environment and the free QM modeling tool (see http://www.state-machine.com ). The QP / C ++ framework supports hierarchical state machines (UML state diagrams) and allows several such states to be executed simultaneously. QP / C ++ has been ported to Linux (see http://www.state-machine.com/linux ).

Now, with regard to the code generator, the free QM modeling tool (see http://www.state-machine.com/qm ) allows you to draw machine state diagrams and generate C ++ code for the QP / C ++ platform. QM itself is cross-platform and runs on Linux as well as Windows and Mac OS X.

0
source

Check out Thingml . It provides text syntax (regardless of C) for UML-like states. Something like:

import "../hardware/bricks/led.thingml" thing Blink includes LedMsgs, TimerMsgs { required port HW { sends led_toggle, timer_start receives timer_timeout } statechart BlinkImpl init Blinking { state Blinking { on entry HW!timer_start (1000) transition -> Blinking event HW?timer_timeout action HW!led_toggle () } } } 

ThingML can generate C code that can be easily integrated into C ++ programs. It can generate more than cigarette butts. We really can generate fully working code. Of course, when it comes to low-level implementation details, we provide an average for combining ThingML code with C.

Please note that we also target Java and JavaScript.

0
source

All Articles