Illustrating Finite Automata with Grail+ and TikZ
Alastair May, Taylor J. Smith
TL;DR
This work tackles the gap between text-based automata descriptions produced by Grail$_{+}$ and the need for readable visual representations. It introduces the Grail$_{+}$ Visualizer, a Bash tool that parses Grail$_{+}$ output and emits TikZ code with automatic state layout to produce ready-to-include diagrams in LaTeX documents. The authors detail the parsing and a concrete layout algorithm, and illustrate the approach with an example that maps textual instructions to a visual automaton. They argue for the practicality of Grail$_{+}$ as a fast, customizable CLI alternative to GUI tools like JFLAP, and outline future enhancements such as layout optimization, user customization, and potential LaTeX-package integration for seamless workflow. The work enhances accessibility and rapid visualization of automata for researchers and students alike.
Abstract
In this article, we discuss a new software tool that interacts with Grail+, a library of automata-theoretic command-line utilities. Our software, the Grail+ Visualizer, takes the textual representation of a finite automaton produced by Grail+ and generates TikZ code to illustrate the finite automaton, with automatic layout of states and transitions. In addition to giving an overview of the basics of automata theory and Grail+, we discuss how the Grail+ Visualizer works in detail and suggest avenues for future work.
