Donnerstag, 15. September 2011

New features in SCT 2 Milestone 5

We published a new preview of the upcoming Statechart Tools 2.0 today! It is available via our milestones update site:
Apart from several bug fixes and some art work (thanks to our designer Carsten for the really cool icon set!)
we implemented the following major features in this milestone:

Submachine States
A submachine state is semantically equivalent to a composite state but it adds the mechanism to be reused in different contexts.   
 In the YAKINDU Statechart Tools, submachine states can be created directly via the diagram palette. This opens a dialog where the Statemachine can be selected, that should be included as a submachine. Submachine states are displayed with a small pictogram at the bottom right. A click on the pictogram opens the submachine diagram in a new editor.

The simulation of a state machines is integrated into the state machine diagram editor and provides visual highlighting of the active state and the current transitions. Additionally, the user can interact with the simulation by sending triggers to or by changing variable values within the simulator to drive the state machine.

The Debug View does also support multiple runtime instances (launches) of the same statechart. The Declarations View on the right and the diagram editor are aware of the selected lauch.
If a statechart with submachine states is executed, the Debug View shows the active states of the submachine ordered by the active regions. A selection of an active state opens the submachine in a new editor and highlights the active states.

Property Pages
Another major improvement are the form based property pages. For each selectable element in the statechart diagram, a custom property page is shown with rich controls like i.e. the Xtext StyledText widget.
The property pages also integrate tightly in the Eclipse help infrastructure and display context sensitive informations in the Dynamic Help View. In the future, we will add detailed information especially for the complex expression languages.

Code Generator for C++
the new preview also consists of a first implementation of a C++ code generator. The generator can be invoked via the context menu in the project explorer by selecting "Generate C++ code".
The code g enerator for C++ code creates the class "<Name>Statemachine" to be used by the programmer. The interface is defined in Statemachine.h and DataRepository.h. The interface mainly consists of a method to raise an event (queueEvent()) and to run one statemachine cycle (runCycle()). Additionally the class offers access to the variables via getter and setter methods. If there is a variable named "myVar" it is read by get_myVar() and can be written by set_myVar(value).
The statemachine implementation follows the event driven paradigm, therefore events can be fired at will and one cycle pops the oldest event and dispaches it. The method eventWaiting() indicates queued events ready to handle by a runCycle() call. To firstly initialize the statemachine, use the init() method.

Miscellaneous enhancements
  • Perspectives (Simulation / Modeling)
  • Hot Model Replacement (Edit the model during simulation)
  • Common Navigator Framework implementation for a tree based view of the semantic model
  • Launch Shortcuts
  • Several Validation rules added
  • Named entry and exit points
  • ....
I hope you enjoy this new version and please provide us some feedback!