Automated Visualization for Flat and Hierachical State Machines

Published:

Abstract

Finite State Machines (FSMs) are essential in event-driven control systems but become complex with more states and events, which complicate debugging and updates. Traditional tools for state diagrams are error-prone as they require manual input or source code annotations. This paper introduces a tool that automatically generates state diagrams from FSM code, using naming conventions targeted by Abstract Syntax Tree (AST) patterns with XSLT transformations. This tool fully automates common coding practices and allows customization for unique styles. The tool improves FSM design, debugging, and maintenance by ensuring diagrams accurately reflect the code.