Table of Contents
Fetching ...

Finite-State Automaton To/From Regular Expression Visualization

Marco T. Morazán, Tijana Minić

TL;DR

The paper tackles the educational challenge of intuitively teaching the bidirectional transformations between nondeterministic finite automata and regular expressions. It introduces FSM, a domain-specific language in Racket, alongside graph-based GNFA-driven visualizations that support forward and backward stepping through regexp-to-ndfa and ndfa-to-regexp transformations, with automatic GNFA construction to reduce user burden. Key contributions include per-step, explanatory visualizations rendered via Graphviz, an interface that lowers extraneous cognitive load, and empirical data from a control group indicating high usefulness and ease of use across novices. The work has practical impact for FLAT classrooms and lays groundwork for extending these visualizations to broader language-derivation tasks and parse-tree representations.

Abstract

Most Formal Languages and Automata Theory courses explore the duality between computation models to recognize words in a language and computation models to generate words in a language. For students unaccustomed to formal statements, these transformations are rarely intuitive. To assist students with such transformations, visualization tools can play a pivotal role. This article presents visualization tools developed for FSM -- a domain-specific language for the Automata Theory classroom -- to transform a finite state automaton to a regular expression and vice versa. Using these tools, the user may provide an arbitrary finite-state machine or an arbitrary regular expression and step forward and step backwards through a transformation. At each step, the visualization describes the step taken. The tools are outlined, their implementation is described, and they are compared with related work. In addition, empirical data collected from a control group is presented. The empirical data suggests that the tools are well-received, effective, and learning how to use them has a low extraneous cognitive load.

Finite-State Automaton To/From Regular Expression Visualization

TL;DR

The paper tackles the educational challenge of intuitively teaching the bidirectional transformations between nondeterministic finite automata and regular expressions. It introduces FSM, a domain-specific language in Racket, alongside graph-based GNFA-driven visualizations that support forward and backward stepping through regexp-to-ndfa and ndfa-to-regexp transformations, with automatic GNFA construction to reduce user burden. Key contributions include per-step, explanatory visualizations rendered via Graphviz, an interface that lowers extraneous cognitive load, and empirical data from a control group indicating high usefulness and ease of use across novices. The work has practical impact for FLAT classrooms and lays groundwork for extending these visualizations to broader language-derivation tasks and parse-tree representations.

Abstract

Most Formal Languages and Automata Theory courses explore the duality between computation models to recognize words in a language and computation models to generate words in a language. For students unaccustomed to formal statements, these transformations are rarely intuitive. To assist students with such transformations, visualization tools can play a pivotal role. This article presents visualization tools developed for FSM -- a domain-specific language for the Automata Theory classroom -- to transform a finite state automaton to a regular expression and vice versa. Using these tools, the user may provide an arbitrary finite-state machine or an arbitrary regular expression and step forward and step backwards through a transformation. At each step, the visualization describes the step taken. The tools are outlined, their implementation is described, and they are compared with related work. In addition, empirical data collected from a control group is presented. The empirical data suggests that the tools are well-received, effective, and learning how to use them has a low extraneous cognitive load.
Paper Structure (19 sections, 1 equation, 11 figures)

This paper contains 19 sections, 1 equation, 11 figures.

Figures (11)

  • Figure 1: Initial step in the JFLAP visualization.
  • Figure 2: Resulting transition diagrams for L={$ab^{\texttt{*}} \cup ba^{\texttt{*}}$}.
  • Figure 3: An ndfa for the language L={w $|$ w is missing at least one in {a b c}}.
  • Figure 4: JFLAP visualization states.
  • Figure 5: JFLAP's and FSM's final visualization state.
  • ...and 6 more figures