Statestep

Code Generation

Using a code template, you can automatically convert a Statestep model to another form, such as HTML, or into executable program code. A general description of how this works is included with each template package, along with specific documentation for that package.

The code generation templates support both decision table and finite state machine logic, as well as the optional use of formulas for both constraints and rules. The functionality provided by the generated code varies slightly. For example, the Perl and Python packages include iterators which may be useful if the code is to be used for testing.

C / C++ Template (v1.1)   C_template.zip
HTML Template (v1.0)   s2_html_v1_0.zip
(For those who are familiar with XSLT and prefer to use that to convert a model to HTML, an older XSLT script is still available.)
Java Template (v1.0)   Java_template.zip
Perl 5 Template (v1.0)   s2_perl5_v1_0.zip
Python Template (v1.0)   s2_python_v1_0.zip

If you'd like to generate code in another language then feel free to request it. Priority is given to supporting existing licensees.

Tip: Embedding code in a model. Depending on what you're using Statestep for, you may sometimes find it useful to embed executable code directly within the model. The rule below shows the general idea. Find out more about this.

Airlock Rule With Code

The flexibility of template-based code generation means it should be possible to do anything you might want. If you have a query on using or adapting a template for a particular purpose, send an email to the address below.

Questions, comments? info3@statestep.com