
-- JFLAP v2.0 15 August 1997 --
JFLAP (c) 1996 Susan H. Rodger, Magda Procopiuc, Octavian Procopiuc.
All rights reserved. Read the COPYRIGHT file for more information.
---------------------------------------------------------------------
The official web page:		 http://www.cs.duke.edu/~rodger/tools/tools.html
Mail any bugs or comments to:	rodger@cs.duke.edu
----------------------------------------------------------------------

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 initiator of this project, Susan
Rodger started this project, the Java version of FLAP, which works on
any system running a JAVA engine.

Using JFLAP, one will 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.
The user also has the option to run his FSA through the NFA to DFA or
Minimize algorithms to convert it into a deterministic or minimal
(smallest number of states) machine.

The package is designed as a Java application. However, for demo purposes,
one can run the program from a Java-enabled Web browser, as a Java applet.

The program is compiled using JDK version 1.1.4. Let us know if you have
any problems installing and/or running it. 

The designing and programming work is done by Magda Procopiuc,
Octavian Procopiuc and Eric Gramond.

If you use this tool, please drop us a short note (at rodger@cs.duke.edu).

To run the program:

On a UNIX station, type at the shell prompt:

 java JFLAP [-p parameters_file_name] [-fa|-pda|-tm|-ttm [machine_file_name_without_extension]]...

If JFLAP.class is not in the current directory, you have to specify 
the class path (INCLUDING THE JDK CLASS PATH!!). You can do that
in one of the following two ways:
 1. specify the classpath command line parameter.
   For example, assuming that java is installed in /usr/pkg/java, and 
   JFLAP is installed in /usr/pkg/jflap:
java -classpath /usr/pkg/java/lib/classes.zip:/usr/pkg/jflap JFLAP

 2. set the CLASSPATH environment variable.
   For example, assuming the same configuration:
setenv CLASSPATH /usr/pkg/java/lib/classes.zip:/usr/pkg/jflap
   and then:
	java JFLAP ...

On a PC running Windows 95, the command is identical, but you HAVE TO
specify the classpath (where the java interpreter looks for classes), by
setting the CLASSPATH environment variable, or by writing it in the command
line.
   For example, assuming java is installed in c:\java and jflap is installed 
   in c:\jflap 
	java -classpath c:\java\lib\classes.zip;c:\jflap JFLAP -fa

(a batch file with this classpath is provided; modify it to fit your installation)

On a Macintosh, double click on the JFLAP.class file.

NOTES: 

 1. The default parameters file is .flaprc. If you want to change the
appearance of the program, you can either edit it, or create a different
one, and  specify it in the command line. It has to be located in the
directory you run the program from. The format of the parameters file
is self explanatory. 

 2. All the files containing saved machines have a predefined extension:
	- .FA for files containing finite state automata;
	- .PDA for files containing pushdown automata;
	- .TM for files containing one-tape Turing machines;
	- .TTM for files containing two-tape Turing machines.
    You can read the fileformat.txt file for more details on how files are
    stored.

 3. If you specify one or more machine types in the command line, a window
will be opened for each type. If the machine type is followed by a file
name, the program tries to open that file. 

 4. The FLAPApplet class is included in the package as a demo tool which
can be inserted in a web page and can be viewed with a Java-enabled web
browser (e.g. Netscape Navigator v2 or newer, HotJava). Here is the code
you have to put on your web page:

<applet code="FLAPApplet.class" WIDTH=330 HEIGHT=240>
<param name=EXAMPLEURL value="http://www.cs.duke.edu/~magda/flap/examples/example.">

Your FLAPApplet.class file has to be in the same directory as the html
file, and the flap package has to be in the class path.

 5. Some example automata are in the examples directory.
