An Automated Tool for State Machine Diagram Generation in Mechatronics Education

Pending peer review from ICRA, 2024

Abstract

We present a targeted tool designed to address a specific challenge in teaching event-driven control systems: the automated visualization of State Machines directly from source code. While State Machines are fundamental in event-driven control systems, their growing complexity can make debugging and maintaining correspondence between design and code increasingly difficult for students. Our tool employs lightweight static analysis techniques leveraging Abstract Syntax Tree patterns to automatically generate accurate state diagrams from student implementations. By focusing on the immediate needs of our students and the constraints of our educational setting, this tool improves State Machine design, debugging, and maintenance within our curriculum. Anecdotal evidence suggests that students benefit directly from this accessible and frequently usable solution, enhancing their understanding and workflow in complex, state-driven systems. This approach demonstrates the value of developing targeted educational tools that address specific classroom needs, even within the broader context of existing research in the field.