[an error occurred while processing this directive] This page is intended as a short reference manual to PetC. If a function is described but not implemented it is marked with .

Sections

  1. Installing PetC
  2. The main window
  3. The main window toolbar
  4. The FSA window
  5. The menus

Installing PetC

Installing PetC couldn't be simpler. Just unzip the archive in a directory of your choice. And then run the program.

The main window



The main window toolbar

Don't care about the button "Ladda" it is just a debugging aid that only works correctly for me.
The first five icons are for opening a new, loading, saving, saving under a new name and printing of an FSA.
When you start a new FSA the first thing you have to do is to define the alphabet of it.

Next come the usual windows icons for cut, copy and paste. To and from the clipboard. For the moment only the paste-button is implemented.

The first five icons in this groups sets the mode of work. The arrow is for moving states and arcs as well as making states final by double clicking on them. The circle is for placing new states, and the arrow does the same for transitions. The "greater than" sign is used for setting starting states and the a being erased is for deleting states and transitions.
The next icon (A) is used if you want to change the alphabet of a FSA.
The last two icons represents often-used functions for making an FSA deterministic and as small as possible.

Last out is an exit-icon that quits the program.

The FSA window


The FSA window(s) are where you design and run your FSA. The major part of this window is used for a graphical representation of the FSA. Below the image is buttons for running the FSA. In the combobox (textline with menu) you enter the string you want to run.
The first button is for "fast run". In this mode you won't see the actual run but only be informed about whether the string was accepted or not. The state the machine ended in will be highlighted after the run.
The second button is for "normal run" where you will see all the transitions made, while the third is for pausing the current run. Every time a transition is made the letter (string) that was needed to make the transition is removed from the text in the combobox (it is reinserted in case of backtracking). The state that the machine ended in after every transition is also highlighted.
The fourth button is for setting the string the machine should try to the one currently in the combobox. DON'T use this button while running the machine normally. There won't be a major explosion or something, but the result might be strange. The only time this button should be pressed is when you want to single-step. Click the button once and then use the fifth button for stepping.
The sixth button (grayed out here) is for saving the run to disk. This option is currently not implemented.

The menus

  1. File
  2. Edit
  3. Run
  4. Question
  5. Do
  6. Window
  7. Options
  8. Help

File

New

Start a new FSA.

New from RE

Start a new FSA and generate it from a regular expression.

Open

Open a saved FSA.

Close

Close the current FSA.

Save

Save the FSA to disk.

Save As

Save the FSA under a new name.

Print

Print the current FSA.

Exit

Quit PetC.

Edit

Cut

Removes part of the FSA and send them to the clipboard.

Copy

Copies the FSA to the clipboard. Currently it only copies the image.

Paste

Inserts an FSA from the clipboard.

Duplicate

Creates a copy of the current FSA in a new window.

Run

Run Fast

Run the current FSA with the specified string. This options does not show the moves but just say if there was a way or not.

Run Normal

Run the current FSA with the specified string. This option shows the run graphically. The time for each transition can be set with the option Time.

Reset string

Reset the input string to the FSA. Necessary for Single-step (below), but be careful when you're running the FSA normally.

Single Step

Makes a single transition. This might and might not work in the current version, there is a bug there somewhere

Record

Save the run to disk.

Question

Deterministic ?

Is the FSA deterministic ?

Useless states ?

Does the FSA contain any useless states ? Useless states are defined somewhat unusual in this context. They are states that are unreachable from any starting state rather than states that can not lead to a final state.

Nr of states ?

Shows the total number of states in the FSA.

Is Equivalent ?

If you click on two states after choosing this menu-item, then PetC will tell you whether or not they are equivalent.

Got Strings ?

Does the FSA contain any transitions over strings ?

Do

Remove strings

Removes all strings from the automaton. Please observe that currently there is no way (except by making use of regular expressions) that you can enter a string into the automaton within the program. If you need to have strings they have to be inserted into a saved FSA by hand.

Remove ¤-arcs

Remove empty transitions. The sun-symbol (¤) is used in stead of the normal e because I wanted a program that could use all characters in the alphabet.

Remove Multiple starting

Removes multiple starting states by inserting a new state and making empty transitions to all current starting states.

Remove Useless states

Removes states that can not be reached from any starting state.

Make deterministic

Make the FSA deterministic.

Minimize

Make the FSA as small as possible using the currently choosen minimization algorithm.

Regular expression Generate

Generate a regular expression from the current FSA.

Regular expression Union with

A new FSA is constructed from a regular expression and the current becomes the union between itself and the new.

Regular expression Concatenate with

A new FSA is constructed from a regular expression and the current becomes the concatenation between itself and the new.

Operations Complement

Makes the current FSA the complement of itself, that is make all non-final states final and vice versa. The automaton now accepts all words except those it accepted before.

Operations Kleene Closure

Gives the Kleene-closure of the current FSA.

Operations Reverse

Reverses the current FSA, that is make all starting states final in stead and all final states starting. States that are both starting and final remains unchanged. The automaton now accepts all strings in reverse. That is if the only word the automaton should accept before was abc then the only word it accepts now is cba.

Operations Union

Another FSA is loaded from disk and the current is made the union between itself and the new.

Operations Concatenation

Another FSA is loaded from disk and the current is made the concatenation between itself and the new.

Renumber

Renumber all states in the FSA, starting from 0.

Reposition

Tries to place all states in such a way that you get as little overlap as possible.

Define Alphabet

Define the alphabet of the current FSA. The letters that should be in the alphabet is entered in the window below. The buttons to the right are just shortcuts for defining some usual alphabets.

Generate Type 1

Generate Type 2

Generate Type 3

The last three menu-items are just debugging aid.

Window

Cascade

If you have several FSAs open at the same time this places them slightly overlapping.

Tile

If you have several FSAs open at the same time this places them without overlap.

Arrange Icons

If you have minimized FSA-windows this arranges them neatly at the bottom of the screen.

Minimize all

Minimize all open FSA-windows.

Window names

Last out on this menu is a list of the currently open FSA-windows. Click on one to get to the window.

Options

Time

Set the time between transitions in normal run.

Algorithm Brzozowski

Use Brzozowskis algorithm for minimization. This algorithm does work for nondeterministic FSAs but is slower than Hopcrofts.

Algorithm Hopcroft

Use Hopcrofts algorithm for minimization. Works only for deterministic auomatons.

Algorithm Huffman Moore

Use Huffman and Moores algorithm for minimization. Works only for deterministic automatons.

Browser

Set internet-browser and help-file locations. Currently there is little meaning with trying to set the browser to anything but Netscape. Although PetC will probably launch the chosen browser it will not use it the next time you want to look in the help.

Font

Choose the font to be used for the state-numbers. Default is 8p Ms Sans Serif

StateSize

Set the diameter of the states in pixels. Default is 40.

Highlight Solid

When a state is highlighted all of the state becomes red.

Highlight Border

When a state is highlighted only the border becomes red.

Help

About

A short copyrights notice.

Tutorial

Tries to open the specified tutorial-URL in the chosen browser.

Manual

Tries to open the specified manual-URL (this page) in the chosen browser.

Homepage

Tries to open the specified Homepage-URL of PetC in the chosen browser.