Menu

Home

Petr Pazourek

Cuml is a free source code generator. It converts your Hierarchical State Machines (UML Statecharts) into simple readable C code compatible to ANSI C.

Table of Contents:

Supported Statechart Elements

  • Simple / Composite states
  • Entry / Exit actions
  • Transitions - internal / local
  • Submachines
  • Initial / Final states
  • Junctions
  • Choices

Unsupported Statechart Elements

  • Regions
  • Do actions
  • Deep histories
  • Shallow histories
  • Time events - if you need to use this type of events, please use a dedicated timer which sends a SignalEvent when timeouts. This timer can start counting time on Entry/Exit action.
  • Forks / Joins
  • Entry/Exit points

Supported Platforms

  • Microsoft Windows
  • Linux/Unix

Synopsis

Usage: cuml [options] <xmi_filename>
Options:
  -h, --help             Display this information
  --version              Display application version information
  -v [level], --verbose [level]
                         Verbose mode, level 0=FATAL, 5=DEBUG
  -o <folder>            Place the output files into <folder>

Known Issues

Enterprise Architect

  • Sub-machines doesn't work with model created by EA - the root cause of this issue is on the EA side, the XMI file doesn't contain information which statemachine is a sub-machine and which one is a parent.

Modelio

  • It's not possible to create internal transitions - Modelio doesn't support this type of transitions and there is no way how to do it.

ArgoUML

  • The XMI file is not possible to read time to time. The XMI contains a link to an external file very often somewhere in the temporary folder. The CUML needs to have all diagram's information in one file. It isn't going to be fixed.

How to install

Linux/Unix/Mac OS X

Default installation location is /usr/local. If you want to change that:

   $ PREFIX=/foo
   $ make install
   Or
   $ make install DESTDIR=/foo

Note: unless you specify a different install directory by PREFIX or DESTDIR option, you must be root to 'make install'.
The name of the binary will be cuml.

There is also necessary to have installed the following libraries:

  • linux-gate.so.1
  • libstdc++.so.6
  • libgcc_s.so.1
  • libc.so.6
  • libm.so.6
  • ld-linux.so.2

Microsoft Windows

A compiled binary code for MS Windows is available. It was compiled by MinGW, libraries are included to the install package. The name of the binary is cuml.exe.

The MinGW libraries are part of the package.

Examples

Please look at [BlinkingLED].

License

Free Public License 1.0.0 (0BSD)

Copyright 2017 Petr Pazourek

Permission to use, copy, modify, and/or distribute this software for any 
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


Related

Wiki: BlinkingLED