Abstract

Statecharts are part of the UML standard, using statecharts, and particularly nondeterministic statecharts, as assertions is a new concept. This chapter uses the StateRover approach and terminology for assertion statecharts. Transitions issuing directly from a sub-statechart, assertion or other, are either labeled with an event or are not. In contrast, an unlabeled transition out of a sub-statechart fires only when the sub-statechart reaches a terminal state. This kind of transition, which fires when the assertion reaches its terminal state, is used for runtime recovery. Assertion actions are simply a statechart for all practical purposes; an assertion statechart can execute custom actions. It is important to separate assertions from the statechart model so that they can be reused. JAVA interfaces are a convenient tool to do that. The StateRover uses two interfaces for that purpose—ITRPrimary for the primary statechart and ITRAssertion for the assertion statechart. Since the interfaces are in source code form, they can be extended to allow a primary to pass custom information down to the assertion and vice versa. An important method in ITRPrimary is getTime(), which is also important in ITRAssertion.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call