A compiler‐based toolkit to teach and learn finite automata

This paper introduces a compiler technology based approach to model and simulate finite automata for pedagogical purposes. The compiler technology helps to define a language to formally model finite automata and to develop a toolkit to simulate them efficiently. The language is called Finite Automaton Description Language (FADL) and the toolkit is based on it. A fast single‐pass compiler is used to compile a finite automaton defined in FADL. Then an interpreter is used to simulate the working of the compiled finite automaton for any input string. The nondeterminism of a Nondeterministic Finite Automaton (NFA) is simulated using backtracking. A tool to view the transition diagram of the finite automaton is provided. A Deterministic Finite Automaton (DFA) can be additionally compiled using an optimizing compiler that also minimizes the number of states. Tools for converting an NFA to a DFA and for converting a DFA to a Turing machine are also provided. A preliminary testing of the toolkit has been performed in which the participating students observed that the toolkit is an interesting teaching tool and it helped them to acquire a better perception about finite automata. © 2010 Wiley Periodicals, Inc. Comput Appl Eng Educ 21: 467–474, 2013

[1]  Mihály Biczó,et al.  Generating Functional Implementations of Finite State Automata in C# 3.0 , 2009, Electron. Notes Theor. Comput. Sci..

[2]  Akim Demaille,et al.  A set of tools to teach compiler construction , 2008, ITiCSE.

[3]  Gennaro Costagliola,et al.  Visual language implementation through standard compiler-compiler techniques , 2007, J. Vis. Lang. Comput..

[4]  Michael T. Grinder Animating automata: a cross-platform program for teaching finite automata , 2002, SIGCSE '02.

[5]  Venkat Venkatasubramanian,et al.  A domain-specific compiler theory based framework for automated reaction network generation , 2008, Comput. Chem. Eng..

[6]  Susan H. Rodger,et al.  A visual and interactive automata theory course with JFLAP 4.0 , 2004, SIGCSE '04.

[7]  Herbert A. Simon,et al.  Experiments with a Heuristic Compiler , 1963, JACM.

[8]  Klaus Sutner Implementing Finite State Machines , 1992, Computational Support for Discrete Mathematics.

[9]  Rastislav Bodík Small languages in an undergraduate PL/Compiler course , 2008, SIGP.

[10]  Susan H. Rodger,et al.  A collection of tools for making automata theory and formal languages come alive , 1997, SIGCSE '97.

[11]  Takao Terano,et al.  A compiler for business simulations: Toward business model development by yourselve , 2002, Inf. Sci..

[12]  Ana Gabriela Maguitman,et al.  Didactic strategies for promoting significant learning in formal languages and automata theory , 2004, ITiCSE '04.

[13]  Frédéric Gruau,et al.  A Neural Compiler , 1995, Theor. Comput. Sci..

[14]  Charles N. Fischer,et al.  Retargetable Compiler Code Generation , 1982, CSUR.

[15]  Nathaniel Dean,et al.  Computational Support for Discrete Mathematics , 1994 .

[16]  Pinaki Chakraborty A language for easy and efficient modeling of Turing machines , 2007 .

[17]  Keshav Pingali,et al.  Compiler research: the next 50 years , 2009, CACM.

[18]  Michel Wermelinger,et al.  A prolog toolkit for formal languages and automata , 2005, ITiCSE '05.

[19]  Enn Tyugu,et al.  COCOVILA - Compiler-Compiler for Visual Languages , 2005, Electron. Notes Theor. Comput. Sci..

[20]  William Yurcik,et al.  Using theoretical computer simulators for formal languages and automata theory , 2003, SGCS.

[21]  Allen Thomas,et al.  Using software simulations to teach automata , 2006 .

[22]  Susan H. Rodger,et al.  A visual and interactive automata theory course with JFLAP 4.0 , 2004 .

[23]  Rockford J. Ross,et al.  Loving to learn theory: active learning modules for the theory of computing , 2002, SIGCSE '02.

[24]  David G. Hannay Hypercard automata simulation: finite-state, pushdown and Turing machines , 1992, SGCS.

[25]  Granino A. Korn,et al.  A simulation-model compiler for all seasons , 2001, Simul. Pract. Theory.

[26]  Shimon Schocken Virtual machines: abstraction and implementation , 2009, ITiCSE '09.

[27]  Agathe Merceron,et al.  Design patterns to support teaching of automata theory , 2009, ITiCSE.

[28]  E. F. Elsworth,et al.  The MSL compiler writing project , 1992, SGCS.