QM  6.1.1
Model-Based Design Tool
Loading...
Searching...
No Matches
About QM™

Remarks
To check what's new in QM, please see QM Revision History. You can also get the latest QM release, with the recent enhancements and bug fixes, from the GitHub QM repository.

What is it?

QM™ (QP™ Modeler) is a freeware Model-Based Design (MBD) and automatic code generation tool for real-time embedded software in C or C++ based on Hierarchical State Machiness (UML Statecharts) and the event-driven QP™ Real-Time Embedded Frameworks (RTEFs). QM™ is available for Windows, Linux, and macOS hosts.

Remarks
To use the QM™ tool effectively, you need to understand a few key concepts that underlie the whole philosophy of modeling and code generation in QM™.

What does it do?

The main goals of the QM™ Model-Based Design tool are:

Note
QM™ is fundamentally an object-oriented tool, regardless of the target programming language (currently C or C++). Object orientation means that QM models are fundamentally composed of classes, and only classes can have state machines associated with them.
If you program in C and object-oriented programming is new to you, please refer to the Application Note Object-Oriented Programming, which describes how you can implement the concepts of classes, inheritance, and polymorphism to portable ANSI-C.

How does it look?

QM™ is a cross-platform desktop application. The following screen shots show the typical activities you perform in QM™:




What's special about it?

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++.

Built-in QP™ Frameworks

As most other tools capable of code generation, the models you create with QM™ are based on an event-driven Real-Time Embedded Framework. This is because such a framework provides well-defined "framework extension points" designed for customizing the framework into applications, which in turn provide well-defined rules for generating code.

However, much of the simplicity of QM™ derives from the fact that it comes with the built-in family of QP™ frameworks (QP/C and QP/C++), as opposed to supporting an open-ended number of yet-to-be-defined frameworks and programming languages.

Note
QM™ assumes a specific overall architecture of your application, which combines object-orientation with the particular model of concurrency, known as active objects (a.k.a. "actors"). In this architecture, software application consists of collaborating, event-driven active objects, which collectively deliver the desired behavior.

Forward Engineering

Another simplifying aspect is that QM™ is a strictly forward-engineering tool without attempts to support round-trip-engineering.

Note
"Forward engineering" means that you should not edit the generated code, because your changes will be lost when the code is re-generated. The tool is not able to "reverse-engineer" your changes back into the model.

Capturing the Physical Design

QM™ is a unique Model-Based Design tool on the market that allows you to capture the physical design of your code as an integral part of the model, whereas "physical design" is the partitioning of the code into directories and files, such as header files (.h) and implementation files (.c or .cpp files). This unique approach gives you the ultimate flexibility and control over the source code structure and mitigates the needs to make manual changes to the generated code in order to combine it with hand-written code or existing 3rd-party code. Also, QM™ provides mechanisms to quickly go back and forth between the model and the generated code so that any changes can be conveniently applied directly to the model rather than the code.

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. Nothing is more frustrating than a tool that suddenly changes the arrangement of your diagrams, after you spent hours arranging the states and routing the transitions. QM™ will never do that.

A lot of thought went into drawing hierarchical state diagrams in QM™. In this respect, the tool is innovative and might work differently from 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 UML standard.

How is it licensed?

The QM™ Tool

The QM™ Model-Based Design tool is freeware. It is free to download and free to use for any purpose, including commercial projects, but is not open source. During the installation you will need to accept the basic End-User License Agreement (EULA), which legally protects Quantum Leaps from any warranty claims, prohibits removing any copyright notices from QM, selling it, and creating similar competitive products based on QM.

Note
QM™ internally uses the Qt Toolkit under the GNU Lesser General Public License (LGPL). Please refer to Section Compliance with LGPL for more information on how to obtain, install, and build the Qt toolkit from sources.

The Generated Code

The code generated by QM™ is licensed under the same dual-license model as the underlying QP™ framework, for which the code has been generated.

By default, the QM code generator assumes that the underlying QP™ framework is used under the open source GNU General Public License (GPL), and for compliance with the GPL, QM generates the required top-level file comments.

However, when the underlying QP framework is licensed commercially, the Licensee receives a QM License Certificate file, which can be registered with QM by means of the Code Generation License Dialog Box. After registering a commercial license, QM generates top-level file comments that reflect the commercial license terms.

How to get help?

Please post any technical questions to the Free Support Forum hosted on SourceForge.net. Posts to this forum benefit the whole community and are typically answered the same day.

Direct Commercial Support is available to commercial licensees. Every commercial license includes one year of Technical Support for the licensed software. The support term can be extended annually.

Training and consulting services are also available from Quantum Leaps. Please refer to the Contact web-page for more information.

Getting Started