OVERVIEW => VIDEO
REPORT => PDF
POSTER => PDF
The State Machine Visualizer (SMV) is a tool for visualizing the structure and behavior of state machines in your code. Follow these steps to set up and use the tool.
System Requirements: These instructions are for Linux systems with the apt package manager, such as Ubuntu. Windows users can use Ubuntu/WSL2, and macOS users can run Ubuntu in a VM.
First, download the smv.bash script using the following command:
wget https://raw.githubusercontent.com/jlesner/smv2/main/smv.bash
Before running the script, it's important to understand its functions:
-
Inspect Changes: Review the
smv.bashscript to understand the changes it will make. It installs necessary tools like git, curl, and podman if they are not already present on your system. -
Password Prompt: The script uses
sudo apt-get, which might prompt you for your password to install missing tools. -
First-Time Setup: On its initial run,
smv.bashwill download the latest version of the State Machine Visualizer and install required dependencies. -
Containerization: To create a suitable environment,
smv.bashbuilds a Linux container, installing additional dependencies (Python, Java, etc.) and executes the SMV code within this container. Note that this container requires approximately 900MB of space. -
Cleanup: At the end of the script, instructions are provided to remove the installations made by
smv.bash. These intructions are for when you are done using SMV and want to remove it. Leaving things installed allowssmv.bashto run faster.
To run the State Machine Visualizer, use the following command, replacing ${path_to_code} with the path to your state machine files:
bash smv.bash ${path_to_code}
After running the script, you can find the generated .gv and .png files, which are the visual representations of your state machines, using this command:
find ${path_to_code} -name '*.cp5*'


