YAKINDU Statechart Tools October release – new and noteworthy

We released YAKINDU Statechart Tools Standard and Professional Edition version 3.1.0 today! Apart from several bug fixes we added the following main features:

New features

Using properties and expressions in generator models

An generator model may assign values to properties and later use these properties in expressions. The following sample generator model uses the var keyword to declare the properties projectName, version, isBeta, and generateTimerServce with their respective types and default values.

GeneratorModel for yakindu::java {
    //Variables can be overridden from command line interface:
    var projectName : string = "light_switch_series"
    var version : string = "1.0"
    var isBeta : boolean = true
    var generateTimerServce : boolean = true

    statechart myStateAutomaton {
        feature Outlet {
            targetProject = projectName
            targetFolder = "src-gen/" + version + (isBeta ? "beta" : "")
            libraryTargetFolder = "src"
        feature GeneralFeatures {
            TimerService = generateTimerServce

The model then uses these values in feature clauses by referring to the properties: The values assigned to properties are default values only and can be overridden from the headless code generator like this:

scc -m myGenmodel.sct -v version=2.0;isBeta=false

The name/value pairs specified by the -v option would override the corresponding default values of the properties in the generator model.This is a very flexible way to tailor the code generator within a headless build.

Read more about this feature in our user guide.

Named parameter calls

Now you can can use named parameters when calling an operation. Consider the following operation declaration:

operation myOperation(xValue : int, yValue : int) : void

This can be called with name parameters like this:

myOperation(xValue = 27, yValue = 42)

Named parameters make their order irrelevant. The following call is semantically equivalent to the one above:

myOperation(yValue = 42, xValue = 27)

While an operation call with named parameters is longer than the equivalent call with positional parameters, named parameters are a great means for self-documenting code (especially if the parameter names are more telling than in the example above).

Option to skip generation of library files

The Outlet feature now has an option to skip the generation of library files. This is useful to prevent the generation of a new library file when an existing one should be used:

skipLibraryFiles (Boolean, optional): If you wish to exclude the static files from the code generation, i.e. those that are put into the libraryTargetFolder, you can set this value to true. If the value is false or not specified at all, the files are generated as usual. Currently supported for the Java, C and C++ generators.

feature Outlet {
    targetProject = projectName
    targetFolder = "src-gen/"
    libraryTargetFolder = "src"
    skipLibraryFiles = headless ? true : false

Miscellaneous improvements and bug fixes

Usability improvements

  • Add a checkbox "save automatically" to the save dialog when running a simulation (#1275)
  • Perspective switch for “Debug As” (#1646)
  • Error markers of subdiagrams are not propagated to parent diagram (#1288)
  • “Run As” context menu action available in diagram (#1626)
  • Implicit imports for active(State) statements (#1294)

Code generation improvements

  • “Effective C++” compliant code (#1633 #1634 #1610)
  • Removed unused includes for cycle based state machines (#1650)
  • Provide a constant that provides the maximum number of parallel time events of a state machine (#1600)

Bug fixes

  • [Performance] The system still slows down more and more for each successive single-step (#1616)
  • Content assist on transitions and states shows implicit variable "period" (#1586)
  • Missing validation rule for top-level regions without entry (#1363)

  Download YAKINDU Statechart Tools

About Andreas Mülder

Andreas Mülder works as a software engineer at itemis AG in Lünen, Germany. He is especially interested in Eclipse modeling technologies and co project lead of the open source project YAKINDU Statechart tools. For more information, visit http://www.statecharts.org