Sinelabore Homepage

Generate production quality code from state diagrams created with StarUML#

The StarUML parser is experimental and under active development. The existing feature set already supports a useful subset for code generation.

Key Features#

  • Robustness checks before generation
  • No runtime framework required
  • Suitable for embedded and non-embedded targets

Drawing the State Machine Diagram#

StarUML supported state machine example

Creating Code#

Export from StarUML via File -> Export -> XMI and run:

java -cp "/path to codegen jar file/*" codegen.Main -l cx -p StarUML -o testcase -t "Model:class1" testcase.xmi

Supported Elements#

  • Hierarchical states
  • Signal events with guard/action
  • Initial and final pseudo states
  • History states
  • Choices