Hierarchical state machines for native mobile apps
Dilip Prajapati · 2012
The primary goal of this paper is to present a simple and efficient implementation of the Hierarchical State Machine (HSM) design pattern for native mobile applications. By providing easy-to-use C language recipes for generating HSMs, the proposed implementation techniques are valuable in that they raise the level of abstraction and allow for straightforward mapping of UML state charts to compact and efficient code in C language. Writing interactive software for embedded systems leads many issues, due to the lack of adapted control structures, to a code that is difficult to maintain and reuse. Formalisms adapted to the description and to the specification of interactions do exist. We propose to extend imperative programming languages with a control structure borrowed from one of those formalisms: the hierarchical state machines.