Title of article
An object-oriented implementation of concurrent and hierarchical state machines
Author/Authors
Franz-Josef and Spinke، نويسنده , , Volker، نويسنده ,
Issue Information
ماهنامه با شماره پیاپی سال 2013
Pages
15
From page
1726
To page
1740
Abstract
AbstractContext
machine diagrams are a powerful means to describe the behavior of reactive systems. Unfortunately, the implementation of state machines is difficult, because state machine concepts, like states, events and transitions, are not directly supported in commonly used programming languages. Most of the implementation approaches known so far have one or more serious drawbacks: they are difficult to understand and maintain, lack in performance, depend on the properties of a specific programming language or do not implement the more advanced state machine features like hierarchy, concurrency or history.
ive
aper proposes and examines an approach to implement state machines, where both states and events are objects. Because the reaction of the state machine depends on two objects (state and event), a method known as double-dispatch is used to invoke the transition between the states. The aim of this work is to explore this approach in detail.
ve the usefulness of the proposed approach, an example was implemented with the proposed approach as well as with other commonly known approaches. The implementation strategies are then compared with each other with respect to run-time, code size, maintainability and portability.
s
esented approach executes fast but needs slightly more memory than other approaches. It supports hierarchy, concurrency and history, is human authorable, easy to understand and easy to modify. Because of its pure object-oriented nature depending only on inheritance and late binding, it is extensible and can be implemented with a wide variety of programming languages.
sion
sults show that the presented approach is a useful way to implement state machines, even on small micro-controllers.
Keywords
State pattern , Double-dispatch , Design pattern , Code Generation , State machines , UML statecharts
Journal title
Information and Software Technology
Serial Year
2013
Journal title
Information and Software Technology
Record number
2375026
Link To Document