Zurück zu Willert.de

Statecharts: reusable vs. flat

If your question doesn't fit in any other category below ask in here.

Statecharts: reusable vs. flat

Postby anajand » April 5th, 2017, 8:15 pm

For statecharts, Rhapsody can generate a "flat" or a "reusable" code, the default is "flat".

The main difference is that "reusable" generates an object for each state, which should provide better performance when classes that have statecharts are derived and when the derived statecharts will be specialized (changed).

The serious issue that I am seeing with all recent versions (8.1.3, 8.1.5, 8.2) is that the code generated for reusable statecharts does not behave the same way as flat, even for simple changes. In the attached picture, the states that are in grey are the statechart of the base class, while the blue states were added to a derived class. The execution with reusable statecharts never prints any count value and never leaves the state "Active", whereas with the flat statecharts, it correctly counts down from 10 to 0 and then goes to the termination state.

I love Rhapsody but my concern is how after 20 years, that fantastic tool created by the inventor of statecharts David Harel, is not properly generating code for something that is very simple. Unless I have missed something or forgot to set a property...

Any advice would be much appreciated.
Attachments
Derived Statechart - Reusable vs Flat.jpg
Derived Class Statechart
Derived Statechart - Reusable vs Flat.jpg (87.64 KiB) Viewed 992 times
anajand
 
Posts: 2
Joined: April 3rd, 2009, 1:15 am

Return to General Question

Who is online

Users browsing this forum: No registered users and 1 guest

cron