Java Formal Languages & Automata Package



JFLAP is a package of graphical tools which can be used as an aid in learning the basic concepts of Formal Languages and Automata Theory. The original program (FLAP) was written in C/C++ for X-window based systems. Due to its success as a visual aid in introductory courses in Theoretical Computer Science, the Java version of FLAP was created, which should work on virtually any system. The 3.1 version of JFLAP is written in Java using JDK 1.2 and JDK 1.1.5 and contains several new features and bug fixes.

Using JFLAP, one should be able to design and simulate several variations of finite automata (FA), pushdown automata (PDA), one-tape Turing machines (TM) and two-tape Turing machines (TTM). The user draws the transition diagram of the desired automaton and, once the picture is complete, the user enters an input string and then "runs" the automaton, being able to view all the generated configurations. In addition, JFLAP can handle grammars(GRM) and Regular Expressions(REX).

Several conversions from one representation to another are supported. The conversions are nondeterministic finite automaton (NFA) to deterministic finite automaton (DFA), DFA to minimum state DFA, NFA to regular grammar, NFA to Regular Expression, regular grammar to NFA, Regular Expression to NFA, nondeterministic pushdown automaton (NPDA) to context-free grammar (CFG), and three algorithms for CFG to NPDA. Two of the CFG to NPDA conversions are useful in studying LL and LR parsing. In addition, you can slide the labels along the arcs and stretch the loops (grab the dot on top) for more room.

For more information on how JFLAP is used in teaching, there are several papers available.

NOTE: The JFLAP package is designed as a Java application. However, for demo purposes, one can run part of the program as a Java applet (NOT ALL FEATURES ARE IN THE APPLET) from a Java-enabled Web browser (eg, Netscape Navigator 4.0). There are three demo applets on this page:

JFLAP 1.0 demo in java 1.0 that works with older versions of Netscape
JFLAP 3.0 demo in java 1.1.3 that only works in Netscape 4.5
JFLAP 3.1 demo in java 1.2 that only works (except for the HTML help) in Netscape 4.5.

* The new features in JFLAP 3.1 include:

support for Regular Expressions
conversion from FSA to Regular Expression
conversion from Regular Expression to NFA
online HTML help support
user defined labels of states
step-by-step display of conversion from FSA or PDA to grammar


JFLAP includes an extensive online help system in HTML and in ASCII text formats. The help covers how to use JFLAP, the supported representations that JFLAP can handle, how to convert from one representation to another, and how to use the various features. The HTML help is now available online.


We have applet versions available that you can try out on Netscape, but be aware that they don't work as well as the application. For example, in the demo, you can't save any creations and the grammar window doesn't work in all browsers. These things do work if you run it as an application.

java 1.0 online demo (JFLAP 1.0 demo only, doesn't include new features)
java 1.1.3 online demo (JFLAP 3.0 demo only, doesn't include new features)
java 1.1.5 online demo (JFLAP 3.1 demo, works with Netscape 4.5 except for online HTML help)

You can download JFLAP 3.1 (the whole package) from here (including the source code). This allows you to run JFLAP as a Java application.

Current Version:(3/5/2000) (any platform, uses JDK 1.2) (same thing, just not compressed, uses JDK 1.2) (same thing, just zipped, uses JDK 1.2)

Old Versions: (any platform, uses JDK 1.1.5) (same thing, just not compressed, uses JDK 1.1.5) (any platform, uses JDK 1.1.4) (any platform, uses JDK 1.1.2) (any platform) (for Mac) (for Windows 95 or NT)

The files were compiled with the Java Development Kit from Sun Microsystems which you can download from .

Read the README file for more information on what these files contain and other tools available for download.

For developers, some information on JFLAP's design is also available.
For links to more
automata and parsing tools. we have created.