Today I wanted to let you know about a new, free, graphical tool called QM (QP-Modeler) for drawing state machines and generating production-quality embedded code. The main design objectives for QM are simplicity and minimizing the need to “fight the tool”. QM achieves this in several ways described below.
Low Ceremony
Compared to most other “high ceremony” modeling tools on the market today, QM is much simpler, code-centric, and relatively low-level. This characterization is not pejorative. It simply means that QM™ maps the design unambiguously and directly to C or C++ code, without intermediate layers of “Platform-Independent Models” (PIMs), “Platform-Specific Models” (PSMs), complex “Model-Transformations”, or “Action Languages”. All actions executed by state machines are entered into the model directly in C or C++.
No more "Fighting the Tool"
The primary design objective in QM™ was to respect your design decisions as much as possible and leave you in control, not only in the physical design of the generated code, but down to the exact details of arranging your states and routing your transitions. Noting is more frustrating as a tool that suddenly changes the arrangement of your diagrams, after you spent hours arranging the states and routing the transitions. QM™ will never to that.
A lot of thought went into drawing hierarchical state diagrams in QM™. In this respect, the tool is innovative and might work differently than other graphical state machine tools on the market. For example, QM does not use “pseudostates”, such as the initial pseudostate or choice point. Instead QM uses higher-level primitives of initial-transition and choice-segment, respectively. This simplifies state diagramming immensely, because you don’t need to separately position pseudostates and then connect them. Also, QM introduces a new notation for internal transitions, which allows actual drawing of internal transitions (in standard UML notation internal transitions are just text in the state body). This notation enables you to attach internal transitions and/or regular state transitions to a single choice point–something that comes up very often in practice and was never addressed well in the standard UML.
Capturing the Physical Design
The new, free QM tool from Quantum Leaps is different, because it was designed from the ground up around the code-centric approach. Unlike other graphical tools, QM gives you complete control over the generated code structure (a.k.a. the physical design), directory names, file names, and elements that go into every file. You can mix your own code with the synthesized code and use QM to generate as much or as little of the overall code as you see fit. At the low level, QM respects your graphical layout as much as possible and will not re-attach or re-route connectors, resize nodes, or adjust text annotations. You will find that you don’t need to fight the tool.
Digramming Hierarchical State Machines
How to Get It?
The QM tool is available now for a free download and free, unrestricted use from state-machine.com. I’d appreciate any comments about the tool, comparisons to other similar tools, code generation, UML, state machines, etc.
8 Responses
I know the vast majority of developers utilize Microsoft Windows as their primary development platform, but I am afraid I no longer have any Windows machines available to me to test this out. That is kind of sad because I would love to put this tool through it’s paces.
The QM tool is based on the cross-platform Qt framework. Therefore, it should be relatively easy to deploy QM on all platforms supported by Qt, such as Linux and Mac OS X. I’d like to gauge the demand for different platforms. So what is it exactly that you are using? Linux? Which distribution?
We’re using Linux, and assuming that you deliver a Qt library to match your app, then the distro probably doesn’t matter. For example, Qt Creator includes its own Qt libs (for the app itself) and my installation of on Ubuntus from 8.10 to 10.04 has always worked without a hitch.
The latest QM 1.1.02 runs natively on Linux (compiled and tested on Ubuntu 10.10).
Free download and installation instructions at: http://www.state-machine.com/downloads/index.php#QM.
I’d like to see this for other platforms too.
I use Mac OS X for most of my design work (specs, paperwork, coding, etc), and I only use my Windows machine for debugging or programming my designs. So I would love to see a Mac version that I could fit into my design flow.
As of version 2.0.00, QM runs on Mac OS X.