itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
174 stars 84 forks source link

[true] guard leads to compile errors #3149

Closed rherrmannr closed 4 years ago

rherrmannr commented 4 years ago

Using [true]at transitions without always/else leads to compile errors in C, as the sequencer does not do any optimizations. Using always [true] resolves the problem, as the sequencer recognizes an AlwaysEvent and evaluates the guard expression.

image

AlwaysTrue.zip

Same problem for C++ and Java:

void AlwaysTrue::effect_alwaysTrue__choice_0_tr1()
{
    ();
}
private void effect_alwaysTrue_A_tr1() {
    exitSequence_alwaysTrue_A();
    ();
}
rherrmannr commented 4 years ago

We need to discuss if we want to do the same optimizations as we do with always [true] or if we extend the validator.

tkutz commented 4 years ago

Might be also related to #3134