Skip to content

Getting started with the CLI

Andrea Panzino edited this page Jul 23, 2022 · 11 revisions

Installation

Windows

The tool is per-compiled for windows, so python is not needed.

To download go to:
https://github.com/p4nzer96/Automi/releases/latest

Click "FSAToolbox_setup.exe" to download the installer.

Run the setup.

Other platforms / python

On other platforms, the tool can run if python is installed.
On the initial page, click on the green "CODE" button (on the right):

down_alt1

Then, click on "Download ZIP":

Extract the ZIP where you want and start the tool by going in Automi-main and run "cli_main.py".

Getting started

Start the tool by running FsaToolbox in the desktop (or by running the script, if not in windows).

splashscreen

The software comes packaged with some examples. These are saved in the "Examples" folder inside the installation path.

Upon the first run, the example folder should be already selected, we can show the example FSA by typing:

ldir

ldir

The examples should show up. (Note: the examples show in the image can change on different releases of the tool)

Now load the fsa "G0.txt" with the command

load G0.txt

We can see the loaded FSA with the command:

list

list

We can print the FSA with the command:

show G0

show
We can, for example compute the proprieties of the FSA with the commands:

reach G0
coreach G0
blocking G0
trim G0
dead G0
reverse G0

analysis

Build an FSA

The software can load .txt or .json files manually created or generated with the excel-like interface (not packaged in this install).
Another way is to use the wizard inside the software ("build" command).

Guide to create a txt file: [credits to Gianni Litarru https://github.com/JonnyLit] How to create a txt

Using FSA functions

For this example, let's consider two FSA: example2

These are present in the example folder as G0.txt and G1.txt, so we can directly load them: cc_load

Note: if you have G0 already in memory, the software will ask permission to overwrite it. Insert "y" to grant the permission.

Now to compute the concurrent composition between the two FSA use the command:

cc G2 G0 G1

Where:

  • cc is the name of the function;
  • G2 is the name given to the output of the function;
  • G0 is the first input;
  • G1 is the second input.

After that, we can print the result FSA with:

show G2

cc_show

and/or save it to file:

save G2 G2.txt

Where:

  • G2 is the name of the FSA that we want to save;
  • G2.txt is the name of the file. (The software also supports .json files)
    Note: to save the FSA in a different location we can change the default location or put the full path like:
save G2 C:\Users\Username\Desktop\G2.txt

Loaded FSA, events and path management

FSA management

When we load or build a FSA, they will go on a list of "loaded FSA". Of course we can use the functions only on loaded FSA.
To see this list, use the command:

list

To remove a FSA from memory use the command:

remove G0

Or to remove everything:

clear

Path

This path is used to load and save FSA rapidly, without putting the full path of the file.
By default the software selects the Example folder inside the installation path.
The path is printed when the tool is started, but can be printed with the command:

showdir

showdir

The path can be changed with the command:

cd

This command supports full and relatives paths: chdir

We can also see the files that are inside the current path with:

ldir

ldir_2

For other functionalities use the "help" command to list the available ones.

Clone this wiki locally