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.

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.