Code Output for State Machine Interactive Creation
COSMIC is a CLI tool capable to generate state machine code based on a XML representation of the state machine. The tool was initially designed to be used by the Residence in Robotics and AI at the UFPE's informatics center.
- Python 3.11
The idea behind COSMIC is to provide a tool capable of generating state machine code automatically from a XML representation file. Currently, the tool is able to generate code from a XML generated at the UPPAAL tool, and the code uses the pytransitions sintax. Future iterations of the implementation intend to increase the support both for the XML files and the code generation.
You can install COSMIC using pipx
At the repository, you can find the latest release of the package. Download the wheel file and install it using pipx:
pipx install <path_to_the_wheel_file>After the installation, COSMIC is able to generate code with a simple command.
cosmic -i <input_file> -o <output_dir>where <input_file> is the XML file and <output_dir> is the directory where the code will be saved. The input file can have one or more agents, each one representing a state machine. The output file will have a python file for each agent.
