Table of Contents
Fetching ...

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.

Illustrating Finite Automata with Grail+ and TikZ

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.
Paper Structure (8 sections, 4 figures)

This paper contains 8 sections, 4 figures.

Figures (4)

  • Figure 1: An example of a finite automaton.
  • Figure 2: The (human-written) Ti kZ code producing the finite automaton in Figure \ref{['fig:finiteautomaton']}.
  • Figure 3: Ti kZ code produced by the Grail$_{+}$ Visualizer from the example input of Section \ref{['subsec:example']}.
  • Figure 4: The illustration produced by compiling the Ti kZ code in Figure \ref{['fig:graillatex']}.