About Multi State Machines

About Multi State Machines

What is a multi state machine?

The behavior of large systems is often too complex to be captured by a single statechart. So if a statechart gets too large you should think about splitting it into two or more smaller parts. Beside the fact that the smaller state machines are easier to handle and maintain there are additional reasons for using multiple state machines instead of single monolithic ones:

  • Separation of concerns enables a better software architecture.
  • State machines can be reused in different contexts. So if you have identical copies of sub states spread around your state machines then this could be a good starting point.
  • If you build a distributed system then you require separate state machines for the different nodes.

Benefits of using multi state machines

There are significant benefits using the multi state machines. Configurable designed statecharts as a component can be reused for various application. Reusing statecharts, which are already tested and in use, can significantly increase the application's quality. Moreover, changes must be handled only at one model, which allows bug fixing over more than one application. SCTUnit allows testing complete systems, which are created as a multi state machine, in one test case. Of course models can be tested encapsulated. So, single state machines can be tested and reused over more than one application. Changing the specification or fixing bugs can handled at one point. After this, they can easily integrated into complex systems.

  • Configurable statecharts as a component can be reused
  • Quality will increase
  • Statecharts as a component can be tested separately
  • Easy integration into complex systems
  • Bug and failure handling at exactly one point


Sum things up!

State machines are an effective way to build components. Multi state machines even more are an effective way to describe and maintain your complete system. The system can be graphically represented and expanded. Using smaller state machines makes the integration and maintenance easier and more robust. Reusing components components is an commonly used approach in software development and the generated code can easily be expanded.

State machines are not the answer for everything in modern embedded systems development, but they can be a good choice for powerful, event-driven devices.


For more information, see: Multi state machine modeling

or leave me a short message.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了