Abstract

State transition mechanisms are widely used in software engineering to implement state/event-dependent behavior. In C/C++, the implementation of state machines using ‘switch/case’ or ‘if’ statements causes problems in readability, understandability, maintainability, and modification. We have developed both a source code pattern searching tool capable of searching for state machine occurrences and a design pattern to replace state machines with C++ generic components. With ‘ESPaRT’ (Enhanced String Pattern Recognition Tool) we search for state machines in the source code. Examples of patterns for state machine detection are given in the paper. The state machine information is extracted and the state machine code is replaced by generic components following the “generic Harel State Machine Engine” (HSME) design pattern.

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.